Initiate sets workflows from specified feature data.
Usage
makeSet(obj, ...)
# S4 method for class 'features'
makeSet(obj, ..., adducts, labels = NULL)
# S4 method for class 'featuresSet'
makeSet(obj, ...)
# S4 method for class 'featureGroups'
makeSet(
obj,
...,
groupAlgo,
groupArgs = NULL,
verbose = TRUE,
adducts = NULL,
labels = NULL
)
# S4 method for class 'featureGroupsSet'
makeSet(obj, ...)Arguments
- obj, ...
featuresorfeatureGroupsobjects that should be used for the sets workflow.- adducts
The adduct assignments to each set. Should either be a
listwithadductobjects or acharactervector (e.g."[M+H]+"). The order should follow that of the objects given to theobjand...arguments.For the
featureGroupsmethod: ifNULLthen adduct annotations are used.- labels
The labels, or set names, for each set to be created. The order should follow that of the objects given to the
objand...arguments. IfNULL, then labels are automatically generated from the polarity of the specifiedadductsargument (e.g."positive","negative").- groupAlgo
groupAlgo The name of the feature grouping algorithm. See the
algorithmargument ofgroupFeaturesfor details.- groupArgs
A
listwith arguments directly passed togroupFeatures(can be named). Example:groupArgs=list(maxAlignMZ=0.002).- verbose
If set to
FALSEthen no text output is shown.
Value
Either a featuresSet object (features method) or featureGroupsSet object
(featureGroups method).
Details
The makeSet method function is used to initiate a sets workflow. The features from
input objects are combined and then neutralized by replacing their m/z values by neutral monoisotopic
masses. After neutralization features measured with e.g. different ionization polarities can be grouped since
their neutral mass will be the same.
The analysis information for this object is updated with all analyses, and a set
column is added to designate the set of each analysis. Note that currently, all analyses names must be
unique across different sets.
makeSet supports two types of input:
featuresobjects:makeSetcombines the input objects into afeaturesSetobject, which is then grouped in the 'usual way' withgroupFeatures.featureGroupsobjects: In this case the features from the input objects are first neutralized and feature groups between sets are then combined withgroupFeatures.
The advantage of the featureGroups method is that it preserves any adduct annotations already present
(e.g. as set by selectIons or adducts<-). Furthermore, this approach allows more advanced
workflows where the input featureGroups are first pre-treated with e.g. filter before the sets object
is made. On the other hand, the features method is easier, as it doesn't require intermediate feature grouping
steps and is often sufficient since adduct annotations can be made afterwards with selectIons/adducts<-
and most filter operations do not need to be done per individual set.
The adduct information used for feature neutralization is specified through the adducts argument.
Alternatively, when the featureGroups method of makeSet is used, then the adduct annotations already
present in the input objects can also by used by setting adducts=NULL. The adduct information is also used to
add adduct annotations to the output of makeSet.