View source: R/calculateTaxaFoldDifference.R
calculateTaxaFoldDifference | R Documentation |
Calculate Fold Difference in Taxa Abundance
calculateTaxaFoldDifference(x, group, sort = FALSE, paired = FALSE)
x |
A phyloseq object |
group |
Vector with specifying the groups to compare. Only two-group comparisons are supported. |
sort |
Sort the results by descending order of fold difference |
paired |
Paired comparison (Default: FALSE) |
Calculate Log10 fold difference in abundance of taxa between two-
groups. This code is modified from original code
https://github.com/microbiome/microbiome/blob/fa2c0de2fbe000da87be3c185972ed7f0f626591/inst/extdata/check_foldchange.R Get the prevalence of taxa in phyloseq
objects
along with taxonomic classification and prevalence.
A tibble with taxa ids, taxonomic information, two-group prevalence and fold change values.
Original Author: Leo Lahti. Adapted by Sudarshan A. Shetty
Shetty SA (2021). Utilities for microbiome analytics. https://github.com/RIVM-IIV-Microbiome/biomeUtils
library(biomeUtils)
data("FuentesIliGutData")
# reduce size for example
ps1 <- filterSampleData(FuentesIliGutData, ILI != "L2")
taxa_fd <- calculateTaxaFoldDifference(ps1, group = "ILI")
# check
taxa_fd
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.