MCPcopy Create free account
hub / github.com/OpenMS/OpenMS / sortPeptideIdentifications

Method sortPeptideIdentifications

src/openms/source/KERNEL/BaseFeature.cpp:123–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

121 }
122
123 void BaseFeature::sortPeptideIdentifications()
124 {
125 std::sort(peptides_.rbegin(),peptides_.rend(),
126 [](PeptideIdentification& p1, PeptideIdentification& p2)
127 {p1.sort();p2.sort();
128 if (p1.empty())
129 {
130 return true;
131 }
132 if (p2.empty())
133 {
134 return false;
135 }
136 if (p1.isHigherScoreBetter())
137 {
138 return p1.getHits()[0].getScore() < p2.getHits()[0].getScore();
139 }
140 else
141 {
142 return p1.getHits()[0].getScore() > p2.getHits()[0].getScore();
143 }});
144 }
145
146 BaseFeature::AnnotationState BaseFeature::getAnnotationState() const
147 {

Callers 2

run_Method · 0.80

Calls 7

sortFunction · 0.85
rbeginMethod · 0.45
rendMethod · 0.45
sortMethod · 0.45
emptyMethod · 0.45
isHigherScoreBetterMethod · 0.45
getScoreMethod · 0.45

Tested by

no test coverage detected