featureValues,XCMSnExp
: extract a matrix
for
feature values with rows representing features and columns samples.
Parameter value
allows to define which column from the
chromPeaks
matrix should be returned. Multiple
chromatographic peaks from the same sample can be assigned to a feature.
Parameter method
allows to specify the method to be used in such
cases to chose from which of the peaks the value should be returned.
Parameter `msLevel` allows to choose a specific MS level for which feature
values should be returned (given that features have been defined for that MS
level).
quantify,XCMSnExp
: return the preprocessing results as an
SummarizedExperiment
object containing the feature abundances
as assay matrix, the feature definitions (returned by
featureDefinitions
) as rowData
and the phenotype
information as colData
. This is an ideal container for further
processing of the data. Internally, the featureValues
method
is used to extract the feature abundances, parameters for that method can
be passed to quantify
with ...
.
Arguments
- object
A
XCMSnExp
object providing the feature definitions.- ...
For
quantify
: additional parameters to be passed on to thefeatureValues
method.- method
character
specifying the method to resolve multi-peak mappings within the same sample, i.e. to define the representative peak for a feature in samples where more than one peak was assigned to the feature. If"medret"
: select the peak closest to the median retention time of the feature. If"maxint"
: select the peak yielding the largest signal. If"sum"
: sum the values (only ifvalue
is"into"
or"maxo"
.- value
character
specifying the name of the column inchromPeaks(object)
that should be returned. Defaults to"into"
in which case the integrated peak area is returned. To get the index of the peak in thechromPeaks(object)
matrix use"index"
.- intensity
character
specifying the name of the column in thechromPeaks(objects)
matrix containing the intensity value of the peak that should be used for the conflict resolution ifmethod = "maxint"
.- filled
logical(1)
specifying whether values for filled-in peaks should be returned or not. Iffilled = FALSE
, anNA
is returned in the matrix for the respective peak. SeefillChromPeaks
for details on peak filling.- missing
how missing values should be reported. Allowed values are
NA
(the default), anumeric
ormissing = "rowmin_half"
. The latter replaces anyNA
with half of the row's minimal (non-missing) value.- msLevel
for `featureValues`: `integer` defining the MS level(s) for which feature values should be returned. By default, values for features defined for all MS levels are returned.
Value
For featureValues
: a matrix
with
feature values, columns representing samples, rows features. The order
of the features matches the order found in the
featureDefinitions(object)
DataFrame
. The rownames of the
matrix
are the same than those of the featureDefinitions
DataFrame
. NA
is reported for features without
corresponding chromatographic peak in the respective sample(s).
For quantify
: a SummarizedExperiment
representing
the preprocessing results.
Note
This method is equivalent to the groupval
for
xcmsSet
objects. Note that missing = 0
should be used to
get the same behaviour as groupval
, i.e. report missing values as 0
after a call to fillPeaks
.
See also
XCMSnExp
for information on the data object.
featureDefinitions
to extract the DataFrame
with the
feature definitions.
featureChromatograms
to extract ion chromatograms for each
feature.
hasFeatures
to evaluate whether the
XCMSnExp
provides feature definitions.
groupval
for the equivalent method on xcmsSet
objects.