|
template<typename SpectrumT , typename TransitionT > |
void | pickTransitionGroup (MRMTransitionGroup< SpectrumT, TransitionT > &transition_group) |
| Pick a group of chromatograms belonging to the same peptide. More...
|
|
template<typename SpectrumT , typename TransitionT > |
MRMFeature | createMRMFeature (MRMTransitionGroup< SpectrumT, TransitionT > &transition_group, std::vector< SpectrumT > &picked_chroms, int &chr_idx, int &peak_idx) |
| Create feature from a vector of chromatograms and a specified peak. More...
|
|
template<typename SpectrumT > |
void | remove_overlapping_features (std::vector< SpectrumT > &picked_chroms, double best_left, double best_right) |
| Remove overlapping features. More...
|
|
void | findLargestPeak (std::vector< RichPeakChromatogram > &picked_chroms, int &chr_idx, int &peak_idx) |
| Find largest peak in a vector of chromatograms. More...
|
|
|
| MRMTransitionGroupPicker () |
| Constructor. More...
|
|
| ~MRMTransitionGroupPicker () |
| Destructor. More...
|
|
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...
|
|
|
void | updateMembers_ () |
| Synchronize members with param class. More...
|
|
MRMTransitionGroupPicker & | operator= (const MRMTransitionGroupPicker &rhs) |
| Assignment operator is protected for algorithm. More...
|
|
template<typename SpectrumT , typename TransitionT > |
double | computeQuality_ (MRMTransitionGroup< SpectrumT, TransitionT > &transition_group, std::vector< SpectrumT > &picked_chroms, const int chr_idx, const double best_left, const double best_right, String &outlier) |
| Compute transition group quality (higher score is better) More...
|
|
template<typename SpectrumT > |
void | recalculatePeakBorders_ (std::vector< SpectrumT > &picked_chroms, double &best_left, double &best_right, double max_z) |
| Recalculate the borders of the peak. More...
|
|
double | calculateBgEstimation_ (const RichPeakChromatogram &chromatogram, double best_left, double best_right) |
| Will use the chromatogram to estimate the background noise and then subtract it. More...
|
|
|
template<typename SpectrumT > |
void | prepareMasterContainer_ (const SpectrumT &ref_chromatogram, SpectrumT &master_peak_container, double best_left, double best_right) |
| create an empty master peak container that has the correct mz / RT values set More...
|
|
template<typename SpectrumT > |
SpectrumT | resampleChromatogram_ (const SpectrumT &chromatogram, SpectrumT &master_peak_container, double best_left, double best_right) |
| use the master container from above to resample a chromatogram at those points stored in the master container More...
|
|
Protected Member Functions inherited from DefaultParamHandler |
void | defaultsToParam_ () |
| Updates the parameters after the defaults have been set in the constructor. More...
|
|
The MRMTransitionGroupPicker finds peaks in chromatograms that belong to the same precursors.
Parameters of this class are:
Name | Type | Default | Restrictions | Description |
stop_after_feature |
int | -1 |
| Stop finding after feature (ordered by intensity; -1 means do not stop). |
stop_after_intensity_ratio |
float | 0.0001 |
| Stop after reaching intensity ratio |
min_peak_width |
float | -1 |
| Minimal peak width (s), discard all peaks below this value (-1 means no action). |
background_subtraction |
string | none |
none, smoothed, original | Try to apply a background subtraction to the peak (experimental). The background is estimated at the peak boundaries, either the smoothed or the raw chromatogram data can be used for that. |
recalculate_peaks |
string | false |
| Tries to get better peak picking by looking at peak consistency of all picked peaks. Tries to use the consensus (median) peak border if theof variation within the picked peaks is too large. |
recalculate_peaks_max_z |
float | 1 |
| Determines the maximal Z-Score (difference measured in standard deviations) that is considered too large for peak boundaries. If the Z-Score is above this value, the median is used for peak boundaries (default value 1.0). |
minimal_quality |
float | -10000 |
| Only if compute_peak_quality is set, this parameter will not consider peaks below this quality threshold |
compute_peak_quality |
string | false |
| Tries to compute a quality value for each peakgroup and detect outlier transitions. The resulting score is centered around zero and values above 0 are generally good and below -1 or -2 are usually bad. |
PeakPickerMRM:sgolay_frame_length |
int | 15 |
| The number of subsequent data points used for smoothing. This number has to be uneven. If it is not, 1 will be added. |
PeakPickerMRM:sgolay_polynomial_order |
int | 3 |
| Order of the polynomial that is fitted. |
PeakPickerMRM:gauss_width |
float | 50 |
| Gaussian width in seconds, estimated peak size. |
PeakPickerMRM:use_gauss |
string | true |
| Use Gaussian filter for smoothing (alternative is Savitzky-Golay filter) |
PeakPickerMRM:peak_width |
float | 40 |
| Force a certain minimal peak_width on the data (e.g. extend the peak at least by this amount on both sides) in seconds. -1 turns this feature off. |
PeakPickerMRM:signal_to_noise |
float | 1 |
min: 0 | Signal-to-noise threshold at which a peak will not be extended any more. Note that setting this too high (e.g. 1.0) can lead to peaks whose flanks are not fully captured. |
PeakPickerMRM:sn_win_len |
float | 1000 |
| Signal to noise window length. |
PeakPickerMRM:sn_bin_count |
int | 30 |
| Signal to noise bin count. |
PeakPickerMRM:remove_overlapping_peaks |
string | false |
false, true | Try to remove overlapping peaks during peak picking |
PeakPickerMRM:method |
string | legacy |
legacy, corrected, crawdad | Which method to choose for chromatographic peak-picking (OpenSWATH legacy, corrected picking or Crawdad). |
Note:
- If a section name is documented, the documentation is displayed as tooltip.
- Advanced parameter names are italic.
It is called through pickTransitionGroup which will accept an MRMTransitionGroup filled with n chromatograms and perform the following steps:
- Step 1: find features (peaks) in individual chromatograms
- Step 2: merge these features to consensus features that span multiple chromatograms
Step 1 is performed by smoothing the individual chromatogram and applying the PeakPickerHiRes.
Step 2 is performed by finding the largest peak overall and use this to create a feature, propagating this through all chromatograms.
double computeQuality_ |
( |
MRMTransitionGroup< SpectrumT, TransitionT > & |
transition_group, |
|
|
std::vector< SpectrumT > & |
picked_chroms, |
|
|
const int |
chr_idx, |
|
|
const double |
best_left, |
|
|
const double |
best_right, |
|
|
String & |
outlier |
|
) |
| |
|
inlineprotected |
Compute transition group quality (higher score is better)
This is only based on the co-elution of the chromatograms and internal consistency without any library information.
For the final score (larger is better), consider these scores:
- missing_peaks (the more peaks are missing, the worse)
- multiple_peaks
- mean of the shapes (1 is very good, 0 is bad)
- mean of the coelutions (0 is good, 1 is ok, above 1 is pretty bad)
These scores are similar to the ones computed by MRMFeatureFinderScoring and a simple sum of these scores is returned.
left_borders / right_borders might not have the same length since we might have peaks missing!!
References MRMTransitionGroup< SpectrumType, TransitionType >::getChromatograms(), MRMTransitionGroup< SpectrumType, TransitionType >::getTransitions(), OpenMS::Constants::k, LOG_DEBUG, mean_and_stddev::mean(), OpenSwath::Scoring::normalizedCrossCorrelation(), and OpenSwath::Scoring::xcorrArrayGetMaxPeak().
void pickTransitionGroup |
( |
MRMTransitionGroup< SpectrumT, TransitionT > & |
transition_group | ) |
|
|
inline |
Pick a group of chromatograms belonging to the same peptide.
Will identify peaks in a set of chromatograms that belong to the same peptide. The chromatograms are given in the MRMTransitionGroup container which also contains the mapping of the chromatograms to their metadata.
The resulting features are added added to the MRMTransitionGroup. Each feature contains the following meta-data:
- PeptideRef
- leftWidth
- rightWidth
- total_xic (fragment trace XIC sum)
- peak_apices_sum
References MRMTransitionGroup< SpectrumType, TransitionType >::addFeature(), MRMTransitionGroup< SpectrumType, TransitionType >::getChromatograms(), Peak2D::getIntensity(), MetaInfoInterface::getMetaValue(), MSSpectrum< PeakT >::isSorted(), OpenMS::Constants::k, PeakPickerMRM::pickChromatogram(), DefaultParamHandler::setParameters(), MSSpectrum< PeakT >::sortByIntensity(), and MSSpectrum< PeakT >::sortByPosition().
Referenced by OpenSwathWorkflow::scoreAllChromatograms().
void recalculatePeakBorders_ |
( |
std::vector< SpectrumT > & |
picked_chroms, |
|
|
double & |
best_left, |
|
|
double & |
best_right, |
|
|
double |
max_z |
|
) |
| |
|
inlineprotected |
Recalculate the borders of the peak.
By collecting all left and right borders of contained peaks, a consensus peak is computed. By looking at the means and standard deviations of all the peak borders it is estimated whether the proposed peak border deviates too much from the consensus one. If the deviation is too high (in this case), then we fall back to the "consensus" (a median here).
References OpenMS::Constants::k, LOG_DEBUG, and OpenMS::Math::mean().
void remove_overlapping_features |
( |
std::vector< SpectrumT > & |
picked_chroms, |
|
|
double |
best_left, |
|
|
double |
best_right |
|
) |
| |
|
inline |
Remove overlapping features.
Remove features that are within the current seed (between best_left and best_right) or overlap with it. An overlapping feature is defined as a feature that has either of its borders within the border of the current peak
Directly adjacent features are allowed, e.g. they can share one border.
References OpenMS::Constants::k.