💪
Omics data visualization in R and Python
  • Introduction
    • From Authors
    • Virtual environments - let's begin
    • Getting started with Python
    • Getting started with R
    • Example data sets
  • PERFORMING FUNDAMENTAL OPERATIONS ON OMICs DATA USING R
    • Fundamental data structures
    • Loading data into R
    • Preferred formats in metabolomics and lipidomics analysis
    • Preprocess data type using Tidyverse package
    • Useful R tricks and features in OMICs mining
      • Application of pipe (%>%) functions
      • Changing data frames format with pivot_longer()
      • Data wrangling syntaxes useful in OMICs mining
      • Writing functions in R
      • The 'for' loop in R (advanced)
  • PERFORMING FUNDAMENTAL OPERATIONS ON OMICs DATA USING PYTHON
    • Fundamental data structures
    • Loading data into Python
  • Missing values handling in R
    • Missing values – Introduction
    • Detecting missing values (DataExplorer R package)
    • Filtering out columns containing mostly NAs
    • Data imputation by different available R libraries
      • Basic data imputation in R with dplyr and tidyr (tidyverse)
      • Data imputation using recipes library (tidymodels)
      • Replacing NAs via k-nearest neighbor (kNN) model (VIM library)
      • Replacing NAs via random forest (RF) model (randomForest library)
  • Missing values handling in Python
    • Detecting missing values
    • Filtering out columns containing mostly NAs
    • Data imputation
  • Data transformation, scaling, and normalization in R
    • Data normalization in R - fundamentals
    • Data normalization to the internal standards (advanced)
    • Batch effect corrections in R (advanced)
    • Data transformation and scaling - introduction
    • Data transformation and scaling using different available R packages
      • Data transformation and scaling using mutate()
      • Data transformation and scaling using recipes R package
      • Data Normalization – bestNormalize R package
  • Data transformation, scaling, and normalization in Python
    • Data Transformation and scaling in Python
  • Metabolites and lipids descriptive statistical analysis in R
    • Computing descriptive statistics in R
    • Using gtsummary to create publication-ready tables
    • Basic plotting in R
      • Bar charts
      • Box plots
      • Histograms
      • Density plots
      • Scatter plots
      • Dot plots with ggplot2 and tidyplots
      • Correlation heat maps
    • Customizing ggpubr and ggplot2 charts in R
    • Creating interactive plots with ggplotly
    • GGally for quick overviews
  • Metabolites and lipids descriptive statistics analysis in Python
    • Basic plotting
    • Scatter plots and linear regression
    • Correlation analysis
  • Metabolites and lipids univariate statistics in R
    • Two sample comparisons in R
    • Multi sample comparisons in R
    • Adjustments of p-values for multiple comparisons
    • Effect size computation and interpretation
    • Graphical representation of univariate statistics
      • Results of tests as annotations in the charts
      • Volcano plots
      • Lipid maps and acyl-chain plots
  • Metabolites and lipids univariate statistical analysis in Python
    • Two sample comparisons in Python
    • Multi-sample comparisons in Python
    • Statistical annotations on plots
  • Metabolites and lipids multivariate statistical analysis in R
    • Principal Component Analysis (PCA)
    • t-Distributed Stochastic Neighbor Embedding (t-SNE)
    • Uniform Manifold Approximation and Projection (UMAP)
    • Partial Least Squares (PLS)
    • Orthogonal Partial Least Squares (OPLS)
    • Hierarchical Clustering (HC)
      • Dendrograms
      • Heat maps with clustering
      • Interactive heat maps
  • Metabolites and lipids multivariate statistical analysis in Python
    • Principal Component Analysis
    • t-Distributed Stochastic Neighbor Embedding
    • Uniform Manifold Approximation and Projection
    • PLS Discriminant Analysis
    • Clustered heatmaps
  • OMICS IN MACHINE LEARNING APPROACHES IN R AND PYTHON
    • Application of selected models to OMICs data
    • OMICs machine learning – Examples
  • References
    • Library versions
Powered by GitBook
On this page
  1. Metabolites and lipids multivariate statistical analysis in R

Hierarchical Clustering (HC)

Metabolites and lipids multivariate statistical analysis in R

Hierarchical clustering is used in lipidomics and metabolomics to group samples with similar lipid or metabolite profiles. These groups of samples are known as clusters. Usually, we expect that samples from two severely different conditions (e.g., healthy and cancer patients) will separate from each other, but samples belonging to one biological group will cluster together. However, the hierarchical clustering applied here is an unsupervised method, different from dimensionality reduction. It can be used to find the data structures if no other clues are available. Except for samples, features like lipids or metabolites can also be clustered, suggesting relationships between molecules and potential biological roles. The clustering can be presented, among others, through dendrograms and heat maps. Here, we will introduce three excellent libraries for hierarchical clustering visualization:

1) ggtree - for preparing dendrograms,

2) ComplexHeatmap - for preparing beautiful, publication-ready heat maps with clustering,

3) InteractiveComplexHeatmap - for turning the ComplexHeatmap outputs into interactive plots.

First, we install all three libraries:

# Installation of the ggtree library (through Bioconductor):
if (!require("BiocManager", quietly = TRUE))
    install.packages("BiocManager")

BiocManager::install("ggtree")

# Browse the vignette of ggtree:
browseVignettes("ggtree")

# Installation of ComplexHeatmap (through Bioconductor):
if (!require("BiocManager", quietly = TRUE))
    install.packages("BiocManager")

BiocManager::install("ComplexHeatmap")

# Browse the vignette of ComplexHeatmap:
browseVignettes("ComplexHeatmap")

# Installation of InteractiveComplexHeatmap:
if (!require("BiocManager", quietly = TRUE))
    install.packages("BiocManager")

BiocManager::install("InteractiveComplexHeatmap")

# Carefully follow installation instructions.
# It may be necessary to download and install additional dependencies - also from Bioconductor.

# Browse the vignette of InteractiveComplexHeatmap:
browseVignettes("InteractiveComplexHeatmap")

Let's begin!

PreviousOrthogonal Partial Least Squares (OPLS)NextDendrograms

Last updated 4 months ago