| filter_samples_by_mv {pmp} | R Documentation |
Missing values in mass spectrometry metabolomic datasets occur widely and can originate from a number of sources, including for both technical and biological reasons. In order for robust conclusions to be drawn from down-stream statistical testing procedures, the issue of missing values must first be addressed. This tool facilitates the removal of samples containing a user-defined maximum percentage of missing values.
filter_samples_by_mv(df, max_perc_mv, classes = NULL, remove_samples = TRUE)
df |
A matrix-like (e.g. an ordinary matrix, a data frame) or
RangedSummarizedExperiment-class object with
all values of class |
max_perc_mv |
|
classes |
|
remove_samples |
|
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. If element
colData() already exists flags are appended to existing values.
Columns in colData() or flags element contain:
perc_mv numeric(), fraction of missing values per sample;
flags integer(),if 0 feature is flagged to be removed.
df <- MTBLS79 out <- filter_samples_by_mv (df=df, max_perc_mv=0.8)