| 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 | { |