Simple function to calculate feature summaries. These include counts and
percentages of samples in which a chromatographic peak is present for each
feature and counts and percentages of samples in which more than one
chromatographic peak was annotated to the feature. Also relative standard
deviations (RSD) are calculated for the integrated peak areas per feature
across samples. For perSampleCounts = TRUE
also the individual
chromatographic peak counts per sample are returned.
Arguments
- x
XcmsExperiment()
orXCMSnExp()
object with correspondence results.- group
numeric
,logical
,character
orfactor
with the same length thanx
has samples to aggregate counts by the groups defined ingroup
.- perSampleCounts
logical(1)
whether feature wise individual peak counts per sample should be returned too.- method
character
passed to thefeatureValues()
function. See respective help page for more information.- skipFilled
logical(1)
whether filled-in peaks should be excluded (default) or included in the summary calculation.
Value
matrix
with one row per feature and columns:
"count"
: the total number of samples in which a peak was found."perc"
: the percentage of samples in which a peak was found."multi_count"
: the total number of samples in which more than one peak was assigned to the feature."multi_perc"
: the percentage of those samples in which a peak was found, that have also multiple peaks annotated to the feature. Example: for a feature, at least one peak was detected in 50 samples. In 5 of them 2 peaks were assigned to the feature."multi_perc"
is in this case 10%."rsd"
: relative standard deviation (coefficient of variation) of the integrated peak area of the feature's peaks.The same 4 columns are repeated for each unique element (level) in
group
ifgroup
was provided.
If perSampleCounts = TRUE
also one column for each sample is returned
with the peak counts per sample.