cmp_species_contributions: Evaluate species contributors for a single metabolite with...

View source: R/singleSpec_contributions.R

cmp_species_contributionsR Documentation

Evaluate species contributors for a single metabolite with qPCR/species abundance data

Description

Evaluate species contributors for a single metabolite with qPCR/species abundance data

Usage

cmp_species_contributions(
  j,
  cmps_sub_good,
  all_rxns,
  subjects,
  norm_kos,
  ko_net,
  spec_abunds,
  ref_kos,
  cor_with = T
)

Arguments

j

metabolite # (usually from lapply/sapply)

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

spec_abunds

original species abundances

ref_kos

gene abundances for each species

cor_with

whether to look at the correlation of CMP scores of each species by itself with the metabolite, or of the whole community with that species removed

Value

List of length two. Item 1 is a table of all relevant species and correlation between the scores alone and the true scores, while item 2 is a vector of taxa that were classified as potential key taxa.

Examples

sapply(1:length(metabolites), cmp_species_contributions, cmp_scores, all_rxns,
all_subjects, ko_abunds, ko_net, spec_abunds, ref_kos)

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