filter_peaks_by_fraction | R Documentation |
Metabolomics datasets often contain 'features' with irreproducible peak intensity values, or with large numbers of missing values. This tool facilitates the remove of such features from a data matrix, based upon the relative proportion (minimum fraction) of samples containing non-missing values.
filter_peaks_by_fraction(
df,
min_frac,
classes = NULL,
method = "QC",
qc_label = "QC",
remove_peaks = TRUE
)
df |
A matrix-like (e.g. an ordinary matrix, a data frame) or
RangedSummarizedExperiment-class object with
all values of class |
min_frac |
|
classes |
|
method |
|
qc_label |
|
remove_peaks |
|
Object of class SummarizedExperiment
. If input data are a
matrix-like (e.g. an ordinary matrix, a data frame) object, function returns
numeric()
matrix-like object of filtered data set. Function
flags
are added to the object attributes
and is a
DataFrame-class with five columns. The same
DataFrame
object containing flags is added to rowData()
element of SummarizedExperiment
object as well.
Columns in rowData()
or flags
element contain fractions
of missing values per feature within QC samples (mehtod QC
),
across (method across
) or within (mehtod within
) each sample
group.
df <- MTBLS79[ ,MTBLS79$Batch == 1]
out <- filter_peaks_by_fraction(df=df, min_frac=1,
classes=df$Class, method='QC', qc_label='QC')
out <- filter_peaks_by_fraction(df=df, min_frac=1,
classes=df$Class, method='across', qc_label='QC')
out <- filter_peaks_by_fraction(df=df, min_frac=1,
classes=df$Class, method='within', qc_label='QC')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.