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 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 di ff erential 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 di ff erential expression
Monocle3 versus Monocle 2 Monocle3 Monocle 2 loading library(monocle3) library(monocle) Data structure base SingleCellExperiment ExpressionSet UMAP ✔ ✘ tSNE ✔ ✔ Di ff erential Graph-based BEAM/single branch expression with trajectories
Monocle3 http://cole-trapnell-lab.github.io/monocle3/ Pre-process
Monocle3 http://cole-trapnell-lab.github.io/monocle3/ Pre-process Reduce dimension (UMAP) McInnes & Healy 2018
Monocle3 http://cole-trapnell-lab.github.io/monocle3/ Pre-process Reduce dimension (UMAP) McInnes & Healy 2018 Cluster
Monocle3 http://cole-trapnell-lab.github.io/monocle3/ Pre-process Reduce dimension (UMAP) McInnes & Healy 2018 Cluster Learn graph Wolf et al 2018
Monocle3 http://cole-trapnell-lab.github.io/monocle3/ Pre-process Reduce dimension (UMAP) McInnes & Healy 2018 Cluster Learn graph Wolf et al 2018
Monocle3 http://cole-trapnell-lab.github.io/monocle3/ Trajectory 1 Trajectory 2 Pre-process Reduce dimension (UMAP) McInnes & Healy 2018 Cluster Learn graph Wolf et al 2018 Trajectory analysis
Workflow steps Normalization Identify top t-SNE +PCA markers High dimension Non-linear Pre-process data Cluster cells Compare clusters noisy scRNA-seq dimension dataset reduction Targeted UMAP 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 devtools :: install_github('cole-trapnell-lab/monocle3') • To test the installation library(monocle3)
C. elegans L2 data Cao, Packer, Science 2017 C. elegans group, Universiteit Utrecht
Import C. elegans data http://sta ff .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): cds <- new_cell_dataset(mat, cell_meta, gene_meta) • Monocle3 can also import data from 10x experiments directly into cds objects 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)
colData(cds) rowData(cds) cell_type culture_cond Size_Factor biotype gc_content cell_1 gene_1 cell_2 gene_2 cell_3 gene_3 cell_n gene_n
Pre-process & batch Normalization Identify top t-SNE +PCA markers High dimension Non-linear Pre-process data Cluster cells Compare clusters noisy scRNA-seq dimension dataset reduction Targeted UMAP contrasts
Preprocess the data • Preprocess data with initial dimensionality reduction cds <- preprocess_cds(cds, num_dim = 100)
Reduce dimension Normalization Identify top t-SNE +PCA markers High dimension Non-linear Pre-process data Cluster cells Compare clusters noisy scRNA-seq dimension dataset reduction Targeted UMAP contrasts
Pre-process Reduce dimensions Reduce dimension cds <- reduce_dimension(cds) plot_cells(cds)
Cluster cells Normalization Identify top t-SNE +PCA markers High dimension Non-linear Pre-process data Cluster cells Compare clusters noisy scRNA-seq dimension dataset reduction Targeted UMAP 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"))
Pre-process Group cells by partitions Reduce dimension Cluster cds <- cluster_cells(cds) plot_cells(cds, color_cells_by="partition", group_cells_by="partition")
Group cells by clusters cds <- cluster_cells(cds) plot_cells(cds)
Compare clusters Normalization Identify top t-SNE +PCA markers High dimension Non-linear Pre-process data Cluster cells Compare clusters noisy scRNA-seq dimension dataset reduction Targeted UMAP contrasts
Pre-process \ Reduce dimension Gene1 Compare expression Cluster between clusters Learn graph Find cluster markers Gene2
Compare selected clusters cds_subset <- choose_cells(cds) � 34
Compare selected clusters gene_fits <- fit_models(cds_subset[1:100,], model_formula_str = "~cluster") fit_coefs <- coefficient_table(gene_fits) head(fit_coefs)
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
Further analyses with Monocle3 Trajectory analysis Graph-based differential expression
Thank you! Questions? � 42
Recommend
More recommend