122 Size multiply_identified_spectra = 0;
125 Size without_spectrum_reference = 0;
128 Size inconsistent_score_direction = 0;
162 p.setMetaValue(
"feature_id",
"not mapped");
167 c.setMetaValue(
"feature_id",StringUtils::toStr(c.getUniqueId()));
170 resolveConflict_(c.getPeptideIdentifications(),
171 map.getUnassignedPeptideIdentifications(),
176 resolveConflictKeepMatching_(c.getPeptideIdentifications(),
177 map.getUnassignedPeptideIdentifications(),
210 p.setMetaValue(
"feature_id",
"not mapped");
215 c.setMetaValue(
"feature_id",StringUtils::toStr(c.getUniqueId()));
216 resolveAggregateConflict_(c.getPeptideIdentifications(),
217 map.getUnassignedPeptideIdentifications(),
230 typedef std::map<std::pair<Int, AASequence>,
typename T::value_type*> FeatureSet;
231 FeatureSet feature_set;
235 for (
typename T::value_type& element : map)
239 if (!pep_ids.
empty())
241 if (pep_ids.
size() != 1)
250 const std::vector<PeptideHit>& hits = pep_ids.
front().
getHits();
254 const PeptideHit& highest_score_hit = hits.front();
257 std::pair<Int, AASequence> pair = std::make_pair(element.getCharge(), highest_score_hit.
getSequence());
262 typename FeatureSet::iterator feature_in_set = feature_set.find(pair);
263 if (feature_in_set != feature_set.end())
267 if (feature_in_set->second->getIntensity() < element.getIntensity())
273 feature_in_set->second->setPeptideIdentifications(pep_ids_empty);
276 feature_in_set->second = &(element);
284 element.setPeptideIdentifications(pep_ids_empty);
290 feature_set[pair] = &(element);
A container for consensus elements.
Definition ConsensusMap.h:67
A method or algorithm argument contains illegal values.
Definition Exception.h:633
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 UnresolvedIdentifications reduceToOnePerSpectrum(PeptideIdentificationList &ids)
Reduce identifications a quantification workflow cannot tell apart to one per spectrum.
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)
std::string example
First reduced group, as "<spectrum reference> / <sequence> / charge <n>", for logging.
Definition IDConflictResolverAlgorithm.h:130
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:157
static void rankAggregation_(T &map)
Definition IDConflictResolverAlgorithm.h:205
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:223
What reduceToOnePerSpectrum() found and did. All counts are over the input list.
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:66
void sort()
Sorts the hits by score.
const std::vector< PeptideHit > & getHits() const
returns the peptide hits as const
uint64_t UInt64
Unsigned integer type (64bit)
Definition Types.h:47
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition Types.h:97
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19