|
The IsotopicClusterGenerator class provides the features needed to model isotopic clusters starting from (elemental-composition, charge) pairs. More...
Header: | #include <IsotopicClusterGenerator.hpp> |
IsotopicClusterGenerator(libXpertMass::IsotopicDataSPtr isotopic_data_sp) | |
virtual | ~IsotopicClusterGenerator() |
void | appendFormulaChargePair(FormulaChargePair &formula_charge_pair) |
QString | clusterToString(const pappso::TraceCstSPtr &isotopic_cluster_sp) const |
QString | clustersToString() const |
bool | configureIsotopicData(std::map<QString, int> &symbol_count_map, int *&per_element_isotopes_count_array_p, int *&per_element_symbol_count_array_p, double **&per_element_isotope_masses_arrays_p_p, double **&per_element_isotope_probs_arrays_p_p) |
IsotopicClusterChargePair | generateIsotopicClusterCentroids(FormulaChargePair formula_charge_pair) |
const std::vector<IsotopicClusterChargePair> & | getIsotopicClusterChargePairs() const |
libXpertMass::IsotopicDataSPtr | getIsotopicData() const |
std::size_t | run() |
pappso::TraceSPtr | runIsotopicDataCalculations(std::size_t element_count, int charge, int *per_element_isotopes_count_array_p, int *per_element_symbol_count_array_p, double **per_element_isotope_masses_arrays_p_p, double **per_element_isotope_probs_arrays_p_p) |
void | setFormulaChargePair(FormulaChargePair &formula_charge_pair) |
void | setFormulaChargePairs(const std::vector<FormulaChargePair> &formula_charge_pairs) |
void | setIsotopicData(libXpertMass::IsotopicDataSPtr isotopic_data_sp) |
void | setIsotopicDataType(IsotopicDataType isotopic_data_type) |
void | setMaxSummedProbability(double max_probability) |
void | setNormalizationIntensity(int normalize_intensity) |
void | setSortOrder(pappso::SortOrder sort_order) |
void | setSortType(pappso::SortType sort_type) |
bool | validateAllFormulas() |
bool | validateFormula(Formula &formula) |
void | normalizeIntensities(pappso::TraceSPtr &isotopic_cluster_sp) |
void | sortPeakCentroids(pappso::TraceSPtr &isotopic_cluster_sp) |
std::vector<FormulaChargePair> | m_formulaChargePairs |
std::vector<IsotopicClusterChargePair> | m_isotopicClusterChargePairs |
IsotopicDataType | m_isotopicDataType |
double | m_maxSummedProbability |
int | m_normalizeIntensity |
pappso::SortOrder | m_sortOrder |
pappso::SortType | m_sortType |
libXpertMass::IsotopicDataSPtr | msp_isotopicData |
The modelling uses the member isotopic data. The generated isotopic clusters only contain cluster centroid peaks. If peaks should have a profile, then they need to be shaped.
See also IsotopicClusterShaper and MassPeakShaper.
Constructs a IsotopicClusterGenerator instance.
[virtual noexcept]
IsotopicClusterGenerator::~IsotopicClusterGenerator()Destructs this IsotopicClusterGenerator instance.
Adds the (elemental composition, charge) pair formula_charge_pair to the member list of FormulaChargePair instances.
Returns a string containing a space-separated set of m/z, intensity pairs, representing the isotopic cluster in isotopic_cluster_sp.
Returns a string containing a space-separated set of m/z, intensity pairs, representing the isotopic clusters in the member isotopic clusters m_isotopicClusterChargePairs.
Configures the isotopic data in a set of arrays for the (symbol,count) pairs in symbol_count_map.
Returns a pappso::Trace with the calculated isotopic cluster.
Calculates the isotopic cluster's peak centroids for formula_charge_pair.
Returns the results of the computation in the form of a IsotopicClusterChargePair instance.
Returns the member list ofIsotopicClusterChargePair instances.
Returns the isotopic data.
[protected]
void IsotopicClusterGenerator::normalizeIntensities(pappso::TraceSPtr &isotopic_cluster_sp)Normalizes the intensities of the isotopic cluster's peak centroids in isotopic_cluster_sp.
If normalization is asked for, the most intense peak centroid in isotopic_cluster_sp is determined. That intensity becomes the m_normalizeIntensity value and all the other peak centroids' intensities are normalized.
Note: The normalization occurs in place.
Starts the computations.
The member m_isotopicClusterChargePairs are first cleared.
Returns the count of IsotopicClusterChargePair instances generated upon the calculations.
Runs the IsoSpec-based isotopic calculations.
Returns a pappso::Trace with the calculated isotopic cluster.
Adds the (elemental composition, charge) pair formula_charge_pair to the member list of FormulaChargePair instances.
The member list of FormulaChargePair instances is first cleared.
Adds the (elemental composition, charge) pairs formula_charge_pairs to the member list of FormulaChargePair instances.
The member list of FormulaChargePair instances is first cleared.
Sets the isotopic data to isotopic_data_sp.
Sets the isotopic data type to isotopic_data_type.
Sets the summed probability maximum value to max_probability.
Sets the normalization intensity to normalize_intensity.
Sets the sort_order.
Sets the sort_type.
[protected]
void IsotopicClusterGenerator::sortPeakCentroids(pappso::TraceSPtr &isotopic_cluster_sp)Sorts the peak centroids of the isotopic cluster isotopic_cluster_sp.
The sort is performed according to m_sortType.
Validates all the elemental compositions in this IsotopicClusterGenerator instance.
Each FormulaChargePair in m_formulaChargePairs is validated for its elemental composition by first creating a Formula out of it.
Returns true if validation was successful, false otherwise.
See also validateFormula and Formula::validate().
Validates the elemental composition formula.
The formula needs to be fully indexed, that is, even an atom present only once needs to be indexed with '1', like this H2O1
.
Returns true if validation was successful, false otherwise.
See also Formula::validate().
This variable holds the set of (elemental composition, charge) pairs.
This variable holds the set of (isotopic cluster, charge) pairs.
This variable holds the IsotopicDataType type of data.
This variable holds the summed probability of all the isotopic cluster peaks. The computation stops when this probability is reached.
This variable holds the most intense cluster peak's intensity that is used to normalize all the other cluster peaks.
This variable holds the order of the sorting for the generated cluster peak centroids.
This variable holds the type of sorting required for the generated cluster peak centroids.
This variable holds the isotopic data needed for the computations.