calculate_var_shares: Wrapper function to calculate contributions to variance,...

View source: R/core_mimosa2_funcs.R

calculate_var_sharesR Documentation

Wrapper function to calculate contributions to variance, specific method depends on configuration

Description

Wrapper function to calculate contributions to variance, specific method depends on configuration

Usage

calculate_var_shares(
  species_contribution_table,
  met_table,
  model_results,
  config_table,
  valueVar = "newValue",
  species_merge = NULL,
  signif_threshold = 0.2,
  add_summary = T
)

Arguments

species_contribution_table

Table of species contributions (with residuals)

met_table

Long-form table of metabolite concentrations (Only used for permutation-based calculation)

model_results

Model fitting results from fit_cmp_mods

config_table

Table of analysis settings

valueVar

Column name to use for values

signif_threshold

Only analyze metabolites with a model p-value less than this value (for rank-based only)

Value

Data table of variance shares by each species in the original table for each metabolite

Examples

calculate_var_shares(species_cmps)

borenstein-lab/mimosa2 documentation built on Dec. 19, 2024, 12:44 a.m.