--- title: "Accessing data from Single-Cell Expression Atlas" author: "Pedro Madrigal" affiliation: "EMBL-EBI" date: "`r Sys.Date()`" output: html_document: toc: false toc_depth: 3 number_sections: false bibliography: references.bib keywords: ["gene expression", "RNA-seq", "ExpressionAtlas", "Bioconductor", "single-cell"] vignette: > %\VignetteEngine{knitr::rmarkdown} %\VignetteIndexEntry{ Accessing data from Single-Cell Expression Atlas } %\VignetteEncoding{UTF-8} --- This vignette demonstrates how to access and visualize dataset [E-GEOD-81383](https://www.ebi.ac.uk/gxa/sc/experiments/E-GEOD-81383) from the Single-Cell Expression Atlas using the `ExpressionAtlas` package. ```{r setup, include=FALSE} knitr::opts_chunk$set(message=FALSE, warning=FALSE) ``` ```{r load-packages} library( ExpressionAtlas ) library( SingleCellExperiment ) library( ggplot2 ) ``` ```{r single-cell-search,eval=TRUE} sc_search_results <- searchSCAtlasExperiments( query = "hematopoietic", secondaryFilter = "old" ) print(sc_search_results) ``` ```{r single-cell-download, eval=TRUE} geod81383 <- getAtlasSCExperiment( "E-GEOD-81383" ) geod81383 print("Reduced dimension names:") print(reducedDimNames(geod81383 )) print("Column data names:") print(colnames(colData(geod81383 ))) ``` ```{r single-cel-plot-cluster, eval=TRUE} # Colour the same UMAP by Louvain cluster, genotype, age, and cell line. plotDimRedSCAtlasExperiment(geod81383, dimRed = "X_umap_neighbors_n_neighbors_20", colorby = "louvain_resolution_0.1", save_pdf = FALSE, plot_layers = list(ggplot2::theme_classic())) plotDimRedSCAtlasExperiment(geod81383, dimRed = "X_umap_neighbors_n_neighbors_20", colorby = "genotype", save_pdf = FALSE, plot_layers = list(ggplot2::theme_classic())) plotDimRedSCAtlasExperiment(geod81383, dimRed = "X_umap_neighbors_n_neighbors_20", colorby = "age", save_pdf = FALSE, plot_layers = list(ggplot2::theme_classic(), ggplot2::scale_colour_brewer(palette = "Set2"))) plotDimRedSCAtlasExperiment(geod81383, dimRed = "X_umap_neighbors_n_neighbors_20", colorby = "cell_line", save_pdf = FALSE, plot_layers = list(ggplot2::theme_classic() , ggplot2::scale_colour_brewer(palette = "Accent"))) ``` ```{r single-cell-heatmap-plot, eval=TRUE} # Plot marker genes for K = 3 using unscaled normalized expression. heatmapSCAtlasExperiment(geod81383, genes=NULL, sel.K=3, scaleNormExp=FALSE, show_row_names=FALSE, save_pdf = FALSE ) # Plot the same marker genes after scaling expression for each gene. heatmapSCAtlasExperiment(geod81383, genes=NULL, sel.K=3, scaleNormExp=TRUE, show_row_names=FALSE, save_pdf = FALSE) # Plot unscaled expression and display Gene names. dotPlotSCAtlasExperiment(geod81383, genes=c('ENSG00000185664', 'ENSG00000205777', 'CD36'), sel.K=3, scaleNormExp=TRUE, geneLabel = 'name', save_pdf = FALSE, dot_theme = list(ggplot2::theme_classic())) # Plot scaled expression and display Gene IDs. dotPlotSCAtlasExperiment(geod81383, genes=c('ENSG00000185664','ENSG00000205777', 'CD36'), sel.K=3, scaleNormExp=TRUE, geneLabel = 'id', save_pdf = FALSE, dot_theme = list(ggplot2::theme_classic())) ``` # sessionInfo ```{r session-info} sessionInfo() ```