Learn R Programming

MetAlyzer (version 1.1.0)

calculate_log2FC: Calculate log2 fold change

Description

This function calculates log2(FC), p-values, and adjusted p-values of the data using limma.

Usage

calculate_log2FC(
  metalyzer_se,
  categorical,
  impute_perc_of_min = 0.2,
  impute_NA = FALSE
)

Value

A data frame containing the log2 fold change for each metabolite

Arguments

metalyzer_se

A Metalyzer object

categorical

A column specifying the two groups

impute_perc_of_min

A numeric value below 1

impute_NA

Logical value whether to impute NA values

Examples

Run this code
metalyzer_se <- MetAlyzer_dataset(file_path = example_mutation_data_xl())
metalyzer_se <- filterMetabolites(
  metalyzer_se,
  drop_metabolites = "Metabolism Indicators"
)
metalyzer_se <- renameMetaData(
  metalyzer_se,
  Mutant_Control = "Sample Description"
)

metalyzer_se <- calculate_log2FC(
  metalyzer_se,
  categorical = "Mutant_Control",
  impute_perc_of_min = 0.2,
  impute_NA = FALSE
)

Run the code above in your browser using DataLab