# Reproduce the registered GIPR/valve analysis

The default `sh code/run` regenerates the numerical results, tables and four figures from supplied public summary facts. It also checks the summary-conditioning calculation against direct least squares. It needs no network, GPU, patient-level records or secret key. Python 3.12 and exact package versions are declared in `env/requirements.txt`. A pinned manual image is in `env/reproduce.Dockerfile`.

From an extracted bundle directory:

```sh
docker build -t gipr-valve-study -f env/reproduce.Dockerfile .
docker run --rm --network none --read-only --cap-drop ALL --security-opt no-new-privileges --memory 2g --cpus 2 --pids-limit 256 --tmpfs /tmp:rw,size=256m -v "$PWD:/study:ro" -v "$PWD/results:/study/results:rw" gipr-valve-study
```

Environment building downloads standard packages. The declared three-minute compute allowance concerns the default offline analysis, not an optional re-download of the upstream resources. Results are a secondary summary-data analysis, not a newly conducted clinical trial. Reference sample genotypes/identifiers and source papers/figures are not included.

`data/association-inputs.json` retains every fixed allele/source cell, exact source rows, allele orientation and explicit missingness. `data/datasets.json` records resource-level sample counts, cohort overlap and source versions. `data/ld-reference.json` supplies aggregate, allele-signed reference matrices only. `data/primary-region.tsv.gz` is the complete numeric primary interval, extracted after scanning and checksum-verifying the full source member. `data/acquisition-audit.json` records the full source/extract checksums and methodological decisions.

Only original raw-prefix REGENIE imaging files are analyzed. The indexed non-raw Zenodo files are MTAG-processed and are not an independent imaging check. Raw secondary METAL AS beta units are left uninterpreted; no odds ratio is inferred from them. Related cohorts and imaging traits are not independent replications. Absence from a source is not a null effect. A precise E354Q interval is not a target-wide or treatment-effect equivalence statement.

## Optional source-level re-extraction

The source tools under `code/upstream/` were used to construct the supplied factual tables. They are not called by `code/run`. A complete recheck downloads approximately 27 GB of public text, streams it without storing whole source files, and took tens of minutes on the study connection. Reserve substantially more than the default compute allowance. It requires network access and `env/requirements-upstream.txt`; the reference LD step accesses only indexed public 1000 Genomes regions and publishes aggregate matrices.

Choose a fresh writable staging directory, install the upstream requirements in a separate environment, and from the extracted bundle run:

```sh
export SJ_SOURCE_ROOT=/absolute/path/to/fresh/staging
sh code/acquire_sources
```

The reconstructed inputs are written to `$SJ_SOURCE_ROOT/bundle/data/`. Raw source hashes can be compared with the supplied acquisition audit. Generated acquisition timestamps may differ without changing factual rows; new source versions or changed checksums must be investigated rather than silently accepted. Ensembl build/allele mapping records are frozen in `data/acquisition-metadata/`. The full archive scanner makes no global ordering assumption, and verifies complete ZIP-member CRC and SHA256. Original Zenodo source files must match their deposited MD5 checksums.

## Plan and scope

The exact committed analysis plan is under `plan/`; deviations and unstated choices are in `deviations.json`. The committed file contains an agent byline, a disclosed blinding oversight; it was retained to match its pre-analysis digest. All other scientific files are anonymous. Public source investigators performed the underlying experiments and GWAS; the present work supplies only the registered reanalysis, source validation and interpretation.
