calculate_log2FC: Calculate log2 fold change

View source: R/calculate_log2FC.R

calculate_log2FCR Documentation

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
)

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

Value

A data frame containing the log2 fold change for each metabolite

Examples

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
)

MetAlyzer documentation built on April 3, 2025, 6:32 p.m.