mixOmics
Dependencies & Environment
Package-intrinsic requirements from the Bioconductor landing page — reproduce in any R environment.
- Version: 6.36.0 · Bioconductor: 3.23 · R: ≥ 4.6
- Depends: MASS, lattice, ggplot2
- Imports: igraph, ellipse, corpcor, RColorBrewer, dplyr, tidyr, reshape2, matrixStats, rARPACK, gridExtra, ggrepel, BiocParallel, rgl, rlang
- Install:
BiocManager::install("mixOmics")
When to Use
- Performing unsupervised exploratory analysis and dimensionality reduction using
pcaandspca. - Integrating multiple omics datasets measured on the same samples (N-integration) using DIABLO.
- Conducting supervised classification and feature selection for multi-class problems using
splsda.
When NOT to Use
- For simple univariate differential expression, use
limmaorDESeq2instead becausemixOmicsis designed for multivariate feature selection and integration. - For raw mass spectrometry or sequencing read preprocessing, use
xcmsoredgeRfor normalization, asmixOmicsrequires pre-processed, normalized continuous matrices.
Data Requirements
- Input: Numeric data matrix or data frames with $N$ observations (samples) in rows and $P$ predictors (variables) in columns.
- Pre-filtering: Data should be pre-filtered (e.g., < 10K predictors) to remove near-zero variance predictors and reduce computational time.
- Normalization: Data must be normalized prior to analysis (e.g., log-transformed for transcriptomics, CLR-transformed for compositional microbiome data).
Key Parameters
- ncomp (none): The number of principal components or latent dimensions to extract in
pca,spca, orsplsda. - scale (TRUE): Logical indicating whether to scale variables to unit variance before analysis in
pcaortune.pca. - center (TRUE): Logical indicating whether to center variables to zero mean in
pca. - keepX (none): A numeric vector specifying the number of variables to select on each component in sparse methods like
spca. - comp (none): Specifies which components to plot in
plotIndivorplotVar(e.g.,c(1, 2)). - group (none): Factor vector used to color samples by class in
plotIndivorbiplot.
Best Practices
- Use
tune.pcato evaluate the cumulative proportion of explained variance and choose the optimalncompvia a screeplot. - Center and scale the data in
pcato ensure variables with large variances do not dominate the components. - Use
selectVarto extract and rank the most important variables contributing to each component. - Visualize sample clustering with
plotIndivand variable correlations withplotVar(correlation circle plot).
Common Pitfalls
- Misinterpreting correlation circle plots on unscaled data: If data is not scaled, cosine angles do not accurately reflect correlations; fix this by ensuring
scale = TRUEis set in the PCA/PLS method. - Overfitting in supervised models: Using PLS-DA without cross-validation can yield perfect separation by chance; fix this by using cross-validation functions like
perfandtune.splsdato objectively selectncompandkeepX. - Incorrect data orientation:
mixOmicsexpects samples in rows and variables in columns; fix this by transposing the matrix if samples are in columns.
Alternatives
- MOFA2: Differs by using Bayesian Group Factor Analysis for multi-omics integration, handling missing values natively.
- RGCCA: Differs by focusing on regularized generalized canonical correlation analysis, which forms the theoretical basis for some mixOmics methods but offers different tuning.
Citations
- Rohart F, Gautier B, Singh A, Lê Cao KA (2017). "mixOmics: An R package for 'omics feature selection and multiple data integration." PLOS Computational Biology, 13(11): e1005752.
- Singh A, Shannon CP, Gautier B, Rohart F, Vacher M, Tebbutt SJ, Lê Cao KA (2019). "DIABLO: an integrative, multi-omics, multivariate method for multi-group classification." Bioinformatics, 35(17): 3055-3062.
References
- Homepage: http://www.mixOmics.org
- Vignette: https://bioconductor.org/packages/release/bioc/vignettes/mixOmics/inst/doc/vignettes.html
Run this on BioMate
This skill is the knowledge layer — when, why, and how to use mixomics. To run this analysis on your own data with managed compute, automated QC, and reproducible outputs, use BioMate — free to start.