|
OpenMS
2.6.0
|
Go to the documentation of this file.
66 static void resolve(
FeatureMap & features,
bool keep_matching =
false);
74 static void resolve(
ConsensusMap & features,
bool keep_matching =
false);
81 static void resolveBetweenFeatures(
FeatureMap & features);
88 static void resolveBetweenFeatures(
ConsensusMap & features);
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(),
125 static void resolveConflict_(
126 std::vector<PeptideIdentification> & peptides,
127 std::vector<PeptideIdentification> & removed,
130 static void resolveConflictKeepMatching_(
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);
Base class for TOPP applications.
Definition: TOPPBase.h:144
OPENMS_UINT64_TYPE UInt64
Unsigned integer type (64bit)
Definition: Types.h:77
void store(const String &filename, const ConsensusMap &consensus_map)
Stores a consensus map to file.
A method or algorithm argument contains illegal values.
Definition: Exception.h:648
const AASequence & getSequence() const
returns the peptide sequence without trailing or following spaces
A more convenient string class.
Definition: String.h:59
static void resolve(FeatureMap &features, bool keep_matching=false)
Resolves ambiguous annotations of features with peptide identifications. The the filtered identificat...
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
OpenMS feature file (.featureXML)
Definition: FileTypes.h:65
static void resolveBetweenFeatures(FeatureMap &features)
In a single (feature/consensus) map, features with the same (possibly modified) sequence and charge s...
void load(const String &filename, FeatureMap &feature_map)
loads the file with name filename into map and calls updateRanges().
Type
Actual file types enum.
Definition: FileTypes.h:58
Resolves ambiguous annotations of features with peptide identifications.
Definition: IDConflictResolverAlgorithm.h:57
static void resolveBetweenFeatures_(T &map)
Definition: IDConflictResolverAlgorithm.h:136
static FileTypes::Type getType(const String &filename)
Tries to determine the file type (by name or content)
A container for consensus elements.
Definition: ConsensusMap.h:80
void store(const String &filename, const FeatureMap &feature_map)
stores the map feature_map in file with name filename.
void load(const String &filename, ConsensusMap &map)
Loads a consensus map from file and calls updateRanges.
int main(int argc, const char **argv)
Definition: INIFileEditor.cpp:73
A container for features.
Definition: FeatureMap.h:97
Represents the peptide hits for a spectrum.
Definition: PeptideIdentification.h:62
This class provides Input/Output functionality for feature maps.
Definition: FeatureXMLFile.h:68
static void resolveConflict_(T &map, bool keep_matching)
Definition: IDConflictResolverAlgorithm.h:93
Data filtering or extraction.
Definition: DataProcessing.h:71
This class provides Input functionality for ConsensusMaps and Output functionality for alignments and...
Definition: ConsensusXMLFile.h:62
Representation of a peptide hit.
Definition: PeptideHit.h:55