R/generics.R
, R/components-nontarget.R
generateComponentsNontarget.Rd
Uses the nontarget R package to generate components by unsupervised detection of homologous series.
generateComponentsNontarget(fGroups, ...)
# S4 method for class 'featureGroups'
generateComponentsNontarget(
fGroups,
ionization = NULL,
rtRange = c(-120, 120),
mzRange = c(5, 120),
elements = c("C", "H", "O"),
rtDev = 30,
absMzDev = 0.002,
absMzDevLink = absMzDev * 2,
traceHack = all(R.Version()[c("major", "minor")] >= c(3, 4)),
...
)
# S4 method for class 'featureGroupsSet'
generateComponentsNontarget(fGroups, ionization = NULL, ...)
featureGroups
object for which components should be generated.
Any further arguments passed to homol.search
.
Further arguments passed to the non-sets workflow method.
Which ionization polarity was used to generate the data: should be "positive"
or "negative"
. If the featureGroups
object has adduct annotations, and ionization=NULL
, the
ionization will be detected automatically.
This parameter is not supported for sets workflows, as the ionization will always be detected automatically.
A numeric vector containing the minimum and maximum retention time (in seconds) between homologues.
Series are always considered from low to high m/z, thus, a negative minimum retention time allows detection
of homologous series with increasing m/z and decreasing retention times. These values set the minrt
and maxrt
arguments of homol.search
.
A numeric vector specifying the minimum and maximum m/z increment of a homologous series. Sets
the minmz
and maxmz
arguments of homol.search
.
A character vector with elements to be considered for detection of repeating units. Sets the
elements
argument of homol.search
function.
Maximum retention time deviation. Sets the rttol
to homol.search
.
Maximum absolute m/z deviation. Sets the mztol
argument to homol.search
Maximum absolute m/z deviation when linking series. This should usually be a bit higher
than absMzDev
to ensure proper linkage.
Currently homol.search
does not work with R >3.3.3. This flag, which is
enabled by default on these R versions, implements a (messy) workaround
(more details here).
The generated comnponents are returned as an object from the componentsNT
class.
This function uses nontarget to generate components. This function is called when calling generateComponents
with
algorithm="nontarget"
.
In the first step the homol.search
function is used to detect all homologous series
within each replicate group (analyses within each replicate group are averaged prior to detection). Then,
homologous series across replicate groups are merged in case of full overlap or when merging of partial overlapping
series causes no conflicts.
In a sets workflow the componentization is first performed for each
set independently. The resulting components are then all combined in a componentsNTSet
object. Note that
the components themselves are never merged. The components are renamed to include the set name from which they were
generated (e.g. "CMP1"
becomes "CMP1-positive"
).
The output class supports additional methods such as plotGraph
.
Loos2017patRoon
enviPat1
generateComponents
for more details and other algorithms.