113 p.setMetaValue(
"feature_id",
"not mapped");
118 c.setMetaValue(
"feature_id",
String(c.getUniqueId()));
121 resolveConflict_(c.getPeptideIdentifications(),
122 map.getUnassignedPeptideIdentifications(),
127 resolveConflictKeepMatching_(c.getPeptideIdentifications(),
128 map.getUnassignedPeptideIdentifications(),
161 p.setMetaValue(
"feature_id",
"not mapped");
166 c.setMetaValue(
"feature_id",
String(c.getUniqueId()));
167 resolveAggregateConflict_(c.getPeptideIdentifications(),
168 map.getUnassignedPeptideIdentifications(),
181 typedef std::map<std::pair<Int, AASequence>,
typename T::value_type*> FeatureSet;
182 FeatureSet feature_set;
186 for (
typename T::value_type& element : map)
190 if (!pep_ids.
empty())
192 if (pep_ids.
size() != 1)
201 const std::vector<PeptideHit>& hits = pep_ids.
front().
getHits();
205 const PeptideHit& highest_score_hit = hits.front();
208 std::pair<Int, AASequence> pair = std::make_pair(element.getCharge(), highest_score_hit.
getSequence());
213 typename FeatureSet::iterator feature_in_set = feature_set.find(pair);
214 if (feature_in_set != feature_set.end())
218 if (feature_in_set->second->getIntensity() < element.getIntensity())
224 feature_in_set->second->setPeptideIdentifications(pep_ids_empty);
227 feature_in_set->second = &(element);
235 element.setPeptideIdentifications(pep_ids_empty);
241 feature_set[pair] = &(element);
A container for consensus elements.
Definition ConsensusMap.h:67
A method or algorithm argument contains illegal values.
Definition Exception.h:630
iterator insert(const_iterator where, T from, T to)
Definition ExposedVector.h:194
size_t size() const noexcept
Definition ExposedVector.h:128
bool empty() const noexcept
Definition ExposedVector.h:140
iterator begin() noexcept
Definition ExposedVector.h:104
VectorElement & front() noexcept
Get first element.
Definition ExposedVector.h:267
iterator end() noexcept
Definition ExposedVector.h:108
A container for features.
Definition FeatureMap.h:78
Resolves ambiguous annotations of features with peptide identifications.
Definition IDConflictResolverAlgorithm.h:33
static void resolveAllHitRankAggregation(ConsensusMap &features)
Resolves ambiguous annotations of consensus features with peptide identifications using rank aggregat...
static void resolveConflict_(PeptideIdentificationList &peptides, PeptideIdentificationList &removed, UInt64 uid)
static void resolve(FeatureMap &features, bool keep_matching=false)
Resolves ambiguous annotations of features with peptide identifications. The the filtered identificat...
static void resolveBetweenFeatures(FeatureMap &features)
In a single (feature/consensus) map, features with the same (possibly modified) sequence and charge s...
static void resolveAllHitRankAggregation(FeatureMap &features)
Resolves ambiguous annotations of features with peptide identifications using rank aggregation.
static void resolveConflictKeepMatching_(PeptideIdentificationList &peptides, PeptideIdentificationList &removed, UInt64 uid)
static void resolveBetweenFeatures(ConsensusMap &features)
In a single (feature/consensus) map, features with the same (possibly modified) sequence and charge s...
static bool compareIDsSmallerScores_(const PeptideIdentification &left, const PeptideIdentification &right)
static void resolveAggregateConflict_(PeptideIdentificationList &peptides, PeptideIdentificationList &removed, UInt64 uid)
static void resolveConflict_(T &map, bool keep_matching)
Definition IDConflictResolverAlgorithm.h:108
static void rankAggregation_(T &map)
Definition IDConflictResolverAlgorithm.h:156
static void resolve(ConsensusMap &features, bool keep_matching=false)
Resolves ambiguous annotations of consensus features with peptide identifications....
static void resolveBetweenFeatures_(T &map)
Definition IDConflictResolverAlgorithm.h:174
Represents a single spectrum match (candidate) for a specific tandem mass spectrum (MS/MS).
Definition PeptideHit.h:52
const AASequence & getSequence() const
returns the peptide sequence
Container for peptide identifications from multiple spectra.
Definition PeptideIdentificationList.h:66
Represents the set of candidates (SpectrumMatches) identified for a single precursor spectrum.
Definition PeptideIdentification.h:66
void sort()
Sorts the hits by score.
const std::vector< PeptideHit > & getHits() const
returns the peptide hits as const
A more convenient string class.
Definition String.h:32
uint64_t UInt64
Unsigned integer type (64bit)
Definition Types.h:47
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19