77 p.setMetaValue(
"feature_id",
"not mapped");
82 c.setMetaValue(
"feature_id",
String(c.getUniqueId()));
85 resolveConflict_(c.getPeptideIdentifications(),
86 map.getUnassignedPeptideIdentifications(),
91 resolveConflictKeepMatching_(c.getPeptideIdentifications(),
92 map.getUnassignedPeptideIdentifications(),
122 typedef std::map<std::pair<Int, AASequence>,
typename T::value_type*> FeatureSet;
123 FeatureSet feature_set;
127 for (
typename T::value_type& element : map)
131 if (!pep_ids.
empty())
133 if (pep_ids.
size() != 1)
142 const std::vector<PeptideHit>& hits = pep_ids.
front().
getHits();
146 const PeptideHit& highest_score_hit = hits.front();
149 std::pair<Int, AASequence> pair = std::make_pair(element.getCharge(), highest_score_hit.
getSequence());
154 typename FeatureSet::iterator feature_in_set = feature_set.find(pair);
155 if (feature_in_set != feature_set.end())
159 if (feature_in_set->second->getIntensity() < element.getIntensity())
165 feature_in_set->second->setPeptideIdentifications(pep_ids_empty);
168 feature_in_set->second = &(element);
176 element.setPeptideIdentifications(pep_ids_empty);
182 feature_set[pair] = &(element);
A container for consensus elements.
Definition ConsensusMap.h:68
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:82
Resolves ambiguous annotations of features with peptide identifications.
Definition IDConflictResolverAlgorithm.h:33
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 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 resolveConflict_(T &map, bool keep_matching)
Definition IDConflictResolverAlgorithm.h:72
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:115
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:64
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:34
uint64_t UInt64
Unsigned integer type (64bit)
Definition Types.h:47
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19