1 of 53

Graph alignment: Applications to scRNA-seq data integration

Nov 29th 2022s

BMI/CS 775 Computational Network Biology�Fall 2022

Sushmita Roy

https://compnetbiocourse.discovery.wisc.edu

2 of 53

Plan for this section

  • Global alignment of protein-interaction networks
    • Spectral method: IsoRank (Nov 22nd)
    • Matrix factorization: FUSE (Nov 22nd)

  • Graph-based alignment for single cell omic datasets (Nov 29th)

3 of 53

Goals for today

  • Aligning different datasets
  • Dimensionality reduction techniques
    • Singular Value Decomposition
    • Non-negative matrix factorization and extensions
    • Canonical Correlation Analysis
  • Approaches to align datasets
    • Mutual nearest neighbor alignment
    • Seurat
    • Scanorama
    • CONOS
    • LIGER

4 of 53

Applications of network alignment

Alignment of scRNA-seq datasets

Alignment of molecular networks

  • PathBLAST
  • IsoRank
  • FUSE
  • SCANORAMA
  • CONOS
  • LIGER
  • scPopcorn

5 of 53

Aligning high-dimensional datasets

  • Often high-dimensional datasets have a low-dimensional structure
  • Such low-dimensional structure can be approximated by a graph
  • Dataset alignment can be considered as an instance of graph alignment
  • Broadly speaking, this aims to construct low dimensional mappings between two or more datasets by aligning their low-dimensional spaces

Adapted from “Manifold alignment”, Wang et al 2010

6 of 53

Single cell omics

Slide credit: 10x genomics

7 of 53

A single cell RNA-seq dataset

scRNA-seq dataset

genes (6k-20k)

cells (5k-1million)

8 of 53

Computational problems with scRNA-seq data

  1. Pre-processing and normalization
  2. Visualization
  3. Cell type identification
  4. Trajectory inference:
    1. Single cell ordering: pseudo time
    2. Cell population structure relationships
  5. Network inference
  6. Data integration

9 of 53

Computational tools for single cell omic datasets

Zappia, L. & Theis, F. J. Over 1000 tools reveal trends in the single-cell RNA-seq analysis landscape. Genome Biol 22, 301 (2021).

10 of 53

Flavors of data integration

  • Integrate multiple scRNA-seq datasets, each representing a time point or treatment condition
  • Integrate multi-modal single cell datasets
    • scRNA-seq
    • scATAC-seq
    • spatial RNA-seq
  • Query new dataset with an existing tissue atlas

11 of 53

Overall Problem Definition

  • Given N single cell RNA-seq datasets, E1, .. EN

  • Do
    • Find a correspondence of the cells and cell types in one dataset to cells and cell types in another dataset

12 of 53

What makes integration of scRNA-seq datasets difficult?

  • Presence of batch effects

  • Unknown number of cell types

  • Varying number of cell types across datasets

  • ..

13 of 53

General approach to aligning datasets

  1. Define k-nearest neighbor graphs
    1. Often accompanied with dimensionality reduction
  2. Correct/align cells

  • (Optional) cluster

14 of 53

Goals for today

  • Aligning different datasets
  • Dimensionality reduction techniques
    • Singular Value Decomposition
    • Non-negative matrix factorization and extensions
    • Canonical Correlation Analysis
  • Approaches to align datasets
    • Mutual nearest neighbor alignment
    • Seurat
    • Scanorama
    • CONOS
    • LIGER

15 of 53

Singular Value Decomposition

By Cmglee - Own work, CC BY-SA 4.0, https://commons.wikimedia.org/w/index.php?curid=67853297

16 of 53

Non-negative matrix factorization

Minimize

Lee and Seung Adv. Neur. In. 2001

 

 

Slide credit Erika Da-Inn Lee

Cells

Genes

H

E

W

s.t, H>=0, W>=0

17 of 53

Using NMF factors for clustering

  • Cell i is in cluster k if

Cells

H

  • Gene j is in cluster k if

W

18 of 53

Applying NMF to a single cell RNA-seq dataset

k ≪ n, m

X = ℝn×m

H = ℝn×k

W = ℝk×m

n cells

k factors

H

X

W

 

HW

m genes

k factors

n cells

m genes

Original value matrix

Predicted matrix

 

U

Factorized cell-side matrix

Cell clusters

19 of 53

