Projecting scRNA-seq data into a reference T cell atlas
454
Log into Docker and download the image:
docker pull mandrea1/projectils_demo:1.0.0
This image contains an installation of RStudio, to run the ProjecTILs demo interactively (1). Alternatively, you can run the pipeline from command line (2).
Run the container using:
docker run --rm -p 8787:8787 -e PASSWORD=pass mandrea1/projectils_demo:1.0.0
and open a browser at the address localhost:8787
If prompted with username and password, use
Then, within the RStudio session running in the browser, open the ProjecTILs.demo.Rmd file. Run chunks separately and explore the package functionalities.
NOTE: Allocate at least 12GB of RAM to Docker, and increase as needed for larger query sets.
To run the code within the docker container from command line, provide a one-liner code with the -e flag. Some examples:
commands="library(ProjecTILs); \
ref <- load.reference.map('/home/rstudio/ref_TILAtlas_mouse_v1.rds'); \
querydata <- ProjecTILs::query_example_seurat; \
query.projected <- make.projection(querydata, ref=ref, skip.normalize = T); \
p <- plot.projection(ref, query.projected); \
ggsave('projected.example.umap.png', plot=p, width = 7, height = 6); \
saveRDS(query.projected, file='query.projected.rds')"
docker run -v `pwd`:`pwd` -w `pwd` mandrea1/projectils_demo:1.0.0 R -e "$commands"
/home/rstudio/sample_data/commands="library(ProjecTILs); \
ref <- load.reference.map('/home/rstudio/ref_TILAtlas_mouse_v1.rds'); \
fname <- '/home/rstudio/sample_data/'; \
querydata <- read.sc.query(fname, type='10x', min.cells=3, min.features=50); \
query.projected <- make.projection(querydata, ref=ref); \
p <- plot.projection(ref, query.projected); \
ggsave('projected.example10x.umap.png', plot=p, width = 7, height = 6); \
query.projected <- cellstate.predict(ref=ref, query=query.projected); \
p <- plot.statepred.composition(ref, query.projected); \
ggsave('projected.example10x.statepred.png', plot=p, width = 6, height = 4); \
saveRDS(query.projected, file='query10x.projected.rds')"
docker run -v `pwd`:`pwd` -w `pwd` mandrea1/projectils_demo:1.0.0 R -e "$commands"
commands="library(ProjecTILs); \
library(GEOquery); \
refUrl <- 'https://ndownloader.figshare.com/files/23166794'; \
refFileName <- 'ref_LCMV_Atlas_mouse_v1.rds'; \
download.file(refUrl, refFileName); \
ref <- load.reference.map(refFileName); \
getGEOSuppFiles('GSE137007'); \
fname <- 'GSE137007/GSE137007_Run36_KK_UMI_Filterby_Gene500_UMI5000.txt.gz'; \
querydata <- read.sc.query(fname, type = 'raw'); \
query.projected <- make.projection(querydata, ref=ref); \
p <- plot.projection(ref, query.projected) + coord_flip() + scale_x_reverse() + scale_y_reverse(); \
ggsave('projected.lcmv.umap.png', plot=p, width = 7, height = 6); \
saveRDS(query.projected, file='query.projected.lcmv.rds')"
docker run -v `pwd`:`pwd` -w `pwd` mandrea1/projectils_demo:1.0.0 R -e "$commands"
NOTE: Allocate at least 12GB of RAM to Docker, and increase as needed for larger query sets.
Publication: Projecting single-cell transcriptomics data onto a reference T cell atlas to interpret immune responses. Massimo Andreatta, Jesus Corria Osorio, Soren Muller, Rafael Cubas, George Coukos, Santiago J Carmona (2020) bioRxiv preprint
See also the ProjecTILs GitHub repository
Content type
Image
Digest
Size
1.5 GB
Last updated
over 5 years ago
docker pull mandrea1/projectils_demo:1.1.0