The Deep learning model for Spatial gene Clusters and Expression (DeepSpaCE) is a method that predicts spatial gene-expression levels and transcriptomic cluster types from tissue section images using deep learning.
- Singularity (verified in v3.7)
git clone https://github.com/tmonjo/DeepSpaCE
Build an image on your local environment since root privileges are required. Then, you can run DeepSpaCE with "DeepSpaCE.sif" on any servers.
sudo singularity build DeepSpaCE.sif DeepSpaCE.srecipe
-
Space Ranger outputs
/home/$USER/DeepSpaCE/data/{sampleName}/SpaceRanger/analysis/
/home/$USER/DeepSpaCE/data/{sampleName}/SpaceRanger/spatial/
/home/$USER/DeepSpaCE/data/{sampleName}/SpaceRanger/filtered_feature_bc_matrix.h5
-
TIFF image (same directory)
/home/$USER/DeepSpaCE/data/{sampleName}/SpaceRanger/image.tif
singularity exec DeepSpaCE.sif \
python script/CropImage.py \
--dataDir /home/$USER/DeepSpaCE/data \
--sampleName Human_Breast_Cancer_Block_A_Section_1 \
--transposeType 0 \
--radiusPixel 75 \
--extraSize 150 \
--quantileRGB 80
singularity exec DeepSpaCE.sif \
Rscript script/NormalizeUMI.R \
--dataDir /home/$USER/DeepSpaCE/data \
--sampleName Human_Breast_Cancer_Block_A_Section_1 \
--threshold_count 1000 \
--threshold_gene 1000
singularity exec --nv DeepSpaCE.sif \
python script/DeepSpaCE.py \
--dataDir /home/$USER/DeepSpaCE/data \
--outDir /home/$USER/DeepSpaCE/out \
--sampleNames_train Human_Breast_Cancer_Block_A_Section_1 \
--sampleNames_test Human_Breast_Cancer_Block_A_Section_1 \
--sampleNames_semi None \
--semi_option normal \
--seed 0 \
--threads 8 \
--GPUs 1 \
--cuda \
--transfer \
--model VGG16 \
--batch_size 128 \
--num_epochs 10 \
--lr 1e-4 \
--weight_decay 1e-4 \
--clusteringMethod graphclust \
--extraSize 150 \
--quantileRGB 80 \
--augmentation flip,crop,color,random \
--early_stop_max 5 \
--cross_index 0 \
--geneSymbols ESR1,ERBB2,MKI67
singularity exec DeepSpaCE.sif \
python script/SuperResolution.py \
--dataDir /home/$USER/DeepSpaCE/data \
--outDir /home/$USER/DeepSpaCE/out \
--sampleName Human_Breast_Cancer_Block_A_Section_1 \
--model VGG16 \
--seed 0 \
--threads 8 \
--modelName teacher \
--batch_size 128 \
--extraSize 150 \
--quantileRGB 80 \
--geneSymbols ESR1,ERBB2,MKI67
singularity exec DeepSpaCE.sif \
Rscript script/PlotSuperResolution.R \
--dataDir /home/$USER/DeepSpaCE/data \
--outDir /home/$USER/DeepSpaCE/out \
--sampleName Human_Breast_Cancer_Block_A_Section_1 \
--geneSymbol ESR1 \
--extraSize 150
The DeepSpaCE pre-print:
Taku Monjo, Masaru Koido, Satoi Nagasawa, Yutaka Suzuki, and Yoichiro Kamatani “Efficient prediction of a spatial transcriptomics profile better characterizes breast cancer tissue sections without costly experimentation” bioRxiv (2021)
https://www.biorxiv.org/content/10.1101/2021.04.22.440763v1
GNU General Public License v3.0
-
Can I install DeepSpaCE without Singularity?
Please install Python 3.6, R >= 4.1, and libraries written in "DeepSpaCE.srecipe".
Pipfile is also available. (Pipenv)
pipenv install Pipfile
- v0.1 (August ?? 2021): First release