View source: R/moduleRelated.r
getStackedTaxaMatrix | R Documentation |
Generate the stacked-taxa tabel for other correlation methods calculation outside C3NA.
getStackedTaxaMatrix( prevTrh = 0.1, phyloseqObj = phyloseqObj, nMinTotalCount = 1000, phenotype = NA )
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. |
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 |
countMatrix
data(CRC_Phyloseq) curPhyloseq = validatePhloseq(phyloseqObj = CRC_Phyloseq) # These steps are commented out due to time consuming step. The post sparcc correlation data will be # to avoid the step # phyloseq_Cancer = phyloseq::subset_samples(physeq = CRC_Phyloseq, diagnosis == "Cancer") # stackedTaxaMatrix = getStackedTaxaMatrix(phyloseqObj = phyloseq_Cancer, phenotype = "Cancer") # Correlation method # testCorMatrix = cor(t(stackedTaxaMatrix))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.