This is a brief tutorial for conducting differential abundance analysis between two phenotypes and how to correctly add any types of DA analysis to C3NA object for interactive investigation of the co-occurence network. There are three differential abundance analysis done, including ANCOMBC, ALDEx2, and MaAsLin2, all of which conduct differential abundance analysis for each of the taxonomic levels individually. The results are summarized into a single DA table to be added to C3NA. As recommended by other studies, we will filter the count matrices from each taxonomic levels by 10% prevalance prior to running the DA methods.

Library

library(ANCOMBC)
library(ALDEx2)
#> Loading required package: zCompositions
#> Loading required package: MASS
#> Loading required package: NADA
#> Loading required package: survival
#> 
#> Attaching package: 'NADA'
#> The following object is masked from 'package:stats':
#> 
#>     cor
#> Loading required package: truncnorm
#> Loading required package: Rfast
#> Loading required package: Rcpp
#> Loading required package: RcppZiggurat
library(Maaslin2)
library(curl)
#> Using libcurl 7.64.1 with Schannel
library(DT)
library(phyloseq)
library(metagMisc)
suppressPackageStartupMessages(library(tidyverse))

Step 1. Loading the phyloseq data from GitHub

The downloaded data is a phyloseq object with 261 samples, of which 127 are Colorectal Cancer Patients and 134 are healthy control.

githubURL <- ("https://github.com/zhouLabNCSU/C3NA_ScriptsAndData/raw/main/RPackageTutorialData/Post-initiateC3NA/cancer_dada2_CancerAndNormal.rds")
CancerAndNormal <- readRDS(url(githubURL, method="libcurl"))
print(CancerAndNormal)
#> phyloseq-class experiment-level object
#> otu_table()   OTU Table:         [ 14635 taxa and 261 samples ]
#> sample_data() Sample Data:       [ 261 samples by 75 sample variables ]
#> tax_table()   Taxonomy Table:    [ 14635 taxa by 7 taxonomic ranks ]

Step 2. Generating the Data Matrices for Differential Abundance Analysis

# Remove OTUs that do not present among these phenotypes and reformat the data
newPS_otu = as.data.frame(as.matrix(otu_table(CancerAndNormal)))
newPS_otu = newPS_otu[which(rowSums(newPS_otu) > 0),]
newPS_tax = as.data.frame(as.matrix(tax_table(CancerAndNormal)))
newPS_tax = newPS_tax[rownames(newPS_otu), ]
newPS_meta = as.data.frame(as.matrix(sample_data(CancerAndNormal)))
newPS_meta = subset(newPS_meta, diagnosis %in% c("Normal", "Cancer"))
newPS_ps = phyloseq(otu_table(newPS_otu, taxa_are_rows=TRUE),
                             tax_table(as.matrix(newPS_tax)),
                             sample_data(newPS_meta))
print(newPS_ps)
#> phyloseq-class experiment-level object
#> otu_table()   OTU Table:         [ 8055 taxa and 261 samples ]
#> sample_data() Sample Data:       [ 261 samples by 75 sample variables ]
#> tax_table()   Taxonomy Table:    [ 8055 taxa by 7 taxonomic ranks ]
DT::datatable(head(newPS_tax))

Ideally, this should match the taxa names used for the C3NA. Ideally, there should not be any t

# Create a phyloseq object for each taxonomic level
taxaLvls <- c("Phylum", "Class", "Order", "Family", "Genus", "Species")
taxaHeaders <- c("p", "c", "o", "f", "g", "s")
taxaCountMatrices_Abs = list()
psList <- list()
for(t in seq_along(taxaLvls)){
  curLevel = taxaLvls[t]
  psTemp = tax_glom(newPS_ps, curLevel, NArm = FALSE)
  curOTUs = as.data.frame(as.matrix(otu_table(psTemp)))
  ## Summing NAs
  curOTUs$TEMP = as.character(as.data.frame(as.matrix(tax_table(psTemp)))[, curLevel])
  curOTUs <- curOTUs %>%
    mutate(TEMP = ifelse(is.na(TEMP), "NA", TEMP)) %>%
    group_by(TEMP) %>%
    summarise_if(is.numeric, sum) %>%
    column_to_rownames("TEMP")
  ## Add the prefix of taxa
  curHeader = taxaHeaders[t]
  rownames(curOTUs) <- paste0(curHeader,"_",rownames(curOTUs))

  ## Phyloseq Object
  curData = curOTUs
  curData[is.na(curData)] <- 0
  curData <- curData[rowSums(curData)>0, ]  
  tempTaxa = matrix(c(rownames(curData)), ncol = 1)
  colnames(tempTaxa) <- "MixedTaxa"
  rownames(tempTaxa) <- tempTaxa[, 1]
  tempPS = phyloseq(otu_table(curData, taxa_are_rows=TRUE),
                    tax_table(tempTaxa),
                    sample_data(psTemp))

  ## Save the Objects
  taxaCountMatrices_Abs[[curLevel]] = curOTUs
  psList[[taxaLvls[t]]] <- tempPS
}

Create a DA Summary Table

DA_Summary = data.frame(
  TaxaName = NULL, DAMethod = NULL, DiffAbn = NULL
)

Step 3. ANCOMBC

