Skip to main content

A spatial transcriptomics analysis tool.

Project description

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

image

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

https://pitt-my.sharepoint.com/:f:/g/personal/chz113_pitt_edu/EuGVB7q_xG1FtaTGj7PrW2wBNVADPt_9ZBJGOxnu0zdMwg?e=X1XMC1

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stars_omics-0.1.1.tar.gz (76.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

stars_omics-0.1.1-py3-none-any.whl (82.6 kB view details)

Uploaded Python 3

File details

Details for the file stars_omics-0.1.1.tar.gz.

File metadata

  • Download URL: stars_omics-0.1.1.tar.gz
  • Upload date:
  • Size: 76.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.6

File hashes

Hashes for stars_omics-0.1.1.tar.gz
Algorithm Hash digest
SHA256 6217f0240ea699def29496bc0159ef2a735ea1b91b19fbc354ecd9a76ce8b8cc
MD5 93d7ed0b3712e1ec2c3f6b965ee62cfa
BLAKE2b-256 14fd6231df1604aa8177d850ac990e28f657f76c2bbdffb24df232b5a74a2812

See more details on using hashes here.

File details

Details for the file stars_omics-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: stars_omics-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 82.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.6

File hashes

Hashes for stars_omics-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 abac3ee84ad571ab7a0437d1cb13feddb1e3f22330335ed18d0bd55037fcdb99
MD5 88a78c48bb01186d68fe4cd449ab9f8d
BLAKE2b-256 4622e32568847b9c8fe29e491bca82823d4e04e64a7ad2a3fbcf82006f62dcc2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page