scRNAseq clustering tools sa Bjrklund asa.bjorklund@scilifelab.se - - PowerPoint PPT Presentation

scrnaseq clustering tools
SMART_READER_LITE
LIVE PREVIEW

scRNAseq clustering tools sa Bjrklund asa.bjorklund@scilifelab.se - - PowerPoint PPT Presentation

scRNAseq clustering tools sa Bjrklund asa.bjorklund@scilifelab.se What is a celltype? What is a cell type? A cell that performs a specific func<on? A cell that performs a specific func<on at a specific loca<on/<ssue?


slide-1
SLIDE 1

scRNAseq clustering tools

Åsa Björklund asa.bjorklund@scilifelab.se

slide-2
SLIDE 2

What is a celltype?

slide-3
SLIDE 3

What is a cell type?

  • A cell that performs a specific func<on?
  • A cell that performs a specific func<on at a specific

loca<on/<ssue?

  • Not clear where to draw the line between cell types

and subpopula8ons within a cell type.

  • Also important to dis<nguish between cell type and

cell state.

– A cell state may be infected/non infected – Metabolically ac<ve/inac<ve – Cell cycle stages – Apopto<c

slide-4
SLIDE 4

scRNA-seq analysis overview

Mapping &

Gene expression es<mate

QC: Remove low Q cells Remove contaminants Data: Expression profiles Raw data: fastq files Defining cell types/lineages Gene signatures Verifica<on experiments

  • Clustering

methods

  • Trajectory

assignment

  • Data normaliza<on
  • Gene set selec<on
  • Batch effect removal
  • Removal of other

confounders Visualiza<on / Dimensionality reduc<on

NOW WE ARE HERE!

slide-5
SLIDE 5

Outline

  • Basic clustering theory
  • Graph theory introduc<on
  • Examples of different tools for clustering single cell

data

  • Other types of analyses on scRNAseq data
slide-6
SLIDE 6

What is clustering?

  • “The process of organizing objects into groups whose

members are similar in some way”

  • Typical methods are:

– Hierarchical clustering – K-means clustering – Graph based clustering

slide-7
SLIDE 7

Hierarchical clustering

  • Builds on distances between data points
  • Agglomera8ve – starts with all data points as

individual clusters and joins the most similar ones in a boZom-up approach

  • Divisive – starts with all data points in one large

cluster and splits it into 2 at each step. A top-down approach

  • Final product is a dendrogram represen<ng the

decisions at each merge/division of clusters

slide-8
SLIDE 8

Hierarchical clustering

slide-9
SLIDE 9

Hierarchical clustering

Clusters are obtained by cu]ng the tree at a desired level

slide-10
SLIDE 10

Hierarchical clustering

Clusters are obtained by cu]ng the tree at a desired level

slide-11
SLIDE 11

Different distance measures

  • Most commonly used in scRNA-seq:

– Euclidean distance

  • In mul<dimensional space
  • In PCA/tSNE or other reduced space

– Inverted pairwise correla<ons (1-correla<on)

  • Others include:

– ManhaZan distance – Mahalanobis distance – Maximum distance

slide-12
SLIDE 12

Linkage criteria

  • Calcula<on of similari<es between 2 clusters (or a

cluster and a data point)

hZp://www.slideshare.net/uzairjavedsiddiqui/malhotra20

slide-13
SLIDE 13
  • Ward (minimum variance method). Similarity of two clusters is

based on the increase in squared error when two clusters are merged.

hZp://www.slideshare.net/uzairjavedsiddiqui/malhotra20

slide-14
SLIDE 14

K-means clustering

  • 1. Starts with random selec<on of cluster centers

(centroids)

  • 2. Then assigns each data points to the nearest cluster
  • 3. Recalculates the centroids for the new cluster

defini<ons

  • 4. Repeats steps 2-3 un<l no more changes occur.

Can use same distance measures as in hclust.

hZps://en.wikipedia.org/wiki/K-means_clustering

slide-15
SLIDE 15

Network/graph clustering

Node/Ver<ce Edge – (weighted & directed)

