STARS
Decoding Spatial Transcriptomics at Any Resolution: From Multicellular or Subcellular Spots to Individual Cells
We presented STARS (Spatial Transcriptomics across Any Resolution for Single Cells). Leveraging Vision Transformer model and contrastive learning, STARS combines high-resolution histology images with spot-level transcriptomics data to decode true single-cell gene expression from any multicellular or subcellular platforms. We demonstrated the advantage of our true single-cell method using public datasets and in-house datasets of mouse lung from 3 ST platforms (Visium, Visium HD and Stereo-seq). STARS was applied at tissue, individual cell, and molecular levels.
Framework
The code is licensed under the GPL-3.0 license.
1. Requirements
1.1 Operating systems:
The code in python has been tested on Linux.
1.2 Required packages in python:
anndata
numpy
opencv-python
pandas
python-louvain
rpy2
scanpy
scipy
seaborn
torch
torch-geometric
torchvision
tqdm
umap-learn
1.3 How to install STARS:
Before installing STARS, ensure that you have StarDist installed in your environment. If not, please follow the installation instructions here.
To download STARS, use the following command:
git clone https://github.com/Zhaocy-Research/STARS.git
(1) cd STARS
(2) conda create --name STARS python=3.9
(3) conda activate STARS
STARS can be installed via pip using the following command:
pip install stars-omics
After installation, you can import the package in Python as:
import stars_omics
2. Instructions: Demo on mouse lung data.
We provide an example notebook, visium_06.ipynb, to implement the experimental results from the paper.
Data Access
Data can be accessed via the following link. Please download the data and update the data path in the code. The file name remains unchanged. For example, modify the code from:
img_fold = os.path.join('/ix1/wchen/Shiyue/Projects/2023_06_Influ_Mouse_Lung_ST/RawData/Fastq/Alcorn_Visium_FFPE_Images/', name + '.TIF')
to
img_fold = os.path.join('/your/local/path/', name, '.TIF')
Note: The path /ix1/wchen/Shiyue/Projects/2023_06_Influ_Mouse_Lung_ST/RawData/Fastq/Alcorn_Visium_FFPE_Images/ is just an example. Other data paths used in the code should also be modified to your local path in the same manner.
3. Instructions: Demo on nuclei segmentation.
We provide an example notebook, nuclei_segmentation.ipynb, to implement the experimental results from the paper.
Data Access
https://www.10xgenomics.com/products/visium-hd-spatial-gene-expression/dataset-human-crc
For nuclei segmentation, we use StarDist. Since StarDist requires TensorFlow to utilize the GPU version, it may cause conflicts with our current model. Therefore, we recommend that the user follow the original installation guidelines provided by the StarDist package before running our notebook (https://github.com/stardist/stardist).
4. Instructions: Demo on CRC data.
We provide an example notebook, CRC.ipynb, to implement the experimental results from the paper.
Data Access
https://www.10xgenomics.com/products/visium-hd-spatial-gene-expression/dataset-human-crc
Please download the data and update the data path in the code as shown in Instruction 2.
Metadata
Release files for stars-omics 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| stars_omics-0.1.1.tar.gz | 76.0 kB | Without provenance | Details for stars_omics-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| stars_omics-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for stars_omics-0.1.1-py3-none-any.whl |
Total release size: 158.6 kB
Release files / stars_omics-0.1.1.tar.gz
| Download URL | stars_omics-0.1.1.tar.gz |
|---|---|
| Size | 76.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6217f0240ea699def29496bc0159ef2a735ea1b91b19fbc354ecd9a76ce8b8cc
|
|
BLAKE2b-256 checksum How to use checksums |
14fd6231df1604aa8177d850ac990e28f657f76c2bbdffb24df232b5a74a2812
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.6
|
Release files / stars_omics-0.1.1-py3-none-any.whl
| Download URL | stars_omics-0.1.1-py3-none-any.whl |
|---|---|
| Size | 82.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
abac3ee84ad571ab7a0437d1cb13feddb1e3f22330335ed18d0bd55037fcdb99
|
|
BLAKE2b-256 checksum How to use checksums |
4622e32568847b9c8fe29e491bca82823d4e04e64a7ad2a3fbcf82006f62dcc2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.6
|
Security for stars-omics 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.