Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
i2MassChroQ
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
A compter du 1er avril, attention à vos pipelines :
Nouvelles limitations de Docker Hub
Show more breadcrumbs
PAPPSO
i2MassChroQ
Commits
9060c2b5
Commit
9060c2b5
authored
7 years ago
by
Langella Olivier
Browse files
Options
Downloads
Patches
Plain Diff
beautifull mass delta histogram
parent
fb96af01
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/gui/project_view/project_view.ui
+84
-65
84 additions, 65 deletions
src/gui/project_view/project_view.ui
src/gui/project_view/projectwindow.cpp
+21
-8
21 additions, 8 deletions
src/gui/project_view/projectwindow.cpp
src/utils/utils.cpp
+4
-3
4 additions, 3 deletions
src/utils/utils.cpp
with
109 additions
and
76 deletions
src/gui/project_view/project_view.ui
+
84
−
65
View file @
9060c2b5
...
...
@@ -24,7 +24,7 @@
<string/>
</property>
<property
name=
"currentIndex"
>
<number>
0
</number>
<number>
3
</number>
</property>
<widget
class=
"QWidget"
name=
"identifications"
>
<attribute
name=
"title"
>
...
...
@@ -270,73 +270,92 @@
<item
row=
"0"
column=
"0"
>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_5"
>
<item>
<layout
class=
"QFormLayout"
name=
"formLayout_2"
>
<item
row=
"0"
column=
"0"
>
<layout
class=
"QFormLayout"
name=
"formLayout_3"
/>
</item>
<item
row=
"0"
column=
"1"
>
<widget
class=
"QComboBox"
name=
"precision_unit_combobox"
>
<item>
<property
name=
"text"
>
<string>
ppm
</string>
</property>
</item>
<item>
<property
name=
"text"
>
<string>
dalton
</string>
<widget
class=
"QWidget"
name=
"widget"
native=
"true"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Preferred"
vsizetype=
"Fixed"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_7"
>
<item>
<layout
class=
"QFormLayout"
name=
"formLayout_2"
>
<property
name=
"sizeConstraint"
>
<enum>
QLayout::SetMinimumSize
</enum>
</property>
</item>
</widget>
</item>
<item
row=
"1"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label_2"
>
<property
name=
"text"
>
<string>
mean
</string>
</property>
</widget>
</item>
<item
row=
"1"
column=
"1"
>
<widget
class=
"QLabel"
name=
"mass_precision_mean_label"
>
<property
name=
"text"
>
<string>
0
</string>
</property>
</widget>
</item>
<item
row=
"2"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label_4"
>
<property
name=
"text"
>
<string>
median
</string>
</property>
</widget>
</item>
<item
row=
"2"
column=
"1"
>
<widget
class=
"QLabel"
name=
"mass_precision_median_label"
>
<property
name=
"text"
>
<string>
0
</string>
</property>
</widget>
</item>
<item
row=
"3"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label_5"
>
<property
name=
"text"
>
<string>
standard deviation
</string>
</property>
</widget>
</item>
<item
row=
"3"
column=
"1"
>
<widget
class=
"QLabel"
name=
"mass_precision_sd_label"
>
<property
name=
"toolTip"
>
<string>
Mass deviation is computed on all valid and checked proteins but not decoy
</string>
</property>
<property
name=
"text"
>
<string>
0
</string>
</property>
</widget>
</item>
</layout>
<item
row=
"0"
column=
"1"
>
<widget
class=
"QComboBox"
name=
"precision_unit_combobox"
>
<item>
<property
name=
"text"
>
<string>
ppm
</string>
</property>
</item>
<item>
<property
name=
"text"
>
<string>
dalton
</string>
</property>
</item>
</widget>
</item>
<item
row=
"1"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label_2"
>
<property
name=
"text"
>
<string>
mean
</string>
</property>
</widget>
</item>
<item
row=
"1"
column=
"1"
>
<widget
class=
"QLabel"
name=
"mass_precision_mean_label"
>
<property
name=
"text"
>
<string>
0
</string>
</property>
</widget>
</item>
<item
row=
"2"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label_4"
>
<property
name=
"text"
>
<string>
median
</string>
</property>
</widget>
</item>
<item
row=
"2"
column=
"1"
>
<widget
class=
"QLabel"
name=
"mass_precision_median_label"
>
<property
name=
"text"
>
<string>
0
</string>
</property>
</widget>
</item>
<item
row=
"3"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label_5"
>
<property
name=
"text"
>
<string>
standard deviation
</string>
</property>
</widget>
</item>
<item
row=
"3"
column=
"1"
>
<widget
class=
"QLabel"
name=
"mass_precision_sd_label"
>
<property
name=
"toolTip"
>
<string>
Mass deviation is computed on all valid and checked proteins but not decoy
</string>
</property>
<property
name=
"text"
>
<string>
0
</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<widget
class=
"QCustomPlot"
name=
"mass_histogram_widget"
native=
"true"
/>
<widget
class=
"QCustomPlot"
name=
"mass_histogram_widget"
native=
"true"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Preferred"
vsizetype=
"Expanding"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
</widget>
</item>
</layout>
</item>
...
...
This diff is collapsed.
Click to expand it.
src/gui/project_view/projectwindow.cpp
+
21
−
8
View file @
9060c2b5
...
...
@@ -67,6 +67,26 @@ ProjectWindow::ProjectWindow(MainWindow *parent):
_p_waiting_message_dialog
=
new
WaitingMessageDialog
(
this
);
ui
->
mass_histogram_widget
->
xAxis
->
setLabel
(
"mass delta"
);
ui
->
mass_histogram_widget
->
yAxis
->
setLabel
(
"count"
);
ui
->
mass_histogram_widget
->
setInteractions
(
QCP
::
iRangeDrag
|
QCP
::
iRangeZoom
);
ui
->
mass_histogram_widget
->
axisRects
().
at
(
0
)
->
setRangeDrag
(
Qt
::
Horizontal
);
ui
->
mass_histogram_widget
->
axisRects
().
at
(
0
)
->
setRangeZoom
(
Qt
::
Horizontal
);
//legend->setVisible(false);
ui
->
mass_histogram_widget
->
legend
->
setFont
(
QFont
(
"Helvetica"
,
9
));
// set locale to english, so we get english decimal separator:
//setLocale(QLocale(QLocale::English, QLocale::UnitedKingdom));
setFocusPolicy
(
Qt
::
ClickFocus
);
QCPGraph
*
p_graph
=
ui
->
mass_histogram_widget
->
addGraph
();
//p_graph->setName("raw xic");
//QPen pen;
//pen.setColor(getNewColors());
//graph()->setPen(pen);
//graph()->setName(lineNames.at(i-QCPGraph::lsNone));
p_graph
->
setLineStyle
(
QCPGraph
::
LineStyle
::
lsStepCenter
);
//p_graph->setScatterStyle(QCPScatterStyle(QCPScatterStyle::ssDisc, 2.0));
#if QT_VERSION >= 0x050000
// Qt5 code
...
...
@@ -294,14 +314,7 @@ void ProjectWindow::computeMassPrecision() {
y
.
push_back
(
mass_pair
.
second
);
}
QCPGraph
*
p_graph
=
ui
->
mass_histogram_widget
->
addGraph
();
//p_graph->setName("raw xic");
//QPen pen;
//pen.setColor(getNewColors());
//graph()->setPen(pen);
//graph()->setName(lineNames.at(i-QCPGraph::lsNone));
p_graph
->
setLineStyle
(
QCPGraph
::
LineStyle
::
lsStepCenter
);
//p_graph->setScatterStyle(QCPScatterStyle(QCPScatterStyle::ssDisc, 2.0));
QCPGraph
*
p_graph
=
ui
->
mass_histogram_widget
->
graph
();
p_graph
->
setData
(
x
,
y
);
p_graph
->
rescaleAxes
(
true
);
ui
->
mass_histogram_widget
->
rescaleAxes
();
...
...
This diff is collapsed.
Click to expand it.
src/utils/utils.cpp
+
4
−
3
View file @
9060c2b5
...
...
@@ -39,7 +39,7 @@ const QString Utils::getDatabaseName(ExternalDatabase database) {
std
::
vector
<
std
::
pair
<
pappso
::
pappso_double
,
size_t
>>
Utils
::
getHistogram
(
std
::
vector
<
pappso
::
pappso_double
>
data_values
,
unsigned
int
number_of_class
)
{
std
::
vector
<
std
::
pair
<
pappso
::
pappso_double
,
size_t
>>
histogram
(
number_of_class
);
std
::
vector
<
std
::
pair
<
pappso
::
pappso_double
,
size_t
>>
histogram
(
number_of_class
+
1
);
try
{
qDebug
()
<<
"Utils::getHistogram begin"
;
...
...
@@ -51,11 +51,12 @@ std::vector<std::pair<pappso::pappso_double, size_t>> Utils::getHistogram(std::v
qDebug
()
<<
"Utils::getHistogram number_of_class offset="
<<
offset
;
for
(
unsigned
int
i
=
0
;
i
<
histogram
.
size
();
i
++
)
{
histogram
[
i
]
=
std
::
pair
<
pappso
::
pappso_double
,
size_t
>
{(
min
+
(
offset
*
i
)
+
(
offset
/
2
)),
0
};
qDebug
()
<<
"Utils::getHistogram x="
<<
histogram
[
i
].
first
;
}
qDebug
()
<<
"Utils::getHistogram data_values"
;
for
(
pappso
::
pappso_double
value
:
data_values
)
{
qDebug
()
<<
"Utils::getHistogram value="
<<
value
;
unsigned
int
i
=
std
::
abs
((
min
+
(
min
-
value
)
)
/
offset
);
//
qDebug() << "Utils::getHistogram value=" << value;
unsigned
int
i
=
std
::
abs
((
value
-
min
)
/
offset
);
qDebug
()
<<
"Utils::getHistogram i="
<<
i
<<
" size="
<<
histogram
.
size
();
histogram
.
at
(
i
).
second
++
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment