Datasets:
Tasks:
Tabular Classification
Formats:
csv
Languages:
English
Size:
1K - 10K
Tags:
laboratory-medicine
pre-analytical
sample-stability
biobanking
dried-blood-spots
clinical-chemistry
License:
Mirror of sample-stability 1.0.0 (Zenodo doi:10.5281/zenodo.24543301, GitHub caraulani/sample-stability)
356ffbd verified Download scripts/check_sheet.py from lifefrom/sample-stability: direct link, hf CLI and curl.
- Browser
- Download file 560 Bytes
-
https://huggingface.co/datasets/lifefrom/sample-stability/resolve/main/scripts/check_sheet.py
- Command line
-
hf download hf://datasets/lifefrom/sample-stability/scripts/check_sheet.py
-
curl -L -o check_sheet.py https://huggingface.co/datasets/lifefrom/sample-stability/resolve/main/scripts/check_sheet.py
560 Bytes
| """Check one or more extraction sheets: python3 -I scripts/check_sheet.py extraction/PMC123.csv ...""" | |
| import csv, sys | |
| from pathlib import Path | |
| sys.path.insert(0, str(Path(__file__).resolve().parent)) | |
| import build | |
| header = next(csv.reader(open(build.REL / "extraction" / "HEADER.csv"))) | |
| markers = build.load_markers() | |
| bad = 0 | |
| for a in sys.argv[1:]: | |
| rows, errs = build.validate_sheet(Path(a).resolve(), markers, header) | |
| print(f"{a}: {len(rows)} rows, {len(errs)} errors") | |
| for e in errs: print(" ", e) | |
| bad += len(errs) | |
| sys.exit(1 if bad else 0) | |