var_shares_cmps: Get variance share contributions to CMP scores for all...

View source: R/singleSpec_contributions.R

var_shares_cmpsR Documentation

Get variance share contributions to CMP scores for all compounds

Description

Get variance share contributions to CMP scores for all compounds

Usage

var_shares_cmps(
  cmps_sub_good,
  all_rxns,
  subjects,
  norm_kos,
  ko_net,
  all_taxa,
  single_spec_cmps,
  contrib_threshold = 0.45,
  cov_shares = F,
  met_data = NULL
)

Arguments

cmps_sub_good

CMP scores for metabolites with abundance data

all_rxns

list of relevant reactions for each metabolite

subjects

vector of subjects

norm_kos

data.table of gene abundances

ko_net

network created by generate_genomic_network

all_taxa

vector of OTUs

single_spec_cmps

single-species CMP scores calculated from get_spec_contribs function

contrib_threshold

Threshold for binary contribution

cov_shares

Whether to calculate contribution to covariance with mets instead of variance (requires supplying metabolite data)

met_data

Metabolite concentration data (if calculating contribution to covariance)

scaled_pos_contrib

Whether to use scaled positive contributions

Value

data.table of variance contributions to CMP scores

Examples

var_shares_cmps(cmps_total, all_rxns, subjects, norm_kos, ko_net, all_taxa, single_spec_cmps, contrib_threshold)

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