AI-Based Risk Score from Tumour-Infiltrating Lymphocyte Predicts Locoregional-Free Survival in Nasopharyngeal Carcinoma. MDPI Cancers
TL;DR: The code is designed to identify intratumoral and stromal tumor-infiltrating lymphocytes (TILs) through density-based clustering, ultimately generating 12 TILs scores as described in the paper.
- Linux (tested on Ubuntu 22.04)
- Python = 3.8, alphashape (1.3.1), opencv-python(4.6.0), Pillow (9.3.0), scikit-learn (1.2.0), scipy (1.9.3), shapely (2.0.0)
git clone https://github.com/mdsatria/npc_digital_tils.git
cd npc_digital_tils # or your clone directory
conda create --name YOUR_ENV_NAME python=3.8
conda activate YOUR_ENV_NAME
pip install -r requirements.txt
- Detect nuclei in your images/WSIs with HoverNet
- Open terminal in cloned git directory
chmod +x run_clustering.sh
- Change the argument based on your setting
./run_clustering.sh
- See examples.ipynb to visualise TILs and how to generate TILs scores
--input_dir Directory to nuclei annotation from HoverNet
--output_dir Directory to save the results
--use_concave Create concave cluster or not. If false, cluster is convex (may faster)
--nuclei_dist Minimum distance between nuclei, clustering hyperparameter.
--num_nuclei Minimum number of nuclei in cluster, clustering hyperparameter.
--outer_buffer Size of the enlarged cluster area
--num_worker CPU count for multiprocessing
If you find our work useful in your research, please consider citing our paper at:
@article{wibawa_ai-based_2023,
title = {AI-Based Risk Score from Tumour-Infiltrating Lymphocyte Predicts Locoregional-Free Survival in Nasopharyngeal Carcinoma},
author = {Wibawa, Made Satria and Zhou, Jia-Yu and Wang, Ruoyu and Huang, Ying-Ying and Zhan, Zejiang and Chen, Xi and Lv, Xing and Young, Lawrence S and Rajpoot, Nasir},
journal={Cancers},
year = {2023},
publisher={MDPI}
}