PercentMissingFilter: Filter features based on the percentage of missing data

View source: R/method-filterFeatures.R

PercentMissingFilterR Documentation

Filter features based on the percentage of missing data


The 'PercentMissingFilter' class and method enable users to filter features from an 'XcmsExperiment' or 'SummarizedExperiment' object based on the percentage (values from 1 to 100) of missing values for each features in different sample groups and filters them according to a provided threshold.

This 'filter' is part of the possible dispatch of the generic function 'filterFeatures'. Features with a percentage of missing values *higher* ('>') than the user input threshold in all sample groups will be removed (i.e. features for which the proportion of missing values is below ('<=') the threshold in at least one sample group will be retained).


PercentMissingFilter(threshold = 30, f = factor())

## S4 method for signature 'XcmsResult,PercentMissingFilter'
filterFeatures(object, filter, ...)

## S4 method for signature 'SummarizedExperiment,PercentMissingFilter'
filterFeatures(object, filter, assay = 1)



'numeric' percentage (between 0 and 100) of accepted missing values for a feature in one sample group.


'vector' of the same length as the 'object', specifying the sample type for each sample in the dataset. The percentage of missing values per feature will be computed within each of these sample groups. Parameter 'f', if not already a 'factor', will be converted to one using the factor function. Samples with an 'NA' as their value in 'f' will be excluded from calculation.


XcmsExperiment or SummarizedExperiment. For an XcmsExperiment object, the featureValues(object) will be evaluated, and for Summarizedesxperiment the assay(object, assay). The object will be filtered.


The parameter object selecting and configuring the type of filtering. It can be one of the following classes: RsdFilter, DratioFilter, PercentMissingFilter or BlankFlag.


Optional parameters. For object being an XcmsExperiment: parameters for the featureValues() call.


For filtering of SummarizedExperiment objects only. Indicates which assay the filtering will be based on. Note that the features for the entire object will be removed, but the computations are performed on a single assay. Default is 1, which means the first assay of the object will be evaluated.


For 'PercentMissingFilter': a 'PercentMissingFilter' class. 'filterFeatures' return the input object minus the features that did not met the user input threshold


Philippine Louail

See Also

Other Filter features in xcms: BlankFlag, DratioFilter, RsdFilter

sneumann/xcms documentation built on June 5, 2024, 4:28 p.m.