70 enum Measure {MEASURE_PPM = 0, MEASURE_DA};
96 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);
113 void annotate(
PeakMap& map,
FeatureMap fmap,
const bool clear_ids =
false,
const bool map_ms1 =
false);
133 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());
151 void annotate(
ConsensusMap& map,
const std::vector<PeptideIdentification>& ids,
152 const std::vector<ProteinIdentification>& protein_ids,
153 bool measure_from_subelements =
false,
154 bool annotate_ids_with_subelements =
false,
184 const std::vector<PeptideIdentification>& ids,
185 double mz_tol = 0.001,
186 double rt_tol = 0.001)
189 for (
Size spectrum_index = 0; spectrum_index < spectra.
size(); ++spectrum_index)
191 const MSSpectrum& spectrum = spectra[spectrum_index];
194 bool identified(
false);
195 const std::vector<Precursor>& precursors = spectrum.
getPrecursors();
198 for (
Size i_p = 0; i_p < precursors.size(); ++i_p)
201 double mz_p = precursors[i_p].getMZ();
202 double rt_s = spectrum.
getRT();
204 for (
Size i_id = 0; i_id != ids.size(); ++i_id)
209 if (pid.
getHits().empty())
continue;
211 double mz_id = pid.
getMZ();
212 double rt_id = pid.
getRT();
214 if ( fabs(mz_id - mz_p) < mz_tol && fabs(rt_s - rt_id) < rt_tol )
240 void updateMembers_()
override;
254 double getAbsoluteMZTolerance_(
const double mz)
const;
257 bool isMatch_(
const double rt_distance,
const double mz_theoretical,
const double mz_observed)
const;
260 void checkHits_(
const std::vector<PeptideIdentification>& ids)
const;
272 bool checkMassType_(
const std::vector<DataProcessing>& processing)
const;
std::vector< Size > identified
Definition: IDMapper.h:164
Measure
Definition: IDMapper.h:70
std::vector< Int > IntList
Vector of signed integers.
Definition: ListUtils.h:55
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:91
Result of a partitioning by identification state with mapPrecursorsToIdentifications().
Definition: IDMapper.h:161
double mz_tolerance_
Allowed m/z deviation.
Definition: IDMapper.h:245
In-Memory representation of a mass spectrometry experiment.
Definition: MSExperiment.h:77
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:183
MSExperiment PeakMap
Two-dimensional map of raw data points or peaks.
Definition: StandardTypes.h:61
Measure measure_
Measure used for m/z.
Definition: IDMapper.h:247
A container for features.
Definition: FeatureMap.h:95
std::vector< Size > no_precursors
Definition: IDMapper.h:163
const std::vector< Precursor > & getPrecursors() const
returns a const reference to the precursors
The representation of a 1D spectrum.
Definition: MSSpectrum.h:67
std::vector< double > DoubleList
Vector of double precision real types.
Definition: ListUtils.h:62
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
Annotates an MSExperiment, FeatureMap or ConsensusMap with peptide identifications.
Definition: IDMapper.h:66
Size size() const
Definition: MSExperiment.h:127
const std::vector< PeptideHit > & getHits() const
returns the peptide hits as const
Represents the peptide hits for a spectrum.
Definition: PeptideIdentification.h:62
A container for consensus elements.
Definition: ConsensusMap.h:79
double rt_tolerance_
Allowed RT deviation.
Definition: IDMapper.h:243
double getMZ() const
returns the MZ of the MS2 spectrum
bool ignore_charge_
Ignore charge states during matching?
Definition: IDMapper.h:249
std::vector< Size > unidentified
Definition: IDMapper.h:165
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:127
double getRT() const
returns the RT of the MS2 spectrum where the identification occurred