for(i in seq_along(taxaLvls)){
  print(paste0(taxaLvls[i]))
  curSample = psList[[taxaLvls[i]]]
  tempOriNTaxa = nrow(otu_table(curSample))
  curSample = phyloseq_filter_prevalence(curSample, prev.trh = 0.1, abund.trh = NULL,
    threshold_condition = "AND", abund.type = "total")
  ## ANCOMBC with BH
  curANCOMBC = ANCOMBC::ancombc(phyloseq = curSample, formula = "diagnosis",
                                p_adj_method = "BH", zero_cut = 1, 
                                lib_cut = 0, group = "diagnosis",
                                struc_zero = TRUE, neg_lb = TRUE, 
                                tol = 1e-5, max_iter = 100, conserve = FALSE, 
                                alpha = 0.05, global = FALSE)
  curANCOMBC_Res = curANCOMBC$res
  DA_Summary_Summary_temp = data.frame(
      DAMethod = "ANCOMBC",
      TaxaName = rownames(curANCOMBC_Res$beta),
      diff_abn = curANCOMBC_Res$diff_abn[,1])
  DA_Summary = rbind(DA_Summary, DA_Summary_Summary_temp)
}
#> [1] "Phylum"
#> Warning: The multi-group comparison will be deactivated as the group variable
#> has < 3 categories
#> [1] "Class"
#> Warning: The multi-group comparison will be deactivated as the group variable
#> has < 3 categories
#> [1] "Order"
#> Warning: The multi-group comparison will be deactivated as the group variable
#> has < 3 categories
#> [1] "Family"
#> Warning: The multi-group comparison will be deactivated as the group variable
#> has < 3 categories
#> [1] "Genus"
#> Warning: The multi-group comparison will be deactivated as the group variable
#> has < 3 categories
#> [1] "Species"
#> Warning: The multi-group comparison will be deactivated as the group variable
#> has < 3 categories

Step 4. ALDEx2

for(i in seq_along(taxaLvls)){
  print(paste0(taxaLvls[i]))
  curSample = psList[[taxaLvls[i]]]
  tempOriNTaxa = nrow(otu_table(curSample))
  curSample = phyloseq_filter_prevalence(curSample, prev.trh = 0.1, abund.trh = NULL,
    threshold_condition = "AND", abund.type = "total")
  ## ALDEx2 with BH
  curALDEx2 <- ALDEx2::aldex(data.frame(phyloseq::otu_table(curSample)), 
                             phyloseq::sample_data(curSample)$diagnosis, 
                             test="t", effect = TRUE, denom="all")
  DA_Summary_Summary_temp = data.frame(
    DAMethod = "ALDEx2",
    TaxaName = rownames(curALDEx2),
    diff_abn = ifelse(curALDEx2$wi.eBH <=0.05, TRUE, FALSE))
  DA_Summary = rbind(DA_Summary, DA_Summary_Summary_temp)
}
#> [1] "Phylum"
#> aldex.clr: generating Monte-Carlo instances and clr values
#> operating in serial mode
#> computing center with all features
#> aldex.ttest: doing t-test
#> aldex.effect: calculating effect sizes
#> [1] "Class"
#> aldex.clr: generating Monte-Carlo instances and clr values
#> operating in serial mode
#> computing center with all features
#> aldex.ttest: doing t-test
#> aldex.effect: calculating effect sizes
#> [1] "Order"
#> aldex.clr: generating Monte-Carlo instances and clr values
#> operating in serial mode
#> computing center with all features
#> aldex.ttest: doing t-test
#> aldex.effect: calculating effect sizes
#> [1] "Family"
#> aldex.clr: generating Monte-Carlo instances and clr values
#> operating in serial mode
#> computing center with all features
#> aldex.ttest: doing t-test
#> aldex.effect: calculating effect sizes
#> [1] "Genus"
#> aldex.clr: generating Monte-Carlo instances and clr values
#> operating in serial mode
#> computing center with all features
#> aldex.ttest: doing t-test
#> aldex.effect: calculating effect sizes
#> [1] "Species"
#> aldex.clr: generating Monte-Carlo instances and clr values
#> operating in serial mode
#> computing center with all features
#> aldex.ttest: doing t-test
#> aldex.effect: calculating effect sizes

Step 5. MaAsLin2

