Manual for the use of the combi package

Install and load packages

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")

Unconstrained integration

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")

Constrained integration

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)
plot(microMetaboIntConstr, samDf = zhangMetavars, samCol = "ABX")

Diagnostics

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")


CenterForStatistics-UGent/combi documentation built on Aug. 22, 2023, 11:02 p.m.