Skip to content

Commit d08850d

Browse files
author
ncoudray
committed
add journal ref
1 parent db0ffbf commit d08850d

File tree

5 files changed

+954
-10
lines changed

5 files changed

+954
-10
lines changed

DeepPATH_code/00_preprocessing/0d_SortTiles.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -251,13 +251,13 @@ def sort_subfolders(metadata, load_dic, **kwargs):
251251
parser.add_argument("--SourceFolder", help="path to tiled images", dest='SourceFolder')
252252
parser.add_argument("--JsonFile", help="path to metadata json file", dest='JsonFile')
253253
parser.add_argument("--Magnification", help="magnification to use", type=float, dest='Magnification')
254-
parser.add_argument("--MagDiffAllowed", help="difference allwed on Magnification", type=float, dest='MagDiffAllowed')
254+
parser.add_argument("--MagDiffAllowed", help="difference allowed on Magnification", type=float, dest='MagDiffAllowed')
255255
parser.add_argument("--SortingOption", help="see option at the epilog", type=int, dest='SortingOption')
256256
parser.add_argument("--PercentValid", help="percentage of images for validation (between 0 and 100)", type=float, dest='PercentValid')
257257
parser.add_argument("--PercentTest", help="percentage of images for testing (between 0 and 100)", type=float, dest='PercentTest')
258258
parser.add_argument("--PatientID", help="Patient ID is supposed to be the first PatientID characters (integer expected) of the folder in which the pyramidal jpgs are. Slides from same patient will be in same train/test/valid set. This option is ignored if set to 0 or -1 ", type=int, dest='PatientID')
259259
parser.add_argument("--TMB", help="path to json file with mutational loads; or to BRAF mutations", dest='TMB')
260-
parser.add_argument("--nSplit", help="interger n: Split into train/test in n different ways", dest='nSplit')
260+
parser.add_argument("--nSplit", help="integer n: Split into train/test in n different ways", dest='nSplit')
261261
parser.add_argument("--outFilenameStats", help="Check if the tile exists in an out_filename_Stats.txt file and copy it only if it True, or is the expLabel option had the highest probability", dest='outFilenameStats')
262262
parser.add_argument("--expLabel", help="Index of the expected label within the outFilenameStats file (if only True/False is needed, leave this option empty).", dest='expLabel')
263263
parser.add_argument("--threshold", help="threshold above which the probability the class should be to be considered as true (if not specified, it would be considered as true if it has the max probability).", dest='threshold')

DeepPATH_code/03_postprocessing/0h_ROC_MultiOutput_BootStrap.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,7 @@ def main():
600600

601601

602602
# save data
603-
print("******* FP / TP for average probabilitys")
603+
print("******* FP / TP for average probability")
604604
print(fpr)
605605
print(tpr)
606606
for i in range(n_classes):
@@ -747,7 +747,7 @@ def main():
747747

748748

749749
# save data
750-
print("******* FP / TP for average probabilitys")
750+
print("******* FP / TP for average probability")
751751
print(fpr)
752752
print(tpr)
753753
for i in range(n_classes):

DeepPATH_code/README.md

+14-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,18 @@
1+
If you use this code, please cite:
2+
3+
Nicolas Coudray, Paolo Santiago Ocampo, Theodore Sakellaropoulos, Navneet Narula, Matija Snuderl, David Fenyö, Andre L. Moreira, Narges Razavian, Aristotelis Tsirigos. "Classification and mutation prediction from non–small cell lung cancer histopathology images using deep learning". Nature Medicine, 2018; DOI: 10.1038/s41591-018-0177-5
4+
5+
6+
This procedure is based on the inception v3 architecture from google which should be cited as well if you use this code. See [Inception v3](https://github.com/tensorflow/models/blob/f87a58cd96d45de73c9a8330a06b2ab56749a7fa/research/inception/README.md) for information about it.
7+
8+
Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jonathon Shlens, Zbigniew Wojna. "Rethinking the Inception Architecture for Computer Vision"
9+
http://arxiv.org/abs/1512.00567
10+
111

212
Preliminary comments:
313
* For the path, it is advised to always put the full path name and not the relative paths.
4-
* For all the steps below, always submit the jobs via a qsub script (if on Pheonix) and always check the output and error log files are fine.
5-
* This procesude is based on the inception v3 architecture from google. See [Inception v3](https://github.com/tensorflow/models/blob/f87a58cd96d45de73c9a8330a06b2ab56749a7fa/research/inception/README.md) for information about it.
14+
* For all the steps below, always submit the jobs via a qsub script (if on Phoenix) and always check the output and error log files are fine.
15+
616

717
The overall process is:
818
* tile the svs images and convert into jpg
@@ -17,7 +27,7 @@ There are several ways to run the pre-processing steps depending on the desired
1727
* if you aim for a multi-output classification (mutations for example): run the svs tiling step once using all the svs images inside 1 output folder, then run the sorting program using option 10 (only 1 output folder generated with all the jpg. They will be sorted into train/valid/test but not assigned any label yet), then run the TFRecord conversion programs for multi-output classification (will assign the label to each tile)
1828
* if a pathologist has selected/labelled regions with Aperio (contours of the ROIs saved in xml format), then you run the svs tiling step on each class of xml file, run the sorting program using optin 10 on each of them (the output folder will have the same name as the one where each class has been tiled), and then run the TFRecord conversion programs
1929

20-
Advised folder organization (directorties that may need to be created in plain, those generated by the programs in bold).
30+
Advised folder organization (directories that may need to be created in plain, those generated by the programs in bold).
2131
* For classes obtained from json files:
2232

2333
| directories | Comments |
@@ -27,7 +37,7 @@ Advised folder organization (directorties that may need to be created in plain,
2737
| `images/Raw/*svs` | original svs images |
2838
| `images/Raw/*json ` | json file from TCGA database |
2939
| `images/<##>pxTiles_<##>Bkg` | output folder for tiles. Replace ## tile size and background threshold used to run the tiling process` |
30-
| **`images/<##>pxTiles_<##>Bkg/<slide name>_files/20.0/<X index>_<Y index>.jpeg`** | Each svs image will have a folder. Inside, there will be as many sub-folders as mangnification available and the tiles jpeg images inside |
40+
| **`images/<##>pxTiles_<##>Bkg/<slide name>_files/20.0/<X index>_<Y index>.jpeg`** | Each svs image will have a folder. Inside, there will be as many sub-folders as magnification available and the tiles jpeg images inside |
3141
| **`images/<##>pxTiles_<##>Bkg/<slide name>_files/10.0/<X index>_<Y index>.jpeg`** | |
3242
| `images/01_Cancer_Tumor/ | output folder for sorted tiled |
3343
| **`images/01_Cancer_Tumor/Solid_Normal_Tissue/<t/v/t set>_<slide name>_<X index>_<Y index>.jpg`** | folders with class names will be generated. Symbolic links to the tiled jpeg will be created and renamed.` |

0 commit comments

Comments
 (0)