Generate the initiate C3NA object, including the count matrix, the taxonomic table, and the multi-taxa stacked count matrix for the C3NA analysis. This step also includes the sparcc correlation calculation. Note: sparcc correlation can be extremely computationally expensive. The results will be summarized along with the signed network calcualted from the topology overlap matrix. Finally, different clusters of taxa will be calculated based on a minimal module size range from 3 to 40 (default).

initiateC3NA_DiffCorr(
  corMatrix = corMatrix,
  prevTrh = 0.1,
  phyloseqObj = phyloseqObj,
  nCPUs = "None",
  nBootstrap = "None",
  nMinTotalCount = 1000,
  phenotype = NA,
  minModuleSize = 3,
  maxModuleSize = 40,
  seed = "None"
)

Arguments

corMatrix

(Required) Symmetric correlation matrix, required column and rownames to be in the format of taxonomic name and level, e.g. "p_bacterialName".

prevTrh

(Required) Prevalence threshold of the samples, which is a number between 0 and 1. E.g., the default 0.1 represents 10% of the samples need to have given taxa.

phyloseqObj

(Required) Phyloseq phyloseq object. This should first undergo validatePhyloseq to ensure the diagnosis column are present.

nCPUs

(Optional) Parallel computation for the sparccboot function. Default: 1.

nBootstrap

(Required) Number of bootstrap for the sparcc command. Warning: this is a very computational step.

nMinTotalCount

(Required) The Minimal number of reads per sample. Default: 1,000.

phenotype

(Required) The desired phenotype that present under the diagnosis column in the metadata from phyloseqObj

minModuleSize

(Optional) The lowest number for the minimal size for each cluster. Default: 3.

maxModuleSize

(Optional) The highest number for the minimal size for each cluster. Default: 40.

seed

(Optional)

Value

A list object of C3NA Objects

Examples

data(CRC_Phyloseq)
curPhyloseq = validatePhloseq(phyloseqObj = CRC_Phyloseq)

# Obtain the cancer data
# phyloseq_Cancer = phyloseq::subset_samples(physeq = CRC_Phyloseq, diagnosis == "Cancer")
# Calculate the Stacked-taxa Matrix
# stackedTaxaMatrix = getStackedTaxaMatrix(phyloseqObj = phyloseq_Cancer, phenotype = "Cancer")

# Correlation method- Example
# testCorMatrix = cor(t(stackedTaxaMatrix))

# Method to generate initiate C3NA Object with the correlation matrix
# C3NAObj_Cancer = initiateC3NA_DiffCorr(corMatrix = testCorMatrix,
#                                        phyloseqObj = phyloseq_Cancer, 
#                                        nMinTotalCount = 1000, phenotype = "Cancer" 
#                                        )