ABCtransform: Adaptive Box-Cox transformation

View source: R/ABCtransform.R

ABCtransformR Documentation

Adaptive Box-Cox transformation

Description

Feature-specific data transformation to improve data normality in untargeted metabolomics.

Usage

ABCtransform(
  FeatureTable,
  Impt = "default",
  LambdaRange = c(-3, 3),
  GapIdentifier = 0,
  SampleInCol = TRUE,
  Output = FALSE
)

Arguments

FeatureTable

Data frame with features in row and samples in column (default).

Impt

A single string specifying the imputation method to be used.

LambdaRange

A numeric vector indicating the optimization range of lambda value.

GapIdentifier

A single value to identify gaps in FeatureTable.

SampleInCol

TRUE if samples are in column. FALSE if samples are in row.

Output

TRUE will output the result table in the current working directory.

Details

Adaptive Box-Cox (ABC) transformation is designed to improve the data normality in untargeted metabolomics. ABC transformation contains three modules:
1. Data pre-treatment by gap-filling and data scaling
2. Optimize lambda value for ABC transformation
3. Perform the ABC data transformation using the optimized lambda value

FeatureTable contains measured signal intensities of metabolic features, with features in row and samples in column (default). The column names should be sample names, and the first row should be sample group names (e.g. control, case).

Four imputation methods are provided here:
1. default, default imputation method by ABC transformation
2. knn, KNN method supported by VIM package. See kNN for details.
3. addition, only replace gaps with identical small values (min/5).
4. rf, random forest method supported by mice package. See mice for details. This method is not recommended due to long calculation time when feature number > 200.

Value

This function returns the transformed data frame.

References

To be updated.

Examples

TransformedTable = ABCtransform(DemoData)

Waddlessss/ABCstats documentation built on May 15, 2024, 10:48 a.m.