Parameters for adduct and fragment annotation
Source:R/AllClasses.R, R/methods-show.R
AdductVoteParam.RdAdductVoteParam() creates the parameter object for annotateAdducts().
Arguments
- rules
data.framewith the adduct and fragment rules in CAMERA's format, with columnsname,nmol,charge,massdiff,quasiandips.NULL(the default) usesdefaultAdductRules()forpolarity.- ppm
numeric(1)relative tolerance (in ppm) for two neutral masses to be considered equal.- mzabs
numeric(1)absolute tolerance added toppm.- polarity
character(1),"positive"or"negative". Selects the default rules.- subset
integerwith the indices of the samples used to compute the representative intensity of each feature. An empty vector (the default) uses all samples. Only used by theXcmsExperimentmethod.- value
character(1)the type of feature value used for the intensities, seexcms::featureValues(). Only used by theXcmsExperimentmethod.- nBest
numeric(1)how many hypotheses per feature are written to theadducttext column.Infwrites all of them. All hypotheses are stored regardless; seeadductHints()andformatAdducts().- object
an
AdductVoteParamobject.
Details
Within each feature group, every feature is tried as every
quasi-molecular ion of the rule list (rules with quasi == 1, such as
[M+H]+). The neutral mass this implies is a hypothesis if at least one
other feature of the group is explained by some rule as an ion of the
same neutral mass. All hypotheses are kept and ranked by the summed rule
score (ips) and then by the summed intensity of the features they
explain.
Examples
AdductVoteParam()
#> Object of class "AdductVoteParam"
#> rules: 159 rules, 5 quasi-molecular
#> ppm: 10
#> mzabs: 0.005
#> polarity: positive
#> value: into
#> subset: all samples
#> nBest: 3
AdductVoteParam(polarity = "negative", nBest = Inf)
#> Object of class "AdductVoteParam"
#> rules: 147 rules, 5 quasi-molecular
#> ppm: 10
#> mzabs: 0.005
#> polarity: negative
#> value: into
#> subset: all samples
#> nBest: Inf