Code for 'Predicting prognoses and therapy responses in ovarian cancer patients from histopathology images using graph deep learning: a multicenter retrospective study'
- TCGA, we incorporate TCGA-OV cohort into our study, and its open access to all.
- PLCO, the ovarian cancer of PLCO data was used in this study. If anyone wants to obtain PLCO data, please initiate an application on the official website.
- HMUCH, HMUCH is available from the corresponding author upon reasonable request.
- clinical_data: Clinical information of each cohort, stored in csv format. At least three columns, id, event time and event state are required for training or obtaining evaluation results.
- WSIs: Store whole slide images of each cohort.
- patches: Store patches extracted from WSIs.
- graphs: Store graph representation of WSIs.
- gradients: Store gradients of patches in TCGA discovery cohort.
- checkpoint_CTransPath: CTransPath model pretrained by CTransPath.
- checkpoint_GDL: Graph-based deep learning (GDL) pretrained on our TCGA discovery cohort.
multi_thread_WSI_segmentation.py: Used to segment and filter patches from WSIs. Implemented based onhistolabpackage.
-
ctran.py: Implementation of CTransPath. -
get_CTransPath_features.py: Using pre-trained CTransPath to obtain histopathological features of patches.Part of the implementation here is based on CTransPath.
utils/conceptualize_WSI_to_graph.py: Get the graph representation of WSIs and further used for the graph-based deep learning (GDL) model.utils/dataset.py: Generate datasets.utils/util.py: Tools and loss function used in training.utils/calculate_gradient_of_patch.py: Integrated Gradients (IG)-based gradient calculation for model interpretability.utils/visualisation.py: Gradient value visualization.model: Implementation of GDL model.train: Training the GDL model.evaluation: Evaluation of the GDL model in multi-center external cohorts.
If you intend to utilize it for paper reproduction or your own WSI dataset, please adhere to the following workflow:
- Configuration Environment.
- Create a folder for your data in
datasetsand download or move the WSIs there. - Use
data_preprocessing/multi_thread_WSI_segmentation.pyto segment WSIs into patches. - Use
get_patches_feature/conceptualize_WSI_to_graph.pyto obtain representation vector of patches. - Use
construct_OCDPI/utils/conceptualize_WSI_to_graph.pyto obtain graph representation for WSIs. - Run
construct_OCDPI/train.pyto train the GDL model. When training is complete you can use this GDL model to calculate OCDPI (Ovarian Cancer Digital Pathology Index) from each WSI. - Using
construct_OCDPI/evaluation.pyyou can obtain the evaluation results of the survival prediction performance of the GDL model.
