Skip to contents

Utility method to perform data filtering, used in higher function

Usage

met.PerformFeatureFilter(
  int.mat,
  mSetObj,
  filter = "none",
  remain.num = NULL,
  anal.type = NULL,
  all.rsd = NULL
)

Arguments

int.mat

Data matrix with samples in rows and features in columns, generated by higher function.

mSetObj

Enter the name of the created mSet object (see InitDataObjects and Read.TextData).

filter

(Character) Select an option for unspecific filtering based on the following ranking criteria:

  • "none" apply no unspecific filtering.

  • "rsd" filters features with low relative standard deviation across the dataset.

  • "nrsd" is the non-parametric relative standard deviation.

  • "mean" filters features with low mean intensity value across the dataset.

  • "median" filters features with low median intensity value across the dataset.

  • "sd" filters features with low absolute standard deviation across the dataset.

  • "mad" filters features with low median absolute deviation across the dataset.

  • "iqr" filters features with a low inter-quartile range across the dataset.

remain.num

(Numerical) Enter the number of variables to keep in your dataset. If NULL, the following empirical rules are applied during data filtering with the methods specified in filter = "":

  • Less than 250 variables: 5% will be filtered

  • 250 - 500 variables: 10% will be filtered

  • 500 - 1000 variables: 25% will be filtered

  • More than 1000 variables: 40% will be filtered

anal.type

(Character) Type of analysis. Extracted from mSetObj by higher function at mSetObj$analSet$type.

all.rsd

(Numeric or NULL) Apply a filter based on the in-group relative standard deviation (RSD, in %) or not NULL. Therefore, the RSD of every feature is calculated for every group in the dataset. If the RSD of a variable in any group exceeds the indicated threshold, it is removed from the dataset. This filter can be applied in addition to other filtering methods and is especially useful to perform on data with technical replicates.

Value

A list with filtered data and a message to inform about the chosen filtering conditions

References

adapted from PerformFeatureFilter (https://github.com/xia-lab/MetaboAnalystR).

Author

Nicolas T. Wirth mail.nicowirth@gmail.com Technical University of Denmark License: GNU GPL (>= 2)