114 Size multiply_identified_spectra = 0;
117 Size without_spectrum_reference = 0;
120 Size inconsistent_score_direction = 0;
154 p.setMetaValue(
"feature_id",
"not mapped");
159 c.setMetaValue(
"feature_id",StringUtils::toStr(c.getUniqueId()));
162 resolveConflict_(c.getPeptideIdentifications(),
163 map.getUnassignedPeptideIdentifications(),
168 resolveConflictKeepMatching_(c.getPeptideIdentifications(),
169 map.getUnassignedPeptideIdentifications(),
202 p.setMetaValue(
"feature_id",
"not mapped");
207 c.setMetaValue(
"feature_id",StringUtils::toStr(c.getUniqueId()));
208 resolveAggregateConflict_(c.getPeptideIdentifications(),
209 map.getUnassignedPeptideIdentifications(),
222 typedef std::map<std::pair<Int, AASequence>,
typename T::value_type*> FeatureSet;
223 FeatureSet feature_set;
227 for (
typename T::value_type& element : map)
231 if (!pep_ids.
empty())
233 if (pep_ids.
size() != 1)
242 const std::vector<PeptideHit>& hits = pep_ids.
front().
getHits();
246 const PeptideHit& highest_score_hit = hits.front();
249 std::pair<Int, AASequence> pair = std::make_pair(element.getCharge(), highest_score_hit.
getSequence());
254 typename FeatureSet::iterator feature_in_set = feature_set.find(pair);
255 if (feature_in_set != feature_set.end())
259 if (feature_in_set->second->getIntensity() < element.getIntensity())
265 feature_in_set->second->setPeptideIdentifications(pep_ids_empty);
268 feature_in_set->second = &(element);
276 element.setPeptideIdentifications(pep_ids_empty);
282 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:122
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:149
static void rankAggregation_(T &map)
Definition IDConflictResolverAlgorithm.h:197
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:215
What reduceToOnePerSpectrum() found and did. All counts are over the input list.
Definition IDConflictResolverAlgorithm.h:107
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