A simple calibration method using linear interpolation of given reference masses.
More...
|
| InternalCalibration () |
| Default constructor. More...
|
|
| ~InternalCalibration () |
| Destructor. More...
|
|
template<typename InputPeakType > |
void | calibrateMapSpectrumwise (const MSExperiment< InputPeakType > &exp, MSExperiment< InputPeakType > &calibrated_exp, std::vector< double > &ref_masses) |
| Calibrate a peak map using given reference masses with a separate calibration function for each spectrum. More...
|
|
template<typename InputPeakType > |
void | calibrateMapGlobally (const MSExperiment< InputPeakType > &exp, MSExperiment< InputPeakType > &calibrated_exp, std::vector< double > &ref_masses, String trafo_file_name="") |
| Calibrate a peak map using given reference masses with one calibration function for the whole map. More...
|
|
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. More...
|
|
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. More...
|
|
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. More...
|
|
template<typename InputPeakType > |
void | calibrateMapList (std::vector< MSExperiment< InputPeakType > > &exp_list, std::vector< MSExperiment< InputPeakType > > &calibrated_exp_list, std::vector< double > &ref_masses, std::vector< double > &detected_background_masses) |
|
Public Member Functions inherited from DefaultParamHandler |
| DefaultParamHandler (const String &name) |
| Constructor with name that is displayed in error messages. More...
|
|
| DefaultParamHandler (const DefaultParamHandler &rhs) |
| Copy constructor. More...
|
|
virtual | ~DefaultParamHandler () |
| Destructor. More...
|
|
virtual DefaultParamHandler & | operator= (const DefaultParamHandler &rhs) |
| Assignment operator. More...
|
|
virtual bool | operator== (const DefaultParamHandler &rhs) const |
| Equality operator. More...
|
|
void | setParameters (const Param ¶m) |
| Sets the parameters. More...
|
|
const Param & | getParameters () const |
| Non-mutable access to the parameters. More...
|
|
const Param & | getDefaults () const |
| Non-mutable access to the default parameters. More...
|
|
const String & | getName () const |
| Non-mutable access to the name. More...
|
|
void | setName (const String &name) |
| Mutable access to the name. More...
|
|
const std::vector< String > & | getSubsections () const |
| Non-mutable access to the registered subsections. More...
|
|
| ProgressLogger () |
| Constructor. More...
|
|
| ~ProgressLogger () |
| Destructor. More...
|
|
| ProgressLogger (const ProgressLogger &other) |
| Copy constructor. More...
|
|
ProgressLogger & | operator= (const ProgressLogger &other) |
| Assignment Operator. More...
|
|
void | setLogType (LogType type) const |
| Sets the progress log that should be used. The default type is NONE! More...
|
|
LogType | getLogType () const |
| Returns the type of progress log being used. More...
|
|
void | startProgress (SignedSize begin, SignedSize end, const String &label) const |
| Initializes the progress display. More...
|
|
void | setProgress (SignedSize value) const |
| Sets the current progress. More...
|
|
void | endProgress () const |
| Ends the progress display. More...
|
|
A simple calibration method using linear interpolation of given reference masses.
This class implements a simple 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:
Name | Type | Default | Restrictions | Description |
mz_tolerance |
float | 1 |
min: 0 | Allowed tolerance between peak and reference m/z. |
mz_tolerance_unit |
string | Da |
Da, ppm | Unit for mz_tolerance. |
rt_tolerance |
int | 10 |
| Allowed tolerance between peak and reference rt. |
Note:
- If a section name is documented, the documentation is displayed as tooltip.
- Advanced parameter names are italic.
void calibrateMapGlobally |
( |
const MSExperiment< InputPeakType > & |
exp, |
|
|
MSExperiment< InputPeakType > & |
calibrated_exp, |
|
|
std::vector< double > & |
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(), MSExperiment< PeakT, ChromatogramPeakT >::empty(), ProgressLogger::endProgress(), Param::getValue(), InternalCalibration::makeLinearRegression_(), DefaultParamHandler::param_, SpectrumSettings::PEAKS, MSExperiment< PeakT, ChromatogramPeakT >::resize(), ProgressLogger::setProgress(), MSExperiment< PeakT, ChromatogramPeakT >::size(), ProgressLogger::startProgress(), TransformationXMLFile::store(), and InternalCalibration::trafo_.
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(), MSExperiment< PeakT, ChromatogramPeakT >::begin(), InternalCalibration::checkReferenceIds_(), MSExperiment< PeakT, ChromatogramPeakT >::empty(), MSExperiment< PeakT, ChromatogramPeakT >::end(), Residue::Full, Param::getValue(), InternalCalibration::makeLinearRegression_(), DefaultParamHandler::param_, SpectrumSettings::PEAKS, MSExperiment< PeakT, ChromatogramPeakT >::resize(), MSExperiment< PeakT, ChromatogramPeakT >::RTBegin(), MSExperiment< PeakT, ChromatogramPeakT >::size(), TransformationXMLFile::store(), and InternalCalibration::trafo_.
void calibrateMapSpectrumwise |
( |
const MSExperiment< InputPeakType > & |
exp, |
|
|
MSExperiment< InputPeakType > & |
calibrated_exp, |
|
|
std::vector< double > & |
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(), MSExperiment< PeakT, ChromatogramPeakT >::empty(), ProgressLogger::endProgress(), Param::getValue(), InternalCalibration::makeLinearRegression_(), DefaultParamHandler::param_, SpectrumSettings::PEAKS, ProgressLogger::setProgress(), MSExperiment< PeakT, ChromatogramPeakT >::size(), ProgressLogger::startProgress(), InternalCalibration::trafo_, and OpenMS::writtenDigits< double >().