IFAA offers a robust approach to make inference on the associations of covariates with the absolute abundance (AA) of microbiome in an ecosystem, and the associations of covariates with the abundance ratios of microbiome taxa/OTU/ASV (or other units).
# Install from CRAN
install.packages("IFAA", repos = "http://cran.us.r-project.org")
# Or from GitHub:
::install_github("gitlzg/IFAA") devtools
Use example datasets to run IFAA()
function.
# Detailed instructions on the package are
# provided in the vignettes and manual
library(IFAA)
library(SummarizedExperiment)
# If you already have a SummarizedExperiment format data, you can
# ignore the data processing steps below
data(dataM)
data(dataC)
# merge microbiome and covariates data
<-merge(dataM,dataC,by="id",all=FALSE)
data_merged
# Seperate microbiome data and covariate data
# and drop id variable from the microbiome data
<-data_merged[,colnames(dataM)[!colnames(dataM)%in%c("id")]]
dataM_sub<-data_merged[,colnames(dataC)]
dataC_sub
# Create SummarizedExperiment object
<-SummarizedExperiment(assays=list(MicrobData=t(dataM_sub)),
test_datcolData=dataC_sub)
# If you already have a SummarizedExperiment format data, you can
# ignore the above steps
# run IFAA
<- IFAA(experiment_dat = test_dat,
results testCov = c("v1", "v2"),
ctrlCov = c("v3"),
sampleIDname = "id",
fdrRate = 0.15)
Once the analysis is done, you can extract the full resuts and significant regression coefficients along with 95% confidence intervals using this command:
# to extract all results:
<-results$full_results
summary_res
# to extract significant results:
=subset(summary_res,sig_ind==TRUE) sig_taxa
Use the same datasets to run MZILN()
function.
<- MZILN(experiment_dat = test_dat,
results refTaxa=c("rawCount11"),
allCov=c("v1","v2","v3"),
sampleIDname = "id",
fdrRate=0.15)
Regression results including confidence intervals for the targeted ratios can be extracted in the following way:
# to extract the results for all ratios with rawCount11
# as the denominator:
<-results$full_results
summary_res
# to extract results for the ratio of a specific taxon (e.g.,
# rawCount45) over rawCount11:
=summary_res[summary_res$taxon=="rawCount45",]
target_ratio
# to extract all ratios having significant associations:
=subset(summary_res,sig_ind==TRUE) sig_ratios
Zhigang Li, Lu Tian, A. James O’Malley, Margaret R. Karagas, Anne G. Hoen, Brock C. Christensen, Juliette C. Madan, Quran Wu, Raad Z. Gharaibeh, Christian Jobin, Hongzhe Li (2021) IFAA: Robust association identification and Inference For Absolute Abundance in microbiome analyses. Journal of the American Statistical Association. 1595-1608
Zhigang Li, Katherine Lee, Margaret Karagas, Juliette Madan, Anne Hoen, James O’Malley and Hongzhe Li (2018 ) Conditional regression based on a multivariate zero-inflated logistic normal model for modeling microbiome data. Statistics in Biosciences 10(3):587-608