Extensions to NMF

  • Joint NMF

  • Integrative NMF

20 of 53

Joint NMF

E1

H1

H2

W

genes

W

E2

=

cells

cells

21 of 53

Integrative NMF

X

+

genes

X

+

X

+

W

cells

cells

cells

W

W

E1

H1

H2

E2

E3

H3

V1

V2

V3

22 of 53

Canonical Correlation Analysis

  •  

23 of 53

Canonical correlation analysis

  • u and v are called the first correlation vectors
  • We can keep finding subsequent vectors that are orthogonal to the ones before
  • We can get the canonical correlations by performing SVD on the cross-correlation matrix

24 of 53

Goals for today

  • Dimensionality reduction techniques
    • Singular Value Decomposition
    • Non-negative matrix factorization and extensions
    • Canonical Correlation Analysis
  • Approaches to align datasets
    • Mutual nearest neighbor alignment
    • Seurat
    • Scanorama
    • CONOS
    • LIGER

25 of 53

Batch effect correction of scRNA-seq data using mutual nearest neighbors

  • L. Haghverdi, A. T. L. Lun, M. D. Morgan, and J. C. Marioni, “Batch effects in single-cell RNA-sequencing data are corrected by matching mutual nearest neighbors,” Nat. Biotechnol., vol. 36, no. 5, pp. 421–427, 2018, doi: 10.1038/nbt.4091.
  • Previous approaches relied on methods for bulk methods
  • This approach aimed to find “mutual nearest neighbors” (MNN) that it will use to align different datasets
  • Assumes there is at least one cell population that is present in both batches

26 of 53

MNN for batch correction

  1. Two batches of data

  • Find mutual nearest neighbors

  • Find correction vectors

  • Shift one dataset to another

  • Repeat for new batches

27 of 53

Comparing MNN to other methods

Simulated dataset

Real dataset

28 of 53

SEURAT

  • Stuart T, Butler A, Hoffman P, et al. Comprehensive Integration of Single-Cell Data. Cell. 2019;177(7):1888-1902.e21. doi:10.1016/j.cell.2019.05.031
  • Dimensionality reduction uses Canonical correlation analysis
  • Find anchor points based on k mutual nearest neighbors on the reduced space.

29 of 53

SEURAT key steps

30 of 53

Identifying anchors in Seurat

  • Based on a k mutual nearest neighbor step
    • Set anchors as mutual nearest neighbors

    • Score anchors based on the shared neighborhood of anchors in the query and reference dataset

    • Check to make sure anchors in low dimensional space are found in the high dimensional space

31 of 53

Scanorama

  • B. Hie, B. Bryson, and B. Berger, “Efficient integration of heterogeneous single-cell transcriptomes using Scanorama,” Nat. Biotechnol., vol. 37, no. 6, pp. 685–691, 2019, doi: 10.1038/s41587-019-0113-3.
  • Does not assume that the datasets we are integrating have a lot in common
  • Conceptual idea is like putting together pieces of a puzzle.

32 of 53

High level picture of Scanorama

  • Given four cell types A, B, C and D that make up three datasets (A, B), (C, D) and (B, C),
  • Scanorama automatically finds the correct set of alignments (A, B) to (B, C) to (C, D) by finding mutual nearest neighbors across all three possible pairs of these datasets

33 of 53

Scanorama key steps

E1

E2

E3

Concatenate datasets

genes

SVD+ first 100 dimensions

cells

cells

cells

K-mutual nearest neighbors

Panorama

34 of 53

Scanorama Panorama creation

  •  

35 of 53

Scanorama “projection step”

  • Scanorama has an optional batch correction step similar to the MNN approach
  • Compute weights for each cell not in the matching set to a cell in the matching set.
    • This is using a Gaussian kernel
  • For each cell, compute a translation vector which is then the linear combination of the matching difference and weights of each cell in the matching set.

36 of 53

Scanorama “projection step”

 

b

a1

a2

a3

 

reference

To be corrected

n1

n2

k

k

 

k

k

b

a3

a2

a1

c1

MNN

Slide credit Junha Shin

37 of 53

SCANORAMA on artificial mixtures

SCANORAMA

MNN

Seurat CCA

38 of 53

Other methods are sensitive of the order of integration

39 of 53

Using SCANORAMA to integrate 100k cells from 26 datasets

Scanorama clusters by cell type as opposed to other methods

