Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
029dedd
refactor(ancestry): og archaic and og ancient in Rust, with a chain l…
GeiserX Nov 13, 2026
f1d1aae
refactor(ancestry): steps 43 and 44 and their setup run og archaic an…
GeiserX Nov 13, 2026
cae6e3e
refactor(ancestry): delete archaic_report.py and ancient_report.py; t…
GeiserX Nov 13, 2026
796f4cd
docs(ancestry): steps 43 and 44 run og archaic and og ancient
GeiserX Nov 13, 2026
7cb54dc
test(ancestry): a mask holds the 1-based bases of its BED intervals only
GeiserX Nov 13, 2026
3b492b9
test(ancestry): RED CONTROL, plant a 1-based mask and a chain block t…
GeiserX Nov 13, 2026
0a23652
Merge remote-tracking branch 'origin/main' into pgp/rust-p6
GeiserX Nov 13, 2026
bb71d56
test(ancestry): revert the red control of 3b492b9a
GeiserX Nov 13, 2026
4ab9d07
fix(ancestry): join genotype calls in one position window
GeiserX Nov 13, 2026
b101631
docs(ancestry): record sorted-input contract and bounded memory
GeiserX Nov 13, 2026
b8aca84
Merge remote-tracking branch 'origin/main' into pgp/rust-p6
GeiserX Nov 13, 2026
c47cd89
feat(summary): whole summary.json and its post pass in og summary col…
GeiserX Nov 13, 2026
5e22114
test(parity): compare the whole summary.json with the Python collector
GeiserX Nov 13, 2026
88dd793
docs(summary): og summary collect writes the whole summary.json
GeiserX Nov 14, 2026
888cd36
test(summary): plant four post-pass faults (red control, reverted next)
GeiserX Nov 14, 2026
0a34ead
Merge remote-tracking branch 'origin/main' into pgp/rust-p6
GeiserX Nov 14, 2026
d3ff258
Merge remote-tracking branch 'origin/main' into HEAD
GeiserX Nov 14, 2026
af005e2
test(summary): remove the planted post-pass faults
GeiserX Nov 14, 2026
7b0a8e7
test(parity): name no image in the whole-summary fixture manifests
GeiserX Nov 14, 2026
8dd88d6
docs(ancestry): give the archaic table's measured cost on the real table
GeiserX Nov 14, 2026
96df5d3
Merge remote-tracking branch 'origin/main' into pgp/rust-p6
GeiserX Nov 14, 2026
8993df9
Merge remote-tracking branch 'origin/main' into pgp/rust-r2d
GeiserX Nov 14, 2026
a3f08e0
fix(summary): claim only error containment in the post pass
GeiserX Nov 14, 2026
fe1542c
fix(ancestry): keep the previous archaic outputs when a run stops, an…
GeiserX Nov 14, 2026
fa7a657
fix(ancestry): remove a stale genotype file only after every new arch…
GeiserX Nov 14, 2026
530eebb
Merge main into pgp/rust-p6: #401 landed
GeiserX Nov 14, 2026
bce28b7
Merge commit '530eebbd' into pgp/rust-r2d: train car before (#402)
GeiserX Nov 14, 2026
c67f440
perf(report): write summary.json with og summary collect
GeiserX Nov 14, 2026
6fd6dc3
Merge remote-tracking branch 'fork/pgp/rust-r2d' into pgp/rust-r3
GeiserX Nov 14, 2026
88d42be
test(summary): check the summary through og summary collect
GeiserX Nov 14, 2026
2545b38
refactor(summary): delete the Python the summary switch left unused
GeiserX Nov 14, 2026
d2bb659
docs: name og summary collect where the docs named the Python collector
GeiserX Nov 14, 2026
17728ec
test(report): check that a run collects the summary once
GeiserX Nov 14, 2026
2d09b4f
perf(summary): read the clinical and other sections one at a time
GeiserX Nov 14, 2026
7c06808
refactor(report): delete run_delta.py, which only the old collector i…
GeiserX Nov 14, 2026
bf525e2
docs(changelog): og writes the summary the reports read, once per run
GeiserX Nov 14, 2026
84027ab
test(report): read the HTML report's generated time up to its separator
GeiserX Nov 14, 2026
8451233
Merge main into pgp/rust-r2d: the car before landed, no file changes
GeiserX Nov 14, 2026
dbba041
Merge the train (pgp/rust-r2d, now with main) into pgp/rust-r3
GeiserX Nov 14, 2026
0aab619
fix(report): collect again after a removed file, and keep the tempora…
GeiserX Nov 14, 2026
c79ccfc
Merge main (#409 landed) into pgp/rust-r3
GeiserX Nov 14, 2026
686a0c6
fix(report): collect again when a section's whole folder is gone
GeiserX Nov 14, 2026
6892ae8
Merge main (#410) into pgp/rust-r3
GeiserX Nov 14, 2026
61dc9c7
Merge main (#414, the Guard time limits) into pgp/rust-r3
GeiserX Nov 14, 2026
eaf6bfc
ci(guard): read the SMN1 marker from the test's own table
GeiserX Nov 14, 2026
7aaf3a9
fix(report): collect again when the run status or a bin or assets tab…
GeiserX Nov 14, 2026
b55093d
test(roh): require chromosome scope and neutral UPD hints
GeiserX Nov 15, 2026
0480d31
Merge main into pgp/i411-roh-scope to clear the PR conflict
GeiserX Nov 15, 2026
ad38e45
Merge remote-tracking branch 'origin/main' into pgp/port-scaffold
GeiserX Nov 15, 2026
b81d49a
test(pgx): pin the disease-gene drug warnings for carriers, SCN1A and…
GeiserX Nov 15, 2026
5942701
test(live): check inline reads and same-origin viewer framing
GeiserX Nov 15, 2026
7317527
test(bloodtype): pin the record a marker reads when several overlap it
GeiserX Nov 15, 2026
5fc18ba
docs(licence): say GPL-3.0-or-later wherever OwnGenome states its lic…
GeiserX Nov 15, 2026
da97715
docs(acmg): cite ACMG SF v3.3 and say the rule text is a short quotation
GeiserX Nov 15, 2026
7875c95
docs(calling): name the source of the GRCh38 PAR intervals
GeiserX Nov 15, 2026
d58805e
docs(changelog): note the licence and ACMG citation fixes
GeiserX Nov 15, 2026
207283a
fix(clinvar): keep ClinVar's condition on each hit
GeiserX Nov 15, 2026
3c8f081
test(clinvar): fake-docker case for the condition on step 06 hits
GeiserX Nov 15, 2026
cd80172
fix(roh): stream chromosome scope and emit neutral region hints
GeiserX Nov 15, 2026
0de4fd2
fix(archive): verify complete read content before removing BAM
GeiserX Nov 15, 2026
ba002b0
feat(live): open the run reads inline from the genome map
GeiserX Nov 15, 2026
80137d4
test(recheck): red first for a failed lookup read as nothing newer, a…
GeiserX Nov 15, 2026
8c26078
Merge remote-tracking branch 'origin/main' into pgp/rust-r3
GeiserX Nov 15, 2026
cd1d2d8
fix(e2e): collect with og summary collect where two cases still ran t…
GeiserX Nov 15, 2026
baced26
build(rust): give every planned port its own crate, module and verb
GeiserX Nov 15, 2026
abc792a
fix(live): show viewer setup failures inside the reads panel
GeiserX Nov 15, 2026
079b864
fix(pgx): stop warning against valproate for one recessive hit, and d…
GeiserX Nov 15, 2026
4e4945f
ci(guard): run every test with the og-leg marker instead of a hand-ke…
GeiserX Nov 15, 2026
2b43c3c
test(roh): pin scoped summaries and prove the controls fail
GeiserX Nov 15, 2026
c8bd596
docs(rust): name the four new crates, the planned verbs and the og-le…
GeiserX Nov 15, 2026
a4fb1c5
fix(ci): keep ROH caller paths within the supported e2e scope
GeiserX Nov 15, 2026
c78f72a
fix(recheck): say the check failed when every lookup failed, and reru…
GeiserX Nov 15, 2026
c406f62
fix(archive): reject empty Nextflow checksum reports
GeiserX Nov 15, 2026
7be974d
test(ancestry): use a verb no plan adds for the unknown-verb case
GeiserX Nov 15, 2026
4fb1bea
fix(bloodtype): read every record that covers a marker, in any order
GeiserX Nov 15, 2026
f446ec4
docs(bloodtype): say how overlapping records at a marker are read
GeiserX Nov 15, 2026
875196f
test(live): inspect alignment rendering inside the viewer shadow root
GeiserX Nov 15, 2026
67856fd
fix(build): mount and fingerprint the embedded imprinting table
GeiserX Nov 15, 2026
e6fe655
fix(docs): link the imprinting table through the public repository
GeiserX Nov 15, 2026
2bb5acc
fix(archive): regenerate MD/NM when restoring a CRAM without stored tags
GeiserX Nov 15, 2026
beb57c9
fix(recheck): count failed items, not failed lookups, in the last line
GeiserX Nov 15, 2026
def428a
fix(live): clear reads links and labels when the panel closes
GeiserX Nov 15, 2026
604fd42
test(pgx): a split 1/2 site in a recessive gene must warn, not read a…
GeiserX Nov 15, 2026
83d39d6
fix(pgx): count 1/. and ./1 as both copies changed in a recessive gene
GeiserX Nov 15, 2026
c7a4111
Merge the car before (cd1d2d82) into pgp/i411-hits-keep-condition for…
GeiserX Nov 15, 2026
b4be807
fix(live): preserve reads history and locus across map navigation
GeiserX Nov 15, 2026
1c83b99
test(live): preserve the targeted reload control guards
GeiserX Nov 15, 2026
4a52aab
fix(ancestry): list the four planned verbs in og ancestry-fine --help
GeiserX Nov 15, 2026
ba3105d
build(live): keep og-live's results module visible to git
GeiserX Nov 15, 2026
7896854
Merge the car before (c7a4111d) into pgp/i411-contraindications for t…
GeiserX Nov 15, 2026
2ef7dfa
Merge the car before (78968549) into pgp/i411-cram-checksum for the l…
GeiserX Nov 15, 2026
b7e3f47
fix(live): keep the reader's igv place through a resize, and document…
GeiserX Nov 15, 2026
3b22331
test(bloodtype): pin split null allele dosage and contradictions
GeiserX Nov 15, 2026
8f07395
Merge the car before (2ef7dfa0) into pgp/i411-licence-statement for t…
GeiserX Nov 15, 2026
0a0cfc0
fix(roh): write 0.0, not -0.0, when a sample has no long run
GeiserX Nov 15, 2026
9b70dc2
Merge pgp/rust-r3 (#413, cd1d2d82) into pgp/i411-roh-scope
GeiserX Nov 15, 2026
26f7be1
fix(bloodtype): combine distinct null ALTs across split records
GeiserX Nov 15, 2026
6af4386
fix(recheck): replay only the switches run-all.sh records, and refuse…
GeiserX Nov 15, 2026
e6ae4fd
Merge the car before (8f07395c) into pgp/port-scaffold for the landin…
GeiserX Nov 15, 2026
82c723e
Merge the car before (e6ae4fd8) into pgp/map-1g for the landing train
GeiserX Nov 15, 2026
87107a8
Merge the car before (82c723ed) into pgp/i411-bloodtype-record-match …
GeiserX Nov 15, 2026
32d0b87
Merge the car before (87107a8d) into pgp/i411-recheck-honest for the …
GeiserX Nov 15, 2026
f59aff6
Merge the car before (32d0b87b) into pgp/i411-roh-scope for the landi…
GeiserX Nov 15, 2026
59745e2
Merge main into pgp/i411-roh-scope: the car before landed, no file ch…
GeiserX Nov 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/guard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,37 @@ jobs:
cp -f "$saved" "$src"
trap - EXIT

- name: Control (ROH scope and neutral hints reject planted faults)
run: |
reader=crates/og-summary/src/collect/group_c/roh.rs
table=../assets/imprinted_regions.tsv
cp "$reader" "$RUNNER_TEMP/roh-reader.rs"
cp "$table" "$RUNNER_TEMP/imprinted-regions.tsv"
restore_roh() {
cp "$RUNNER_TEMP/roh-reader.rs" "$reader"
cp "$RUNNER_TEMP/imprinted-regions.tsv" "$table"
}
trap restore_roh EXIT
sed -i 's/let denominator = covered_unmasked_bp(&covered);/let denominator = autosome_unmasked_bp();/' "$reader"
sed -i 's/s("-")/s("Example syndrome")/g' "$reader"
sed -i 's/26248010;29959430/not-pmid/' "$table"
log="$RUNNER_TEMP/roh-scope-planted.log"
rc=0
cargo test --locked -p og-summary --no-fail-fast > "$log" 2>&1 || rc=$?
cat "$log"
test "$rc" -ne 0
for name in \
roh_scope_chr20_uses_its_own_unmasked_denominator \
roh_scope_counts_sites_without_runs_and_keeps_partial_labels_empty \
roh_scope_a_segment_only_file_never_establishes_scope \
roh_scope_upd_is_a_region_hint_without_syndrome_names \
imprinted_asset_is_the_only_table; do
grep -E "test .*${name} .* FAILED" "$log"
done
grep -E 'test result: FAILED\. [0-9]+ passed; 5 failed;' "$log"
restore_roh
trap - EXIT

- name: cargo test
run: cargo test --workspace --locked --no-fail-fast

Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ Each release's notes. From 1.0.0 on, a major or minor release has hand-written n

## Unreleased

- ROH summaries now divide F_ROH by the GRCh38 length outside the bands of the assessed autosomes. Per-site rows identify those chromosomes, including chromosomes with no ROH. A new `roh.data.scope` records the chromosomes, denominator and scope source. Relationship labels and UPD flags require sites on all 22 autosomes and the full unmasked autosome length. Segment-only files use their observed chromosomes as an unverified lower bound and get neither label. Empty input has null F_ROH. Segment counts and the step 11 summary table keep their format.
- A one-chromosome ROH flag now names regions and citations without syndrome names. Its note includes deletion, acquired loss of heterozygosity and shared ancestry as alternatives. The maternal and paternal JSON keys remain as `"-"` for reader compatibility. The attributed `assets/imprinted_regions.tsv` is embedded at build time, replacing the duplicated Rust table. The container builder mounts it, and the source stamp includes its blob hash, so a table edit makes an old binary stale. The stamp format and `tree-hash` command name stay the same. Every listed chromosome uses the same lookup, including chr11 and chr15. A region hint does not establish overlap with its imprinted locus or parental origin. Broad cytoband names remain reference labels, not diagnostic intervals.
- The ROH collector now streams per-site rows instead of keeping the whole file in memory. On 1.1 million synthetic site rows, peak RSS fell from 65.7-67.0 MB to 3.0-3.5 MB. CPU time stayed near 0.2 seconds. Under shared host load, wall time ranged from 1.40-21.46 seconds before and 7.89-38.16 seconds after; these timings do not establish a speedup.

- The reports now get summary.json from the Rust `og` binary. Step 24, the Nextflow HTML_REPORT process and `generate-report.sh` collect it with `og summary collect` (through `bin/render_report.py`), and a run collects each sample once: `generate-report.sh` renders the text report from the summary.json step 24 wrote, and collects again when a file it reads is newer than that summary.json, or a file was added to or removed from a step folder since, or a file a section names as its source, the run status or a table in `bin/` or `assets/` is gone. When it renders from step 24's summary.json, the text report's generated time is step 24's, the same as the HTML report's; it was the minute of its own collect. When it collects again, the text report carries the new collect's values and time, and the HTML report keeps step 24's until step 24 runs again, as before. The deliberate fixes the `og summary collect` entries below list now reach the reports; apart from them, nothing in summary.json or either report changes. `bin/collect_summary.py` keeps only what the report renderer (`bin/render_report.py`), the couple report, the results index and the live view import from it. The Python modules that only the old collector imported are gone: `bin/pgx_outside_calls.py`, `ancestry_fine_report.py`, `clip_check.py`, `annotsv_postfilter.py`, `chip_report.py`, `traits_report.py`, `run_delta.py` and `genotype_rules_indels.py`. On the synthetic demo sample (4.7 million VCF records) the collect takes 1.1 s of CPU and 12-15 MB, where the Python took 7.8-8.0 s and 34-37 MB. What changes on purpose:
- The walk of the sample folder leaves out `<sample>/nextflow`. `run-all.sh` launches Nextflow there, and its `work/` holds every task's files and staged links. No section reads a file there. With 200,000 files under it, the collect took 67 MB walked and 14 MB skipped.
- The sections other than the sample VCF are read one at a time, while the sample VCF is read on its own thread, so the peak memory is near the biggest section's and not the sum of all of them. With every side table 50 times its demo size, the peak footprint fell from 119-130 MB to 105-112 MB (the Python: 100-102 MB), with the same CPU time.
Expand Down
21 changes: 12 additions & 9 deletions assets/imprinted_regions.tsv
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
# Imprinting disorders caused by uniparental disomy (UPD), one row per chromosome or region.
# Read by og summary collect (IMPRINTED_REGIONS in rust/crates/og-summary holds the same rows; its
# tests check that the two agree) to name what a run of homozygosity over most of one chromosome could mean.
# start and end: GRCh38, 0-based start, exclusive end, the UCSC cytoBand.hg38.txt bands of the region;
# empty for a row that applies to the whole chromosome. A row with a region applies when a run on the
# flagged chromosome overlaps it. "-" is no known imprinting disorder for UPD from that parent.
# Overview: Eggermann et al., Imprinting disorders, Nat Rev Dis Primers 2023 (PMID 37386011).
# Imprinted chromosomes and regions. Factual reference rows, curated by OwnGenome.
# Sole source: embedded by og summary collect at build time. The UPD hint emits region and PMID only;
# maternal_upd and paternal_upd remain reference facts here, never a diagnosis from a ROH match.
# start and end are retained for format compatibility and are empty: the hint is chromosome-wide.
# Mixed iso/heterodisomy may leave the imprinted locus outside the observed homozygous runs.
# Region labels are broad cytobands, not diagnostic locus coordinates or a specialist-reviewed assay.
# Overview: Eggermann et al., Imprinting disorders, Nat Rev Dis Primers 9, 33 (2023).
# https://doi.org/10.1038/s41572-023-00443-4 (PMID 37386011).
# Mechanism: Robinson, BioEssays 22:452-459 (2000), https://pubmed.ncbi.nlm.nih.gov/10797485/.
# Per-row PMIDs support the parent-of-origin reference facts; names and symbols are factual labels.
chrom start end region maternal_upd paternal_upd pmid
chr6 6q24 (PLAGL1, HYMAI) - Transient neonatal diabetes mellitus (6q24-related) 20301706
chr7 7p12 (GRB10), 7q32 (MEST) Silver-Russell syndrome - 27585961
chr11 0 22000000 11p15 (H19/IGF2, KCNQ1OT1) Silver-Russell syndrome Beckwith-Wiedemann syndrome 29377879;27585961
chr11 11p15 (H19/IGF2, KCNQ1OT1) Silver-Russell syndrome Beckwith-Wiedemann syndrome 29377879;27585961
chr14 14q32.2 (DLK1-MEG3) Temple syndrome Kagami-Ogata syndrome 24891339;26377239
chr15 20500000 33400000 15q11-q13 (SNRPN, UBE3A) Prader-Willi syndrome Angelman syndrome 22237428;27615419
chr15 15q11-q13 (SNRPN, UBE3A) Prader-Willi syndrome Angelman syndrome 22237428;27615419
chr20 20q13.32 (GNAS) Mulchandani-Bhoj-Conlin syndrome (growth failure) Pseudohypoparathyroidism type 1B 26248010;29959430
36 changes: 19 additions & 17 deletions docs/11-roh-analysis.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ For chip data (no `FORMAT/PL`), the script adds `-G30`.

### Centromere and heterochromatin bands

Few markers map in GRCh38's centromeres (cytoband stain `acen`), its large heterochromatin blocks (`gvar`, such as 1q12, 9q12 and 16q11.2) and the acrocentric stalks (`stalk`), so `bcftools roh` reads long homozygous runs there that are artefacts. The script, the Nextflow module and the reports take the part of each segment that lies in one of these bands out of its length; a segment wholly inside one counts as nothing. The bands are the `acen`, `gvar` and `stalk` rows of UCSC's `cytoBand.hg38.txt` (the file `setup.sh` installs for step 10), neighbouring rows merged into one span around each centromere (two on chrY), written into `scripts/11-roh-analysis.sh`, `modules/local/roh/main.nf` and `og summary collect` as the same line (a unit test checks they agree). On chr1 the span is 121.7-143.2 Mb, on chr9 42.2-61.5 Mb, on chr18 15.4-21.5 Mb.
Few markers map in GRCh38's centromeres (cytoband stain `acen`), its large heterochromatin blocks (`gvar`, such as 1q12, 9q12 and 16q11.2) and the acrocentric stalks (`stalk`), so `bcftools roh` reads long homozygous runs there that are artefacts. The script, the Nextflow module and the reports take the part of each segment that lies in one of these bands out of its length; a segment wholly inside one counts as nothing. The bands are the `acen`, `gvar` and `stalk` rows of UCSC's `cytoBand.hg38.txt` (the file `setup.sh` installs for step 10). Neighbouring rows are merged around each centromere, with two spans on chrY. `MASKED_BANDS` in `rust/crates/og-summary/src/collect/group_c/roh.rs` is their only copy. The step and the Nextflow module call `og roh summary`, which reads that same constant. On chr1 the span is 121.7-143.2 Mb, on chr9 42.2-61.5 Mb, on chr18 15.4-21.5 Mb.

The reports count autosomes only: Segments, Total and Largest keep chr1 to chr22, so they leave out chrX and chrY (a man's single X reads as one long run) and any other contig (chrM, chrEBV, chrUn_*), and the part of each segment in a band. They say how many chrX and chrY segments and how many megabases in bands were left out.

Expand All @@ -63,8 +63,15 @@ When parents are related, a child is autozygous (both copies from the same ances

These are averages. Inheritance is random, so one person's total can be well above or below the value for their parents' relationship, and the ranges of neighbouring rows overlap. A total near one row is consistent with it; it does not prove it.

Both reports print this as **F_ROH**, the measure of McQuillan et al. 2008 (PMID 18760389): the length of the autosomal segments of 5 Mb or more, without their band parts, divided by the length of chr1 to chr22 without the bands (2,875,001,522 bp less 217,000,000 bp, so 2,658,001,522 bp). Beside it they name the row of the table above whose F is nearest to F_ROH on a log scale: the boundaries are the geometric means of neighbouring rows (for example 1/16 and 1/8 meet at about 0.088), and an F_ROH under 1/128 (about 21 Mb) reads "no sign of related parents". When one chromosome carries most of the runs (next section), there is no band: that chromosome fills F_ROH by itself.
`og summary collect` writes **F_ROH**, the measure of McQuillan et al. 2008 ([PMID 18760389](https://pubmed.ncbi.nlm.nih.gov/18760389/)). Its numerator is the length of autosomal runs of 5 Mb or more outside the bands. Its denominator is the GRCh38 length of the chromosomes this run assessed, with their bands removed. With all 22 autosomes, that is 2,875,001,522 bp less 217,000,000 bp, or 2,658,001,522 bp. With chr20 alone it is 64,444,167 bp less 4,700,000 bp, or 59,744,167 bp. A 21 Mb run then gives F_ROH 0.3515, rather than 0.0079.

The collector streams the per-site `ST` rows to identify assessed autosomes. A chromosome with sites counts even when it has no ROH. No marker-count floor is imposed, so sparse exome and chip input remain supported. This is a chromosome-length denominator, **not a count of callable bases**. One site does not establish coverage across a chromosome. A capture panel or a small interval on every autosome can still look complete at this resolution.

The new `roh.data.scope` object records `autosomes` in numeric order, `unmasked_bp`, `source`, `partial` and a note. Older segment-only files have `source: segments_only`; their observed chromosomes give only a lower bound on scope. An empty file has no denominator and `f_roh: null`. The segment list and length totals remain available.

A relationship label or a one-chromosome UPD flag needs sites on all 22 autosomes and the full 2,658,001,522 bp denominator. Below that floor, or without per-site evidence, `relationship` and `upd_flag` are null. A subset F_ROH is a descriptive fraction of the listed chromosomes and must not be mapped to the parental relationship table. The report and live-view wording for this scope is handled separately.

For complete chromosome scope, the relationship is the row whose F is nearest on a log scale. Boundaries are the geometric means of neighbouring rows; for example 1/16 and 1/8 meet at about 0.088. An F_ROH under 1/128 reads "no sign of related parents". A one-chromosome flag suppresses that relationship label.
To compute the total the table means from the summary file, which takes the band parts out before it keeps the segments of 5 Mb or more, as the reports do:

```bash
Expand All @@ -78,24 +85,19 @@ In uniparental disomy (UPD) both copies of a chromosome come from one parent. Wh

The reports flag a chromosome when its segments of 5 Mb or more (band parts left out) add up to at least 20 Mb **and** to more than half of the length of all such autosomal segments. Both numbers are our thresholds, not a published cut-off: 20 Mb on one chromosome is the long-standing sign of isodisomy (see the uniparental disomy note under [Important Notes](#important-notes)), and the share rule keeps out a child of related parents, whose runs spread over many chromosomes. The flag says "may": a run that long can also be chance in a child of related parents.

A flagged chromosome is looked up in `assets/imprinted_regions.tsv`, the chromosomes where UPD from one parent causes an imprinting disorder (overview: Eggermann et al. 2023, Nat Rev Dis Primers, PMID 37386011). A row with a region applies only when a run on that chromosome overlaps it; the others apply to the whole chromosome.
A flagged chromosome is looked up in [assets/imprinted_regions.tsv](https://github.com/GeiserX/OwnGenome/blob/main/assets/imprinted_regions.tsv). That file is the only imprinting table and is embedded into `og` at build time. Its header credits [Eggermann et al. 2023](https://doi.org/10.1038/s41572-023-00443-4), with per-row PMIDs for the reference facts.

| Chromosome or region | UPD from the mother | UPD from the father | Source (PMID) |
|---|---|---|---|
| chr6 (6q24, PLAGL1, HYMAI) | none known | Transient neonatal diabetes mellitus | 20301706 |
| chr7 (GRB10 at 7p12, MEST at 7q32) | Silver-Russell syndrome | none known | 27585961 |
| 11p15, chr11:0-22,000,000 (H19/IGF2, KCNQ1OT1) | Silver-Russell syndrome | Beckwith-Wiedemann syndrome | 29377879, 27585961 |
| chr14 (14q32.2, DLK1-MEG3) | Temple syndrome | Kagami-Ogata syndrome | 24891339, 26377239 |
| 15q11-q13, chr15:20,500,000-33,400,000 (SNRPN, UBE3A) | Prader-Willi syndrome | Angelman syndrome | 22237428, 27615419 |
| chr20 (20q13.32, GNAS) | Mulchandani-Bhoj-Conlin syndrome (growth failure) | Pseudohypoparathyroidism type 1B | 26248010, 29959430 |
The flag lists the chromosome, run length, share, region names and citations. It names no syndrome. The existing `maternal_upd` and `paternal_upd` JSON keys stay as `"-"` for reader compatibility. The asset retains their reference facts. Those facts cannot be inferred from a region match in one genome.

`og summary collect` holds the same rows (`IMPRINTED_REGIONS` in `rust/crates/og-summary`; a unit test checks that the two agree). A flagged chromosome with no row still matters: a recessive variant inside the run, if there is one, would be homozygous.
All six chromosomes use the same chromosome-wide lookup, including chr11 and chr15. Mixed iso/heterodisomy can leave an imprinted locus outside the observed homozygous runs ([Robinson 2000](https://pubmed.ncbi.nlm.nih.gov/10797485/)). A region hint therefore does not claim that a run overlaps the imprinted locus. Region names are broad cytoband labels, not diagnostic locus intervals or a specialist-reviewed assay. No interval was narrowed on the basis of a ROH alone.

What this cannot tell, and the reports say so:
The flag's `note` describes long chromosome-focused ROH and suggests investigating possible isodisomy. Its limits are:

- **Which parent.** A single genome has no parent of origin; both columns are listed. The parents' genotypes (step 38, the family workflow) confirm a UPD and tell which. Where a row applies, a methylation test of its imprinted region tests for that imprinting disorder; on its own it does not prove a UPD, since an imprinting defect gives the same result.
- **Heterodisomy.** Two different copies from one parent leave no run at all, so it is not detected here. It needs the parents' genotypes.
- **Mosaic or segmental UPD** that covers only a short stretch, or a share of the cells (common in Beckwith-Wiedemann syndrome), may stay under the thresholds.
- A large deletion of one copy or acquired loss of heterozygosity can give the same pattern. Check the copy-number results and the MoChA results. The collector does not establish copy neutrality or perform that cross-check.
- Shared ancestry, including related parents, can also produce long runs. A flag is a screening hint, not a UPD diagnosis.
- A single genome cannot determine parental origin. The parents' genotypes can establish it. Methylation testing assesses an imprinting defect and alone does not establish UPD.
- Heterodisomy can leave no ROH. Mosaic or short segmental UPD can fall below the thresholds.
- Sites on all autosomes establish chromosome presence only. They do not prove assay completeness within any chromosome.

### Single segments

Expand All @@ -112,5 +114,5 @@ What this cannot tell, and the reports say so:
- bcftools roh reads a site's frequency from INFO/AC and INFO/AN when the record has them, and uses 0.4 only where it does not. DeepVariant writes neither, so on its calls every site uses 0.4. A VCF from another caller may carry them: in a single-sample file they are the sample's own allele counts, not a population's.
- No population allele frequencies are used, and the reports say so: read the total and the short segments as rough, the long segments are the signal. A population allele-frequency file (`--AF-file`, for example from gnomAD) would replace the one default value with real frequencies per site and give better segment edges; neither the script nor the module uses one today, and its effect on the total has not been measured.
- The centromere and heterochromatin bands (above) are taken out of every count; the step and the reports do it, so there is nothing to subtract by hand
- Long runs concentrated on one chromosome may indicate uniparental disomy; the reports flag a chromosome whose segments of 5 Mb or more add up to at least 20 Mb and to more than half of the length of all such autosomal segments (above). Confirm with the parents' genotypes; a methylation test of a listed imprinted region tests for its imprinting disorder
- Long runs concentrated on one chromosome may indicate uniparental disomy; the reports flag a chromosome whose segments of 5 Mb or more add up to at least 20 Mb and to more than half of the length of all such autosomal segments (above). The flag requires sites on all 22 autosomes. Check copy number and acquired LOH, and confirm with the parents' genotypes. A methylation test assesses an imprinting defect
- ROH within known disease gene regions warrants checking for homozygous pathogenic variants
Loading
Loading