SpatialLIBD
Code for the spatialLIBD R/Bioconductor package and shiny app
Install / Use
/learn @LieberInstitute/SpatialLIBDREADME
spatialLIBD <img src="man/figures/logo.png" align="right" />
<!-- badges: start --> <!-- badges: end -->Welcome to the spatialLIBD project! It is composed of:
- a shiny web application that we are hosting at spatial.libd.org/spatialLIBD/ that can handle a limited set of concurrent users,
- a Bioconductor package at bioconductor.org/packages/spatialLIBD (or from here) that lets you analyze the data and run a local version of our web application (with our data or yours),
- and a research article with the scientific knowledge we drew from this dataset. The analysis code for our project is available here and the high quality figures for the manuscript are available through Figshare.
The web application allows you to browse the LIBD human dorsolateral pre-frontal cortex (DLPFC) spatial transcriptomics data generated with the 10x Genomics Visium platform. Through the R/Bioconductor package you can also download the data as well as visualize your own datasets using this web application. Please check the manuscript or bioRxiv pre-print for more details about this project.
If you write about this website, the data or the R package please use the <code>#spatialLIBD</code> hashtag. See previous tagged Bluesky posts <a href="https://bsky.app/search?q=%23spatialLIBD">here</a>. Thank you!
Study design
As a quick overview, the data presented here is from portion of the DLPFC that spans six neuronal layers plus white matter (A) for a total of three subjects with two pairs of spatially adjacent replicates (B). Each dissection of DLPFC was designed to span all six layers plus white matter (C). Using this web application you can explore the expression of known genes such as SNAP25 (D, a neuronal gene), MOBP (E, an oligodendrocyte gene), and known layer markers from mouse studies such as PCP4 (F, a known layer 5 marker gene).
<img src="man/figures/paper_figure1.jpg" align="center" width="800px" />This web application was built such that we could annotate the spots to layers as you can see under the spot-level data tab. Once we annotated each spot to a layer, we compressed the information by a pseudo-bulking approach into layer-level data. We then analyzed the expression through a set of models whose results you can also explore through this web application. Finally, you can upload your own gene sets of interest as well as layer enrichment statistics and compare them with our LIBD Human DLPFC Visium dataset.
If you are interested in running this web application locally, you can
do so thanks to the spatialLIBD R/Bioconductor package that powers
this web application as shown below.
## Run this web application locally
spatialLIBD::run_app()
## You will have more control about the length of the
## session and memory usage.
## You could also use this function to visualize your
## own data given some requirements described
## in detail in the package vignette documentation
## at http://research.libd.org/spatialLIBD/.
Shiny website mirrors
- Main shiny application website
(note that the link must have a trailing slash
/for it to work) - Shinyapps This version has
less RAM memory but is typically deployed using the latest version of
spatialLIBD.
Introductory material
If you prefer to watch a video overview of the HumanPilot project,
check the following journal club presentation of the main results.
You might also be interested in the explainer video and companion blog post as well as the original Feb 29, 2020 blog post from when we first made this project public.
<iframe width="560" height="315" src="https://www.youtube.com/embed/HGioWKuI3ek?si=X-tqtZtcPSV-3uMt" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen data-external="1"> </iframe>R/Bioconductor package
The spatialLIBD package contains functions for:
- Accessing the spatial transcriptomics data from the LIBD Human Pilot
project (code on
GitHub) generated with
the Visium platform from 10x Genomics. The data is retrieved from
Bioconductor’s
ExperimentHub. - Visualizing the spot-level spatial gene expression data and clusters.
- Inspecting the data interactively either on your computer or through spatial.libd.org/spatialLIBD/.
For more details, please check the documentation website or the Bioconductor package landing page here.
Installation instructions
Get the latest stable R release from
CRAN. Then install spatialLIBD from
Bioconductor using the following code:
if (!requireNamespace("BiocManager", quietly = TRUE)) {
install.packages("BiocManager")
}
BiocManager::install("spatialLIBD")
If you want to use the development version of spatialLIBD, you will
need to use the R version corresponding to the current
Bioconductor-devel branch as described in more detail on the
Bioconductor
website. Then you
can install spatialLIBD from GitHub using the following command.
BiocManager::install("LieberInstitute/spatialLIBD")
Access the data
Through the spatialLIBD package you can access the processed data in
it’s final R format. However, we also provide a table of links so you
can download the raw data we received from 10x Genomics.
Processed data
Using spatialLIBD you can access the Human DLPFC spatial
transcriptomics data from the 10x Genomics Visium platform. For example,
this is the code you can use to access the layer-level data. For more
details, check the help file for fetch_data().
## Load the package
library("spatialLIBD")
## Download the spot-level data
spe <- fetch_data(type = "spe")
## This is a SpatialExperiment object
spe
#> class: SpatialExperiment
#> dim: 33538 47681
#> metadata(0):
#> assays(2): counts logcounts
#> rownames(33538): ENSG00000243485 ENSG00000237613 ... ENSG00000277475
#> ENSG00000268674
#> rowData names(9): source type ... gene_search is_top_hvg
#> colnames(47681): AAACAACGAATAGTTC-1 AAACAAGTATCTCCCA-1 ...
#> TTGTTTCCATACAACT-1 TTGTTTGTGTAAATTC-1
#> colData names(69): sample_id Cluster ... array_row array_col
#> reducedDimNames(6): PCA TSNE_perplexity50 ... TSNE_perplexity80
#> UMAP_neighbors15
#> mainExpName: NULL
#> altExpNames(0):
#> spatialCoords names(2) : pxl_col_in_fullres pxl_row_in_fullres
#> imgData names(4): sample_id image_id data scaleFactor
## Note th
Related Skills
node-connect
342.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
85.3kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
342.5kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
342.5kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
