Skip to main content

PyPI package for multi-task label transfer from single-cell refrence data to spatial data

Project description

spacetree logo

SpaceTree: Deciphering Tumor Microenvironments by joint modeling of cell states and genotype-phenotype relationships in spatial omics data

SpaceTree jointly models spatially smooth cell type- and clonal state composition. SpaceTree employs Graph Attention mechanisms, capturing information from spatially close regions when reference mapping falls short, enhancing both interpretation and quantitative accuracy.

A significant merit of SpaceTree is its technology-agnostic nature, allowing clone-mapping in sequencing- and imaging-based assays. The model outputs can be used to characterize spatial niches that have consistent cell type and clone composition.

spacetree schema

Overview of the spatial mapping approach and the workflow enabled by SpaceTree.From left to right: SpaceTree requirs as input reference (scRNA-seq) and spatial count matrices as well as labels that need to be transfered. The labels can be descrete, continious or hierachical. The model outputs a spatial mapping of the labels and the cell type (compositions in case of Visium) of the spatial regions.

Usage and Tutorials

Installation

SpaceTree reles on pytorch geometric and pyg-lib libraries for GNNs and efficient graph sampling routines. It was develoed and tested with torch-geometric==2.5.0 and pyg-lib==0.2.0+pt20cu118. We recommend to use the same versions, when possible, otherwise just go with the ones that are compatable with your CUDA version. Please note, that access to GPU is adviced, but not nessesary, especially if the data size is not too large (i.e. for Visium HD we strongly recommend to use GPU). Please visit the offical documentation to make sure that you will install the version that is compatable with your GPUs.

Installation with pip:

conda create -y -n spacetree_env python=3.10
conda activate spacetree_env
pip install spaceTree
#install torch geometric (check the documentation for the supported versions)
pip install torch-geometric
# install pyg-lib (check supported wheels for your CUDA version)
pip install pyg_lib 

Installation from source:

conda create -y -n spacetree_env python=3.10
conda activate spacetree_env
git clone https://github.com/PMBio/spaceTree.git
# cd in the spaceTree directory
cd spaceTree
pip install .
#install torch geometric (check the documentation for the supported versions)
pip install torch-geometric
# install pyg-lib (check supported wheels for your CUDA version)
pip install pyg_lib 

If you struggle with compiling the pyg-lib library, you can also use precompiled wheels from here and then install with pip install {file_name}.whl

Documentation, Tutorials and Examples

Check out our tutorials and documentation to get started with spaceTree here.

Citation

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

spaceTree-0.1.2.tar.gz (24.2 kB view details)

Uploaded Source

Built Distribution

spaceTree-0.1.2-py3-none-any.whl (24.9 kB view details)

Uploaded Python 3

File details

Details for the file spaceTree-0.1.2.tar.gz.

File metadata

  • Download URL: spaceTree-0.1.2.tar.gz
  • Upload date:
  • Size: 24.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.14

File hashes

Hashes for spaceTree-0.1.2.tar.gz
Algorithm Hash digest
SHA256 f992a5aba5bbf6ef6e69becdef1a9bff00a408677b30e47c684ee73613d90873
MD5 4ce03bb446120620590685b17610e27d
BLAKE2b-256 6853b7f17fb9ee9faab6cac2996c447457990f6120a76e4fb5a1e012b8c334d3

See more details on using hashes here.

File details

Details for the file spaceTree-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: spaceTree-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 24.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.14

File hashes

Hashes for spaceTree-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 08881c4ba09fa550ebf6c1973a917aa90bc1a260f32a85d67ae28f1872b2a6d0
MD5 f23cf4dc17fe7b3b57c1d6dfe54e9d39
BLAKE2b-256 84f56952f6a3e166942445084bd079b1774606962a12d1435638ec942f7f03cc

See more details on using hashes here.

Supported by

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