Skip to content

Latest commit

 

History

History
34 lines (28 loc) · 1.02 KB

README.md

File metadata and controls

34 lines (28 loc) · 1.02 KB

Graph Contrastive Learning of Subcellular-resolution Spatial Transcriptomics Improves Cell Type Annotation and Reveals Critical Molecular Pathways

requirements:

  • torch (=1.11.0)
  • networkx (>=2.6.3)
  • scikit-learn (>=1.0.2)
  • torch-scatter (>=2.0.9)
  • torch-sparse (>=0.6.16)
  • torch-cluster (>=1.6.0)
  • torch-geometric (>=2.1.0)

Dataset

The offical raw FOCUS dataset is avaiable:

Preprocessing

1. knn-based gene neighborhood network generation

python focus/data/knn_data_cosmx_lung.py # take CosMx lung data as an example.

2. data split and generation

python focus/data/build_graph_datasets_lung.py 

Training

torchrun --nnodes=1 --nproc_per_node=4 run_all.py