applyFilt: Apply an S3 filter object to an ftmsData or CoreMSData S3...

View source: R/applyFilt.R

applyFiltR Documentation

Apply an S3 filter object to an ftmsData or CoreMSData S3 object

Description

This function takes a filter object of class 'moleculeFilt', 'massFilt', 'formulaFilt', 'emetaFilt', or 'confFilt' and applies the filter to a dataset of class ftmsData or CoreMSData

Usage

applyFilt(filter_object, msObj, ...)

## S3 method for class 'moleculeFilt'
applyFilt(filter_object, msObj, min_num = 2, ...)

## S3 method for class 'massFilt'
applyFilt(filter_object, msObj, min_mass = 200, max_mass = 900, ...)

## S3 method for class 'formulaFilt'
applyFilt(filter_object, msObj, remove = "NoFormula", ...)

## S3 method for class 'emetaFilt'
applyFilt(
  filter_object,
  msObj,
  min_val = NULL,
  max_val = NULL,
  cats = NULL,
  na.rm = TRUE,
  ...
)

## S3 method for class 'confFilt'
applyFilt(filter_object, msObj, min_conf = 0.5, ...)

Arguments

filter_object

an object of the class 'moleculeFilt', 'massFilt', 'formulaFilt', 'emetaFilt', or 'confFilt'

msObj

an object of the class ftmsData or CoreMSData, created by as.peakData or as.CoreMSData, respectively

...

further arguments as described below based on the class of filter_object

min_num

[moleculeFilt object] an integer value specifying the minimum number of times each biomolecule must be observed across all samples in order to retain the biomolecule. Default value is 2.

min_mass

[massFilt object] a numeric value greater than 0, specifying the minimum mass a peak should have in order to retain the peak. Default value is 200.

max_mass

[massFilt object] a numeric value greater than min_mass, specifying the maximum mass a peak should have in order to retain the peak. Default value is 900.

remove

[formulaFilt object] a character string specifying which set of peaks to filter. Valid options are "NoFormula" and "Formula", defaults to "NoFormula".

min_val

[emetaFilt object] a numeric value specifying the minimum value (inclusive) that a peak should have for the specified 'e_meta' column.

max_val

[emetaFilt object] a numeric value specifying the maximum value (inclusive) that a peak should have for the specified 'e_meta' column.

cats

[emetaFilt object] a vector of character values specifying the level(s) of the specified 'e_meta' column which should be retained.

na.rm

[emetaFilt object] logical value specifying if peaks with NA values for the specified 'e_meta' column should be removed. Default value is TRUE.

min_conf

a numeric value greater than 0 specifying the minimum confidence score a peak should have in order to be retained

Value

An object of the class ftmsData or CoreMSData with specified molecules filtered out of the appropriate datasets

Author(s)

Lisa Bramer

See Also

molecule_filter, mass_filter, formula_filter, emeta_filter, conf_filter


EMSL-Computing/fticRanalysis documentation built on Dec. 18, 2024, 9:51 p.m.