library(BiocStyle)
knitr::opts_chunk$set(error=FALSE, message=FALSE, warning=FALSE)

Downloading the count data

We obtain a single-cell RNA sequencing dataset of mouse embryonic stem cells from @kolodziejczyk2015singlecell. We download and cache the count matrix using the r Biocpkg("BiocFileCache") package.

library(BiocFileCache)
bfc <- BiocFileCache("raw_data", ask = FALSE)
kolod.counts <- bfcrpath(bfc,
    file.path("https://espresso.teichlab.sanger.ac.uk",
        "static/counttable_es.csv"))

Processing the read counts

We load the counts into memory. Despite the name of the file, it is not actually comma-separated!

counts <- read.table(kolod.counts, row.names=1, check.names=FALSE)
counts <- as.matrix(counts)
dim(counts)

Saving for upload

We save these to file for upload to r Biocpkg("ExperimentHub").

path <- file.path("scRNAseq", "kolodziejczyk-esc", "2.0.0")
dir.create(path, showWarnings=FALSE, recursive=TRUE)
saveRDS(counts, file=file.path(path, "counts.rds"))

Session information

sessionInfo()

References



drisso/scRNAseq documentation built on Feb. 16, 2021, 1:18 a.m.