|
| 1 | +# spatialLIBD <img src="http://research.libd.org/spatialLIBD/reference/figures/logo.png" align="right" /> |
| 2 | + |
| 3 | +<!-- badges: start --> |
| 4 | + |
| 5 | +[](https://www.tidyverse.org/lifecycle/#maturing) |
| 7 | +[](https://travis-ci.org/LieberInstitute/spatialLIBD) |
| 9 | +[](https://bioconductor.org/checkResults/release/bioc-LATEST/spatialLIBD) |
| 11 | +[](https://codecov.io/gh/LieberInstitute/spatialLIBD?branch=master) |
| 13 | +<!-- badges: end --> |
| 14 | + |
| 15 | +Welcome to the `spatialLIBD` [shiny](https://shiny.rstudio.com/) web application! This 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](https://bioconductor.org/packages/spatialLIBD) you can also download the data as well as visualize your own datasets using this web application. Please check the [bioRxiv pre-print](https://www.biorxiv.org/search/maynard%252Bcollado%252Bweber%252Bhicks%252Bmartinowich%252Bjaffe) for more details about this project. |
| 16 | + |
| 17 | +## Study design |
| 18 | + |
| 19 | +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). |
| 20 | + |
| 21 | +<img src="http://research.libd.org/spatialLIBD/reference/figures/paper_figure1.jpg" align="center" width="800px" /> |
| 22 | + |
| 23 | +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. |
| 24 | + |
| 25 | +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. |
| 26 | + |
| 27 | +``` r |
| 28 | +## Run this web application locally |
| 29 | +spatialLIBD::run_app() |
| 30 | + |
| 31 | +## You will have more control about the length of the |
| 32 | +## session and memory usage. |
| 33 | + |
| 34 | +## You could also use this function to visualize your |
| 35 | +## own data given some requirements described |
| 36 | +## in detail in the package vignette documentation |
| 37 | +## at http://research.libd.org/spatialLIBD/. |
| 38 | +``` |
| 39 | + |
| 40 | + |
| 41 | +## R/Bioconductor package |
| 42 | + |
| 43 | +The `spatialLIBD` package contains functions for: |
| 44 | + |
| 45 | + - Accessing the spatial transcriptomics data from the LIBD Human Pilot |
| 46 | + project ([code on |
| 47 | + GitHub](https://github.com/LieberInstitute/HumanPilot)) generated |
| 48 | + with the Visium platform from 10x Genomics. The data is retrieved |
| 49 | + from [Bioconductor](http://bioconductor.org/)’s `ExperimentHub`. |
| 50 | + - Visualizing the spot-level spatial gene expression data and |
| 51 | + clusters. |
| 52 | + - Inspecting the data interactively either on your computer or through |
| 53 | + [jhubiostatistics.shinyapps.io/spatialLIBD/](https://jhubiostatistics.shinyapps.io/spatialLIBD/). |
| 54 | + |
| 55 | +For more details, please check the [documentation |
| 56 | +website](http://lieberinstitute.github.io/spatialLIBD) or the |
| 57 | +Bioconductor package landing page |
| 58 | +[here](https://bioconductor.org/packages/spatialLIBD). |
| 59 | + |
| 60 | +## Installation instructions |
| 61 | + |
| 62 | +Get the latest stable `R` release from |
| 63 | +[CRAN](http://cran.r-project.org/). Then install `spatialLIBD` using |
| 64 | +from [Bioconductor](http://bioconductor.org/) the following code: |
| 65 | + |
| 66 | +``` r |
| 67 | +if (!requireNamespace("BiocManager", quietly = TRUE)) |
| 68 | + install.packages("BiocManager") |
| 69 | + |
| 70 | +BiocManager::install("spatialLIBD") |
| 71 | +``` |
| 72 | + |
| 73 | +## Access the data |
| 74 | + |
| 75 | +Using `spatialLIBD` you can access the Human DLPFC spatial |
| 76 | +transcriptomics data from the 10x Genomics Visium platform. For example, |
| 77 | +this is the code you can use to access the layer-level data. For more |
| 78 | +details, check the help file for `fetch_data()`. |
| 79 | + |
| 80 | +``` r |
| 81 | +## Load the package |
| 82 | +library('spatialLIBD') |
| 83 | + |
| 84 | +## Download the spot-level data |
| 85 | +sce <- fetch_data(type = 'sce') |
| 86 | +#> Loading objects: |
| 87 | +#> sce |
| 88 | + |
| 89 | +## This is a SingleCellExperiment object |
| 90 | +sce |
| 91 | +#> class: SingleCellExperiment |
| 92 | +#> dim: 33538 47681 |
| 93 | +#> metadata(1): image |
| 94 | +#> assays(2): counts logcounts |
| 95 | +#> rownames(33538): ENSG00000243485 ENSG00000237613 ... ENSG00000277475 |
| 96 | +#> ENSG00000268674 |
| 97 | +#> rowData names(9): source type ... gene_search is_top_hvg |
| 98 | +#> colnames(47681): AAACAACGAATAGTTC-1 AAACAAGTATCTCCCA-1 ... |
| 99 | +#> TTGTTTCCATACAACT-1 TTGTTTGTGTAAATTC-1 |
| 100 | +#> colData names(73): barcode sample_name ... pseudobulk_UMAP_spatial |
| 101 | +#> markers_UMAP_spatial |
| 102 | +#> reducedDimNames(6): PCA TSNE_perplexity50 ... TSNE_perplexity80 |
| 103 | +#> UMAP_neighbors15 |
| 104 | +#> spikeNames(0): |
| 105 | +#> altExpNames(0): |
| 106 | + |
| 107 | +## Note the memory size |
| 108 | +pryr::object_size(sce) |
| 109 | +#> 2.08 GB |
| 110 | + |
| 111 | +## Remake the logo image with histology information |
| 112 | +sce_image_clus( |
| 113 | + sce = sce, |
| 114 | + clustervar = 'layer_guess_reordered', |
| 115 | + sampleid = '151673', |
| 116 | + colors = libd_layer_colors, |
| 117 | + ... = ' DLPFC Human Brain Layers\nMade with github.com/LieberInstitute/spatialLIBD' |
| 118 | +) |
| 119 | +``` |
| 120 | + |
| 121 | +<img src="http://research.libd.org/spatialLIBD/reference/figures/README-access_data-1.png" width="600px" align="center" /> |
| 122 | + |
| 123 | +## Citation |
| 124 | + |
| 125 | +Below is the citation output from using `citation('spatialLIBD')` in R. |
| 126 | +Please run this yourself to check for any updates on how to cite |
| 127 | +**spatialLIBD**. |
| 128 | + |
| 129 | +``` r |
| 130 | +citation('spatialLIBD') |
| 131 | +#> |
| 132 | +#> Collado-Torres L, Maynard KR, Jaffe AE (2020). _LIBD Visium spatial |
| 133 | +#> transcriptomics human pilot data inspector_. doi: |
| 134 | +#> 10.18129/B9.bioc.spatialLIBD (URL: |
| 135 | +#> https://doi.org/10.18129/B9.bioc.spatialLIBD), |
| 136 | +#> https://github.com/LieberInstitute/spatialLIBD - R package version |
| 137 | +#> 0.99.1, <URL: http://www.bioconductor.org/packages/spatialLIBD>. |
| 138 | +#> |
| 139 | +#> Maynard KR, Collado-Torres L, Weber LM, Uytingco C, Williams SR, II |
| 140 | +#> JLC, Barry BK, Tran MN, Besich Z, Tippani M, Chew J, Yin Y, Hyde TM, |
| 141 | +#> Rao N, Hicks SC, Martinowich K, Jaffe AE (2020). "Transcriptome-scale |
| 142 | +#> spatial gene expression in the human dorsolateral prefrontal cortex." |
| 143 | +#> _bioRxiv_. doi: 10.1101/xxxyyy (URL: https://doi.org/10.1101/xxxyyy), |
| 144 | +#> <URL: https://doi.org/10.1101/xxxyyy>. |
| 145 | +#> |
| 146 | +#> To see these entries in BibTeX format, use 'print(<citation>, |
| 147 | +#> bibtex=TRUE)', 'toBibtex(.)', or set |
| 148 | +#> 'options(citation.bibtex.max=999)'. |
| 149 | +``` |
0 commit comments