Skip to content

Commit f3c81a0

Browse files
committed
Update readme.md
1 parent 4d14493 commit f3c81a0

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

main.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
import argparse
22
import os.path
33
from pathlib import Path
4-
import pandas as pd
54
import logging
65

7-
from src import postprocess, preprocess
86
from src.postprocess import postprocess_files
97
from src.preprocess import preprocess_files, run_wsi
108
from src.utils import get_config, print_config
@@ -34,9 +32,13 @@ def main():
3432
configs = get_config()
3533

3634
print_config(args, configs)
37-
assert args.output.suffix in ['.xlsx', '.csv'], 'Output file should be in xlsx or csv format.'
38-
assert len(os.listdir(args.buffer)) == 0, (f'Buffer directory {args.buffer} should be empty, or it may cause '
39-
f'conflict.')
35+
assert args.output.suffix in ['.xlsx', '.csv'], \
36+
'Output file should be in xlsx or csv format. Directories are not supported.'
37+
38+
if os.listdir(args.buffer) != 0:
39+
logging.warning(f'Buffer directory {args.buffer} is not empty, it may cause conflict. Continue? (y/N)')
40+
if input().lower() != 'y':
41+
return
4042

4143
if not args.file_mode:
4244
preprocess_files(args, configs)

readme.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44

55
# PyPathomics
66

7-
> PyPathomics is an open-source software for gigapixel whole-slide image analysis.
7+
> PyPathomics is an open-source software for gigapixel whole-slide image analysis. Off-the-shelf and easy-to-use.
88
9-
The PyPathomics is under development. The current version is 0.1.0.
9+
The PyPathomics is under development. The current version is 0.5.0.
1010

1111
Support for:
1212
- [x] Hover-Net
13-
[[Repo](https://github.com/vqdang/hover_net)] [[Paper](https://www.sciencedirect.com/science/article/abs/pii/S1361841519301045?via%3Dihub)] (Graham et al., 2019)
13+
[[Repo](https://github.com/vqdang/hover_net)] [[Paper](https://www.sciencedirect.com/science/article/abs/pii/S1361841519301045)] (Graham et al., 2019)
1414

15-
- [x] Cerberus
15+
- [x] Cerberus (In Beta)
1616
[[Repo](https://github.com/TissueImageAnalytics/cerberus)] [[Paper](https://doi.org/10.1016/j.media.2022.102685)] (Graham et al., 2023)
1717

1818
## Installation
@@ -53,7 +53,7 @@ Where,
5353
Required Arguments:
5454
```text
5555
--config Specify the configuration file path
56-
--seg Path to the seg directory or file from Hover-Net(.json) or Cerberus(.dat)
56+
--seg Path to the segmentation directory or file from Hover-Net(.json) or Cerberus(.dat)
5757
--wsi Path to the WSI directory or file
5858
--ext WSI file extension (default: .svs)
5959
--buffer Specify the output buffer dir for preprocessing
@@ -76,12 +76,12 @@ Optional Arguments:
7676

7777
3. Analyze a Directory:
7878
```bash
79-
python main.py --seg /path/to/seg_dir --wsi /path/to/wsi_dir --buffer /path/to/buffer --ext .svs --output /path/to/output
79+
python main.py --seg /path/to/seg_dir --wsi /path/to/wsi_dir --buffer /path/to/buffer --ext .svs --output /path/to/output.csv
8080
```
8181

8282
4. Analyze a Single File
8383
```bash
84-
python main.py -f --seg /path/to/seg_file --wsi /path/to/wsi_file --buffer /path/to/buffer --ext .svs --output /path/to/output
84+
python main.py -f --seg /path/to/seg_file --wsi /path/to/wsi_file --buffer /path/to/buffer --ext .svs --output /path/to/output.csv
8585
```
8686

8787

0 commit comments

Comments
 (0)