base class for filtering centroided and profile data for peak patterns
More...
#include <OpenMS/FEATUREFINDER/MultiplexFiltering.h>
|
| struct | BlacklistEntry |
| | an entry of blacklist_ (spectrum index and peak index in exp_centroided_) and a value read from or written to it More...
|
| |
|
| | MultiplexFiltering (const MSExperiment &exp_centroided, const std::vector< MultiplexIsotopicPeakPattern > &patterns, int isotopes_per_peptide_min, int isotopes_per_peptide_max, double intensity_cutoff, double rt_band, double mz_tolerance, bool mz_tolerance_unit, double peptide_similarity, double averagine_similarity, double averagine_similarity_scaling, std::string averagine_type="peptide") |
| | constructor
|
| |
| MSExperiment & | getCentroidedExperiment () |
| | returns the intensity-filtered, centroided spectral data
|
| |
| MSExperiment | getBlacklist () |
| | returns the blacklisted, centroided peaks
|
| |
| | ProgressLogger () |
| | Constructor.
|
| |
| virtual | ~ProgressLogger () |
| | Destructor.
|
| |
| | ProgressLogger (const ProgressLogger &other) |
| | Copy constructor.
|
| |
| ProgressLogger & | operator= (const ProgressLogger &other) |
| | Assignment Operator.
|
| |
| void | setLogType (LogType type) const |
| | Sets the progress log that should be used. The default type is NONE!
|
| |
| LogType | getLogType () const |
| | Returns the type of progress log being used.
|
| |
| void | setLogger (ProgressLoggerImpl *logger) |
| | Sets the logger to be used for progress logging.
|
| |
| void | startProgress (SignedSize begin, SignedSize end, const std::string &label) const |
| | Initializes the progress display.
|
| |
| void | setProgress (SignedSize value) const |
| | Sets the current progress.
|
| |
| void | endProgress (UInt64 bytes_processed=0) const |
| |
| void | nextProgress () const |
| | increment progress by 1 (according to range begin-end)
|
| |
|
| void | updateWhiteMSExperiment_ () |
| | construct an MS experiment from exp_centroided_ containing peaks which have not been previously blacklisted in blacklist_
|
| |
| int | checkForSignificantPeak_ (double mz, double mz_tolerance, MSExperiment::ConstIterator &it_rt, double intensity_first_peak) const |
| | check for significant peak
|
| |
| bool | filterPeakPositions_ (double mz, const MSExperiment::ConstIterator &it_rt_begin, const MSExperiment::ConstIterator &it_rt_band_begin, const MSExperiment::ConstIterator &it_rt_band_end, const MultiplexIsotopicPeakPattern &pattern, MultiplexFilteredPeak &peak, std::vector< BlacklistEntry > *blacklist_reads=nullptr) const |
| | check if there are enough peaks in the RT band to form the pattern
|
| |
| void | blacklistPeak_ (const MultiplexFilteredPeak &peak) |
| | blacklist this peak
|
| |
| void | blacklistPeak_ (const MultiplexFilteredPeak &peak, unsigned pattern_idx) |
| | blacklist this peak
|
| |
| void | blacklistEntries_ (const MultiplexFilteredPeak &peak, unsigned pattern_idx, std::vector< BlacklistEntry > &entries) const |
| | the entries of blacklist_ that blacklistPeak_() sets, with their new values, in the order it sets them
|
| |
| void | filterSpectrum_ (size_t idx_rt, unsigned pattern_idx, const PeakFilter &filter_peak, MultiplexFilteredMSExperiment &result) |
| | filter all peaks of one 'white' spectrum, add the ones that pass to result and blacklist them
|
| |
| bool | filterAveragineModel_ (const MultiplexIsotopicPeakPattern &pattern, const MultiplexFilteredPeak &peak) const |
| | check if the satellite peaks conform with the averagine model
|
| |
| bool | filterPeptideCorrelation_ (const MultiplexIsotopicPeakPattern &pattern, const MultiplexFilteredPeak &peak) const |
| | check if corresponding satellite peaks of different peptides show a good correlation
|
| |
base class for filtering centroided and profile data for peak patterns
The algorithm searches for patterns of multiple peptides in the data. The peptides appear as characteristic patterns of isotopic peaks in MS1 spectra. We first search the centroided data, and optionally in a second step the spline interpolated profile data. For each peak pattern the algorithm generates a filter result.
The algorithm differs slightly for centroided and profile input data. This base class comprises code common to both. The two child classes MultiplexFilteringCentroided and MultiplexFilteringProfile contain specific functions and the primary filter() method.
- See also
- MultiplexIsotopicPeakPattern
-
MultiplexFilteredMSExperiment
-
MultiplexFilteringCentroided
-
MultiplexFilteringProfile
◆ OpenMS::MultiplexFiltering::BlacklistEntry
| struct OpenMS::MultiplexFiltering::BlacklistEntry |
an entry of blacklist_ (spectrum index and peak index in exp_centroided_) and a value read from or written to it
| Class Members |
|
size_t |
mz_idx |
|
|
size_t |
rt_idx |
|
|
int |
value |
|
◆ PeakFilter
decides on one peak of a 'white' spectrum
Called with the peak index in the white spectrum and, if not null, the list to which every entry of blacklist_ read is to be appended (see filterPeakPositions_()). Returns the peak with its satellites if it passes all filters.
◆ White2Original
index mapping from a 'white' experiment to its original experiment
An MSExperiment contains a set of spectra each containing a number of peaks. In the course of the filtering, some peaks are blacklisted since they are identified to belong to a certain pattern i.e. peptide. An experiment in which blacklisted peaks are removed is called 'white'. White spectra contain fewer peaks than their corresponding primary spectra. Consequently, their indices are shifted. The type maps a peak index in a 'white' spectrum back to its original spectrum.
◆ MultiplexFiltering()
| MultiplexFiltering |
( |
const MSExperiment & |
exp_centroided, |
|
|
const std::vector< MultiplexIsotopicPeakPattern > & |
patterns, |
|
|
int |
isotopes_per_peptide_min, |
|
|
int |
isotopes_per_peptide_max, |
|
|
double |
intensity_cutoff, |
|
|
double |
rt_band, |
|
|
double |
mz_tolerance, |
|
|
bool |
mz_tolerance_unit, |
|
|
double |
peptide_similarity, |
|
|
double |
averagine_similarity, |
|
|
double |
averagine_similarity_scaling, |
|
|
std::string |
averagine_type = "peptide" |
|
) |
| |
constructor
- Parameters
-
| [in] | exp_centroided | experimental data in centroid mode |
| [in] | patterns | patterns of isotopic peaks to be searched for |
| [in] | isotopes_per_peptide_min | minimum number of isotopic peaks in peptides |
| [in] | isotopes_per_peptide_max | maximum number of isotopic peaks in peptides |
| [in] | intensity_cutoff | intensity cutoff |
| [in] | rt_band | RT range used for filtering |
| [in] | mz_tolerance | error margin in m/z for matching expected patterns to experimental data |
| [in] | mz_tolerance_unit | unit for mz_tolerance, ppm (true), Da (false) |
| [in] | peptide_similarity | similarity score for two peptides in the same multiplet |
| [in] | averagine_similarity | similarity score for peptide isotope pattern and averagine model |
| [in] | averagine_similarity_scaling | scaling factor x for the averagine similarity parameter p when detecting peptide singlets. With p' = p + x(1-p). |
| [in] | averagine_type | Averagine model to use: 'peptide', 'RNA', 'DNA' |
◆ blacklistEntries_()
the entries of blacklist_ that blacklistPeak_() sets, with their new values, in the order it sets them
They do not depend on the blacklist.
- Parameters
-
| [in] | peak | peak to be blacklisted |
| [in] | pattern_idx | index of the pattern in patterns_ |
| [out] | entries | the entries are appended to it |
◆ blacklistPeak_() [1/2]
blacklist this peak
Blacklist all satellites associated with this peak.
- Parameters
-
| [in] | peak | peak to be blacklisted |
◆ blacklistPeak_() [2/2]
blacklist this peak
Each of the satellites is associated with a specific mass trace. We blacklist all peaks in these mass traces (even if they are not a satellite) extending them by a margin rt_band_.
- Parameters
-
| [in] | peak | peak to be blacklisted |
| [in] | pattern_idx | index of the pattern in patterns_ |
◆ checkForSignificantPeak_()
| int checkForSignificantPeak_ |
( |
double |
mz, |
|
|
double |
mz_tolerance, |
|
|
MSExperiment::ConstIterator & |
it_rt, |
|
|
double |
intensity_first_peak |
|
) |
| const |
|
protected |
check for significant peak
- Parameters
-
| [in] | mz | position where the peak is expected |
| [in] | mz_tolerance | m/z tolerance within the peak may lie |
| [in] | it_rt | pointer to the spectrum |
| [in] | intensity_first_peak | intensity to compare to |
- Returns
- -1 (if there is no significant peak), or peak index mz_idx (if there is a significant peak)
◆ filterAveragineModel_()
check if the satellite peaks conform with the averagine model
Check if the intensities of the satellite peaks correlate with the peak intensities of the averagine model. We check both Pearson and Spearman rank correlation.
- Parameters
-
| [in] | pattern | m/z pattern to search for |
| [in] | peak | peak with set of satellite peaks |
- Returns
- boolean if this filter was passed i.e. the correlation coefficient is greater than averagine_similarity_
◆ filterPeakPositions_()
check if there are enough peaks in the RT band to form the pattern
Checks if there are peaks at m/z positions corresponding to the pattern and that the primary peak position is not blacklisted.
- Parameters
-
| [in] | mz | m/z of the primary peak |
| [in] | it_rt_begin | RT iterator of the very first spectrum of the experiment (needed to determine indices) |
| [in] | it_rt_band_begin | RT iterator of the first spectrum in the RT band |
| [in] | it_rt_band_end | RT iterator of the spectrum after the last spectrum in the RT band |
| [in] | pattern | m/z pattern to search for |
| [out] | peak | filter result output |
| [out] | blacklist_reads | if not null, every entry of blacklist_ read is appended to it, with the value read |
- Returns
- boolean if this filter was passed i.e. there are isotopes_per_peptide_min_ or more mass traces which form the pattern.
◆ filterPeptideCorrelation_()
check if corresponding satellite peaks of different peptides show a good correlation
Different peptides in the same multiplet have the same amino acid sequence and should therefore exhibit very similar isotope distributions. The filter checks if satellite peaks corresponding to different isotopes in different peptide features show a strong correlation. The filter is of course ignored for singlet feature detection.
- Parameters
-
| [in] | pattern | m/z pattern to search for |
| [in] | peak | peak with set of satellite peaks |
- Returns
- boolean if this filter was passed i.e. the correlation coefficient is greater than peptide_similarity_
◆ filterSpectrum_()
filter all peaks of one 'white' spectrum, add the ones that pass to result and blacklist them
Whether a peak passes depends on the blacklist, which every peak that passes extends. The result is that of filtering the peaks one after another in order of m/z (as a single thread does), whatever the number of threads: The peaks are filtered in parallel against the blacklist as it is when the spectrum is reached; every decision records the blacklist entries it read, and every peak that passes the entries it would blacklist. Then the peaks are accepted in order of m/z. A decision stands unless a peak accepted before it in this spectrum has changed one of the entries it read; then the peak is filtered again against the current blacklist. With one thread, the peaks are simply filtered in order of m/z.
- Parameters
-
| [in] | idx_rt | index of the spectrum in exp_centroided_white_ |
| [in] | pattern_idx | index of the pattern in patterns_ |
| [in] | filter_peak | decides on one peak of the spectrum |
| [out] | result | filter result the peaks that pass are added to |
◆ getBlacklist()
returns the blacklisted, centroided peaks
◆ getCentroidedExperiment()
returns the intensity-filtered, centroided spectral data
◆ updateWhiteMSExperiment_()
| void updateWhiteMSExperiment_ |
( |
| ) |
|
|
protected |
construct an MS experiment from exp_centroided_ containing peaks which have not been previously blacklisted in blacklist_
In addition, construct an index mapping of 'white' peak positions to their position in the corresponding, original spectrum.
◆ averagine_similarity_
| double averagine_similarity_ |
|
protected |
◆ averagine_similarity_scaling_
| double averagine_similarity_scaling_ |
|
protected |
averagine similarity scaling
◆ averagine_type_
| std::string averagine_type_ |
|
protected |
◆ blacklist_
| std::vector<std::vector<int> > blacklist_ |
|
protected |
auxiliary structs for blacklisting
◆ blacklist_reads_
for each peak of the spectrum being filtered, the entries of blacklist_ its decision read (see filterSpectrum_())
Kept from spectrum to spectrum, so that the lists keep their memory.
◆ blacklist_writes_
for each peak of the spectrum being filtered that passes, the entries of blacklist_ it sets (see filterSpectrum_())
◆ exp_centroided_
centroided experimental data
◆ exp_centroided_mapping_
mapping of peak indices from a 'white' experiment exp_centroided_white_ to its original experiment exp_centroided_
◆ exp_centroided_white_
"white" centroided experimental data
subset of all peaks of exp_centroided_ which are not blacklisted in blacklist_
◆ intensity_cutoff_
◆ isotopes_per_peptide_max_
| size_t isotopes_per_peptide_max_ |
|
protected |
maximum number of isotopic peaks per peptide
◆ isotopes_per_peptide_min_
| size_t isotopes_per_peptide_min_ |
|
protected |
minimum number of isotopic peaks per peptide
◆ mz_tolerance_
◆ mz_tolerance_unit_in_ppm_
| bool mz_tolerance_unit_in_ppm_ |
|
protected |
unit for m/z shift tolerance (ppm - true, Da - false)
◆ patterns_
◆ peptide_similarity_
| double peptide_similarity_ |
|
protected |
◆ rt_band_
RT range used for filtering.