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.
.
├── 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
Create the conda environment with:
conda env create -f environment.yml
conda activate hssurvThis project expects pre-extracted pathology features and tabular omics data.
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_idvalues in the cohort 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.
The training entry uses the following split directories by default:
splits/5foldcv/tcga_blca_newsplits/5foldcv/tcga_brca_newsplits/5foldcv/tcga_gbmlgg_newsplits/5foldcv/tcga_luad_newsplits/5foldcv/tcga_ucec_new
Each directory should contain:
splits_0.csv
splits_1.csv
splits_2.csv
splits_3.csv
splits_4.csv
The current training entry is:
python main.py HSSurvA more explicit example is:
python main.py HSSurv --sets luad --fold 0,1,2,3,4 --which_splits 5foldcvUseful arguments are defined in [utils/options.py], including:
--data_root_dir--sets--fold--num_epoch--lr--weight_decay--loss
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