(hZp://www.lyonwj.com/2016/06/26/ graph-of-thrones-neo4j-social-network-analysis/)

Community Hubs Connec<vity

  • # of edges
slide-16
SLIDE 16

Network/graph clustering

hZps://en.wikipedia.org/wiki/Modularity_(networks) #Example_of_mul<ple_community_detec<on

Adjacency matrix

slide-17
SLIDE 17

Types of graphs

  • The k-Nearest Neighbor (kNN) graph is a graph in

which two ver<ces p and q are connected by an edge, if the distance between p and q is among the k-th smallest distances from p to other objects from P.

  • The Shared Nearest Neighbor (SNN) graph has

weights that defines proximity, or similarity between two edges in terms of the number of neighbors (i.e., directly connected ver<ces) they have in common.

slide-18
SLIDE 18

SNN graph

(Ertöz et al. Seman<c scholar, 2002)

slide-19
SLIDE 19

Community detec8on

Communi<es, or clusters, are usually groups of ver<ces having higher probability of being connected to each other than to members of other groups.

slide-20
SLIDE 20

Community detec8on

  • Main objec<ve is to find a group (community) of

ver<ces with more edges inside the group than edges linking ver<ces of the group with the rest of the graph.

  • Many implemented algorithms to this problem:

– Different methods of Modularity op<miza<on – Infomap – Walktrap – etc.

  • Most methods will automa<cally define the number
  • f clusters based on some user parameters.
slide-21
SLIDE 21

For single cell data

  • Can start with distances based on correla<on,

euklidean distances in PCA space etc. Same as for hclust/k-means.

  • Buld a KNN graph with cells as ver<ces.

– Find k nearest neighbors to each cell. – The size of k will strongly influence the network structure.

  • Can reduce network based on shared neighbors.
  • Find clusters with community detec<on method.
  • Graphs can also be used for trajectory analysis
slide-22
SLIDE 22

How to work with networks

  • Igraph package – implemented for both R, python

and Ruby

  • Has most commonly used layout op<miza<on

methods and community detec<on methods implemented.

  • Simple R example at:

hZps://jef.works/blog/2017/09/13/graph-based- community-detec<on-for-clustering-analysis/

  • Tutorial to igraph at:

hZp://kateto.net/networks-r-igraph

slide-23
SLIDE 23

Bootstrapping

  • How confident can you

be that the clusters you see are real?

  • You can always take a

random set of cells from the same cell type and manage to split them into clusters.

  • Most scRNAseq

packages do not include any bootstrapping

(Rosvall et al. Plos One 2010 )

slide-24
SLIDE 24

scRNAseq clustering

  • Easy case with dis<nct celltypes:

– rpkms/counts – Euklidean or correla<on distances – PCA, tSNE or other dimensionality reduc<on method

  • Examples of programs for clustering (many more out

there):

– WGCNA – BackSPIN – Pagoda – SC3 – Seurat – pcaReduce – SNNcliq

slide-25
SLIDE 25

SCRAN – Single Cell RNA ANalisys

  • Uses SingleCellExperiment class – same as in Scater

package

  • Includes cyclone method for predic<ng cell cycle

phase.

  • Includes Basics deconvolu<on strategy for size

factors.

  • Detec<on of variable genes by deconvolu<on of

technical and biological variance.

hZp://bioconductor.org/packages/devel/bioc/ vigneZes/scran/inst/doc/scran.html

slide-26
SLIDE 26

Single Cell Consensus Clustering – SC3

(Kiselev et al Nat. Methods 2017)

slide-27
SLIDE 27

Single Cell Consensus Clustering – SC3

  • 1. Gene filtering – rare and ubiquitous genes
  • 2. Distance matrices (DM) – Euklidean, Spearman, Pearson
  • 3. Transforma<on of DM with PCA or Laplacian
  • 4. K-means clustering with first d eigenvectors
  • 5. Consensus clustering – distance 1/0 for cells in same/

different clusters -> hierarchical clustering on average distances. Differen<al expression with nonparametric Kruskal–Wallis test. Marker genes with areas under the ROC curve (AUROC) from 100 permuta<ons of cell cluster labels and P-values from Wilcoxon signed-rank test.

(Kiselev et al Nat. Methods 2017)

slide-28
SLIDE 28

Pagoda – Pathway And Geneset OverDispersion Analysis

(Fan et al. Nature Methods 2016)

Implemented in the SCDE package

slide-29
SLIDE 29

Pagoda – Pathway And Geneset OverDispersion Analysis

(Fan et al. Nature Methods 2016)

  • Helps with biological interpreta<on of data
  • Important to have good and relevant gene sets
  • High memory consump<on when running Pagoda
  • Also has methods for removing batch effect, detected genes, cell cycle etc
slide-30
SLIDE 30

Pagoda2

  • Similar error modelling
  • Now include KNN graph clustering
  • Can visualize gene sets.
  • hZps://github.com/hms-dbmi/pagoda2
slide-31
SLIDE 31

BackSPIN - Biclustering

  • Simultaneous clustering genes and cells.
  • An itera<ve, biclustering method based on sor<ng points into

neighborhoods (SPIN) to find shapes in a reduced space

  • 1. ordering of samples using genes as features,
  • 2. ordering of genes using samples as features and
  • 3. zooming in on subsets of the original expression matrix

to order objects in a reduced subspace.

  • Clusters both genes and cells to iden<fy subpopula<ons as

well as poten<al markers for each subpopula<ons.

  • Implemented in Python.

(Zeisel et al. Science 2015)

slide-32
SLIDE 32

Shared nearest neighbor (SNN)-Cliq

  • Similarity matrix using Euclidean distance (can use
  • ther distances)
  • List the k-nearest-neighbors (KNN)
  • Edge between cells if at least one shared neighbor
  • Weights based on ranking of the neighbors
  • Graph par<<on by finding cliques
  • Iden<fy clusters in the SNN graph by itera<vely

combining significantly overlapping subgraphs

  • Implemented in Matlab and Python

(Xu et al Bioinforma;cs 2015)

slide-33
SLIDE 33

Seurat

  • Developed for drop-seq analysis – compa<ble with 10X
  • utput files. But works also for other types of data.
  • Contains func<on for

– Data normaliza<on – Detec<on of variable genes – Regression of batch effects and other confounders – JackStraw to detect significant principal components – tSNE and other dimensionality reduc<on techniques – Clustering based on SNN graphs – Many different methods for Differen<al expression

(hZp://sa<jalab.org/seurat/)

slide-34
SLIDE 34

Seurat - FindClusters

  • First construct a KNN (k-nearest neighbor) graph based on the

euclidean distance in PCA space.

– Select which principal components to include

  • Refine the edge weights between any two cells based on the

shared overlap in their local neighborhoods (Jaccard distance).

  • To cluster the cells, modularity op<miza<on techniques to

itera<vely group cells together.

  • OBS! Earlier versions of Seurat uses “spectral tSNE” and

DBScan density clustering.

(hZp://sa<jalab.org/seurat/)

slide-35
SLIDE 35

Seurat

  • Also contains func<ons for:

– Spa<al reconstruc<on of single cell data using in situ references (Zebrafish embryos) – Integrated analysis across plaworms – Analysis of mul<modal datasets (e.g. RNA + protein)

(hZp://sa<jalab.org/seurat/)

slide-36
SLIDE 36

Loupe – Cell Browser, from 10X Genomics

slide-37
SLIDE 37

Which clustering method is best?

  • Depends on the input data
  • Consistency between several methods gives

confidence that the clustering is robust

  • The clustering method that is most consistent – best

bootstrap values is not always best

  • In a simple case where you have clearly dis<nct

celltypes, simple hierarchical clustering based on euklidean or correla<on distances will work fine.

slide-38
SLIDE 38

How many clusters do you really have?

  • It is hard to know when to stop clustering – you can

always split the cells more <mes.

  • Can use:

– Do you get any/many significant DE genes from the next split? – Some tools have automated predic<ons for number of clusters – may not always be biologically relevant

  • Always check back to QC-data – is what your spli]ng

mainly related to batches, qc-measures (especially detected genes)

slide-39
SLIDE 39

Check QC data

slide-40
SLIDE 40

Check QC data

slide-41
SLIDE 41

Large scale analysis

(Svensson et al. Nature Protocols 2018)

slide-42
SLIDE 42

Large scale analysis

(SCANPY – Wolf et al. Genome Biology 2018)

slide-43
SLIDE 43

Addi8onal analyses

  • Allelic expression
  • Variant calling
  • Alterna<ve splicing
  • Copy-number varia<on
  • Projec<on between datasets
  • CRISPR-edi<ng
slide-44
SLIDE 44

Single-Cell RNA-Seq Reveals Dynamic, Random Monoallelic Gene Expression in Mammalian Cells

(Deng et al. Science 2014) Single cells Pooled embryos

slide-45
SLIDE 45

X Chromosome inac8va8on

(Petropoulos et al. Cell 2017)

slide-46
SLIDE 46

Using Single Nucleo8de Varia8ons in Cancer Single-Cell RNA- Seq Data for Subpopula8on Iden8fica8on and Genotype- phenotype Linkage Analysis

(Poiron et al. BioRxiv 2016)

Kim Ting Miyamoto Patel

P C A ( G E ) PCA (eeSNVs) SIMLR (GE) b i p a r t i t e g r a p h ( e e S N V s )

MGH26 MGH29 MGH30 MGH28 MGH31 CSC6 CSC8 PDX mRCC PDX pRCC GMP nb508 TuGMP MP WBC MEF LNCaP Pr5 Pr4 DU Pr20 Pr21 Pr22 Pr23 Pt mRCC

Patel Kim Ting

PC HD Pr6 Pr1 Pr9 Pr10 Pr2 Pr12 Pr13 Pr11 Pr16 Pr17 Pr14 Pr19 VCaP Pr18

Miyamoto

Legend

A B C D

slide-47
SLIDE 47

Mul8plexed droplet single-cell RNA-sequencing using natural gene8c varia8on

(Kang et al. Nature Biotech 2018)

slide-48
SLIDE 48

Dissec8ng the mul8cellular ecosystem of metasta8c melanoma by single-cell RNA-seq

(Tirosh et al. Science 2016)

slide-49
SLIDE 49

Cell specific alterna8ve splicing

(Shalek et al. Nature 2013)

slide-50
SLIDE 50

(Zhang et al Cell 2016)

slide-51
SLIDE 51

scmap – projec8on between datasets

(Kiselev et al. BioarXiv 2017)

slide-52
SLIDE 52

Seurat – canonical correla8on analysis (CCA) for dataset integra8on

(Butler et al. Nature Biotech 2018)

slide-53
SLIDE 53

crisprQTL mapping

87 88 89 90 91 92 93 94 95 96 97 98

  • Fig. 1 | crisprQTL mapping. (A) crisprQTL mapping uses the same framework as human eQTL studies,

but with a population of human individuals replaced by a population of individual cells, natural genetic variation replaced by diverse combinations of gRNA­programmed perturbations in each cell, and tissue­level RNA­seq of each person replaced by scRNA­seq. (B) Multiplex perturbations increase power to detect changes in gene expression in single­cell genetic screens while greatly reducing the number of cells necessary to profile. Simulated power calculations show that increasing the average number of perturbations per cell ( e.g. , by increasing MOI in lentiviral delivery of gRNAs) strongly increases power to detect changes in gene expression, including for genes with low (0.10 mean UMIs per cell), medium (0.32) or high (1.00) levels of mean expression. X­axis corresponds to the simulated % change of transcript repressed by targeting CRISPRi to the associated enhancer. Calculations assume a fixed number

  • f 45,000 cells profiled by scRNA­seq.

4

(Gasperini et. al. BioRxiv 2018)

slide-54
SLIDE 54

scGESTALT – lineage tracing and cell profiling with CRISPR-Cas9 edi8ng of barcodes

(Raj et al. Nature Biotech 2018)

slide-55
SLIDE 55

Resources

  • Good course at:

hZps://hemberg-lab.github.io/scRNA.seq.course/

  • Many of the packages have very thorough tutorials on their

websites

  • Repo with scRNA-seq tools:

hZps://github.com/seandavi/awesome-single-cell

  • Single cell assay objects for many datasets:

hZps://hemberg-lab.github.io/scRNA.seq.datasets/

  • Conquer datasets - salmon pipeline to many different

datasets: hZp://imlspen<cton.uzh.ch:3838/conquer/