![]() |
OpenMS
2.4.0
|
#include <OpenMS/CHEMISTRY/ISOTOPEDISTRIBUTION/IsoSpecWrapper.h>
Public Member Functions | |
IsoSpecThresholdWrapper (const std::vector< int > &isotopeNumbers, const std::vector< int > &atomCounts, const std::vector< std::vector< double > > &isotopeMasses, const std::vector< std::vector< double > > &isotopeProbabilities, double threshold, bool absolute) | |
A non-generator version of IsoSpecThresholdGeneratorWrapper. More... | |
IsoSpecThresholdWrapper (const EmpiricalFormula &formula, double threshold, bool absolute) | |
Setup the algorithm to run on an EmpiricalFormula. More... | |
virtual IsotopeDistribution | run () override final |
A convenience class for the IsoSpec algorithm - easier to use than the generator classes. More... | |
![]() | |
virtual | ~IsoSpecWrapper () |
Protected Attributes | |
IsoSpec::IsoThresholdGenerator | ITG |
IsoSpecThresholdWrapper | ( | const std::vector< int > & | isotopeNumbers, |
const std::vector< int > & | atomCounts, | ||
const std::vector< std::vector< double > > & | isotopeMasses, | ||
const std::vector< std::vector< double > > & | isotopeProbabilities, | ||
double | threshold, | ||
bool | absolute | ||
) |
A non-generator version of IsoSpecThresholdGeneratorWrapper.
This is the simplest algorithm - most users will however want to use IsoSpecTotalProbWrapper. The reason for it is that when thresholding by peak intensity one has no idea how far the obtained spectrum is from a real spectrum. For example, consider human insulin: if the threshold is set at 0.1 of the most intense peak, then the peaks above the treshhold account for 99.7% of total probability for water, 82% for substance P, only 60% for human insulin, and 23% for titin. For a threshold of 0.01, the numbers will be: still 99.7% for water, 96% for substance P, 88% for human insulin and 72% for titin (it also took 5 minutes on an average notebook computer to process the 17 billion configurations involved).
As you can see the threshold does not have a straightforward correlation to the accuracy of the final spectrum obtained - and accuracy of final spectrum is often what the user is interested in. The IsoSpeTotalcProbGeneratorWrapper provides a way to directly parametrise based on the desired accuracy of the final spectrum - and should be used instead in most cases. The tradeoff is that it's (slightly) slower than Threshold algorithm. This speed gap will be dramatically improved with IsoSpec 2.0.
isotopeNumbers | A vector of how many isotopes each element has, e.g. [2, 2, 3]) |
atomCounts | How many atoms of each we have [e.g. 12, 6, 6 for Glucose] |
isotopeMasses | Array with the individual elements isotopic masses |
isotopeProbabilities | Array with the individual elements isotopic probabilities |
threshold | Intensity threshold: will only compute peaks above this threshold |
absolute | Whether the threshold is absolute or relative (relative to the most intense peak) |
IsoSpecThresholdWrapper | ( | const EmpiricalFormula & | formula, |
double | threshold, | ||
bool | absolute | ||
) |
Setup the algorithm to run on an EmpiricalFormula.
|
finaloverridevirtual |
A convenience class for the IsoSpec algorithm - easier to use than the generator classes.
Run the algorithm
This method will run the algorithm with parameters as set up by the constructor. It will return an IsotopeDistribution containing the observed configurations. The configurations are explicitly stored in memory, which may become a problem when considering some especially large distributions. If this, or (a rather small) performance overhead is a concern, then the generator methods (below) should be used instead.
This method is provided for convience. As calling that method invalidates the object (the method should not be called again, nor anything other than destroying the object should be done with it), the most common usage pattern of IsoSpecGeneratorWrapper classes with the run method is:
IsotopeDistribution dist = IsoSpecGeneratorWrapperSubclass(...).run(); do something with dist;
Implements IsoSpecWrapper.
|
protected |