| | |
The LowMassDeconvolverNoLabelling class manages the deconvolution of low mass analytes mass spectra. More...
| Header: | #include <\ MsXpS/libXpertMassCore/Processing/LowMassDeconvolverNoLabelling.hpp> |
| Inherits: | MsXpS::libXpertMassCore::Processing::AbstractLowMassDeconvolver |
| LowMassDeconvolverNoLabelling(const MsXpS::libXpertMassCore::Processing::LowMassDeconvolverParameters ¶meters) | |
| virtual | ~LowMassDeconvolverNoLabelling() |
| virtual QList<MsXpS::libXpertMassCore::Processing::DeconvolutedFeature> | deconvolute(const pappso::Trace &input_centroids) const override |
| virtual bool | fitIsotopicEnvelope(const pappso::Trace &input_centroids, std::size_t input_centroid_index, MsXpS::libXpertMassCore::Processing::ChargeSpecificFeature &charge_specific_feature, std::vector<bool> &globally_used) const override |
| virtual std::vector<MsXpS::libXpertMassCore::Processing::ChargeSpecificFeature> | generateChargeSpecificFeatures(const pappso::Trace &input_centroids) const override |
| virtual pappso::Trace | getIsotopicClusterReducedToMaxMatchCount(const pappso::Trace &isotopic_cluster) const override |
| virtual std::vector<MsXpS::libXpertMassCore::Processing::IsoMatch, std::allocator<MsXpS::libXpertMassCore::Processing::IsoMatch>>::const_iterator | getIsotopologueMatchIterator(const std::vector<MsXpS::libXpertMassCore::Processing::IsoMatch> &matches, int isotopologue_index, QString &message) const override |
| virtual std::vector<MsXpS::libXpertMassCore::Processing::IsoMatch, std::allocator<MsXpS::libXpertMassCore::Processing::IsoMatch>>::const_iterator | getMonoisotopicMatchIterator(const std::vector<MsXpS::libXpertMassCore::Processing::IsoMatch> &matches, QString &message) const override |
The mass spectra must have been acquired on analytes of natural isotopic abundance (no labelling). Low mass analytes of natural isotopic abundance have their isotopic cluster shaped in such a manner that the monoisotopic isotopologue peak is leftmost and most intense of all the isotopologue peaks (see explanations in AbstractLowMassDeconvolver).
[explicit] LowMassDeconvolverNoLabelling::LowMassDeconvolverNoLabelling(const MsXpS::libXpertMassCore::Processing::LowMassDeconvolverParameters ¶meters)Constructs a LowMassDeconvolverNoLabelling instance using parameters.
The parameters structure members are used to initialize the isotopic data and the Averagine formula. Any failure to do so triggers qFatal().
[virtual noexcept] LowMassDeconvolverNoLabelling::~LowMassDeconvolverNoLabelling()Destructs this instance.
[override virtual] QList<MsXpS::libXpertMassCore::Processing::DeconvolutedFeature> LowMassDeconvolverNoLabelling::deconvolute(const pappso::Trace &input_centroids) constPerforms the deconvolution of the input centroided mass spectrum input_centroids.
Returns a container of DeconvolutedFeature instances corresponding to the found neutral masses along with supporting ions data.
[override virtual protected] bool LowMassDeconvolverNoLabelling::fitIsotopicEnvelope(const pappso::Trace &input_centroids, std::size_t input_centroid_index, MsXpS::libXpertMassCore::Processing::ChargeSpecificFeature &charge_specific_feature, std::vector<bool> &globally_used) constFits the charge_specific_feature contained data to a theoretical isotopic cluster.
The idea of this function implementation is that we get the input_centroid_index index to one centroid of the input_centroids input centroided mass spectrum. That centroid is thus an observed, not a theoretical, centroid characterized by it (m/z, intensity) pair of values. We also get the neutral mass of that centroid m/z, as stored in the charge_specific_feature parameter. This neutral mass is used to compute a theoretical isotopic cluster.
The centroids of the computed neutral theoretical isotopic cluster are iterated into and for each one a m/z value is computed using the charge in charge_specific_feature.
Then, matches are searched from the input centroided mass spectrum to the computed m/z value0. When all the possible centroids of the input mass spectrum have been checked, the matches (if any) are subsequently thoroughly checked for various consistency notions (like inter-centroid distance, isotopic cluster shape correlation between the input mass spectral data and the theoretical isotopic cluster, for example).
If the checks succeed, the input_centroid_index is recorded into globally_used so as to avoid having to iterate into it again. The charge_specific_feature object is then updated with data for the successful match.
Since the mass spectrometry data have been acquired on unlabelled analytes, the iteration in the input mass spectrum, in search for the matches mentioned above, is perform from left to right, that is, from lower to upper m/z values.
Returns true upon a successful fit, false otherwise.
[override virtual protected] std::vector<MsXpS::libXpertMassCore::Processing::ChargeSpecificFeature> LowMassDeconvolverNoLabelling::generateChargeSpecificFeatures(const pappso::Trace &input_centroids) constGenerates a set of ChargeSpecificFeature instances modelled using the input_centroids input centroided mass spectrum.
The implementation of this function does the following:
For each centroid in input_centroids, a set of ChargeSpecificFeature instances is created by iterating in the range of acceptable ion charge values as defined in m_params. Since the charge of the ion beneath each centroid in the input mass spectrum is not known, a neutral mass is sequentially computed corresponding to each one of the values in that charge range. For each charge level, a new ChargeSpecificFeature is allocated.
If the neutral mass that is computed is outside of the [min-max] mass range as defined in m_params, then the input centroid is skipped.
Because the analytes recorded in the input_centroids centroided mass spectrum are not labelled with heavy isotopes (that is, the isotopes have natural abundances), the input mass spectrum is iterated into from the smallest to the greatest m/z values.
All the generated ChargeSpecificFeature instances are returned in a container.
[override virtual protected] pappso::Trace LowMassDeconvolverNoLabelling::getIsotopicClusterReducedToMaxMatchCount(const pappso::Trace &isotopic_cluster) constReturns an isotopic cluster as a pappso::Trace corresponding to isotopic_cluster from which centroids have been removed.
The input isotopic cluster may have more centroids than the number of accepted centroids as specified in m_params.maxIsotopicClusterMatches.
An iterator to the most intense centroid is searched for in isotopic_cluster and as long as the number of centroids is not greater than m_params.maxIsotopicClusterMatches, centroids from isotopic_cluster are copied in the returned isotopic cluster.
This process is equivalent to setting to the returned isotopic cluster only the m_params.maxIsotopicClusterMatches most intense centroids found in isotopic_cluster.
qFatal() is called if it was not possible to find the most intense centroid in isotopic_cluster.
[override virtual protected] std::vector<MsXpS::libXpertMassCore::Processing::IsoMatch, std::allocator<MsXpS::libXpertMassCore::Processing::IsoMatch>>::const_iterator LowMassDeconvolverNoLabelling::getIsotopologueMatchIterator(const std::vector<MsXpS::libXpertMassCore::Processing::IsoMatch> &matches, int isotopologue_index, QString &message) constReturns an iterator to the IsoMatch instance in matches found to be the isotopologue index isotopologue_index of the isotopic cluster.
Because the analytes are non-labelled (that is, of natural isotopic abundances), and because the analytes are of low mass, the monoisotopic centroid has to be both:
isotopologue_index cannot be greater or equal to the number of matches in matches. If so the end iterator to the matches container is returned.
Any message that needs to be fed back to the caller is appended to message.
Isotopologue 0 is the monoisotopic isotopologue's centroid, isotopologue 1 is the centroid that is right of isotopologue 0, isotopologue 2 is the centroid that is found right of isotopologue 1.
Returns an iterator to the IsoMatch item corresponding to the found isotopic cluster's isotopologue_index isotopologue.
[override virtual protected] std::vector<MsXpS::libXpertMassCore::Processing::IsoMatch, std::allocator<MsXpS::libXpertMassCore::Processing::IsoMatch>>::const_iterator LowMassDeconvolverNoLabelling::getMonoisotopicMatchIterator(const std::vector<MsXpS::libXpertMassCore::Processing::IsoMatch> &matches, QString &message) constReturns an iterator to the IsoMatch instance that corresponds to the isotopic cluster centroid match having the greatest intensity among all the matches in matches.
Because the analytes on which the mass spectrum has been acquired are non-labelled (that is, of natural isotopic abundances), the monoisotopic isotopologue centroid is the leftmost centroid of the isotopic cluster.
Any message that needs to be fed back to the caller is appended to message.
See also getIsotopologueMatchIterator.