Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Public Member Functions | Protected Member Functions | Protected Attributes

InternalCalibration Class Reference
[SignalProcessing]

A simple calibration method using linear interpolation of given reference masses. More...

#include <OpenMS/FILTERING/CALIBRATION/InternalCalibration.h>

Inheritance diagram for InternalCalibration:
DefaultParamHandler ProgressLogger

List of all members.

Public Member Functions

 InternalCalibration ()
 Default constructor.
 ~InternalCalibration ()
 Destructor.
template<typename InputPeakType >
void calibrateMapSpectrumwise (const MSExperiment< InputPeakType > &exp, MSExperiment< InputPeakType > &calibrated_exp, std::vector< DoubleReal > &ref_masses)
 Calibrate a peak map using given reference masses with a separate calibration function for each spectrum.
template<typename InputPeakType >
void calibrateMapGlobally (const MSExperiment< InputPeakType > &exp, MSExperiment< InputPeakType > &calibrated_exp, std::vector< DoubleReal > &ref_masses, String trafo_file_name="")
 Calibrate a peak map using given reference masses with one calibration function for the whole map.
template<typename InputPeakType >
void calibrateMapGlobally (const MSExperiment< InputPeakType > &exp, MSExperiment< InputPeakType > &calibrated_exp, std::vector< PeptideIdentification > &ref_ids, String trafo_file_name="")
 Calibrate a peak map using given reference ids with one calibration function for the whole map.
void calibrateMapGlobally (const FeatureMap<> &feature_map, FeatureMap<> &calibrated_feature_map, String trafo_file_name="")
 Calibrate an annotated feature map with one calibration function for the whole map.
void calibrateMapGlobally (const FeatureMap<> &feature_map, FeatureMap<> &calibrated_feature_map, std::vector< PeptideIdentification > &ref_ids, String trafo_file_name="")
 Calibrate a feature map using given reference ids with one calibration function for the whole map.
template<typename InputPeakType >
void calibrateMapList (std::vector< MSExperiment< InputPeakType > > &exp_list, std::vector< MSExperiment< InputPeakType > > &calibrated_exp_list, std::vector< DoubleReal > &ref_masses, std::vector< DoubleReal > &detected_background_masses)

Protected Member Functions

void makeLinearRegression_ (std::vector< DoubleReal > &observed_masses, std::vector< DoubleReal > &theoretical_masses)
 the actual calibration function
void checkReferenceIds_ (std::vector< PeptideIdentification > &pep_ids)
 check if reference ids contain RT and MZ information as meta values
void checkReferenceIds_ (const FeatureMap<> &feature_map)
 check if reference ids contain RT and MZ information as meta values
void applyTransformation_ (const FeatureMap<> &feature_map, FeatureMap<> &calibrated_feature_map)
 apply transformation to all features (including subordinates and convex hulls)

Protected Attributes

TransformationDescription trafo_
 here the transformation is stored

Detailed Description

A simple calibration method using linear interpolation of given reference masses.

This class implements a simle calibration method: given a list of reference masses, the relative errors of the peaks in the data are approximated by linear interpolation and subtracted from the data.

Parameters of this class are:

NameTypeDefaultRestrictionsDescription
mz_tolerance float1 min: 0Allowed tolerance between peak and reference m/z.
mz_tolerance_unit stringDa Da, ppmUnit for mz_tolerance.
rt_tolerance int10  Allowed tolerance between peak and reference rt.

Note:

Constructor & Destructor Documentation

Default constructor.

~InternalCalibration (  )  [inline]

Destructor.


Member Function Documentation

void applyTransformation_ ( const FeatureMap<> &  feature_map,
FeatureMap<> &  calibrated_feature_map 
) [protected]

apply transformation to all features (including subordinates and convex hulls)

void calibrateMapGlobally ( const FeatureMap<> &  feature_map,
FeatureMap<> &  calibrated_feature_map,
std::vector< PeptideIdentification > &  ref_ids,
String  trafo_file_name = "" 
)

Calibrate a feature map using given reference ids with one calibration function for the whole map.

Calibrate a feature map using given peptide identifications. The calibration function is calculated for the whole map. Even if the features are already annotated with peptide ids these annotations are ignored for the calibration, only the reference ids are used. The m/z-values of the reference identifications are calculated through the given sequence and charge of the peptide. The reference ids are mapped onto the FeatureMap using IDMapper with the mz_tolerance and rt_tolerance parameters.

