molecule_filter: Molecule Filter Object

View source: R/filter_objects.R

molecule_filterR Documentation

Molecule Filter Object

Description

This function returns a moleculeFilt object for use with applyFilt

Usage

molecule_filter(omicsData, use_groups = FALSE, use_batch = FALSE)

Arguments

omicsData

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.

use_groups

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.

use_batch

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.

Details

Attribute of molecule_filt object is "total_poss_obs", the number of total possible observations for each feature (same as the number of samples)

Value

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)

Author(s)

Kelly Stratton

Examples


library(pmartRdata)
to_filter <- molecule_filter(omicsData = pep_object)
summary(to_filter, min_num = 2)


pmartR/pmartRqc documentation built on March 4, 2024, 3:46 p.m.