knitr::opts_chunk$set(error=FALSE, warning=FALSE, message=FALSE)
The r Biocpkg("MouseGastrulationData")
package provides convenient access to various -omics datasets from mouse gastrulation and organogeneis.
These datasets are provided in a highly annotated format, so can be used very easily to probe different biological questions, or for methods development.
The primary datasets are the single-cell RNA sequencing (scRNA-seq) datasets from @pijuan-sala_single-cell_2019 and @guibentif2020diverse.
These include an atlas of embryonic development (EmbryoAtlasData()
) with high sampling density across time, alongside chimaera experiments, that include gene knockouts in an in vivo system.
These Datasets are provided as count matrices with additional feature- and sample-level metadata after processing.
Raw sequencing data can be acquired from ArrayExpress accession E-MTAB-6967 for the atlas.
In addition, the package also provides single-nucleus ATAC-seq data from E8.25 embryos (@BPS_atac), and seqFISH (i.e. spatial transcriptomic) data from E8.5 embryos (@lohoff_highly_2020).
The package may be installed from Bioconductor.
Bioconductor packages can be accessed using the r CRANpkg("BiocManager")
package.
if (!requireNamespace("BiocManager", quietly = TRUE)) install.packages("BiocManager") BiocManager::install("MouseGastrulationData")
Bioconductor devel includes the most recent datasets and changes to the package. Instructions for installation of Bioconductor devel are available on their website.
To use the package, load it in the typical way.
library(MouseGastrulationData)
Detailed methods are available in the methods that accompany the paper, or from the code in the corresponding Github repository. Briefly, whole embryos were dissociated at timepoints between embryonic days (E) 6.5 and 8.5 of development. Libraries were generated using the 10x Genomics Chromium platform (v1 chemistry) and sequenced on the Illumina HiSeq 2500. The computational analysis involved a number of steps:
swappedDrops()
function from r Biocpkg("DropletUtils")
[@griffiths2018detection].emptyDrops()
function from r Biocpkg("DropletUtils")
[@lun2019emptydrops].computeSumFactors()
function from r Biocpkg("scran")
[@lun2016pooling].doubletCells()
function from r Biocpkg("scran")
.fastMNN()
from r Biocpkg("scran")
[@haghverdi2018batch].buildSNNGraph()
(from r Biocpkg("scran")
)
and cluster_louvain
(from r CRANpkg("igraph")
), and were annotated and merged into interpretable units by hand.The data accessible via this package is stored in subsets according to the different 10x samples that were generated.
For the embryo atlas, the exported object AtlasSampleMetadata
provides metadata information for each of the samples.
Descriptions of the contents of each column can be accessed using ?AtlasSampleMetadata
.
head(AtlasSampleMetadata, n = 3)
All data access functions allow you to select the particular samples you would like to access. By loading only the samples that you are interested in for your particular analysis, you will save time when downloading and loading the data, and also reduce memory consumption on your machine.
The package provides the dataset in the form of a SingleCellExperiment
object.
This section details how you can interact with the object.
We load in only one of the samples from the atlas to reduce memory consumption when compiling this vignette.
sce <- EmbryoAtlasData(samples = 21) sce
We use the counts()
function to retrieve the count matrix.
These are stored as a sparse matrix, as implemented in the r CRANpkg("Matrix")
package.
counts(sce)[6:9, 1:3]
Size factors for normalisation are present in the object and are accessed with the sizeFactors()
function.
head(sizeFactors(sce))
After running r Biocpkg("scuttle")
's logNormCounts
function on the r Biocpkg("SingleCellExperiment")
object, normalised or log-transformed counts can be accessed using logcounts
(or, if log=FALSE
, normcounts
).
These are not demonstrated in this vignette to avoid a dependency on r Biocpkg("scuttle")
.
The MGI symbol and Ensembl gene ID for each gene is stored in the rowData
of the SingleCellExperiment
object.
All of this data was processed with Ensembl 92 annotation.
head(rowData(sce))
The colData
contains cell-specific attributes.
The meaning of each field is detailed in the function documentation (?EmbryoAtlasData
).
head(colData(sce))
Batch-corrected PCA representations of the data are available via the reducedDim
function, in the pca.corrected
slot.
This representation contains NA
values for cells that are doublets, or cytoplasm-stripped nuclei.
A vector of celltype colours (as used in the paper) is also provided in the exported object EmbryoCelltypeColours
.
Its use is shown below.
#exclude technical artefacts singlets <- which(!(colData(sce)$doublet | colData(sce)$stripped)) plot( x = reducedDim(sce, "umap")[singlets, 1], y = reducedDim(sce, "umap")[singlets, 2], col = EmbryoCelltypeColours[colData(sce)$celltype[singlets]], pch = 19, xaxt = "n", yaxt = "n", xlab = "UMAP1", ylab = "UMAP2" )
If you would like to use spliced/unspliced/ambiguously spliced count matrices for the atlas data, these can be accessed using the get.spliced
argument, as shown below.
Spliced count matrices will be stored as separate entries in the assays
slot.
sce <- EmbryoAtlasData(samples=21, get.spliced=TRUE) names(assays(sce))
Unfiltered count matrices are also available from r Biocpkg("MouseGastrulationData")
.
This refers to count matrices where swapped molecules have been removed but no cells have been called.
They can be obtained using the EmbryoAtlasData()
function and are returned as SingleCellExperiment
objects.
unfilt <- EmbryoAtlasData(type="raw", samples=c(1:2)) sapply(unfilt, dim)
These unfiltered matrices may be useful if you want to perform tests of cell-calling analyses, or analyses which use the ambient pool of RNA in 10x samples. Note that empty columns are excluded from these matrices.
Data from experiments involving chimeric embryos in @pijuan-sala_single-cell_2019 and @guibentif2020diverse are also available from this package. In these embryos, a population of fluorescent embryonic stem cells were injected into wild-type E3.5 mouse embryos. The embryos were then returned to a parent mouse, and allowed to develop normally until collection. The cells were flow-sorted to purify host and injected populations, libraries were generated using 10x version 2 chemistry and sequencing was performed on the HiSeq 4000.
Chimeras are especially effective for studying the effect of knockouts of essential developmental genes. We inject stem cells that possess a knockout of a particular gene, and allow the resulting chimeric embryo to develop. Both injected and host cells contribute to the different tissues in the mouse. The presence of the wild-type host cells allows the embryo to compensate and avoid gross developmental failures, while cells with the knockout are also captured, and their aberrant behaviour can be studied.
The package contains three chimeric datasets:
WTChimeraData()
function.Tal1ChimeraData()
function.TChimeraData()
function.The processed data for each experiment are provided as a SingleCellExperiment
, as for the previously described atlas data.
However, there are a few small differences:
colData
field tomato
.colData
field pool
.There may also be additional columns in the cell metadata for individual experiments, the meanings of which are described in the help pages for each function. Unfiltered count matrices are also provided for each sample in these datasets.
Data from @BPS_atac is available in this package in the BPSATACData()
function.
As the package authors were not involved in this study, we leave it to users to familiarise themselves with the methods used in that paper, linked here.
Because this data is measured in units of open chromatin, its format is quite different to the other datasets, so it is advised to consult the manual page for the function for more information.
Raw sequencing data is available at GEO accession GSE133244.
Data from @lohoff_highly_2020 is available in this package in the LohoffSeqFISHData()
function.
Methods for the generation of this data may be found in their biorXiv submission.
This data is provided as a r Biocpkg("SpatialExperiment")
object.
This includes the locations of individual RNA molecules within cells, and also segmentation masks for each cell.
Segmentation masks were determined from cell membrane staining, not from simple distance-to-nuclei methods, which is a unique aspect of this dataset (at the time of its publication).
See the function manual page for information on how this data is delivered.
Data from @ricard_multiome is available in the RAMultiomeData()
function.
This dataset contains both RNA expression and chromatin accessibility data from the same cells, from gastrulation embryos of various timepoints.
ATAC-seq data is available via a gene promoter accessibility score (altExp(sce, "TSS_gene_score")
) and genome-wide peak presence (altExp(sce, "ATAC_peak_counts")
).
The way altExp
s work is that these are themselves SingleCellExperiment
objects, with identical colData
to the main SingleCellExperiment
object.
Check the documentation for RAMultiomeData()
for more information on the contents of each matrix.
Similarly to the main atlas, metadata for each sample is available using RASampleMetadata
.
Some additional data is provided that is specific to analyses performed in individual publications whose data is in this package.
At the moment, the only example of this is GuibentifExtraData()
, which downloads somitogenesis trajectory information and NMP orderings for @guibentif2020diverse.
A user might want to use these data outside of the Bioconductor framework in which it is provided from this package.
Fortunately, there are several packages available for R that facilitate this.
In my experience, r Biocpkg("zellkonverter")
is by far the best approach for creating h5ad files for use with (scanpy.
An alternative is to use the r Biocpkg("LoomExperiment")
package to create .loom
files.
You could instead use r Githubpkg("mojaveazure/loomR")
, which is available through Github.
r CRANpkg("Seurat")
has a function as.Seurat
to directly convert SingleCellExperiment files directly to Seurat*-friendly objects.
In any case, it is likely that this package is the easiest way to access the mouse gastrulation datasets, regardless of how you wish to analyse it downstream.
sessionInfo()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.