-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathREADME.Rmd
More file actions
88 lines (59 loc) · 4.52 KB
/
Copy pathREADME.Rmd
File metadata and controls
88 lines (59 loc) · 4.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# SpaCET: Spatial Cellular Estimator for Tumors <img src="man/figures/sticker.png" align="right" alt="" width="120" />
<!-- badges: start -->
<!-- badges: end -->
SpaCET is an R package designed for analyzing cancer spatial transcriptomics (ST) datasets to estimate cell lineages and intercellular interactions within the tumor microenvironment. In a nutshell, SpaCET first infers <b>cancer cell</b> abundance by integrating a gene pattern dictionary of common malignancies. Subsequently, SpaCET employs a constrained linear regression model to calibrate local tissue densities and determine <b>stromal and immune</b> cell lineage fractions based on a comprehensive non-malignant cell atlas. Furthermore, SpaCET has the capability to unveil putative <b>cell-cell interactions</b> within the tumor microenvironment, particularly at the tumor-immune interface. Of note, although SpaCET does not require any input cell references for the analysis of tumor ST data, SpaCET can still incorporate a matched scRNA-seq dataset as customized references to conduct cell type deconvolution of any ST dataset. Check the tutorials below for details on how to use the package.
<img src="man/figures/workflow.png" width="100%" />
## Installation
To install `SpaCET` R package, we recommend using `devtools`:
``` r
# install.packages("devtools")
devtools::install_github("data2intelligence/SpaCET")
```
Or user can install `SpaCET` R package from the source code. Click <a href="https://api.github.com/repos/data2intelligence/SpaCET/tarball/HEAD" target="_blank">here</a> to download it.
``` r
# install SpaCET dependencies
remotes::install_deps("Path_to_the_source_code", force = TRUE)
# install SpaCET R package
install.packages("Path_to_the_source_code", repos = NULL, type="source")
```
#### 🔶 Alternative installation options
If you are not familiar with R language, you can use the Python version of SpaCET available <a href="https://github.com/psychemistz/spatial-gpu" target="_blank">here</a>.
## Dependencies
* R version >= 4.2.0.
* R packages: Matrix, jsonlite, ggplot2, reshape2, scatterpie, patchwork, png, shiny, plotly, DT, MUDAN, factoextra, NbClust, cluster, parallel, pbmcapply, psych, BiRewire, limma, arrow, UCell, RANN, sctransform.
## Example
``` r
library(SpaCET)
visiumPath <- file.path(system.file(package = "SpaCET"), "extdata/Visium_BC")
SpaCET_obj <- create.SpaCET.object.10X(dataPath = visiumPath, platform = "Visium", organism = "human")
SpaCET_obj <- SpaCET.deconvolution(SpaCET_obj, cancerType="BRCA", coreNo=6)
SpaCET_obj@results$deconvolution$propMat[1:13,1:5]
```
## Tutorial
SpaCET is applicable for deconvolving spatial transcriptomics data across different platforms and cellular resolutions. In addition, it can compute gene set scores and assess spatial correlations.
#### Core
* [Cell type deconvolution and interaction analysis](https://data2intelligence.github.io/SpaCET/articles/visium_BC.html)
* [Deconvolution with a matched scRNA-seq data set](https://data2intelligence.github.io/SpaCET/articles/oldST_PDAC.html)
* [Application to high resolution spatial transcriptomics data](https://data2intelligence.github.io/SpaCET/articles/hiresST_CRC.html)
#### Misc
* [Creating a SpaCET object](https://data2intelligence.github.io/SpaCET/articles/SpaCET_object.html)
* [Gene set score calculation for spatial spots](https://data2intelligence.github.io/SpaCET/articles/GeneSetScore.html)
* [Spatially variable genes and co-expressed ligand–receptor interactions](https://data2intelligence.github.io/SpaCET/articles/SpatialCorrelation.html)
## Data availability
This [Link](https://doi.org/10.5281/zenodo.14976008){target="_blank"} provides access to the 10 scRNA-seq datasets used to generate SpaCET's in-house cell-type reference, along with the 8 spatial transcriptomics samples demonstrated in our manuscript.
## Contact
For questions, bug reports, or feature requests, please submit an [issue](https://github.com/data2intelligence/SpaCET/issues). To keep the issue tracker focused and constructive, advertising or promotional content is not permitted.
## Citation
Beibei Ru, Jinlin Huang, Yu Zhang, Kenneth Aldape, Peng Jiang. Estimation of cell lineages in tumors from spatial transcriptomics data. **Nature Communications** 14, 568 (2023). [[Full Text](https://doi.org/10.1038/s41467-023-36062-6){target="_blank"}]