Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HSSurv

HSSurv is a multimodal survival analysis project for TCGA cohorts. This repository keeps a streamlined training entry, split files, model definition, and environment description for local reproduction.

Repository Structure

.
├── environment.yml
├── main.py
├── models/
│   └── HSSurv/
│       ├── network.py
│       ├── util.py
│       └── vit.py
├── splits/
│   └── 5foldcv/
│       ├── tcga_blca_new/
│       ├── tcga_brca_new/
│       ├── tcga_gbmlgg_new/
│       ├── tcga_luad_new/
│       └── tcga_ucec_new/
└── utils/
    ├── dataset_survival.py
    ├── engine.py
    ├── loss_factory_new.py
    ├── optimizer.py
    ├── options.py
    └── scheduler.py

Environment

Create the conda environment with:

conda env create -f environment.yml
conda activate hssurv

Data Preparation

This project expects pre-extracted pathology features and tabular omics data.

Pathology Features

For each cohort, the feature root should follow this structure:

DATA_ROOT/
├── slide/
│   ├── XXX.pt
│   └── ...
└── patch/
    ├── XXX.pt
    └── ...
  • slide/ stores slide-level features.
  • patch/ stores patch-level features.
  • Feature file names should match slide_id values in the cohort CSV.

Clinical / Omics CSV

main.py currently loads cohort CSV files from this local path pattern:

./csv/tcga_{dataset}_all_clean_filtered.csv

Before running the project on another machine, update that path in [main.py] to match your local dataset location.

Split Files

The training entry uses the following split directories by default:

  • splits/5foldcv/tcga_blca_new
  • splits/5foldcv/tcga_brca_new
  • splits/5foldcv/tcga_gbmlgg_new
  • splits/5foldcv/tcga_luad_new
  • splits/5foldcv/tcga_ucec_new

Each directory should contain:

splits_0.csv
splits_1.csv
splits_2.csv
splits_3.csv
splits_4.csv

Training

The current training entry is:

python main.py HSSurv

A more explicit example is:

python main.py HSSurv --sets luad --fold 0,1,2,3,4 --which_splits 5foldcv

Useful arguments are defined in [utils/options.py], including:

  • --data_root_dir
  • --sets
  • --fold
  • --num_epoch
  • --lr
  • --weight_decay
  • --loss

Output

Training outputs are written under:

./results/

For each dataset and fold, the project saves:

  • per-run CSV summaries
  • TensorBoard logs
  • best model checkpoints
  • run configuration snapshots

About

The source codes of HSSurv

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages