 |
OpenMS
3.0.0
|
|
Go to the documentation of this file.
68 enum Measure {MEASURE_PPM = 0, MEASURE_DA};
94 void annotate(
PeakMap& map,
const std::vector<PeptideIdentification>& peptide_ids,
const std::vector<ProteinIdentification>& protein_ids,
const bool clear_ids =
false,
const bool map_ms1 =
false);
111 void annotate(
PeakMap& map,
FeatureMap fmap,
const bool clear_ids =
false,
const bool map_ms1 =
false);
131 void annotate(
FeatureMap& map,
const std::vector<PeptideIdentification>& ids,
const std::vector<ProteinIdentification>& protein_ids,
bool use_centroid_rt =
false,
bool use_centroid_mz =
false,
const PeakMap& spectra =
PeakMap());
149 void annotate(
ConsensusMap& map,
const std::vector<PeptideIdentification>& ids,
150 const std::vector<ProteinIdentification>& protein_ids,
151 bool measure_from_subelements =
false,
152 bool annotate_ids_with_subelements =
false,
182 const std::vector<PeptideIdentification>& ids,
183 double mz_tol = 0.001,
184 double rt_tol = 0.001)
187 for (
Size spectrum_index = 0; spectrum_index < spectra.
size(); ++spectrum_index)
189 const MSSpectrum& spectrum = spectra[spectrum_index];
192 bool identified(
false);
193 const std::vector<Precursor>& precursors = spectrum.
getPrecursors();
196 for (
Size i_p = 0; i_p < precursors.size(); ++i_p)
199 double mz_p = precursors[i_p].getMZ();
200 double rt_s = spectrum.
getRT();
202 for (
Size i_id = 0; i_id != ids.size(); ++i_id)
207 if (pid.
getHits().empty())
continue;
209 double mz_id = pid.
getMZ();
210 double rt_id = pid.
getRT();
212 if ( fabs(mz_id - mz_p) < mz_tol && fabs(rt_s - rt_id) < rt_tol )
238 void updateMembers_()
override;
252 double getAbsoluteMZTolerance_(
const double mz)
const;
255 bool isMatch_(
const double rt_distance,
const double mz_theoretical,
const double mz_observed)
const;
258 void checkHits_(
const std::vector<PeptideIdentification>& ids)
const;
270 bool checkMassType_(
const std::vector<DataProcessing>& processing)
const;
std::vector< std::string > valid_strings
Default: empty.
Definition: Param.h:111
OpenMS identification format (.idXML)
Definition: FileTypes.h:64
bool ignore_charge_
Ignore charge states during matching?
Definition: IDMapper.h:247
Base class for TOPP applications.
Definition: TOPPBase.h:147
double rt_tolerance_
Allowed RT deviation.
Definition: IDMapper.h:241
void store(const String &filename, const ConsensusMap &consensus_map)
Stores a consensus map to file.
void setValue(const std::string &key, const ParamValue &value, const std::string &description="", const std::vector< std::string > &tags=std::vector< std::string >())
Sets a value.
A method or algorithm argument contains illegal values.
Definition: Exception.h:648
const ParamEntry & getEntry(const std::string &key) const
Returns the whole parameter entry.
Result of a partitioning by identification state with mapPrecursorsToIdentifications().
Definition: IDMapper.h:159
double mz_tolerance_
Allowed m/z deviation.
Definition: IDMapper.h:243
File adapter for MzML files.
Definition: MzMLFile.h:57
A more convenient string class.
Definition: String.h:58
std::vector< double > DoubleList
Vector of double precision real types.
Definition: ListUtils.h:62
In-Memory representation of a mass spectrometry run.
Definition: MSExperiment.h:70
const std::vector< Precursor > & getPrecursors() const
returns a const reference to the precursors
OpenMS consensus map format (.consensusXML)
Definition: FileTypes.h:65
static SpectraIdentificationState mapPrecursorsToIdentifications(const PeakMap &spectra, const std::vector< PeptideIdentification > &ids, double mz_tol=0.001, double rt_tol=0.001)
Mapping of peptide identifications to spectra This helper function partitions all spectra into those ...
Definition: IDMapper.h:181
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:127
mzQuantML (HUPO PSI AnalysisXML followup format) (.mzq)
Definition: FileTypes.h:76
mzIdentML (HUPO PSI AnalysisXML followup format) (.mzid)
Definition: FileTypes.h:75
std::vector< Int > IntList
Vector of signed integers.
Definition: ListUtils.h:55
Measure measure_
Measure used for m/z.
Definition: IDMapper.h:245
Size size() const
Definition: MSExperiment.h:120
void annotate(PeakMap &map, const std::vector< PeptideIdentification > &peptide_ids, const std::vector< ProteinIdentification > &protein_ids, const bool clear_ids=false, const bool map_ms1=false)
Mapping method for peak maps.
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:92
std::vector< Size > unidentified
Definition: IDMapper.h:163
const std::vector< PeptideHit > & getHits() const
returns the peptide hits as const
File adapter for MzQuantML files.
Definition: MzQuantMLFile.h:51
const std::vector< ConsensusMap > & getConsensusMaps() const
void load(const String &filename, std::vector< ProteinIdentification > &protein_ids, std::vector< PeptideIdentification > &peptide_ids)
Loads the identifications of an idXML file without identifier.
File adapter for MzIdentML files.
Definition: MzIdentMLFile.h:67
void sortPeptideIdentificationsByMapIndex()
Sorts PeptideIdentifications of consensus features with respect to their map index.
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
OpenMS feature file (.featureXML)
Definition: FileTypes.h:63
void load(const String &filename, PeakMap &map)
Loads a map from a MzML file. Spectra and chromatograms are sorted by default (this can be disabled u...
void load(const String &filename, FeatureMap &feature_map)
loads the file with name filename into map and calls updateRanges().
std::vector< Size > no_precursors
Definition: IDMapper.h:161
Type
Actual file types enum.
Definition: FileTypes.h:56
static FileTypes::Type getType(const String &filename)
Tries to determine the file type (by name or content)
void setParameters(const Param ¶m)
Sets the parameters.
const Param & getParameters() const
Non-mutable access to the parameters.
MSExperiment PeakMap
Two-dimensional map of raw data points or peaks.
Definition: StandardTypes.h:61
A container for consensus elements.
Definition: ConsensusMap.h:82
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.
void load(const String &filename, std::vector< ProteinIdentification > &poid, std::vector< PeptideIdentification > &peid)
Loads the identifications from a MzIdentML file.
int main(int argc, const char **argv)
Definition: INIFileEditor.cpp:71
void store(const String &filename, const MSQuantifications &cmsq) const
Stores a map in a MzQuantML file.
A container for features.
Definition: FeatureMap.h:98
Represents the peptide hits for a spectrum.
Definition: PeptideIdentification.h:63
double getMZ() const
returns the MZ of the MS2 spectrum
Measure
Definition: IDMapper.h:68
This class provides Input/Output functionality for feature maps.
Definition: FeatureXMLFile.h:62
Management and storage of parameters / INI files.
Definition: Param.h:69
std::vector< Size > identified
Definition: IDMapper.h:162
Definition: MSQuantifications.h:52
Identification mapping
Definition: DataProcessing.h:74
Annotates an MSExperiment, FeatureMap or ConsensusMap with peptide identifications.
Definition: IDMapper.h:64
The representation of a 1D spectrum.
Definition: MSSpectrum.h:66
const ParamValue & getValue(const std::string &key) const
Returns a value of a parameter.
void load(const String &filename, MSQuantifications &msq)
Loads a map from a MzQuantML file.
This class provides Input functionality for ConsensusMaps and Output functionality for alignments and...
Definition: ConsensusXMLFile.h:58
Used to load and store idXML files.
Definition: IdXMLFile.h:68
double getRT() const
returns the RT of the MS2 spectrum where the identification occurred