Giter Club home page Giter Club logo

stabox's Introduction

STABox

STABox is a one-stop platform for spatial transcriptomics data that provide a unified data processing pipeline, versatile data analysis modules, and interactive visualization. It integrates a suite of advanced analysis tools based on graph neural networks. STABox supports interactive 2D/3D visualization of spatial transcriptomics data, simplifying the generation and refinement of publication-ready high-quality images. STABox is extensible, allowing for seamless integration with various analysis methods to facilitate comprehensive downstream analysis of spatial transcriptomics data.

image-20240529151225098

Folder structure:

stabox
├─src
│  └─stabox
│      ├─dataset
│      ├─extension
│      ├─model
│      ├─module_3D
│      ├─pl
│      ├─pp
│      └─view
└─tests
  • config: save configuration yaml files
  • extension: save the third-party code, e.g. SEDR, SpaGCN
  • dataset: save the code for loading data. All loading functions should return an AnnData object with spatial information in .obsm['spatial'].
  • model: save the model code, including STAgate, STAligner and STAMarker. All methods should be inherited from BaseModelMixin in _mixin.py.
  • module_3D: save the converted 3D data for subsequent interactive visualization of 3D data.
  • pl: save the result image output after model training.
  • pp: save the preprocessing code, all preporcessing functions should take AnnData as input and return AnnData as output.
  • view: save the visualization code for gui.

Installation

The STABox package is developed based on the Python libraries Scanpy, PyTorch, DGL, and PyG (PyTorch Geometric) framework, and can be run on GPU (recommend) or CPU.

First clone the repository.

git clone https://github.com/zhanglabtools/STABox.git
cd STABox-main

It's recommended to create a separate conda environment for running STABox:

#create an environment called env_STABox
conda create -n env_STABox python=3.8

#activate your environment
conda activate env_STABox

The use of the mclust algorithm requires R environment, the rpy2 package (Python) and the mclust package (R). See https://pypi.org/project/rpy2/ and https://cran.r-project.org/web/packages/mclust/index.html for detail.

Install R environment in python by conda:

conda install -c conda-forge r-base

Other required packages are listed in STABox_env.yaml.

Run STABox toolkit
cd STABox-main\src
python -m stabox.view.app

If run successfully, you will launch the following GUI:

image-20240529204657589

https://stabox-tutorial.readthedocs.io/en/latest/

Support

If you have any questions, please feel free to contact us [email protected].

Citation

...

FAQs

Q: How to install PyG from whl files?

A: Please download the whl files from https://pytorch-geometric.com/whl/index.html. Note that the version of python, torch, PyG, and cuda should match.

stabox's People

Contributors

tidebear avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.