Monocle3 Tutorial Welcome! Download all data, slides, and scripts - - PowerPoint PPT Presentation
Monocle3 Tutorial Welcome! Download all data, slides, and scripts - - PowerPoint PPT Presentation
Monocle3 Tutorial Welcome! Download all data, slides, and scripts at: http://sta ff .washington.edu/hpliner/ Pace and content: We will move fairly fast - we hope experienced R users will be able to keep up, but expect newer users will follow the
Welcome!
Download all data, slides, and scripts at: http://staff.washington.edu/hpliner/ Pace and content: We will move fairly fast - we hope experienced R users will be able to keep up, but expect newer users will follow the presentation and explore the code at their own pace Ask questions!
Acknowledgements
Introducing Monocle3
- Performs cell type and trajectory analysis simultaneously
- Optimized for large datasets
- Advanced differential expression tools
Brand new package (released yesterday!), help us with development! Update often, submit bug reports (including re website) via github, ask question via google group
Monocle3? Monocle? Monocle 3-alpha?
Warning!
Monocle3 is fully independent Please remember that cds’ generated in monocle/monocle 2 will not work in monocle3
Monocle3
Trajectory analysis Cluster analysis
Find more info on the Monocle3 website
Website: https://cole-trapnell-lab.github.io/ monocle3/monocle3_docs/
Monocle3 features
- Cluster, classify and count cells
- Construct single-cell trajectories
- Perform differential expression
Monocle3 versus Monocle 2
Monocle3 Monocle 2 loading library(monocle3) library(monocle) Data structure base SingleCellExperiment ExpressionSet UMAP ✔ ✘ tSNE ✔ ✔ Differential expression with trajectories Graph-based BEAM/single branch
Monocle3
http://cole-trapnell-lab.github.io/monocle3/
Pre-process
Monocle3
http://cole-trapnell-lab.github.io/monocle3/
Reduce dimension (UMAP)
McInnes & Healy 2018
Pre-process
Monocle3
http://cole-trapnell-lab.github.io/monocle3/
Reduce dimension (UMAP)
McInnes & Healy 2018
Pre-process Cluster
Monocle3
http://cole-trapnell-lab.github.io/monocle3/
Reduce dimension (UMAP)
McInnes & Healy 2018
Pre-process Cluster Learn graph
Wolf et al 2018
Monocle3
http://cole-trapnell-lab.github.io/monocle3/
Reduce dimension (UMAP)
McInnes & Healy 2018
Pre-process Cluster Learn graph
Wolf et al 2018
Trajectory 1 Trajectory 2
Monocle3
http://cole-trapnell-lab.github.io/monocle3/
Reduce dimension (UMAP)
McInnes & Healy 2018
Pre-process Cluster Learn graph
Wolf et al 2018
Trajectory analysis
Workflow steps
Pre-process data Cluster cells Compare clusters Non-linear dimension reduction High dimension noisy scRNA-seq dataset Normalization +PCA t-SNE UMAP Identify top markers Targeted contrasts
Software & installation
- Monocle3 runs in the R statistical computing environment
- Needs R version 3.5 or higher
- To install from the Trapnell Lab GitHub
- To test the installation
library(monocle3) devtools :: install_github('cole-trapnell-lab/monocle3')
- C. elegans L2 data
Cao, Packer, Science 2017
- C. elegans group, Universiteit Utrecht
Import C. elegans data
http://staff.washington.edu/hpliner/
cds <- readRDS(‘~/Downloads/worm_l1_cds.rds’)
Import your own data
- To create your own cds object, use gene x cell matrix (mat),
gene data frame (gene_meta) and cell data frame (cell_meta):
- Monocle3 can also import data from 10x experiments directly into
cds objects
cds <- new_cell_dataset(mat, cell_meta, gene_meta) cds <- load_cellranger_data("cell_ranger_output")
Accessor functions for cds
- exprs/counts: A numeric matrix of expression values, where rows
are genes and columns are cells
- pData/colData: An object where rows are cells and columns are
cell attributes such as cell type, culture condition, etc
- fData/rowData: An object where rows are features (e.g. genes)
and columns are gene attributes such as biotype, gc content, etc
colData(cds) rowData(cds) counts(cds)
cell_type culture_cond Size_Factor cell_1 cell_2 cell_3 cell_n
colData(cds) rowData(cds)
biotype gc_content gene_1 gene_2 gene_3 gene_n
Pre-process & batch
Cluster cells Compare clusters Non-linear dimension reduction Pre-process data High dimension noisy scRNA-seq dataset Normalization +PCA t-SNE UMAP Identify top markers Targeted contrasts
Preprocess the data
- Preprocess data with initial dimensionality reduction
cds <- preprocess_cds(cds, num_dim = 100)
Reduce dimension
Pre-process data Cluster cells Compare clusters High dimension noisy scRNA-seq dataset Normalization +PCA Non-linear dimension reduction t-SNE UMAP Identify top markers Targeted contrasts
Reduce dimensions
cds <- reduce_dimension(cds) plot_cells(cds)
Reduce dimension Pre-process
Cluster cells
Pre-process data Compare clusters Non-linear dimension reduction High dimension noisy scRNA-seq dataset Cluster cells Normalization +PCA t-SNE UMAP Identify top markers Targeted contrasts
Next we cluster the cells
- The cluster_cells function of monocle3 allows users to group similar
cells according to global expression profiles
- In addition, partitions (super-clusters) are calculated for dividing
distinct trajectories
- You can access values using the following:
cds <- cluster_cells(cds) head(partitions(cds, reduction_method = "UMAP")) head(clusters(cds, reduction_method = "UMAP"))
Group cells by partitions
cds <- cluster_cells(cds) plot_cells(cds, color_cells_by="partition", group_cells_by="partition")
Reduce dimension Pre-process Cluster
cds <- cluster_cells(cds) plot_cells(cds)
Group cells by clusters
Compare clusters
Pre-process data Cluster cells Non-linear dimension reduction High dimension noisy scRNA-seq dataset Normalization +PCA t-SNE UMAP Compare clusters Identify top markers Targeted contrasts
\
Reduce dimension Pre-process Cluster Learn graph
Compare expression between clusters Find cluster markers
Gene1 Gene2
34
cds_subset <- choose_cells(cds)
Compare selected clusters
gene_fits <- fit_models(cds_subset[1:100,], model_formula_str = "~cluster") fit_coefs <- coefficient_table(gene_fits) head(fit_coefs)
Compare selected clusters
Find cluster markers
marker_genes <- top_markers(cds) tops_sig <- subset(marker_genes, marker_test_q_value < .05)
Annotating by cell type
Annotating by cell type
plot_cells(cds, color_by="cao_cell_type")
Simplifying future workflow with Garnett
generate_garnett_marker_file(marker_genes)
Further analyses with Monocle3
Trajectory analysis Graph-based differential expression
Further analyses with Monocle3
Thank you! Questions?
42