isopattern(isotopes, chemforms, threshold = 0.001, charge = FALSE,
emass = 0.00054858, plotit = FALSE, algo=2, rel_to_mono = FALSE)
isotopes
.chemforms
or the second column in the value of check_chemform
0
if all peaks shall be calculated.chemforms
.
Set to FALSE
for omitting any charge calculations.charge
is not set to FALSE
.TRUE/FALSE
?1
or 2
. See details.TRUE/FALSE
?chemforms
; names of entries in list = chemical formula in chemform.
Each entry in that list contains information on individual isotopologues (rows) with columns:threshold
may lead to unnecessary calculation of low abundance peaks - to the extent that not enough memory is available
for either of the two algorithms. This is especially critial if rel_to_mono
is set to TRUE
.algo
. All algorithms use
hierarchical updates to derive the mass and abundance of a new isotopologue from an existing one, by steps of single isotope replacements.
Memory usage is lower and in most cases faster for the first two algorithms as compared to the third,
allowing for calculation of very large molecules or inclusion of elements with many isotopes. Comparable in memory allocation, the second algorithm is
faster for very small molecules than the first - but much slower for larger ones.
The first algorithm algo=1
uses tree-like combinatorial transitions to calculate daughter isotopologues from their parent node isotopologues, with
the monoisotopic composition as root node.
This approach first searches for branches of increasing abundance to find the isotopologue of maximum abundance, with transitions ordered as to minimize
the occurrence of decreasing branches. The remaining branches are subsequently omitted if they (a) fall below a threshold relative to this most abundant
isotopologue and (b) only contain branches of decreasing abundance. Furthermore, to avoid redundant calculations for transitions of the same isotope
(but not the same isotopologues!), this global search is conducted in elementwise subtrees that are then combined.
The second algorithm algo=2
does not use elementwise subtree maximum abundance searches with no differences to the first algorithm otherwise.
The third algorithm algo=3
is similar to the one poposed by Li et al. (2010). Herein, mass states and abundances are calculated
individually within seperate blocks for each of the elements present in a molecule without (!) abundance thresholds.
These building-blocks are then combined to individual isotopologues, with peaks below the threshold abundance evenutally omitted.
In the presented version, a fast calculation of elementwise building-blocks and their combination to isotopologues is implemented so as to avoid redundant
calculations from both different updates or different combinations leading to the same isotopologue.
Note that when rel_to_mono
is set to TRUE
, the abundance threshold
is specified relative to the monoisotopic instead of the most abundant peak.isopattern
chemforms
check_chemform
getR
envelope
vdetect
check_several
############################
# batch of chemforms #######
data(isotopes)
data(chemforms)
pattern<-isopattern(
isotopes,
chemforms,
threshold=0.1,
plotit=TRUE,
charge=FALSE,
emass=0.00054858,
algo=2
)
############################
# Single chemical formula ##
data(isotopes)
pattern<-isopattern(
isotopes,
"C100H200S2Cl5",
threshold=0.1,
plotit=TRUE,
charge=FALSE,
emass=0.00054858,
algo=2
)
############################
Run the code above in your browser using DataLab