Description Usage Arguments Details Value Rules setting Imbecile Note Author(s) See Also Examples
Combines groups of isotope pattern peaks from pattern.search
and groups of adduct peaks adduct.search
to components, with information on homologue series relations from homol.search
attached. Includes some checks for component
plausibility. Needs at least two inputs of (1) isotope pattern relations, (2) adduct relations and (3) homologue series relations. Extracts the most intensive peak
per component, allowing for a comparison of components among HRMS data sets.
Individual components and peak relations therein can then be plotted with plotcomp
.
Numbers for detected isotope m/z differences among components can be summarized with plotisotopes
.
Subsets of components and HRMS data can be interactively selected for with ms.filter
.
1 |
pattern |
List of type pattern produced by |
adduct |
List of type adduct produced by |
homol |
List of type homol produed by |
rules |
Vector with three entries of |
dont |
Numeric vector with one or several values in between 1 and 4, to exclude components with particular warnings; if not used, set to |
The algorithm sorts relations among peaks in HRMS data sets generated by pattern.search
, adduct.search
and
homol.search
to components in a repetition of four consecutive steps.
In a first step, and along decreasing peak intensities, individual peaks are checked for being part of an isotope pattern group and thus relatable to other peaks.
In a second step, all peaks within this group from the first step are checked for being part of adduct groups, thus relating to more peaks.
Step one and two thereby lead to the set of peaks defining a component.
In a third step, all peaks in a component are checked for having adduct or isotope pattern relations to other peaks not yet subsumed into the component, e.g. as
a result of overlapping isotope pattern groups. These additional peaks are therefore defined as interfering peaks.
In a fourth step, all peaks found for a component are, if available, related to homologue series they may be part of.
Once thus assigned to a component, peaks take not further part in subsequent repetitions of step one to initiate a new component (except for interfering peaks, if rules[1]=TRUE
).
However, they may repeatedly be involved in steps two and three to reflect ambiguities of assigning components.
Four plausibility checks are implemented, represented by warning
indices 1 to 4.
The first test checks whether the adduct relations found for the peaks assorted under above steps one and two are consistent. If ambiguous adduct relations (e.g. M+H<->M+K AND M+Na<->M+NH4)
are found for at least one peak, warning 1 is tagged to the concerned component.
The second test checks whether variations in peak intensities within isotope pattern groups are consistent among the different adducts of the same component. This
must account for uncertainty in peak intensities via argument inttol of pattern.search
.
The third check examines whether interfering peaks occur.
The fourth check takes effect if a component consists of ambiguously merged isotope pattern groups (only relevant if several charges are used, see use_charges
argument in
make.isos
and the last of the rules
in pattern.search
).
These warning indices can then be used to exclude components affected, using argument dont.
For example, dont=c(1,3)
excludes components with ambiguous adduct relations and interfering peaks from the
final component list.
List of type comp with 7 entries
comp[[1]] |
|
comp[[2]] |
|
comp[[3]] |
|
comp[[4]] |
|
comp[[5]] |
|
comp[[6]] |
|
comp[[7]] |
|
rules[1]
: Set to TRUE
enables peaks identified as interfering in a component to enter step one of the algorithm (see details).
rules[2]
: Set to TRUE
to remove single-peaked components.
rules[3]
: Set to TRUE
to only list components being part of (a) homologue serie(s).
Do not combine adduct pattern groups and/or isotope pattern groups and/or homologue series information from (a) different peak lists or (b) the same peak list differently ordered.
Component IDs are allocated in decreasing peak intensity order of the most intensive peak per component, see section value, comp[[1]]
.
In contrast, IDs of individual peaks refer to the order in which peaks are provided.
Setting the argument pattern
to FALSE
skips the first step in the algorithm; adducts group are then only searched for a single peak along decreasing peak intensities.
Setting the argument adduct
to FALSE
skips the second step in the algorithm; no adduct groups are then searched for.
Martin Loos
pattern.search
pattern.search2
adduct.search
homol.search
plotisotopes
plotcomp
ms.filter
plotisotopes
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | ######################################################
# (0) Group for isotopologues, adducts & homologues #
data(peaklist);
data(adducts);
data(isotopes);
iso<-make.isos(isotopes,
use_isotopes=c("13C","15N","34S","37Cl","81Br","41K","13C","15N","34S","37Cl","81Br","41K"),
use_charges=c(1,1,1,1,1,1,2,2,2,2,2,2))
pattern<-pattern.search(
peaklist,
iso,
cutint=10000,
rttol=c(-0.05,0.05),
mztol=2,
mzfrac=0.1,
ppm=TRUE,
inttol=0.2,
rules=c(TRUE,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE),
deter=FALSE,
entry=50
);
adduct<-adduct.search(
peaklist,
adducts,
rttol=0.05,
mztol=3,
ppm=TRUE,
use_adducts=c("M+K","M+H","M+Na","M+NH4"),
ion_mode="positive"
);
homol<-homol.search(
peaklist,
isotopes,
elements=c("C","H","O"),
use_C=TRUE,
minmz=5,
maxmz=120,
minrt=1,
maxrt=2,
ppm=TRUE,
mztol=3.5,
rttol=0.5,
minlength=5,
mzfilter=FALSE,
vec_size=3E6,
spar=.45,
R2=.98,
plotit=FALSE
)
##############################################################
# Combine these individual groups to components #
##############################################################
# (1) Standard setting: #
# Produce a component list, allowing for single-peaked #
# components and with interfering peaks also listed as indi- #
# vidual components (with inputs pattern,adduct,homol): #
comp<-combine(
pattern,
adduct,
homol,
dont=FALSE,
rules=c(TRUE,FALSE,FALSE)
);
comp[[6]];
##############################################################
# (2) Produce a list with those components related to a homo-#
# logue series only (requires inputs pattern,adduct,homol): #
comp<-combine(
pattern,
adduct,
homol,
dont=FALSE,
rules=c(TRUE,FALSE,TRUE)
);
comp[[6]];
##############################################################
# (3) Extract only components that are plausible and contain #
# more than one peak per component, without homologue series #
# information attached (with inputs pattern and adduct): #
comp<-combine(
pattern,
adduct,
homol=FALSE,
dont=c(1,2,3),
rules=c(TRUE,TRUE,FALSE)
);
comp[[6]];
##############################################################
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.