significant_met_own: Provides log2fold change and p value on custom metabolomics...

View source: R/significant_met_own.R

significant_met_ownR Documentation

Provides log2fold change and p value on custom metabolomics data using t test.

Description

Provides log2fold change and p value on metabolomics data using t test. One can then calculate significant metabolites by using the dataframe generated from this function.

Usage

significant_met_own(
  metabolomics_data,
  met_col,
  metadata,
  normalization,
  factor1,
  factor2,
  factor_col,
  sample_col,
  p_adjust
)

Arguments

metabolomics_data

metabolomics data associated to refmet class

met_col

column with metabolite names

metadata

Metadata

normalization

method for normalization : "half_of_min": where the NAs are replaced by half of min values in the data "remove_NAs": where Cols with NAs values are removed "50percent": where cols with more than 50% NAs values are removed

factor1

first independent variable

factor2

second independent variable

factor_col

column name of the independent variables

sample_col

the column name having samples

p_adjust

Method for p value adjustment, i.e. "fdr"

Examples

stats_metabolites = significant_met_own(metabolomics_data=refmet_names,met_col="metabolite_name",
metadata=metadata, factor1='No shield', factor2='plus shield',
factor_col='treatment',sample_col='local_sample_id', p_adjust='fdr',normalization="half_of_min")

metabolomicsworkbench/MetENP documentation built on April 12, 2025, 7:55 p.m.