outputFileNames = c()
for(i in seq_along(taxaLvls)){
  print(paste0(taxaLvls[i]))
  curSample = psList[[taxaLvls[i]]]
  tempOriNTaxa = nrow(otu_table(curSample))
  curSample = phyloseq_filter_prevalence(curSample, prev.trh = 0.1, abund.trh = NULL,
    threshold_condition = "AND", abund.type = "total")
  ## MaAsLin2 with BH
  curMaAsLin2 = Maaslin2::Maaslin2(
    input_data = data.frame(phyloseq::otu_table(curSample)), 
    input_metadata = data.frame(phyloseq::sample_data(curSample)), 
    output = paste0(taxaLvls[i]), 
    transform = "AST",
    fixed_effects = "diagnosis",
    normalization = "TSS",
    standardize = FALSE,
    min_prevalence = 0, plot_heatmap = FALSE, plot_scatter = FALSE)
  DA_Summary_Summary_temp = data.frame(
    DAMethod = "MaAsLin2",
    TaxaName = curMaAsLin2$results$feature,
    diff_abn = ifelse(curMaAsLin2$results$qval <=0.05, TRUE, FALSE)
  )
  DA_Summary = rbind(DA_Summary, DA_Summary_Summary_temp)
  ## Delete the temp folder 
  unlink(taxaLvls[i],recursive=TRUE)
}
#> [1] "Phylum"
#> [1] "Creating output folder"
#> 2022-10-06 21:04:50 INFO::Writing function arguments to log file
#> 2022-10-06 21:04:50 INFO::Verifying options selected are valid
#> 2022-10-06 21:04:50 INFO::Determining format of input files
#> 2022-10-06 21:04:50 INFO::Input format is data samples as columns and metadata samples as rows
#> 2022-10-06 21:04:50 INFO::Formula for fixed effects: expr ~  diagnosis
#> 2022-10-06 21:04:50 INFO::Filter data based on min abundance and min prevalence
#> 2022-10-06 21:04:50 INFO::Total samples in data: 261
#> 2022-10-06 21:04:50 INFO::Min samples required with min abundance for a feature not to be filtered: 0.000000
#> 2022-10-06 21:04:50 INFO::Total filtered features: 0
#> 2022-10-06 21:04:50 INFO::Filtered feature names from abundance and prevalence filtering:
#> 2022-10-06 21:04:50 INFO::Total filtered features with variance filtering: 0
#> 2022-10-06 21:04:50 INFO::Filtered feature names from variance filtering:
#> 2022-10-06 21:04:50 INFO::Running selected normalization method: TSS
#> 2022-10-06 21:04:50 INFO::Bypass z-score application to metadata
#> 2022-10-06 21:04:50 INFO::Running selected transform method: AST
#> 2022-10-06 21:04:50 INFO::Running selected analysis method: LM
#> 2022-10-06 21:04:50 INFO::Fitting model to feature number 1, p_Actinobacteriota
#> 2022-10-06 21:04:50 INFO::Fitting model to feature number 2, p_Bacteroidota
#> 2022-10-06 21:04:50 INFO::Fitting model to feature number 3, p_Campilobacterota
#> 2022-10-06 21:04:50 INFO::Fitting model to feature number 4, p_Cyanobacteria
#> 2022-10-06 21:04:50 INFO::Fitting model to feature number 5, p_Desulfobacterota
#> 2022-10-06 21:04:50 INFO::Fitting model to feature number 6, p_Euryarchaeota
#> 2022-10-06 21:04:50 INFO::Fitting model to feature number 7, p_Firmicutes
#> 2022-10-06 21:04:50 INFO::Fitting model to feature number 8, p_Fusobacteriota
#> 2022-10-06 21:04:50 INFO::Fitting model to feature number 9, p_Proteobacteria
#> 2022-10-06 21:04:50 INFO::Fitting model to feature number 10, p_Synergistota
#> 2022-10-06 21:04:50 INFO::Fitting model to feature number 11, p_Verrucomicrobiota
#> 2022-10-06 21:04:50 INFO::Counting total values for each feature
#> 2022-10-06 21:04:50 INFO::Writing residuals to file Phylum/residuals.rds
#> 2022-10-06 21:04:50 INFO::Writing fitted values to file Phylum/fitted.rds
#> 2022-10-06 21:04:50 INFO::Writing all results to file (ordered by increasing q-values): Phylum/all_results.tsv
#> 2022-10-06 21:04:50 INFO::Writing the significant results (those which are less than or equal to the threshold of 0.250000 ) to file (ordered by increasing q-values): Phylum/significant_results.tsv
#> [1] "Class"
#> [1] "Creating output folder"
#> 2022-10-06 21:04:51 INFO::Writing function arguments to log file
#> 2022-10-06 21:04:51 INFO::Verifying options selected are valid
#> 2022-10-06 21:04:51 INFO::Determining format of input files
#> 2022-10-06 21:04:51 INFO::Input format is data samples as columns and metadata samples as rows
#> 2022-10-06 21:04:51 INFO::Formula for fixed effects: expr ~  diagnosis
#> 2022-10-06 21:04:51 INFO::Filter data based on min abundance and min prevalence
#> 2022-10-06 21:04:51 INFO::Total samples in data: 261
#> 2022-10-06 21:04:51 INFO::Min samples required with min abundance for a feature not to be filtered: 0.000000
#> 2022-10-06 21:04:51 INFO::Total filtered features: 0
#> 2022-10-06 21:04:51 INFO::Filtered feature names from abundance and prevalence filtering:
#> 2022-10-06 21:04:51 INFO::Total filtered features with variance filtering: 0
#> 2022-10-06 21:04:51 INFO::Filtered feature names from variance filtering:
#> 2022-10-06 21:04:51 INFO::Running selected normalization method: TSS
#> 2022-10-06 21:04:51 INFO::Bypass z-score application to metadata
#> 2022-10-06 21:04:51 INFO::Running selected transform method: AST
#> 2022-10-06 21:04:51 INFO::Running selected analysis method: LM
#> 2022-10-06 21:04:51 INFO::Fitting model to feature number 1, c_Actinobacteria
#> 2022-10-06 21:04:51 INFO::Fitting model to feature number 2, c_Alphaproteobacteria
#> 2022-10-06 21:04:51 INFO::Fitting model to feature number 3, c_Bacilli
#> 2022-10-06 21:04:51 INFO::Fitting model to feature number 4, c_Bacteroidia
#> 2022-10-06 21:04:51 INFO::Fitting model to feature number 5, c_Campylobacteria
#> 2022-10-06 21:04:51 INFO::Fitting model to feature number 6, c_Clostridia
#> 2022-10-06 21:04:51 INFO::Fitting model to feature number 7, c_Coriobacteriia
#> 2022-10-06 21:04:51 INFO::Fitting model to feature number 8, c_Cyanobacteriia
#> 2022-10-06 21:04:51 INFO::Fitting model to feature number 9, c_Desulfovibrionia
#> 2022-10-06 21:04:51 INFO::Fitting model to feature number 10, c_Fusobacteriia
#> 2022-10-06 21:04:51 INFO::Fitting model to feature number 11, c_Gammaproteobacteria
#> 2022-10-06 21:04:51 INFO::Fitting model to feature number 12, c_Incertae_Sedis
#> 2022-10-06 21:04:51 INFO::Fitting model to feature number 13, c_Methanobacteria
#> 2022-10-06 21:04:51 INFO::Fitting model to feature number 14, c_NA
#> 2022-10-06 21:04:51 INFO::Fitting model to feature number 15, c_Negativicutes
#> 2022-10-06 21:04:51 INFO::Fitting model to feature number 16, c_Synergistia
#> 2022-10-06 21:04:51 INFO::Fitting model to feature number 17, c_uncultured
#> 2022-10-06 21:04:51 INFO::Fitting model to feature number 18, c_Vampirivibrionia
#> 2022-10-06 21:04:51 INFO::Fitting model to feature number 19, c_Verrucomicrobiae
#> 2022-10-06 21:04:51 INFO::Counting total values for each feature
#> 2022-10-06 21:04:51 INFO::Writing residuals to file Class/residuals.rds
#> 2022-10-06 21:04:51 INFO::Writing fitted values to file Class/fitted.rds
#> 2022-10-06 21:04:51 INFO::Writing all results to file (ordered by increasing q-values): Class/all_results.tsv
#> 2022-10-06 21:04:51 INFO::Writing the significant results (those which are less than or equal to the threshold of 0.250000 ) to file (ordered by increasing q-values): Class/significant_results.tsv
#> [1] "Order"
#> [1] "Creating output folder"
#> 2022-10-06 21:04:51 INFO::Writing function arguments to log file
#> 2022-10-06 21:04:51 INFO::Verifying options selected are valid
#> 2022-10-06 21:04:51 INFO::Determining format of input files
#> 2022-10-06 21:04:51 INFO::Input format is data samples as columns and metadata samples as rows
#> 2022-10-06 21:04:51 INFO::Formula for fixed effects: expr ~  diagnosis
#> 2022-10-06 21:04:51 INFO::Filter data based on min abundance and min prevalence
#> 2022-10-06 21:04:51 INFO::Total samples in data: 261
#> 2022-10-06 21:04:51 INFO::Min samples required with min abundance for a feature not to be filtered: 0.000000
#> 2022-10-06 21:04:51 INFO::Total filtered features: 0
#> 2022-10-06 21:04:51 INFO::Filtered feature names from abundance and prevalence filtering:
#> 2022-10-06 21:04:51 INFO::Total filtered features with variance filtering: 0
#> 2022-10-06 21:04:51 INFO::Filtered feature names from variance filtering:
#> 2022-10-06 21:04:51 INFO::Running selected normalization method: TSS
#> 2022-10-06 21:04:51 INFO::Bypass z-score application to metadata
#> 2022-10-06 21:04:51 INFO::Running selected transform method: AST
#> 2022-10-06 21:04:51 INFO::Running selected analysis method: LM
#> 2022-10-06 21:04:51 INFO::Fitting model to feature number 1, o_Acidaminococcales
#> 2022-10-06 21:04:51 INFO::Fitting model to feature number 2, o_Actinomycetales
#> 2022-10-06 21:04:51 INFO::Fitting model to feature number 3, o_Bacteroidales
#> 2022-10-06 21:04:51 INFO::Fitting model to feature number 4, o_Bifidobacteriales
#> 2022-10-06 21:04:51 INFO::Fitting model to feature number 5, o_Burkholderiales
#> 2022-10-06 21:04:51 INFO::Fitting model to feature number 6, o_Campylobacterales
#> 2022-10-06 21:04:51 INFO::Fitting model to feature number 7, o_Chloroplast
#> 2022-10-06 21:04:51 INFO::Fitting model to feature number 8, o_Christensenellales
#> 2022-10-06 21:04:51 INFO::Fitting model to feature number 9, o_Clostridia
#> 2022-10-06 21:04:51 INFO::Fitting model to feature number 10, o_Clostridia_UCG.014
#> 2022-10-06 21:04:51 INFO::Fitting model to feature number 11, o_Clostridia_vadinBB60_group
#> 2022-10-06 21:04:51 INFO::Fitting model to feature number 12, o_Clostridiales
#> 2022-10-06 21:04:51 INFO::Fitting model to feature number 13, o_Coriobacteriales
#> 2022-10-06 21:04:51 INFO::Fitting model to feature number 14, o_Corynebacteriales
#> 2022-10-06 21:04:51 INFO::Fitting model to feature number 15, o_Desulfovibrionales
#> 2022-10-06 21:04:51 INFO::Fitting model to feature number 16, o_DTU014
#> 2022-10-06 21:04:51 INFO::Fitting model to feature number 17, o_Enterobacterales
#> 2022-10-06 21:04:51 INFO::Fitting model to feature number 18, o_Erysipelotrichales
#> 2022-10-06 21:04:51 INFO::Fitting model to feature number 19, o_Eubacteriales
#> 2022-10-06 21:04:51 INFO::Fitting model to feature number 20, o_Flavobacteriales
#> 2022-10-06 21:04:51 INFO::Fitting model to feature number 21, o_Fusobacteriales
#> 2022-10-06 21:04:51 INFO::Fitting model to feature number 22, o_Gastranaerophilales
#> 2022-10-06 21:04:51 INFO::Fitting model to feature number 23, o_Izemoplasmatales
#> 2022-10-06 21:04:51 INFO::Fitting model to feature number 24, o_Lachnospirales
#> 2022-10-06 21:04:51 INFO::Fitting model to feature number 25, o_Lactobacillales
#> 2022-10-06 21:04:51 INFO::Fitting model to feature number 26, o_Methanobacteriales
#> 2022-10-06 21:04:51 INFO::Fitting model to feature number 27, o_Micrococcales
#> 2022-10-06 21:04:51 INFO::Fitting model to feature number 28, o_Monoglobales
#> 2022-10-06 21:04:51 INFO::Fitting model to feature number 29, o_NA
#> 2022-10-06 21:04:51 INFO::Fitting model to feature number 30, o_Oscillospirales
#> 2022-10-06 21:04:51 INFO::Fitting model to feature number 31, o_Paenibacillales
#> 2022-10-06 21:04:51 INFO::Fitting model to feature number 32, o_Pasteurellales
#> 2022-10-06 21:04:51 INFO::Fitting model to feature number 33, o_Peptococcales
#> 2022-10-06 21:04:51 INFO::Fitting model to feature number 34, o_Peptostreptococcales.Tissierellales
#> 2022-10-06 21:04:51 INFO::Fitting model to feature number 35, o_Pseudomonadales
#> 2022-10-06 21:04:51 INFO::Fitting model to feature number 36, o_RF39
#> 2022-10-06 21:04:51 INFO::Fitting model to feature number 37, o_Rhizobiales
#> 2022-10-06 21:04:51 INFO::Fitting model to feature number 38, o_Rhodospirillales
#> 2022-10-06 21:04:51 INFO::Fitting model to feature number 39, o_Staphylococcales
#> 2022-10-06 21:04:51 INFO::Fitting model to feature number 40, o_Synergistales
#> 2022-10-06 21:04:51 INFO::Fitting model to feature number 41, o_uncultured
#> 2022-10-06 21:04:51 INFO::Fitting model to feature number 42, o_Veillonellales.Selenomonadales
#> 2022-10-06 21:04:51 INFO::Fitting model to feature number 43, o_Verrucomicrobiales
#> 2022-10-06 21:04:51 INFO::Counting total values for each feature
#> 2022-10-06 21:04:51 INFO::Writing residuals to file Order/residuals.rds
#> 2022-10-06 21:04:51 INFO::Writing fitted values to file Order/fitted.rds
#> 2022-10-06 21:04:51 INFO::Writing all results to file (ordered by increasing q-values): Order/all_results.tsv
#> 2022-10-06 21:04:51 INFO::Writing the significant results (those which are less than or equal to the threshold of 0.250000 ) to file (ordered by increasing q-values): Order/significant_results.tsv
#> [1] "Family"
#> [1] "Creating output folder"
#> 2022-10-06 21:04:52 INFO::Writing function arguments to log file
#> 2022-10-06 21:04:52 INFO::Verifying options selected are valid
#> 2022-10-06 21:04:52 INFO::Determining format of input files
#> 2022-10-06 21:04:52 INFO::Input format is data samples as columns and metadata samples as rows
#> 2022-10-06 21:04:52 INFO::Formula for fixed effects: expr ~  diagnosis
#> 2022-10-06 21:04:52 INFO::Filter data based on min abundance and min prevalence
#> 2022-10-06 21:04:52 INFO::Total samples in data: 261
#> 2022-10-06 21:04:52 INFO::Min samples required with min abundance for a feature not to be filtered: 0.000000
#> 2022-10-06 21:04:52 INFO::Total filtered features: 0
#> 2022-10-06 21:04:52 INFO::Filtered feature names from abundance and prevalence filtering:
#> 2022-10-06 21:04:52 INFO::Total filtered features with variance filtering: 0
#> 2022-10-06 21:04:52 INFO::Filtered feature names from variance filtering:
#> 2022-10-06 21:04:52 INFO::Running selected normalization method: TSS
#> 2022-10-06 21:04:52 INFO::Bypass z-score application to metadata
#> 2022-10-06 21:04:52 INFO::Running selected transform method: AST
#> 2022-10-06 21:04:52 INFO::Running selected analysis method: LM
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 1, f_.Clostridium._methylpentosum_group
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 2, f_.Eubacterium._coprostanoligenes_group
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 3, f_Acidaminococcaceae
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 4, f_Actinomycetaceae
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 5, f_Akkermansiaceae
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 6, f_Anaerofustaceae
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 7, f_Anaerovoracaceae
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 8, f_Atopobiaceae
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 9, f_Bacteroidaceae
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 10, f_Barnesiellaceae
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 11, f_Beijerinckiaceae
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 12, f_Bifidobacteriaceae
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 13, f_Butyricicoccaceae
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 14, f_Campylobacteraceae
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 15, f_Carnobacteriaceae
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 16, f_Chloroplast
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 17, f_Christensenellaceae
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 18, f_Clostridia_UCG.014
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 19, f_Clostridia_vadinBB60_group
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 20, f_Clostridiaceae
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 21, f_Coriobacteriaceae
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 22, f_Coriobacteriales_Incertae_Sedis
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 23, f_Corynebacteriaceae
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 24, f_Defluviitaleaceae
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 25, f_Desulfovibrionaceae
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 26, f_DTU014
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 27, f_Eggerthellaceae
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 28, f_Enterobacteriaceae
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 29, f_Enterococcaceae
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 30, f_Erysipelatoclostridiaceae
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 31, f_Erysipelotrichaceae
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 32, f_Eubacteriaceae
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 33, f_Flavobacteriaceae
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 34, f_Fusobacteriaceae
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 35, f_Gastranaerophilales
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 36, f_Gemellaceae
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 37, f_Hungateiclostridiaceae
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 38, f_Izemoplasmatales
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 39, f_Lachnospiraceae
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 40, f_Lactobacillaceae
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 41, f_Leuconostocaceae
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 42, f_Marinifilaceae
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 43, f_Methanobacteriaceae
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 44, f_Micrococcaceae
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 45, f_Monoglobaceae
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 46, f_Muribaculaceae
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 47, f_NA
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 48, f_Neisseriaceae
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 49, f_Oscillospiraceae
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 50, f_Oscillospirales
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 51, f_Oxalobacteraceae
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 52, f_Paenibacillaceae
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 53, f_Pasteurellaceae
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 54, f_Peptococcaceae
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 55, f_Peptostreptococcaceae
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 56, f_Peptostreptococcales.Tissierellales
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 57, f_Porphyromonadaceae
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 58, f_Prevotellaceae
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 59, f_Pseudomonadaceae
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 60, f_RF39
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 61, f_Rikenellaceae
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 62, f_Ruminococcaceae
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 63, f_Selenomonadaceae
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 64, f_Streptococcaceae
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 65, f_Sutterellaceae
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 66, f_Synergistaceae
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 67, f_Tannerellaceae
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 68, f_UCG.010
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 69, f_uncultured
#> 2022-10-06 21:04:52 INFO::Fitting model to feature number 70, f_Veillonellaceae
#> 2022-10-06 21:04:52 INFO::Counting total values for each feature
#> 2022-10-06 21:04:52 INFO::Writing residuals to file Family/residuals.rds
#> 2022-10-06 21:04:52 INFO::Writing fitted values to file Family/fitted.rds
#> 2022-10-06 21:04:52 INFO::Writing all results to file (ordered by increasing q-values): Family/all_results.tsv
#> 2022-10-06 21:04:52 INFO::Writing the significant results (those which are less than or equal to the threshold of 0.250000 ) to file (ordered by increasing q-values): Family/significant_results.tsv
#> [1] "Genus"
#> [1] "Creating output folder"
#> 2022-10-06 21:04:53 INFO::Writing function arguments to log file
#> 2022-10-06 21:04:53 INFO::Verifying options selected are valid
#> 2022-10-06 21:04:53 INFO::Determining format of input files
#> 2022-10-06 21:04:53 INFO::Input format is data samples as columns and metadata samples as rows
#> 2022-10-06 21:04:53 INFO::Formula for fixed effects: expr ~  diagnosis
#> 2022-10-06 21:04:53 INFO::Filter data based on min abundance and min prevalence
#> 2022-10-06 21:04:53 INFO::Total samples in data: 261
#> 2022-10-06 21:04:53 INFO::Min samples required with min abundance for a feature not to be filtered: 0.000000
#> 2022-10-06 21:04:53 INFO::Total filtered features: 0
#> 2022-10-06 21:04:53 INFO::Filtered feature names from abundance and prevalence filtering:
#> 2022-10-06 21:04:53 INFO::Total filtered features with variance filtering: 0
#> 2022-10-06 21:04:53 INFO::Filtered feature names from variance filtering:
#> 2022-10-06 21:04:53 INFO::Running selected normalization method: TSS
#> 2022-10-06 21:04:53 INFO::Bypass z-score application to metadata
#> 2022-10-06 21:04:53 INFO::Running selected transform method: AST
#> 2022-10-06 21:04:53 INFO::Running selected analysis method: LM
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 1, g_.Clostridium._innocuum_group
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 2, g_.Clostridium._methylpentosum_group
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 3, g_.Eubacterium._brachy_group
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 4, g_.Eubacterium._coprostanoligenes_group
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 5, g_.Eubacterium._eligens_group
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 6, g_.Eubacterium._fissicatena_group
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 7, g_.Eubacterium._hallii_group
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 8, g_.Eubacterium._nodatum_group
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 9, g_.Eubacterium._ruminantium_group
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 10, g_.Eubacterium._siraeum_group
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 11, g_.Eubacterium._ventriosum_group
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 12, g_.Eubacterium._xylanophilum_group
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 13, g_.Ruminococcus._gauvreauii_group
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 14, g_.Ruminococcus._gnavus_group
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 15, g_.Ruminococcus._torques_group
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 16, g_Acidaminococcus
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 17, g_Actinomyces
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 18, g_Adlercreutzia
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 19, g_Agathobacter
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 20, g_Akkermansia
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 21, g_Alistipes
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 22, g_Alloprevotella
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 23, g_Anaerococcus
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 24, g_Anaerofilum
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 25, g_Anaerofustis
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 26, g_Anaerosporobacter
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 27, g_Anaerostipes
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 28, g_Anaerotruncus
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 29, g_Angelakisella
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 30, g_Atopobium
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 31, g_Bacteroides
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 32, g_Barnesiella
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 33, g_Bifidobacterium
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 34, g_Bilophila
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 35, g_Blautia
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 36, g_Butyricicoccus
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 37, g_Butyricimonas
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 38, g_Butyrivibrio
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 39, g_CAG.352
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 40, g_CAG.56
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 41, g_Campylobacter
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 42, g_Candidatus_Soleaferrea
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 43, g_Candidatus_Stoquefichus
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 44, g_Catenibacillus
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 45, g_Catenibacterium
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 46, g_CHKCI002
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 47, g_Chloroplast
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 48, g_Christensenella
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 49, g_Christensenellaceae_R.7_group
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 50, g_Cloacibacillus
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 51, g_Clostridia_UCG.014
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 52, g_Clostridia_vadinBB60_group
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 53, g_Clostridium_sensu_stricto_1
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 54, g_Colidextribacter
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 55, g_Collinsella
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 56, g_Coprobacillus
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 57, g_Coprobacter
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 58, g_Coprococcus
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 59, g_Corynebacterium
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 60, g_Defluviitaleaceae_UCG.011
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 61, g_Desulfovibrio
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 62, g_Dialister
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 63, g_Dielma
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 64, g_Dorea
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 65, g_DTU014
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 66, g_DTU089
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 67, g_Eggerthella
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 68, g_Eisenbergiella
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 69, g_Enterococcus
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 70, g_Enterorhabdus
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 71, g_Erysipelatoclostridium
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 72, g_Erysipelotrichaceae_UCG.003
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 73, g_Escherichia.Shigella
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 74, g_Eubacterium
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 75, g_Faecalibacterium
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 76, g_Faecalitalea
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 77, g_Family_XIII_AD3011_group
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 78, g_Family_XIII_UCG.001
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 79, g_Flavonifractor
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 80, g_Fournierella
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 81, g_Frisingicoccus
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 82, g_Fusicatenibacter
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 83, g_Fusobacterium
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 84, g_Gastranaerophilales
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 85, g_GCA.900066575
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 86, g_GCA.900066755
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 87, g_Gemella
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 88, g_Gordonibacter
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 89, g_Granulicatella
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 90, g_Haemophilus
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 91, g_Holdemanella
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 92, g_Holdemania
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 93, g_Howardella
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 94, g_Hungatella
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 95, g_Hydrogenoanaerobacterium
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 96, g_Incertae_Sedis
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 97, g_Intestinibacter
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 98, g_Intestinimonas
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 99, g_Izemoplasmatales
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 100, g_Lachnoclostridium
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 101, g_Lachnospira
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 102, g_Lachnospiraceae_FCS020_group
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 103, g_Lachnospiraceae_ND3007_group
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 104, g_Lachnospiraceae_NK4A136_group
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 105, g_Lachnospiraceae_NK4B4_group
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 106, g_Lachnospiraceae_UCG.001
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 107, g_Lachnospiraceae_UCG.004
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 108, g_Lachnospiraceae_UCG.008
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 109, g_Lachnospiraceae_UCG.009
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 110, g_Lachnospiraceae_UCG.010
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 111, g_Lactobacillus
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 112, g_Lactococcus
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 113, g_Lactonifactor
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 114, g_Leuconostoc
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 115, g_Marvinbryantia
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 116, g_Megasphaera
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 117, g_Merdibacter
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 118, g_Methanobrevibacter
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 119, g_Methylobacterium.Methylorubrum
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 120, g_Mogibacterium
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 121, g_Monoglobus
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 122, g_Moryella
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 123, g_Muribaculaceae
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 124, g_NA
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 125, g_Negativibacillus
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 126, g_Neisseria
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 127, g_NK4A214_group
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 128, g_Odoribacter
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 129, g_Oscillibacter
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 130, g_Oscillospira
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 131, g_Paenibacillus
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 132, g_Paludicola
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 133, g_Parabacteroides
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 134, g_Paraprevotella
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 135, g_Parasutterella
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 136, g_Parvimonas
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 137, g_Peptococcus
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 138, g_Peptoniphilus
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 139, g_Peptostreptococcus
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 140, g_Phascolarctobacterium
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 141, g_Phocea
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 142, g_Porphyromonas
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 143, g_Prevotella
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 144, g_Prevotellaceae_UCG.001
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 145, g_Pseudomonas
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 146, g_RF39
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 147, g_Romboutsia
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 148, g_Roseburia
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 149, g_Rothia
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 150, g_Ruminiclostridium
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 151, g_Ruminococcus
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 152, g_S5.A14a
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 153, g_Sellimonas
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 154, g_Senegalimassilia
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 155, g_Shuttleworthia
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 156, g_Slackia
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 157, g_Solobacterium
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 158, g_Streptococcus
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 159, g_Subdoligranulum
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 160, g_Sutterella
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 161, g_Terrisporobacter
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 162, g_Turicibacter
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 163, g_Tyzzerella
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 164, g_UBA1819
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 165, g_UC5.1.2E3
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 166, g_UCG.002
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 167, g_UCG.003
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 168, g_UCG.005
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 169, g_UCG.008
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 170, g_UCG.009
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 171, g_UCG.010
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 172, g_uncultured
#> 2022-10-06 21:04:53 INFO::Fitting model to feature number 173, g_Veillonella
#> 2022-10-06 21:04:53 INFO::Counting total values for each feature
#> 2022-10-06 21:04:53 INFO::Writing residuals to file Genus/residuals.rds
#> 2022-10-06 21:04:53 INFO::Writing fitted values to file Genus/fitted.rds
#> 2022-10-06 21:04:53 INFO::Writing all results to file (ordered by increasing q-values): Genus/all_results.tsv
#> 2022-10-06 21:04:53 INFO::Writing the significant results (those which are less than or equal to the threshold of 0.250000 ) to file (ordered by increasing q-values): Genus/significant_results.tsv
#> [1] "Species"
#> [1] "Creating output folder"
#> 2022-10-06 21:04:54 INFO::Writing function arguments to log file
#> 2022-10-06 21:04:54 INFO::Verifying options selected are valid
#> 2022-10-06 21:04:54 INFO::Determining format of input files
#> 2022-10-06 21:04:54 INFO::Input format is data samples as columns and metadata samples as rows
#> 2022-10-06 21:04:54 INFO::Formula for fixed effects: expr ~  diagnosis
#> 2022-10-06 21:04:54 INFO::Filter data based on min abundance and min prevalence
#> 2022-10-06 21:04:54 INFO::Total samples in data: 261
#> 2022-10-06 21:04:54 INFO::Min samples required with min abundance for a feature not to be filtered: 0.000000
#> 2022-10-06 21:04:54 INFO::Total filtered features: 0
#> 2022-10-06 21:04:54 INFO::Filtered feature names from abundance and prevalence filtering:
#> 2022-10-06 21:04:54 INFO::Total filtered features with variance filtering: 0
#> 2022-10-06 21:04:54 INFO::Filtered feature names from variance filtering:
#> 2022-10-06 21:04:54 INFO::Running selected normalization method: TSS
#> 2022-10-06 21:04:54 INFO::Bypass z-score application to metadata
#> 2022-10-06 21:04:54 INFO::Running selected transform method: AST
#> 2022-10-06 21:04:54 INFO::Running selected analysis method: LM
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 1, s_.Clostridium._leptum
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 2, s_.Clostridium._scindens
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 3, s_.Clostridium._spiroforme
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 4, s_.Eubacterium._siraeum
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 5, s_Absiella_dolichum
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 6, s_Actinomyces_graevenitzii
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 7, s_Alistipes_indistinctus
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 8, s_Alistipes_inops
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 9, s_Alistipes_obesi
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 10, s_Alistipes_shahii
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 11, s_Alistipes_sp.
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 12, s_Anaerofustis_stercorihominis
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 13, s_Anaerotruncus_sp.
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 14, s_bacterium_YE57
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 15, s_Bacteroides_eggerthii
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 16, s_Bacteroides_intestinalis
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 17, s_Bacteroides_massiliensis
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 18, s_Bacteroides_ovatus
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 19, s_Bacteroides_plebeius
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 20, s_Bacteroides_salyersiae
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 21, s_Bacteroides_sp.
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 22, s_Bacteroides_stercoris
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 23, s_Bacteroides_vulgatus
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 24, s_Blautia_hydrogenotrophica
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 25, s_Blautia_sp.
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 26, s_Christensenella_massiliensis
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 27, s_Christensenella_minuta
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 28, s_Christensenella_sp.
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 29, s_Cloacibacillus_evryensis
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 30, s_Clostridiales_bacterium
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 31, s_Clostridium_perfringens
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 32, s_Clostridium_sp.
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 33, s_Colidextribacter_massiliensis
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 34, s_Collinsella_stercoris
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 35, s_Coprococcus_eutactus
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 36, s_Corynebacterium_durum
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 37, s_Desulfovibrio_desulfuricans
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 38, s_Eubacterium_ramulus
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 39, s_Faecalitalea_cylindroides
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 40, s_gut_metagenome
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 41, s_human_gut
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 42, s_Lachnospiraceae_bacterium
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 43, s_Lactococcus_lactis
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 44, s_Massiliomicrobiota_timonensis
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 45, s_Massiliprevotella_massiliensis
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 46, s_metagenome
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 47, s_Mogibacterium_diversum
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 48, s_Mordavella_sp.
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 49, s_NA
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 50, s_Parabacteroides_distasonis
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 51, s_Parabacteroides_johnsonii
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 52, s_Parabacteroides_merdae
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 53, s_Porphyromonas_asaccharolytica
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 54, s_Ruminococcaceae_bacterium
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 55, s_Ruminococcus_bicirculans
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 56, s_Ruminococcus_lactaris
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 57, s_Ruminococcus_sp.
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 58, s_Schaalia_odontolytica
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 59, s_Solobacterium_moorei
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 60, s_Streptococcus_mutans
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 61, s_Streptococcus_salivarius
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 62, s_Tyzzerella_sp.
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 63, s_uncultured_Alistipes
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 64, s_uncultured_Anaerovorax
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 65, s_uncultured_bacterium
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 66, s_uncultured_Bacteroidales
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 67, s_uncultured_Blautia
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 68, s_uncultured_Clostridia
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 69, s_uncultured_Clostridiaceae
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 70, s_uncultured_Clostridiales
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 71, s_uncultured_Clostridium
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 72, s_uncultured_Dorea
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 73, s_uncultured_Eubacteriaceae
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 74, s_uncultured_Eubacterium
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 75, s_uncultured_Firmicutes
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 76, s_uncultured_Lachnospiraceae
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 77, s_uncultured_marine
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 78, s_uncultured_organism
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 79, s_uncultured_Peptococcaceae
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 80, s_uncultured_prokaryote
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 81, s_uncultured_Roseburia
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 82, s_uncultured_rumen
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 83, s_uncultured_Ruminococcaceae
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 84, s_uncultured_Ruminococcus
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 85, s_uncultured_Thermoanaerobacterales
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 86, s_uncultured_Veillonellaceae
#> 2022-10-06 21:04:54 INFO::Fitting model to feature number 87, s_unidentified
#> 2022-10-06 21:04:54 INFO::Counting total values for each feature
#> 2022-10-06 21:04:54 INFO::Writing residuals to file Species/residuals.rds
#> 2022-10-06 21:04:54 INFO::Writing fitted values to file Species/fitted.rds
#> 2022-10-06 21:04:54 INFO::Writing all results to file (ordered by increasing q-values): Species/all_results.tsv
#> 2022-10-06 21:04:54 INFO::Writing the significant results (those which are less than or equal to the threshold of 0.250000 ) to file (ordered by increasing q-values): Species/significant_results.tsv

