P7: differential-testing harness (simurg compare) and nightly run on the Pi

- compare/core: EXACT/NEAR/DISCREPANCY/UNKNOWN with the plan §16.3 tolerances (abs, float32 ULP), NaN = NaN,
  locus classes (assay, variant type, chromosome group, intensity-only); fields absent on both sides are
  not applicable
- compare/records: GTC vs GTC (per-locus arrays, transforms per bin, controls, sample statistics; metadata
  listed, not counted) and VCF vs VCF (records keyed incl. ID; SNV/MNV/indel, merged, multi-allelic classes)
- simurg compare A B (files or folders paired by name): summary.json, discrepancies.tsv.gz (never truncated),
  self-contained dashboard.html; --tolerance, --fail-on-discrepancy (exit 3)
- scripts/nightly.py + install_nightly.sh (crontab 02:30): unit tests, GSA vs gtc2vcf (GTC + VCF), VCF
  regression vs golden, Omni2.5 subset vs vendor GTCs; first run PASS on every step
- tests/unit/test_compare.py; docs/validation/P7.md, README
This commit is contained in:
kemal committed 2026-09-28 17:00:37 +01:00
1 parent 51747674ba
commit 3c33ae5cb1
10 files changed
+1268 -1

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
#!/usr/bin/env bash
# Install (or remove) the nightly differential-testing run in the user's crontab (no root needed).
# bash scripts/install_nightly.sh # add: every night at 02:30
# bash scripts/install_nightly.sh --remove # remove the entry
set -euo pipefail
cd "$(dirname "$0")/.."
REPO=$(pwd)
TAG="# simurg-nightly"
LINE="30 2 * * * cd $REPO && flock -n /tmp/simurg-nightly.lock .venv/bin/python scripts/nightly.py >> data/nightly/cron.log 2>&1 $TAG"
current=$(crontab -l 2>/dev/null | grep -v -- "$TAG" || true)
if [[ "${1:-}" == "--remove" ]]; then
printf '%s\n' "$current" | sed '/^$/d' | crontab -
echo "nightly entry removed"
exit 0
fi
mkdir -p data/nightly
printf '%s\n%s\n' "$current" "$LINE" | sed '/^$/d' | crontab -
echo "installed: $LINE"
crontab -l | grep -- "$TAG"