40 of 53

SCANORAMA learns good clusters

41 of 53

LIGER

  • Assumes datasets are have a shared and specific lower dimensional representation
  • Uses integrative NMF to find this

42 of 53

LIGER key steps

  • iNMF to find reduced cell and gene space
  • Cluster cells based on iNMF factors
  • Refine cell clusters further to handle divergent datasets

43 of 53

LIGER: Defining cell clusters

  • Simple max loading is noisy for divergent datasets
  • Use Hi to define the k-nearest neighborhood of a cell
  • Assign each cell i the cluster based on max factor loading
  • Get the histogram of cluster assignments of neighbors of i
  • Compute Manhattan Distance between cluster histograms.
    • Sum of absolute difference in histograms
  • Connect two cells if their distance is less than t
  • Louvain graph clustering

44 of 53

Benchmarking LIGER

45 of 53

Applying LIGER to integrate multiple datasets

Cell clusters

Gene markers

46 of 53

Using LIGER to integrate scRNA-seq and spatial transcriptomics data

scRNA-seq: 71,000 cells

spatial: 2500 cells

scRNAseq

spatial

47 of 53

CONOS

  • Similar conceptually to Scanorama
  • Also able to integrate samples across many different platforms and contexts
  • Project pairs of datasets on the same space
  • Cluster all cells together in the projected space

48 of 53

CONOS key steps

  • Perform a pairwise alignment of each pair of datasets to get inter-sample edges
    • Common PCA
    • Joint NMF
    • SVD
  • Add edges between pairs of cells between pairs of datasets using the lower dimensional representation
  • Add low weight intra sample edges to get a Joint graph (helps preserve local neighborhood of cells)
  • Graph clustering with Leiden to define populations across all samples

49 of 53

Applying CONOS to 16 blood scRNA-seq datasets

Joint embedding of datasets

Visualizing individual datasets

50 of 53

Comparing CONOS to other methods

51 of 53

Summary of algorithms

Algorithm

Dimensionality reduction technique

Graph creation

Cell-clustering

MNN

NA

Mutual nearest neighbor

NA

SCANORAMA

SVD

Mutual nearest neighbor on factor space

LIGER

iNMF

NMF+Shared neighborhood

Louvain/Leiden

CONOS

jNMF, CPCA

Mutual nearest neighbor

Leiden

SEURAT

CCA

k nearest neighbor

52 of 53

Take away points

  • We talked about two types of alignment problems
  • Aligning across species
    • Nodes are mismatched, but we have some sequence based mapping that we wish to exploit
    • Algorithms:
      • FUSE, IsoRank
    • Differ based on: Pairwise, global, local, how to define the similarity matrix
  • Aligning across datasets
    • Nodes might have a substantial mismatch and datasets can only partially overlap
    • Algorithms differ based on
      • how they project into the shared space
      • cluster or not

53 of 53

References

  • Stuart, Tim, Andrew Butler, Paul Hoffman, Christoph Hafemeister, Efthymia Papalexi, William M. Mauck, Yuhan Hao, Marlon Stoeckius, Peter Smibert, and Rahul Satija. 2019. “Comprehensive Integration of Single-Cell Data.” Cell 177 (7): 1888-1902.e21. https://doi.org/10.1016/j.cell.2019.05.031.
  • Barkas, Nikolas, Viktor Petukhov, Daria Nikolaeva, Yaroslav Lozinsky, Samuel Demharter, Konstantin Khodosevich, and Peter V. Kharchenko. 2019. “Joint Analysis of Heterogeneous Single-Cell RNA-Seq Dataset Collections.” Nature Methods 16 (8): 695–98. https://doi.org/10.1038/s41592-019-0466-z.
  • Hie, Brian, Bryan Bryson, and Bonnie Berger. 2019. “Efficient Integration of Heterogeneous Single-Cell Transcriptomes Using Scanorama.” Nature Biotechnology 37 (6): 685–91. https://doi.org/10.1038/s41587-019-0113-3.
  • Welch, Joshua D., Velina Kozareva, Ashley Ferreira, Charles Vanderburg, Carly Martin, and Evan Z. Macosko. 2019. “Single-Cell Multi-Omic Integration Compares and Contrasts Features of Brain Cell Identity.” Cell 177 (7): 1873-1887.e17. https://doi.org/10.1016/j.cell.2019.05.006.