Skip to content

Spatial Expression PAttern-guided paiRing And unmixing of proTEins

Notifications You must be signed in to change notification settings

NICALab/SEPARATE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SEPARATE

Spatial Expression PAttern-guided paiRing And unmixing of proTEins

Installation

Clone the repository

git clone https://github.com/NICALab/SEPARATE.git

Navigate into the SEPARATE folder

cd ./SEPARATE

Creat conda environment

conda env create -f environment.yaml

Activate conda environment

conda activate SEPARATE
conda install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia

Getting started

0. Organize the image data

  • To train the feature extraction network

    The folder ./data/sampledata_FeatureExtract/ contains two subfolders named train and test, each containing the .tif files of individual protein images for training and testing (to identify protein pairing) the feature extraction network, respectively.

    • The images are named using the format {protein name}_{sample idx}.tif, such as CALB2_1.tif, GFAP_4.tif, or PV_3.tif, and each .tif file contains single channel [Z, X, Y] image of the protein.

    To be compatible with the provided code, the name of the images can start with any prefix but must end with the format {protein name}_{sample idx}.tif, and the name of protein shoud not include underscore( _ ).

  • To train the protein separation network

    For the pair of two proteins—protein α and protein β—the folder ./data/sampledata_ProteinSep/{protein α}_{protein β}/ also contains two subfolders named train and test, each containing the .tif files of individual protein images for training and testing the protein separation network, respectively.

    • The images containing individual sigal of protein α are named using the format {protein α}_{protein β}_{sample idx}_ch1.tif.

    • The images containing individual sigal of protein β are named using the format {protein α}_{protein β}_{sample idx}_ch2.tif.

    • The images containing mixed sigal of protein α and protein β are named using the format {protein α}_{protein β}_{sample idx}_ch3.tif.

    • Each .tif file contains single channel [Z, X, Y] image

    The name of the folder and images can start with any prefix but must end with the format. For instance, ./data/sample_data_ProteinSep/Group1Pair4_LaminB1_PV/Group1Pair4_LaminB1_PV_1_ch1.tif

  • Demonstration of SEPARATE

    For the demonstration of SEPARATE for 2N proteins using N fluorophores, the folder ./data/demodata_SEPARATE/ contains N subfolder named ch1, ch2, ... , chN, each containing the single channel [Z, X, Y] images of each pair of two proteins.

    • The images are named ch{channel number}_{sample idx}.tif , such as ch1_1.tif or ch3_4.tif.

    There are no restrictions on the names of folders and images, as long as they follow the specified format of N subfolders.

1. Train the feature extraction network

python -m FeatureExtract.script.train --exp_name mytest_FeatureExtractNet --protein_list CALB2 Calnexin GFAP Double-cortin LaminB1 MAP2 NeuN Nucleolin PV S100B --data_dir ./data/sampledata_FeatureExtract --results_dir ./results/FeatureExtract/ --n_epochs 100
  • You can check the extracted feature vector (t-SNE plot) in ./results/FeatureExtract/tsne/mytest_FeatureExtractNet/

2. Spatial expression pattern guided protein pairing

python -m FeatureExtract.script.test ./results/FeatureExtract/namespace/mytest_FeatureExtractNet.yaml  --pairing_protein_list Double-cortin GFAP LaminB1 NeuN Nucleolin PV --test_epoch 10
  • You can check the optimal protein pairing in the terminal like below

    SpatialExpressionPatternGuidedProteinPairing

3. Train the protein separation network

python -m ProteinSep.script.train --exp_name mytest_ProteinSepNet --protein_list LaminB1 PV --data_dir ./data/sampledata_ProteinSep/Group1Pair4_LaminB1_PV --results_dir ./results/ProteinSep/ --n_epochs 10000

4. Inference of test data for protein separation network

python -m ProteinSep.script.test ./results/ProteinSep/namespace/mytest_ProteinSepNet_LaminB1_PV.yaml --test_epoch 100

5. Demonstration of SEPARATE

python -m ProteinSep.script.demo ./results/ProteinSep/namespace/mytest_ProteinSepNet_LaminB1_PV.yaml --testdata_dir ./data/demodata_SEPARATE/ch2_LaminB1_PV --test_epoch 100

About

Spatial Expression PAttern-guided paiRing And unmixing of proTEins

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages