98 p.setMetaValue(
"feature_id",
"not mapped");
103 c.setMetaValue(
"feature_id",
String(
c.getUniqueId()));
106 resolveConflict_(
c.getPeptideIdentifications(),
107 map.getUnassignedPeptideIdentifications(),
112 resolveConflictKeepMatching_(
c.getPeptideIdentifications(),
113 map.getUnassignedPeptideIdentifications(),
126 std::vector<PeptideIdentification> & peptides,
127 std::vector<PeptideIdentification> & removed,
131 std::vector<PeptideIdentification> & peptides,
132 std::vector<PeptideIdentification> & removed,
139 std::vector<PeptideIdentification>& unassigned = map.getUnassignedPeptideIdentifications();
143 typedef std::map<std::pair<Int, AASequence>,
typename T::value_type*> FeatureSet;
144 FeatureSet feature_set;
148 for (
typename T::value_type& element : map)
150 std::vector<PeptideIdentification>& pep_ids = element.getPeptideIdentifications();
152 if (!pep_ids.empty())
154 if (pep_ids.size() != 1)
162 pep_ids.front().sort();
163 const std::vector<PeptideHit>& hits = pep_ids.front().getHits();
167 const PeptideHit& highest_score_hit = hits.front();
170 std::pair<Int, AASequence> pair = std::make_pair(element.getCharge(), highest_score_hit.
getSequence());
175 typename FeatureSet::iterator feature_in_set = feature_set.find(pair);
176 if (feature_in_set != feature_set.end())
180 if (feature_in_set->second->getIntensity() < element.getIntensity())
183 std::vector<PeptideIdentification>& obsolete = feature_in_set->second->getPeptideIdentifications();
184 unassigned.insert(unassigned.end(), obsolete.begin(), obsolete.end());
185 std::vector<PeptideIdentification> pep_ids_empty;
186 feature_in_set->second->setPeptideIdentifications(pep_ids_empty);
189 feature_in_set->second = &(element);
194 std::vector<PeptideIdentification>& obsolete = element.getPeptideIdentifications();
195 unassigned.insert(unassigned.end(), obsolete.begin(), obsolete.end());
196 std::vector<PeptideIdentification> pep_ids_empty;
197 element.setPeptideIdentifications(pep_ids_empty);
203 feature_set[pair] = &(element);
A container for consensus elements.
Definition: ConsensusMap.h:88
A method or algorithm argument contains illegal values.
Definition: Exception.h:656
A container for features.
Definition: FeatureMap.h:105
Resolves ambiguous annotations of features with peptide identifications.
Definition: IDConflictResolverAlgorithm.h:58
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 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:93
static void resolveConflict_(std::vector< PeptideIdentification > &peptides, std::vector< PeptideIdentification > &removed, UInt64 uid)
static void resolve(ConsensusMap &features, bool keep_matching=false)
Resolves ambiguous annotations of consensus features with peptide identifications....
static void resolveConflictKeepMatching_(std::vector< PeptideIdentification > &peptides, std::vector< PeptideIdentification > &removed, UInt64 uid)
static void resolveBetweenFeatures_(T &map)
Definition: IDConflictResolverAlgorithm.h:136
Representation of a peptide hit.
Definition: PeptideHit.h:57
const AASequence & getSequence() const
returns the peptide sequence without trailing or following spaces
Represents the peptide hits for a spectrum.
Definition: PeptideIdentification.h:65
A more convenient string class.
Definition: String.h:61
OPENMS_UINT64_TYPE UInt64
Unsigned integer type (64bit)
Definition: Types.h:77
const double c
Definition: Constants.h:209
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47