|  | OpenMS
    2.6.0
    | 
This class provides methods for precursor correction. More...
#include <OpenMS/FILTERING/CALIBRATION/PrecursorCorrection.h>
| Static Public Member Functions | |
| static void | getPrecursors (const MSExperiment &exp, std::vector< Precursor > &precursors, std::vector< double > &precursors_rt, std::vector< Size > &precursor_scan_index) | 
| Extract precursors and associated information (precursor retention time and precursor scan index).  More... | |
| static void | writeHist (const String &out_csv, const std::vector< double > &delta_mzs, const std::vector< double > &mzs, const std::vector< double > &rts) | 
| Writer can be used in association with correctToNearestMS1Peak or correctToHighestIntensityMS1Peak.  More... | |
| static std::set< Size > | correctToNearestMS1Peak (MSExperiment &exp, double mz_tolerance, bool ppm, std::vector< double > &delta_mzs, std::vector< double > &mzs, std::vector< double > &rts) | 
| Selection of the peak in closest proximity as corrected precursor mass in a given mass range (e.g. precursor mass +/- 0.2 Da).  More... | |
| static std::set< Size > | correctToHighestIntensityMS1Peak (MSExperiment &exp, double mz_tolerance, bool ppm, std::vector< double > &delta_mzs, std::vector< double > &mzs, std::vector< double > &rts) | 
| Selection of the peak with the highest intensity as corrected precursor mass in a given mass range (e.g. precursor mass +/- 0.2 Da)  More... | |
| static std::set< Size > | correctToNearestFeature (const FeatureMap &features, MSExperiment &exp, double rt_tolerance_s=0.0, double mz_tolerance=0.0, bool ppm=true, bool believe_charge=false, bool keep_original=false, bool all_matching_features=false, int max_trace=2, int debug_level=0) | 
| Reassigns a precursor to the nearest feature in a given rt and mass range. Wrong assignment of the mono-isotopic mass for precursors are assumed:  More... | |
| Static Public Attributes | |
| static const std::string | csv_header | 
| Static Protected Member Functions | |
| static bool | overlaps_ (const Feature &feature, const double rt, const double pc_mz, const double rt_tolerance) | 
| Check if precursor is located in the bounding box of a features convex hull. Here the bounding box of the feature is extended by the retention time tolerance and afterwards the precursor location is validated.  More... | |
| static bool | compatible_ (const Feature &feature, double pc_mz, double mz_tolerance, Size max_trace_number=2, int debug_level=0) | 
| Check precursor and feature compatibility If the precursor mz is in one of the masstraces the feature is compatible. Dependent on 13C mass difference and charge.  More... | |
This class provides methods for precursor correction.
Supported methods: getPrecursors: Extract precursors and associated information (mz, scan index). writeHist: Write output .csv for validation purposes (corrected, uncorrected). correctToNearestMS1Peak: Correct to the peak in closest proximity in a certain mass range. correctToHighestIntensityMS1Peak: Correct to the peak with the highest intensity in a certain mass range. correctToNearestFeature: Use feature information to re-annotate a precursor (e.g. falsely assigned to non mono-isotopic trace).
| 
 | staticprotected | 
Check precursor and feature compatibility If the precursor mz is in one of the masstraces the feature is compatible. Dependent on 13C mass difference and charge.
| feature | constant Feature. | 
| pc_mz | double precursor mass to charge. | 
| mz_tolerance | double mass to charge tolerance. | 
| max_trace_number | Size maximum number of mass traces. | 
| debug_level | integer debug level. | 
| 
 | static | 
Selection of the peak with the highest intensity as corrected precursor mass in a given mass range (e.g. precursor mass +/- 0.2 Da)
For each MS2 spectrum the corresponding MS1 spectrum is determined by using the rt information of the precursor. In the MS1, the peak with the highest intensity in a given mass range to the uncorrected precursor m/z is selected and used as corrected precursor m/z.
| exp | MSExperiment. | 
| mz_tolerance | double tolerance used for precursor correction in mass range. | 
| ppm | bool enables usage of ppm. | 
| delta_mzs | vector double delta mass to charge. | 
| mzs | vector double mass to charge. | 
| rts | vector double retention time. | 
| 
 | static | 
Reassigns a precursor to the nearest feature in a given rt and mass range. Wrong assignment of the mono-isotopic mass for precursors are assumed:
| features | constant FeatureMap. | 
| exp | MSExperiment. | 
| rt_tolerance_s | double retention time tolerance in seconds. | 
| mz_tolerance | double tolerance used for precursor correction in mass range. | 
| ppm | bool enables usage of ppm. | 
| believe_charge | bool only add features that match the precursor charge. | 
| keep_original | bool this will create a copy of the precursor and tandem spectrum for the new mono-isotopic trace and retain the original one. | 
| all_matching_features | bool correction is performed for all features in question not only the closest one. | 
| max_trace | integer maximal number of traces used. | 
| debug_level | integer debug level. | 
| 
 | static | 
Selection of the peak in closest proximity as corrected precursor mass in a given mass range (e.g. precursor mass +/- 0.2 Da).
For each MS2 spectrum the corresponding MS1 spectrum is determined by using the rt information of the precursor. In the MS1, the peak closest to the uncorrected precursor m/z is selected and used as corrected precursor m/z.
| exp | MSExperiment. | 
| mz_tolerance | double tolerance used for precursor correction in mass range. | 
| ppm | bool enables usage of ppm. | 
| delta_mzs | vector double delta mass to charge. | 
| mzs | vector double mass to charge. | 
| rts | vector double retention time. | 
| 
 | static | 
Extract precursors and associated information (precursor retention time and precursor scan index).
| exp | constant MSExperiment. | 
| precursors | vector of Precursor. | 
| precursors_rt | vector double of precursors retention time. | 
| precursor_scan_index | vector size of precursor scan index. | 
| 
 | staticprotected | 
Check if precursor is located in the bounding box of a features convex hull. Here the bounding box of the feature is extended by the retention time tolerance and afterwards the precursor location is validated.
| feature | constant Feature. | 
| rt | constant double retention time. | 
| pc_mz | constant double precursor mass to charge. | 
| rt_tolerance | constant double retention time tolerance in seconds. | 
| 
 | static | 
Writer can be used in association with correctToNearestMS1Peak or correctToHighestIntensityMS1Peak.
| out_csv | constant String for csv output. | 
| delta_mzs | constant vector double delta mass to charge. | 
| mzs | constant vector double mass to charge. | 
| rts | constant vector double retention time. | 
Format: RT uncorrectedMZ correctedMZ deltaMZ 100.1 509.9999 510 0.0001 180.9 610.0001 610 -0.0001 183.92 611.0035 611.0033 -0.0002
| 
 | static | 
 1.8.16
 1.8.16