Parameters:
feature_map the uncalibrated feature map
calibrated_feature_map the calibrated feature map
ref_ids the reference peptide identifications
trafo_file_name file where the transformation function of the calibration is stored
void calibrateMapGlobally ( const MSExperiment< InputPeakType > &  exp,
MSExperiment< InputPeakType > &  calibrated_exp,
std::vector< DoubleReal > &  ref_masses,
String  trafo_file_name = "" 
)

Calibrate a peak map using given reference masses with one calibration function for the whole map.

The calibration function is calculated for the whole map. For the matching of the reference masses and the peaks the parameter mz_tolerance is used to calculate a window around the reference masses. If more than one peak is found within this window the closest peak is taken.

Parameters:
exp the uncalibrated peak map
calibrated_exp the calibrated peak map
ref_masses the reference m/z values
trafo_file_name file where the transformation function of the calibration is stored

References TransformationDescription::apply(), ProgressLogger::endProgress(), Param::getValue(), InternalCalibration::makeLinearRegression_(), DefaultParamHandler::param_, ProgressLogger::setProgress(), ProgressLogger::startProgress(), and InternalCalibration::trafo_.

void calibrateMapGlobally ( const FeatureMap<> &  feature_map,
FeatureMap<> &  calibrated_feature_map,
String  trafo_file_name = "" 
)

Calibrate an annotated feature map with one calibration function for the whole map.

Calibrate an annotated (!) feature map using the features' identifications. The calibration function is calculated for the whole map. The m/z-values of the reference identifications are calculated through the given sequence and charge of the peptide.

Parameters:
feature_map the uncalibrated feature map (annotated with peptide ids)
calibrated_feature_map the calibrated feature map
trafo_file_name file where the transformation function of the calibration is stored
void calibrateMapGlobally ( const MSExperiment< InputPeakType > &  exp,
MSExperiment< InputPeakType > &  calibrated_exp,
std::vector< PeptideIdentification > &  ref_ids,
String  trafo_file_name = "" 
)

Calibrate a peak map using given reference ids with one calibration function for the whole map.

Calibrate a map using given peptide identifications. The calibration function is calculated for the whole map. The m/z-values of the reference identifications are calculated through the given sequence and charge of the peptide. For the matching of the reference masses and the peaks the parameter mz_tolerance is used to calculate a window around the reference masses. If more than one peak is found within this window the closest peak is taken.

Parameters:
exp the uncalibrated peak map
calibrated_exp the calibrated peak map
ref_ids the reference peptide identifications
trafo_file_name file where the transformation function of the calibration is stored

References TransformationDescription::apply(), InternalCalibration::checkReferenceIds_(), Residue::Full, Param::getValue(), InternalCalibration::makeLinearRegression_(), DefaultParamHandler::param_, MSExperiment< PeakT, ChromatogramPeakT >::RTBegin(), and InternalCalibration::trafo_.

void calibrateMapList ( std::vector< MSExperiment< InputPeakType > > &  exp_list,
std::vector< MSExperiment< InputPeakType > > &  calibrated_exp_list,
std::vector< DoubleReal > &  ref_masses,
std::vector< DoubleReal > &  detected_background_masses 
)
void calibrateMapSpectrumwise ( const MSExperiment< InputPeakType > &  exp,
MSExperiment< InputPeakType > &  calibrated_exp,
std::vector< DoubleReal > &  ref_masses 
)

Calibrate a peak map using given reference masses with a separate calibration function for each spectrum.

The calibration function is calculated for each spectrum separately. If not enough reference masses are found for a spectrum it is left uncalibrated. For the matching of the reference masses and the peaks, the parameter mz_tolerance is used to calculate a window around the reference masses. If more than one peak is found within this window the closest peak is taken.

Parameters:
exp the uncalibrated peak map
calibrated_exp the calibrated peak map
ref_masses the reference m/z values

References TransformationDescription::apply(), ProgressLogger::endProgress(), Param::getValue(), InternalCalibration::makeLinearRegression_(), DefaultParamHandler::param_, ProgressLogger::setProgress(), ProgressLogger::startProgress(), and InternalCalibration::trafo_.

void checkReferenceIds_ ( std::vector< PeptideIdentification > &  pep_ids  )  [protected]

check if reference ids contain RT and MZ information as meta values

Referenced by InternalCalibration::calibrateMapGlobally().

void checkReferenceIds_ ( const FeatureMap<> &  feature_map  )  [protected]

check if reference ids contain RT and MZ information as meta values

void makeLinearRegression_ ( std::vector< DoubleReal > &  observed_masses,
std::vector< DoubleReal > &  theoretical_masses 
) [protected]

Member Data Documentation


OpenMS / TOPP release 1.10.0 Documentation generated on Thu Mar 7 2013 09:42:53 using doxygen 1.7.1