library(BiocStyle) knitr::opts_chunk$set(error=FALSE, message=FALSE, warning=FALSE)
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"))
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)
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"))
sessionInfo()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.