Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
xtpcpp
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
Container Registry
Model registry
Operate
Environments
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
Show more breadcrumbs
PAPPSO
xtpcpp
Commits
b47fba63
Commit
b47fba63
authored
6 years ago
by
Langella Olivier
Browse files
Options
Downloads
Patches
Plain Diff
countSpecificSampleScan is able to count distinct labels
parent
8ea82da7
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/grouping/groupinggroup.cpp
+26
-6
26 additions, 6 deletions
src/grouping/groupinggroup.cpp
src/grouping/groupinggroup.h
+3
-1
3 additions, 1 deletion
src/grouping/groupinggroup.h
src/output/ods/comparspecificspectrasheet.cpp
+1
-1
1 addition, 1 deletion
src/output/ods/comparspecificspectrasheet.cpp
with
30 additions
and
8 deletions
src/grouping/groupinggroup.cpp
+
26
−
6
View file @
b47fba63
...
...
@@ -121,7 +121,8 @@ GroupingGroup::countSubgroupPresence(
std
::
size_t
GroupingGroup
::
countSpecificSampleScan
(
const
ProteinMatch
*
p_protein_match
,
ValidationState
state
,
const
MsRun
*
p_msrun_id
)
const
const
MsRun
*
p_msrun_id
,
const
Label
*
p_label
)
const
{
if
(
_number_of_subgroup
==
1
)
{
...
...
@@ -139,11 +140,29 @@ GroupingGroup::countSpecificSampleScan(const ProteinMatch *p_protein_match,
}
else
{
if
(
p_peptide_match
.
getPeptideEvidence
()
->
getMsRunP
()
==
p_msrun_id
)
if
(
p_label
!=
nullptr
)
{
if
((
p_peptide_match
.
getPeptideEvidence
()
->
getMsRunP
()
==
p_msrun_id
)
&&
(
p_peptide_match
.
getPeptideEvidence
()
->
getPeptideXtpSp
()
.
get
()
->
getLabel
()
==
p_label
))
{
spectrum_list_in
.
insert
(
p_peptide_match
.
getPeptideEvidence
()
->
getHashSampleScan
());
}
}
else
{
spectrum_list_in
.
insert
(
p_peptide_match
.
getPeptideEvidence
()
->
getHashSampleScan
());
if
(
p_peptide_match
.
getPeptideEvidence
()
->
getMsRunP
()
==
p_msrun_id
)
{
spectrum_list_in
.
insert
(
p_peptide_match
.
getPeptideEvidence
()
->
getHashSampleScan
());
}
}
}
}
...
...
@@ -235,7 +254,8 @@ unsigned int
GroupingGroup
::
countProteinInSubgroup
(
unsigned
int
subgroup_number
)
const
{
return
std
::
count_if
(
_protein_match_list
.
begin
(),
_protein_match_list
.
end
(),
_protein_match_list
.
begin
(),
_protein_match_list
.
end
(),
[
subgroup_number
](
const
ProteinMatch
*
p_protein_match
)
{
if
(
p_protein_match
->
getGrpProteinSp
().
get
()
->
getSubGroupNumber
()
==
subgroup_number
)
...
...
This diff is collapsed.
Click to expand it.
src/grouping/groupinggroup.h
+
3
−
1
View file @
b47fba63
...
...
@@ -30,6 +30,7 @@
#include
<QStringList>
#include
"../utils/types.h"
#include
"../core/msrun.h"
#include
"../core/labeling/label.h"
class
ProteinMatch
;
class
PeptideEvidence
;
...
...
@@ -48,7 +49,8 @@ class GroupingGroup
void
add
(
const
ProteinMatch
*
p_protein_match
);
std
::
size_t
countSpecificSampleScan
(
const
ProteinMatch
*
p_protein_match
,
ValidationState
state
,
const
MsRun
*
p_msrun_id
=
nullptr
)
const
;
const
MsRun
*
p_msrun_id
=
nullptr
,
const
Label
*
p_label
=
nullptr
)
const
;
std
::
size_t
countSpecificSequenceLi
(
const
ProteinMatch
*
p_protein_match
,
ValidationState
state
,
const
MsRun
*
p_msrun_id
=
nullptr
)
const
;
...
...
This diff is collapsed.
Click to expand it.
src/output/ods/comparspecificspectrasheet.cpp
+
1
−
1
View file @
b47fba63
...
...
@@ -52,7 +52,7 @@ ComparSpecificSpectraSheet::writeComparValue(
_p_writer
->
writeCell
(
(
unsigned
int
)
p_protein_match
->
getGroupingGroupSp
()
.
get
()
->
countSpecificSampleScan
(
p_protein_match
,
state
,
p_msrun
));
->
countSpecificSampleScan
(
p_protein_match
,
state
,
p_msrun
,
p_label
));
qDebug
()
<<
"ComparSpecificSpectraSheet::writeComparValue end"
;
}
...
...
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