This function returns a moleculeFilt object for use with applyFilt

molecule_filter(ftmsObj)

Arguments

ftmsObj

an object of class 'peakData' or 'compoundData', typically a result of as.peakData or mapPeaksToCompounds.

Value

Object of class 'moleculeFilt' that contains the molecule identifier and the number of samples for which the molecule was measured (not 0). This can be used in conjunction with applyFilt to remove peaks observed in fewer than min_num samples.

Author

Lisa Bramer

Examples

data("examplePeakData")
filter_obj <- molecule_filter(examplePeakData)
peakDataFiltered <- applyFilt(filter_obj, examplePeakData, min_num=2)