# Castl: A Consensus Framework for Robust Identification of Spatially Variable Genes in Spatial Transcriptomics
## 1 Overview
`Castl` is a novel consensus-based analytical framework designed to enhance the accuracy and robustness of spatially variable genes identification for spatially resolved transcriptomics through statistically rigorous algorithms, including **rank aggregation**, **p-value aggregation**, and **Stabl aggregation**. Comprehensive evaluations on both simulated and real-world data demonstrate that Castl consistently identifies biologically meaningful spatial expression patterns, mitigates method-specific biases and effectively controls FDRs across various biological contexts, resolutions, and spatial technologies. This flexible, assumption-free framework offers a robust and standardized foundation for spatially informed feature discovery in complex biological systems.
## 2 System Requirements
### Python
- Python >= 3.9.5
- pandas >= 1.3.0
- numpy >= 1.21.0
- rpy2 >= 3.5.0
- scipy >= 1.7.0
- statsmodels >= 0.13.0
- anndata >= 0.8.0
- scanpy >= 1.9.0
- matplotlib >= 3.5.0
- seaborn >= 0.12.0
- scikit-learn >= 1.0.0
### R
- R >= 4.0.5
- dplyr >= 1.0.0
- tidyverse >= 1.3.0
- clusterProfiler >= 3.18.0
- org.Hs.eg.db >= 3.12.0
- patchwork >= 1.1.0
- ggplot2 >= 3.3.0
- TissueEnrich >= 1.8.0
- SummarizedExperiment >= 1.20.0
## 3 Installation
### Python
`Castl` can be installed directly from PyPI:
```bash
pip install Castl
```
or download from Github and install it:
```bash
git clone https://github.com/TheY11/Castl
cd Castl
pip install -e .
```
### R
We also provide the R package `castlRUtils` for calculating quality scores (QS) of SVGs.
```{r}
library(devtools)
devtools::install_github("TheY11/Castl", subdir = "Castl/r_utils", force = TRUE)
library(castlRUtils)
```
## 4 Tutorials
Detailed usage instructions and tutorials for `Castl` are available at:
[Tutorial 1: 10x Visium colorectal cancer liver metastasis datasets.](./docs/tutorials/Tutorial1_CRC.ipynb)
[Tutorial 2: 10x Visium human dorsolateral prefrontal cortex (DLPFC) datasets.](./docs/tutorials/Tutorial2_DLPFC.ipynb)
[Tutorial 3: Stereo-seq mouse olfactory bulb datasets.](./docs/tutorials/Tutorial3_Stereoseq_MOB.ipynb)
[Tutorial 4: Slide-seqV2 mouse olfactory bulb datasets.](./docs/tutorials/Tutorial4_SlideseqV2_MOB.ipynb)
[Tutorial 5: MERFISH mouse hypothalamic preoptic region data.](./docs/tutorials/Tutorial5_MERFISH.ipynb)
## 5 Improvements
For questions or issues, please [open an issue](https://github.com/TheY11/Castl/issues).
Raw data
{
"_id": null,
"home_page": "https://github.com/TheY11/Castl",
"name": "STCastl",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "consensus, spatially variable genes, spatial transcriptomics",
"author": "Yiyi Yu",
"author_email": "yiyiyu11@163.com",
"download_url": "https://files.pythonhosted.org/packages/fd/5a/974bb29bd7f7dc7cf28a4ce456969854b0f684c07366a1fb582d84b063db/STCastl-0.1.0.tar.gz",
"platform": null,
"description": "# Castl: A Consensus Framework for Robust Identification of Spatially Variable Genes in Spatial Transcriptomics\r\n\r\n## 1 Overview\r\n`Castl` is a novel consensus-based analytical framework designed to enhance the accuracy and robustness of spatially variable genes identification for spatially resolved transcriptomics through statistically rigorous algorithms, including **rank aggregation**, **p-value aggregation**, and **Stabl aggregation**. Comprehensive evaluations on both simulated and real-world data demonstrate that Castl consistently identifies biologically meaningful spatial expression patterns, mitigates method-specific biases and effectively controls FDRs across various biological contexts, resolutions, and spatial technologies. This flexible, assumption-free framework offers a robust and standardized foundation for spatially informed feature discovery in complex biological systems. \r\n\r\n## 2 System Requirements\r\n### Python\r\n- Python >= 3.9.5\r\n- pandas >= 1.3.0\r\n- numpy >= 1.21.0\r\n- rpy2 >= 3.5.0\r\n- scipy >= 1.7.0\r\n- statsmodels >= 0.13.0\r\n- anndata >= 0.8.0\r\n- scanpy >= 1.9.0\r\n- matplotlib >= 3.5.0\r\n- seaborn >= 0.12.0\r\n- scikit-learn >= 1.0.0\r\n\r\n### R\r\n- R >= 4.0.5\r\n- dplyr >= 1.0.0\r\n- tidyverse >= 1.3.0\r\n- clusterProfiler >= 3.18.0\r\n- org.Hs.eg.db >= 3.12.0\r\n- patchwork >= 1.1.0\r\n- ggplot2 >= 3.3.0\r\n- TissueEnrich >= 1.8.0\r\n- SummarizedExperiment >= 1.20.0\r\n\r\n## 3 Installation\r\n\r\n### Python\r\n`Castl` can be installed directly from PyPI\uff1a\r\n```bash\r\npip install Castl\r\n```\r\n\r\nor download from Github and install it:\r\n```bash\r\ngit clone https://github.com/TheY11/Castl\r\n\r\ncd Castl\r\npip install -e .\r\n```\r\n\r\n### R\r\nWe also provide the R package `castlRUtils` for calculating quality scores (QS) of SVGs.\r\n```{r}\r\nlibrary(devtools)\r\ndevtools::install_github(\"TheY11/Castl\", subdir = \"Castl/r_utils\", force = TRUE)\r\nlibrary(castlRUtils)\r\n```\r\n\r\n## 4 Tutorials\r\nDetailed usage instructions and tutorials for `Castl` are available at:\r\n\r\n[Tutorial 1: 10x Visium colorectal cancer liver metastasis datasets.](./docs/tutorials/Tutorial1_CRC.ipynb)\r\n\r\n[Tutorial 2: 10x Visium human dorsolateral prefrontal cortex (DLPFC) datasets.](./docs/tutorials/Tutorial2_DLPFC.ipynb)\r\n\r\n[Tutorial 3: Stereo-seq mouse olfactory bulb datasets.](./docs/tutorials/Tutorial3_Stereoseq_MOB.ipynb)\r\n\r\n[Tutorial 4: Slide-seqV2 mouse olfactory bulb datasets.](./docs/tutorials/Tutorial4_SlideseqV2_MOB.ipynb)\r\n\r\n[Tutorial 5: MERFISH mouse hypothalamic preoptic region data.](./docs/tutorials/Tutorial5_MERFISH.ipynb)\r\n\r\n## 5 Improvements\r\nFor questions or issues, please [open an issue](https://github.com/TheY11/Castl/issues).\r\n",
"bugtrack_url": null,
"license": null,
"summary": "A Consensus Framework for Robust Identification of Spatially Variable Genes in Spatial Transcriptomics",
"version": "0.1.0",
"project_urls": {
"Bug Reports": "https://github.com/TheY11/Castl/issues",
"Homepage": "https://github.com/TheY11/Castl",
"Source": "https://github.com/TheY11/Castl"
},
"split_keywords": [
"consensus",
" spatially variable genes",
" spatial transcriptomics"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "6b5e3533dffad78c5a61d2cd966f972692be4d48f47949a7e3e76db81969c19f",
"md5": "06c291b9a9eb5b63114e19b68992b945",
"sha256": "b2ba51ba7dc46ea95f069abb3c8b8fa07e420d04f7187810ce96d0c8ce2052fa"
},
"downloads": -1,
"filename": "STCastl-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "06c291b9a9eb5b63114e19b68992b945",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 17521,
"upload_time": "2025-07-30T16:41:40",
"upload_time_iso_8601": "2025-07-30T16:41:40.589806Z",
"url": "https://files.pythonhosted.org/packages/6b/5e/3533dffad78c5a61d2cd966f972692be4d48f47949a7e3e76db81969c19f/STCastl-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "fd5a974bb29bd7f7dc7cf28a4ce456969854b0f684c07366a1fb582d84b063db",
"md5": "a6e8d7fb48e08860643cbe809cb8b65e",
"sha256": "1d239054723c12221e9b708945630671d317cce2e7604e1ade3296db9cd99859"
},
"downloads": -1,
"filename": "STCastl-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "a6e8d7fb48e08860643cbe809cb8b65e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 16546,
"upload_time": "2025-07-30T16:41:41",
"upload_time_iso_8601": "2025-07-30T16:41:41.838907Z",
"url": "https://files.pythonhosted.org/packages/fd/5a/974bb29bd7f7dc7cf28a4ce456969854b0f684c07366a1fb582d84b063db/STCastl-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-30 16:41:41",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "TheY11",
"github_project": "Castl",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "numpy",
"specs": [
[
">=",
"1.21.0"
]
]
},
{
"name": "pandas",
"specs": [
[
">=",
"1.3.0"
]
]
},
{
"name": "rpy2",
"specs": [
[
">=",
"3.5.0"
]
]
},
{
"name": "scipy",
"specs": [
[
">=",
"1.7.0"
]
]
},
{
"name": "statsmodels",
"specs": [
[
">=",
"0.13.0"
]
]
},
{
"name": "anndata",
"specs": [
[
">=",
"0.8.0"
]
]
},
{
"name": "scanpy",
"specs": [
[
">=",
"1.9.0"
]
]
},
{
"name": "matplotlib",
"specs": [
[
">=",
"3.5.0"
]
]
},
{
"name": "seaborn",
"specs": [
[
">=",
"0.12.0"
]
]
},
{
"name": "scikit-learn",
"specs": [
[
">=",
"1.0.0"
]
]
}
],
"lcname": "stcastl"
}