Preprocessing of all the data in teh list. This function performs filtering, kNN imputation and orders metabolites across all batches.

kNN imputation is used for missing values, with k set to 10 with knnImputation function from DMwR2 package.

If method intersect is selected, all metabolites present across all batches after filtering those with percentage of metabolite quantified in a batch less than the threshold value. If method union is selected, all metabolites measured in all batches are included, those metabolites with percentage of quantification greater than the threshold will be imputed with kNN and the remaining metabolites will be imputed with the sample mean.

clean(
  dat_list,
  threshold = 0.5,
  method = c("intersect", "union"),
  assay = "raw",
  newAssay = assay
)

Arguments

dat_list

A list of SummarizedExperiment data where each object represents a batch.

threshold

A threshold value between 0 and 1 of missingness to filter.

method

A method to select metabolites across al batches.

assay

An assay name to measure the missingness of the signals.

newAssay

A name of the new assay for cleaned (preprocessed) data.

Value

A list of SummarizedExperiment data after preprocessing.