- 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
20 lines
805 B
Bash
Executable File
20 lines
805 B
Bash
Executable File
#!/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"
|