|
The IsotopicClusterShaper class provides the features needed to shape sets of (peak centroid m/z, intensity) pairs associated to a given charge into a mass spectral pappso;:Trace. More...
Header: | #include <IsotopicClusterShaper.hpp> |
IsotopicClusterShaper(const pappso::Trace &isotopic_cluster, int charge, const libXpertMass::MassPeakShaperConfig &config) | |
IsotopicClusterShaper(const std::vector<IsotopicClusterChargePair> &isotopic_cluster_charge_pairs, const libXpertMass::MassPeakShaperConfig &config) | |
virtual | ~IsotopicClusterShaper() |
void | appendIsotopicCluster(const pappso::Trace &isotopic_cluster, int charge) |
void | appendIsotopicClusterChargePairs(const std::vector<IsotopicClusterChargePair> &isotopic_cluster_charge_pairs) |
libXpertMass::MassPeakShaperConfig | getConfig() const |
int | getNormalizeIntensity() const |
pappso::Trace & | run(bool reset = true) |
void | setConfig(libXpertMass::MassPeakShaperConfig config) |
void | setIsotopicCluster(const pappso::Trace &isotopic_cluster, int charge) |
void | setIsotopicCluster(pappso::TraceCstSPtr isotopic_cluster_sp, int charge) |
void | setIsotopicCluster(IsotopicClusterChargePair isotopic_cluster_charge_pair) |
void | setIsotopicClusterChargePairs(const std::vector<IsotopicClusterChargePair> &isotopic_cluster_charge_pairs) |
void | setNormalizeIntensity(int max_intensity) |
QString | shapeToString() |
void | setIsotopicCluster(pappso::TraceCstSPtr isotopic_cluster_sp, int charge, bool reset) |
void | setIsotopicCluster(const pappso::Trace &isotopic_cluster, int charge, bool reset) |
void | setIsotopicCluster(IsotopicClusterChargePair isotopic_cluster_charge_pair, bool reset) |
void | setIsotopicClusterChargePairs(const std::vector<IsotopicClusterChargePair> &isotopic_cluster_charge_pairs, bool reset) |
libXpertMass::MassPeakShaperConfig | m_config |
pappso::Trace | m_finalTrace |
double | m_greatestMz |
std::vector<IsotopicClusterChargePair> | m_isotopicClusterChargePairs |
pappso::MapTrace | m_mapTrace |
double | m_mostIntensePeakMz |
pappso::MzIntegrationParams | m_mzIntegrationParams |
int | m_normalizeIntensity |
double | m_smallestMz |
Each set of (peak centroid m/z, intensity) pairs corresponds to an isotopic cluster that is associated to a charge.
The configuration of the peak shaping process is held in a specific MassPeakShaperConfig class.
The output of the computation is a pappso::Trace obtained by combining all the different shapes obtained for the different peak centroids of all the sets of (peak centroid m/z, intensity) pairs. If binning was requested, the obtained Trace is the result of a combination accounting for the required bin size, otherwise the obtained Trace is the result of the mere addition of all the points in the different traces.
See also MassPeakShaperConfig.
Constructs a IsotopicClusterShaper instance.
Each pappso::DataPoint in the isotopic_cluster pappso::Trace corresponds to a (m/z, intensity) peak centroid belonging to the isotopic cluster.
Constructs a IsotopicClusterShaper instance.
In this constructor, a set of sets of (m/z, charge) peak centroids is passed as argument. The pappso::Trace instances in isotopic_cluster_charge_pairs might correspond to all the isotopic clusters representing a given analyte at different charges.
[virtual noexcept]
IsotopicClusterShaper::~IsotopicClusterShaper()Destructs this IsotopicClusterShaper instance.
Adds an isotopic cluster in the form of the isotopic_cluster pappso::Trace associated to the corresponding charge.
The member vector of IsotopicClusterChargePair instances is not cleared before the computations.
Adds isotopic clusters in the form of the isotopic_cluster_charge_pairs vector of IsotopicClusterChargePair instances.
The member vector of IsotopicClusterChargePair instances is not cleared before the computations.
Gets the peak shaping process configuration.
Gets the intensity normalization value.
Runs the mass peak shaping process for all the IsotopicClusterChargePair objects in m_isotopicClusterChargePairs.
If reset is true, the member m_mapTrace and m_finalTrace are cleared before starting the computations. The m_config member is first MassPeakShaperConfig::resolve()d to check that all the parameters have been properly set and are valid.
Returns the obtained pappso::Trace corresponding to the combination of all the individual traces obtained for the various isotopic clusters and their corresponding charge.
Sets the peak shaping process configuration.
Handles the isotopic_cluster input isotopic cluster as a pappso::Trace.
isotopic_cluster is associated to a charge.
The member vector of IsotopicClusterChargePair instances is cleared before the computations.
Handles the isotopic_cluster_sp input isotopic cluster as a pappso::Trace.
isotopic_cluster_sp is associated to a charge.
The member vector of IsotopicClusterChargePair instances is cleared before the computations.
Handles the isotopic_cluster_charge_pair input isotopic cluster as a IsotopicClusterChargePair.
The member vector of IsotopicClusterChargePair instances is cleared before the computations.
[protected]
void IsotopicClusterShaper::setIsotopicCluster(pappso::TraceCstSPtr isotopic_cluster_sp, int charge, bool reset)Handles the isotopic_cluster_sp input isotopic cluster as a pappso::Trace.
isotopic_cluster_sp is associated to a charge. If reset is true, the member vector of IsotopicClusterChargePair instances is cleared before the computations.
This function is the workhorse for all the functions used to set the initial data for the computations. Its main task is to scrutinize the data in isotopic_cluster_sp and update the m_smallestMz, m_greatestMz and m_mostIntensePeakMz values based on the data passed as argument.
[protected]
void IsotopicClusterShaper::setIsotopicCluster(const pappso::Trace &isotopic_cluster, int charge, bool reset)Handles the isotopic_cluster input isotopic cluster as a pappso::Trace.
isotopic_cluster is associated to a charge. If reset is true, the member vector of IsotopicClusterChargePair instances is cleared before the computations.
[protected]
void IsotopicClusterShaper::setIsotopicCluster(IsotopicClusterChargePair isotopic_cluster_charge_pair, bool reset)Handles the isotopic_cluster_charge_pair input isotopic cluster as a IsotopicClusterChargePair.
If reset is true, the member vector of IsotopicClusterChargePair instances is cleared before the computations.
Handles the isotopic_cluster_charge_pairs input isotopic cluster as a vector of IsotopicClusterChargePair instances.
The member vector of IsotopicClusterChargePair instances is cleared before the computations.
[protected]
void IsotopicClusterShaper::setIsotopicClusterChargePairs(const std::vector<IsotopicClusterChargePair> &isotopic_cluster_charge_pairs, bool reset)Handles the isotopic_cluster_charge_pairs input isotopic cluster as a vector of IsotopicClusterChargePair instances.
If reset is true, the member vector of IsotopicClusterChargePair instances is cleared before the computations.
Sets the intensity normalization value to max_intensity.
Returns the final result of all the computations as a string.
This variable holds the configuration driving the mass peak shaping process.
This variable holds the pappso::Trace holding the final results of the computations.
This variable holds the greatest m/z value encountered during the calculations.
This value is required for the crafting of the bins.
Vector of pappso::Trace instances in pair with charges.
This variable holds the map relating a m/z value to its intensity.
This map is a variant of pappso::Trace that is designed to allow for easy mass spectrum combination. It is generally used only for computations and is converted to a pappso::Trace once all the computations have been carried out.
This variable holds the most intense peak encountered during the calculations.
This variable holds the configuration of the mass spectral combinations (for example, determines the bins, if binning is required).
This variable holds the value by which all the peak shapes need to be normalized.
This variable holds the smallest m/z value encountered during the calculations.
This value is required for the crafting of the bins.