This function returns a moleculeFilt object for use with
applyFilt
molecule_filter(omicsData, use_groups = FALSE, use_batch = FALSE)
object of the class 'pepData', 'proData', 'metabData',
'lipidData', 'nmrData', or 'seqData', created by as.pepData
,
as.proData
, as.metabData
,
as.lipidData
, as.nmrData
, or as.seqData
, respectively.
logical indicator for whether to utilize group information
from group_designation
when calculating the molecule filter.
Defaults to FALSE. When group information is used to calculate the molecule
filter, the minimum number of observations is required within each group,
as opposed to across all samples regardless of group membership.
logical indicator for whether to utilize batch information
from group_designation
when calculating the molecule filter.
Defaults to FALSE. When batch information is used to calculate the molecule
filter, the minimum number of observations is required within each batch,
as opposed to across all samples regardless of batch. If ComBat or similar
method will be used for downstream batch effect correction, this argument
should be set to TRUE.
An S3 object of class 'moleculeFilt' (also a data.frame) that contains the molecule identifier and the number of samples for which the molecule was observed (i.e. not NA)
Attribute of molecule_filt object is "total_poss_obs", the number of total possible observations for each feature (same as the number of samples)
library(pmartRdata)
to_filter <- molecule_filter(omicsData = pep_object)
summary(to_filter, min_num = 2)