Giter VIP home page Giter VIP logo

interstellar's Introduction

Interpretable spatial cell learning enhances the characterization of patient tissue microenvironments with highly multiplexed imaging data

Logo

In highly multiplexed imaging data analysis, there is a gap between tissue phenotype identification and its relevant microenvironment characterization. Here we present InterSTELLAR, a geometric deep learning framework for multiplexed imaging data, to directly link tissue-scale outcomes with the corresponding cell communities that are clinically relevant. Using a publicly available breast cancer imaging mass cytometry dataset, InterSTELLAR allows simultaneous tissue phenotype prediction and interested community detection, with better performance than reference methods. Downstream analyses demonstrate InterSTELLAR is able to capture specific microenvironment features from different clinical cancer subtypes, as well as discover potential relationships to patient prognosis. InterSTELLAR represents an application of geometric deep learning with direct benefits for extracting enhanced microenvironment characterization for multiplexed imaging of patient samples.

Contents

Directory structure of InterSTELLAR

InterSTELLAR
|---InterSTELLAR
|---|---Graph_Construction_Functions.py
|---|---InterSTELLAR_Network.py
|---|---InterSTELLAR_Train.py
|---|---InterSTELLAR_Utility.py
|---Demo
|---|---Graph_Construction_Demo.py
|---|---Training_DeepSNiF_script.py
|---|---InterSTELLAR_Train_Demo.py
|---|---InterSTELLAR_Predict_Demo.py
|---trained_weights
|---|---trained_weights_10fold
|---|---trained_weights_ETA

Customize environment for InterSTELLAR

Suggested InterSTELLAR environment

  • Windows 10 64bit
  • Python 3.7
  • PyTorch 1.12.1
  • PyTorch-Geometric 2.2.0
  • NVIDIA GPU + CUDA
  • Note that Linux also works with such configurations

Installation

  • Create a virtual environment and install PyTorch and PyTorch_Geometric (we run all the codes in a Anaconda Powershell Prompt):
$ conda create -n 'InterSTELLAR' python=3.7
$ conda activate InterSTELLAR (some systems recommend: source activate IMC_Denoise)
$ git clone https://github.com/PENGLU-WashU/InterSTELLAR.git
$ cd InterSTELLAR
$ pip install -e .

Implement InterSTELLAR

Download example data

Hyper-parameters used in this package

Parameter Description Default Value Data type
dataset The dataset used to build graphs from raw data. npy format, along with its folder. graph_data.npy str
neighbour_thresh The thresh value used to determine if any two cells are neighbours. 40 int
myeps The value used in log transform of the cell data. 1e-4 float
built_graph_data The built graphs from raw data. npy format, along with its folder. constructed_graph_data.npy str
fold_order 10-fold cross validation, specify the fold order, from 1 to 10. 5 int
k_sample_val k top highest and lowest samples in cell-scale training. 8 int
epoch_num The epoch number 30 int
lr Initial training rate. 3e-4 float
eta The eta value in the loss function, between 0 and 1 0.85 float
n_classes The number of tissue classes 3 int
out_channels The output channel number 10 int
batch_size The batch size 8 int
lambda_reg l1 regularization parameter for network weights 3e-5 float
results_dir The folder to save the trained weights None str
GPU Apply GPU for training True bool
trained_weights Load a trained weights file to model N/A str
save_results Save the predicted tissue and cell-scale results False bool

Implement InterSTELLAR with scripts

  • Activate the InterSTELLAR environment.
    $ conda activate InterSTELLAR
    
  • Graph construction from raw data.
    $ python Demo/Graph_Construction_Demo.py --dataset 'graph_data.npy' --neighbour_thresh '40' --myeps '1e-4'  --built_graph_data 'constructed_graph_data.npy' 
    
  • InterSTELLAR training with the demo data.
    $ python Demo/InterSTELLAR_Train_Demo.py --dataset 'constructed_graph_data.npy' --fold_order '5' --k_sample_val '8' --epoch_num '30' --lr '3e-4' --eta '0.85' --n_classes '3' --out_channels '10' --batch_size '8' --lambda_reg '3e-5' --results_dir 'saved_model_interstellar5.pt' --GPU 'True'
    
  • InterSTELLAR prediction with the test dataset from the demo data.
    $ python Demo/InterSTELLAR_Predict_Demo.py --trained_weights 'saved_model_interstellar5.pt' --dataset 'constructed_graph_data.npy' --n_classes '3' --out_channels '10' --GPU 'True' --save_results 'True'
    

Contact

Peng Lu - @penglu10 - [email protected]
Project Link: https://github.com/PENGLU-WashU/InterSTELLAR
Lab Website: Thorek Lab WashU

References

If you find our work useful in your research or if you use parts of this code please consider citing our paper:

Lu P, Oetjen K, Oh S and Thorek D. Interpretable spatial cell learning enhances the characterization of patient tissue microenvironments with highly multiplexed imaging data. bioRxiv, 2023. https://www.biorxiv.org/content/early/2023/03/28/2023.03.26.534306

@article{lu2023interpretable,
  title={Interpretable spatial cell learning enhances the characterization of patient tissue microenvironments with highly multiplexed imaging data},
  author={Lu, Peng and Oetjen, Karolyn and Oh, Stephen and Thorek, Daniel LJ},
  journal={bioRxiv},
  pages={2023--03},
  year={2023},
  publisher={Cold Spring Harbor Laboratory}
}

interstellar's People

Contributors

penglu-washu avatar

Stargazers

Yuren Cong avatar Musu Yuan avatar Rustam Uzairov avatar  avatar

Watchers

 avatar  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.