Step 6. Convert the Differential Abundance Analysis to a Summary

The shiny application accept a data.frame as shown below to be included into the interactive network display.

DASummaryTable = DA_Summary %>%
  pivot_wider(values_from = diff_abn, names_from = DAMethod, id_cols = TaxaName) %>%
  relocate(TaxaName) ## Relocate the TaxaName column to the front <-- Important!
DT::datatable(DASummaryTable, options = list(pageLength = 20))

Step 7. Adding to C3NA Object

Now the DASummaryTable can be easily added to the C3NA object after the comparePhenotypes() function. The Shiny program will use the TaxaName (first column), and the remaining columns as selectable differential abundance methods in TRUE/FALSE format. Please make sure you only has the TaxaName column followed by a number of DA methods (with unique column names)

## From Tutorial with Demo Step 4:
CancerVsNormal_C3NA = comparePhenotypes(C3NAObj_Comparison =  Cancer_C3NA, 
                                        C3NAObj_Reference = Normal_C3NA,
                                        corCutoff = 0.2, fdr = 0.05, unusefulTaxa = NA, 
                                        nBootstrap = 100, verbose = FALSE)
CancerVsNormal_C3NA = addDAResults(twoPhenoC3NAObj = CancerVsNormal_C3NA, 
                                   DAResults = DASummaryTable)