knitr::opts_chunk$set(
    collapse = TRUE,
    comment = "#>"
)

Load Tabula Muris data

The TabulaMurisData data package provides access to the 10x and SmartSeq2 single-cell RNA-seq data sets from the Tabula Muris Consortium. The contents of the package can be seen by querying the ExperimentHub for the package name.

suppressPackageStartupMessages({
    library(ExperimentHub)
    library(SingleCellExperiment)
    library(TabulaMurisData)
})

eh <- ExperimentHub()
query(eh, "TabulaMurisData")

The individual data sets can be accessed using either their ExperimentHub accession number, or the convenience functions provided in this package. For example, for the 10x data:

droplet <- eh[["EH1617"]]
droplet
droplet <- TabulaMurisDroplet()
droplet

Explore data with iSEE

Each data set is provided in the form of a SingleCellExperiment object. To gain further insights into the contents of the data sets, they can be explored using, e.g., the r Biocpkg("iSEE") package. For the purposes of this vignette, we first subsample a small subset of the cells in the 10x data set, to reduce the run time.

set.seed(1234)
se <- droplet[, sample(seq_len(ncol(droplet)), 250, replace = FALSE)]
se

Next, we calculate size factors and normalize the data using the r Biocpkg("scran") and r Biocpkg("scater") packages, and perform dimension reduction using PCA and t-SNE.

se <- scran::computeSumFactors(se)
se <- scater::logNormCounts(se)
se <- scater::runPCA(se)
se <- scater::runTSNE(se)

Finally, we call iSEE with the subsampled SingleCellExperiment object. This opens up an instance of iSEE containing the provided data set.

if (require(iSEE)) {
    iSEE(se)
}

Session info

sessionInfo()


csoneson/TabulaMurisData documentation built on July 15, 2024, 5:13 p.m.