This repo contains R-code to fit and plot the mode-based integration models for compositional omics data using the combi package (Compositional Omics Model-Based Integration). The basic usage is demonstrated here.
The package can be installed loaded using the following commands:
library(devtools)
install_github("CenterForStatistics-UGent/combi")
Alternatively, via BioConductor:
library(BiocManager)
BiocManager::install("combi")
suppressPackageStartupMessages(library(combi))
cat("combi package version", as.character(packageVersion("combi")), "\n")
## combi package version 1.13.1
For an unconstrained ordination, a named list of data matrices with overlapping samples must be supplied. In addition, information on the required distribution (“quasi” for quasi-likelihood fitting, “gaussian” for normal data) and compositional nature should be supplied.
data(Zhang)
microMetaboInt = combi(
list("microbiome" = zhangMicrobio, "metabolomics" = zhangMetabo),
distributions = c("quasi", "gaussian"), compositional = c(TRUE, FALSE),
logTransformGaussian = FALSE)
A simple plot function is available for the result, for samples and shapes, a data frame should also be supplied
plot(microMetaboInt)
plot(microMetaboInt, samDf = zhangMetavars, samCol = "ABX")
For a constrained ordination also a data frame of sample variables should be supplied
microMetaboIntConstr = combi(
list("microbiome" = zhangMicrobio, "metabolomics" = zhangMetabo),
distributions = c("quasi", "gaussian"), compositional = c(TRUE, FALSE),
logTransformGaussian = FALSE, covariates = zhangMetavars)
## Warning in buildCovMat(covariates): Integer values treated as numeric!
plot(microMetaboIntConstr, samDf = zhangMetavars, samCol = "ABX")
Convergence of the iterative algorithm can be assessed as follows:
convPlot(microMetaboInt)
Influence of the different views can be investigated through
inflPlot(microMetaboInt, samples = 1:20, plotType = "boxplot")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.