Skip to content

samuel-marsh/Hammond-et-al_2019_Microglia_scRNAseq

Repository files navigation

Hammond-et-al_2019_Microglia_scRNAseq

Analysis Objects to Download for:

Timothy R. Hammond1,*, Connor Dufort, Lasse Dissing-Olesen, Stefanie Giera, Adam Young, Alec Wysoker, Alec J. Walker, Frederick Gergits, Michael Segel, James Nemesh, Samuel E. Marsh2,#, Arpiar Saunders, Evan Macosko, Florent Ginhoux, Jinmiao Chen, Robin J.M. Franklin, Xianhua Piao, Steven A. McCarroll, and Beth Stevens.

1Performed analysis
2Created Objects/Repo
*Analysis Contact (contact: [email protected])
#Repo/Object Contact (contact: [email protected])

Table of Contents

About the Datasets
Object Creation
Downloading Objects
Loading & Basic Use of Objects

About the Datasets

Analysis was performed in paper as described without use of bespoke object/file format. However, to facilitate easier use of data in analyzed/annotated form we have created pseudo-objects.
NOTE: If you would like to query individual genes and their expression across clusters/ages you can use interactive web portal microgliasinglecell.com.

Objects described in this repo are available in 3 most popular formats for use in both R and Python (Seurat, SingleCellExperiment, and anndata).

The objects contain:

  • Raw & Normalized expression data.
  • tSNE coordinates of analysis shown in paper.
  • Cluster annotation from paper.
  • Cell level meta data (age, sex, batch, etc)

They do not contain:

  • Variable genes
  • ICA factor loadings
  • Scaled Data (removed to keep object size small, can be added using package functions)

Object Creation

Downloading data

Raw data matrices can be downloaded using browser from NCBI GEO GSE121654. If using command line you can use ffq tool from Pacther lab.

Creating Objects

Raw data matrices were then processed in R using scCustomize & Seurat to create Seurat objects. The steps and functions used for object creation are detailed in script: 01_Object_Creation.R.

Objects were then converted (see 02_Object_Conversion.R) to SingleCellExperiment using Seurat::as.SingleCellExperiment() and anndata using sceasy::convertFormat functions.

Downloading Objects

Dataset objects can be downloaded from figshare either using browser or command line as detailed below.

Download via browser

Datasets can be downloaded through browser using the following links:

Dataset Figures Type Link
All Samples Figure 1 Seurat All Sample Seurat
All Samples Figure 1 SCE All Sample SCE
All Samples Figure 1 anndata All Sample anndata
Young vs. Old Figure 5 Seurat Young vs. Old Seurat
Young vs. Old Figure 5 SCE Young vs. Old SCE
Young vs. Old Figure 5 anndata Young vs. Old anndata

Download via command line

Seurat Objects

# Download both objects in .zip
wget -O hammond_seurat.zip https://figshare.com/ndownloader/articles/21201463/versions/4

# Download All Samples Object
wget -O Hammond_et-al-2019_Seurat_Converted_v4.qs https://figshare.com/ndownloader/files/37624052

# Download Young vs. Old Samples Object
wget -O Hammond_et-al-2019_Aged_Seurat_Converted_v4.qs https://figshare.com/ndownloader/files/37606217

SCE Objects

# Download both objects in .zip
wget -O hammond_SCE.zip https://figshare.com/ndownloader/articles/21201472/versions/3

# Download All Samples Object
wget -O Hammond_et-al-2019_SCE_Converted_v1-16-0.qs https://figshare.com/ndownloader/files/37624058

# Download Young vs. Old Samples Object
wget -O Hammond_et-al-2019_Aged_SCE_Converted_v1-16-0.qs https://figshare.com/ndownloader/files/37606379

anndata Objects

# Download both objects in .zip
wget -O hammond_anndata.zip https://figshare.com/ndownloader/articles/21201616/versions/5

# Download All Samples Object
wget -O Hammond_et-al-2019_anndata_Converted_v0-8-0.h5ad https://figshare.com/ndownloader/files/37624073

# Download Young vs. Old Samples Object
wget -O Hammond_et-al-2019_Aged_anndata_Converted_v0-8-0.h5ad https://figshare.com/ndownloader/files/37610789

Using Objects

Using Objects in R

Examples of some basic use and plotting of Seurat and SCE objects can be found in script: 03_Object_Usage_R.R.

Use of Seurat object also takes advantage of the ability to use scCustomize for plotting:

library(tidyverse)
library(Seurat) #v4.1.0
library(scCustomize) #v0.7.0.9038
library(patchwork)

p1 <- DimPlot(hammond_all_samples, cols = hammond_all_samples@misc$hammond_colors, pt.size = 0.25, raster = F, label = T, label.size = 5) + NoLegend() + ggtitle("Hammond et. al., 2019 All Samples") + theme(plot.title = element_text(hjust = 0.5))

p2 <- Cluster_Highlight_Plot(seurat_object = hammond_all_samples, cluster_name = 4, highlight_color = hammond_all_samples@misc$hammond_colors[[6]]) + ggtitle("Cluster 9") + theme(plot.title = element_text(hjust = 0.5))

p3 <- FeaturePlot_scCustom(seurat_object = hammond_all_samples, features = "Spp1")

p1 + p2 + p3

Using Objects in Python

We also provide a jupyter notebook with basic commands for loading and plotting objects using scanpy/anndata: 04_Object_Usage_Scanpy.ipynb

Color Palettes (Matching Paper Figures)

We also provide color palettes in easily accessible formats for use in either R or python. The script 05_Hammond_Color_Palettes.R provides details of basic use.

  • Seurat objects contain color palettes in the @misc slot of the objects.
  • For either Seurat, SCE, or any other R-based use there is also a qs object Hammond_et-al-2019_Color_Palettes.qs in this repo which contains all color palettes for easy loading.
  • For Python 05_Hammond_Color_Palettes.R contains vectors formatted for copy and paste use in python.

About

Repository for "pseudo"-objects based on analysis in Hammond et al., 2019 (https://doi.org/10.1016/j.immuni.2018.11.004)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published