HCCSurvNet: Deep learning predicts postsurgical recurrence of hepatocellular carcinoma from digital histopathologic images
This repository contains the code to quantify risk scores for recurrence in patients with hepatocellular carcinoma from H&E-stained FFPE histopathology images.
This code was developed and tested in the following settings.
- Ubuntu 18.04
- Nvidia GeForce RTX 2080 Ti
- python (3.6.10)
- numpy: (1.18.1)
- pandas (0.25.3)
- pillow (7.0.0)
- scikit-learn (0.21.3)
- scikit-image (0.15.0)
- scikit-survival (0.11)
- opencv-python (4.1.2.30)
- openslide-python (1.1.1)
- staintools (2.1.2)
- h5py (2.9.0)
- pytables (3.5.1)
- pytorch (1.4.0)
- torchvision (0.5.0)
Install Miniconda on your machine (download the distribution that comes with python3).
After setting up Miniconda, install OpenSlide (3.4.1):
apt-get install openslide-tools
Create a conda environment with environment.yml:
conda env create -f environment.yml
Activate the environment:
conda activate hccsurvnet
Download diagnostic whole-slide images from TCGA-LIHC project using GDC Data Transfer Tool Client.
gdc-client download -m gdc_manifest_tcga_lihc.txt
Download TCGA-CDR-SupplementalTableS1.xlsx from Integrated TCGA Pan-Cancer Clinical Data Resource and rename it to metadata.csv.
Get tumor region annotations on whole-slide images using Aperio ImageScope in XML format.
python xml2tile.py
python xml_tile2hdf.py
python tumor_tile_classifier.py
*** Output: AUROC (areas under the receiver operating characteristic curve) and its 95% confidence interval
python svs2tile.py
python svs_tile2hdf.py
python tumor_tile_inference.py
python select_topX.py
python risk_score_predictor.py
*** Output: Harrell's and Uno's C-indices
Note: please edit paths in each .py file.
This code is made available under the MIT License.
Scientific Reports 2021;11(1):2047
@ARTICLE{Yamashita2021deep,
title = "Deep learning predicts postsurgical recurrence of hepatocellular carcinoma from digital histopathologic images",
author = "Yamashita, Rikiya and Long, Jin and Saleem, Atif and Rubin, Daniel L and Shen, Jeanne",
journal = "Sci. Rep.",
volume = 11,
number = 1,
pages = "2047",
month = jan,
year = 2021,
language = "en"
}