diff --git a/CHANGELOG.md b/CHANGELOG.md index 83c1dd591..936d29635 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -137,6 +137,7 @@ Get started: https://geiserx.github.io/OwnGenome/getting-started/ ### Every change +- Repeat summaries skip incomplete PharmCAT UGT1A1 calls. Carrier rows keep the ACMG condition flag, the OwnHealth export names unread exons and reports whether dedicated steps ran, and MEI reports label sites with too few reads as not assessed. Parity now covers the Step 35 PMS2 filename and shallow CYP2D6 flanks. Live person pages publish the current run's progress, findings and search index together. While a run is active and the tab is visible, the page checks every five seconds and reloads at most once every ten seconds. - A pgsc_calc task killed for memory no longer leaves the PRS step running for ever. pgsc_calc ran its tasks with `errorStrategy 'finish'`: after a failure it waited for its pending tasks, and in its ancestry branch that wait could never end, so `PRS` never ended and the run waited on it. Both PRS entry points now give every pgsc_calc task `'terminate'`, so pgsc_calc stops its pending tasks and exits at once. That is a generic line for the tasks that take pgsc_calc's default, and a `withName` line for the processes that set `errorStrategy` themselves, which outrank a generic line: `MATCH_VARIANTS` and `PLINK2_SCORE` set `'finish'` at v2.3.0. That list is read from the installed pgsc_calc, and `tests/test_pgsc_error_strategy.sh` fails when a pinned pgsc_calc has an `errorStrategy` the config does not cover. `PRS` then exits 137 and Nextflow retries it with twice the memory. `PRS` and its `PRS_*` steps are now report-only, so a PRS that fails again no longer stops the run. - ROH no longer waits for a PRS that failed. With `--roh_af_panel`, ROH reads step 26's ancestry table to pick a group's allele frequencies, and a failed `PRS` stopped the run before ROH started. ROH now runs with the panel's global frequencies, and the first line of its table says `no step 26 ancestry table`. The report and the live page now say why the global frequencies were used: no step 26 ancestry table, or no group at 0.8 or more. - Each sample keeps its own MultiQC report and somalier tables. `run-all.sh` runs one sample at a time into the same `GENOME_DIR`, and both went to `multiqc/` and `somalier/` beside the sample folders, so each sample's run replaced the previous sample's. The pipeline now writes `/multiqc/` (where step 28 writes too) and `/qc/somalier/.samples.tsv`, `.pairs.tsv` and `.html` for every sample, the names step 33 gives them. Both legs give somalier an `-o` that ends with its own `.`, because somalier adds one only when `-o` has none: a sample name that ends with `.` (the name check allows it) now keeps that dot in the table names, where step 33 used to stop with "somalier relate wrote no". A run of two samples or more also writes one report and one set of tables across them, in `multiqc/` and `somalier/` (the new `MULTIQC_COHORT` and `SOMALIER_RELATE_COHORT` tasks). A run of one sample never writes there. A results folder that a `main` checkout before 1.0 wrote into (the `GENOME_DIR` of `run-all.sh`, or a Nextflow `--outdir`) keeps its old `multiqc/` and `somalier/`; 0.8.2 had no somalier step, and its Nextflow wrote to `./results` by default: 1.0 leaves them as they are, but they now sit where a cohort report goes, and they may hold only the last sample's report and tables. The pipeline warns when it finds one (an old `somalier/versions.yml`); delete them, or move them into that sample's folder. diff --git a/assets/live/core.js b/assets/live/core.js index e907b8755..3ceced5d2 100644 --- a/assets/live/core.js +++ b/assets/live/core.js @@ -154,16 +154,16 @@ // A child's report stays closed while any of the child's results to act on (findings of level "act") is // unopened. The page is then a function of the opened results alone and of how many are closed: no view (person.js, // finding.js, map.js, family-page.js, home.js, live.js, the plugins) receives the child's report, because every - // view reads through fetch and EventSource and this gate holds both. Adults and children with no result to act on - // pass through untouched: each file is fetched as often, in the same order and with the same options as without - // the gate, and the event stream opens when the view asks for it. + // view reads through the gate. An open document gets its snapshot and can read related files. var originalFetch = window.fetch.bind(window); - var records = {}, current = null, ownsPage = false, eventSources = [], shared = {}, cleaned = false; + var records = {}, current = null, ownsPage = false, shared = {}, cleaned = false; var CLOSED_TEXT = "This child's report stays closed until every result to act on in adult life is opened on purpose."; // A page whose run state could not be read stays closed too (it fails closed), and names no role. Its results // may still be readable and counted below, so the text speaks of the state only. var UNREAD_TEXT = "This page could not read this run's state, so it keeps its results closed."; var TRANSFER = 'og-report-opening', NONCE = 'og-report-opening:'; + var livePerson = document.body.classList.contains('page-person') && root.getAttribute('data-mode') === 'live'; + var snapshot = null; var findingPath = /\/finding\//.test(location.pathname) ? location.pathname : null; // The opening ticket of the navigation that replaced the last document (transfer below): read and removed at // once, before any network load, and valid only for this navigation (its one-use nonce in window.name). @@ -262,10 +262,9 @@ rec.perm = old && same(ids, (old.acts || []).map(function (f) { return f.id; })) ? old.perm : shuffled(ids); return rec; } - // PRE: the kept answer of results.json the gate asked for already (preparePerson), else it is read here. - function record(url, child, cached, pre) { + function record(url, child, cached) { url = absolute(url); - return (pre ? parsedOf(pre) : cached ? sharedJSON(url + 'results.json', NO_STORE) : jsonAt(url + 'results.json')).then(function (r) { + return (cached ? sharedJSON(url + 'results.json', NO_STORE) : jsonAt(url + 'results.json')).then(function (r) { var old = records[url]; var rec = makeRecord(url, child !== undefined ? child : old ? old.child : true, r, old); records[url] = rec; @@ -345,7 +344,7 @@ add(wrap, el('h1', {}, current.unread ? 'Results not loaded' : 'Results about a child')); add(wrap, controls(current, function () { if (shut(current)) { renderGate(); } else { transfer(); } }, '')); add(document.body, wrap); - root.setAttribute('data-pgp-status', 'ready'); + root.setAttribute('data-pgp-status', current.unread && livePerson ? 'offline' : 'ready'); root.setAttribute('data-pgp-gated', 'true'); } function proof(rec) { @@ -354,8 +353,9 @@ } // Replacing the document discards every view closure, image, chart, search cache and in-flight callback. Only // which acts are open crosses it, with a digest of their records and a nonce for the next navigation only. - function transfer() { - proof(current).then(function (stamp) { + function transfer(reload, allowReload) { + return proof(current).then(function (stamp) { + if (allowReload && !allowReload()) { return; } var ids = current.acts.map(function (f) { return f.id; }), b = new Uint8Array(16); crypto.getRandomValues(b); var nonce = Array.from(b).map(function (v) { return v.toString(16).padStart(2, '0'); }).join(''); @@ -367,7 +367,7 @@ sessionStorage.setItem(TRANSFER, JSON.stringify({ path: target, stamp: stamp, nonce: nonce, name: window.name.indexOf(NONCE) === 0 ? '' : window.name, order: current.order.map(function (id) { return ids.indexOf(id); }) })); window.name = NONCE + nonce; - location.replace(target); // a map or section address returns to the default view + if (reload) { location.reload(); } else { location.replace(target); } }); } function consume(rec) { @@ -394,12 +394,49 @@ var parsed = new Promise(function (done) { if (document.readyState === 'complete') { done(); } else { document.addEventListener('DOMContentLoaded', done); window.addEventListener('load', done); } }); + function showGateIfClosed() { + ownsPage = shut(current); + if (ownsPage) { renderGate(); } + } + + function prepareSnapshot() { + var url = absolute('./'); + return originalFetch(url + 'snapshot.json', NO_STORE).then(function (r) { + if (r.status === 401) { location.href = '/login?next=' + encodeURIComponent(location.pathname); return; } + if (!r.ok) { throw new Error('snapshot request failed'); } + var match = /^"([a-f0-9]{64})"$/.exec(r.headers.get('ETag') || ''); + if (!match) { throw new Error('invalid snapshot ETag'); } + return r.json().then(function (doc) { return acceptSnapshot(url, doc, match[1]); }); + }).catch(function () { + current = { child: true, unread: true, acts: null, opened: {}, order: [], perm: [] }; + ownsPage = true; + renderGate(); + }); + } + + function acceptSnapshot(url, doc, hash) { + if (!doc || !doc.state || !doc.state.run || !Array.isArray(doc.state.steps) || !doc.state.plugins || + !doc.results || !Array.isArray(doc.results.chapters)) { + throw new Error('incomplete snapshot'); + } + var fam = doc.state.plugins.family; + var child = !!(fam && (fam.unknown || (fam.kind === 'member' && fam.child !== false))); + current = records[url] = makeRecord(url, child, doc.results); + return consume(current).then(function () { + showGateIfClosed(); + if (!ownsPage) { + snapshot = doc; + root.setAttribute('data-pgp-snapshot', hash); + } + }); + } + function preparePerson() { var url = absolute(findingPath ? '../../' : './'); var replaying = root.getAttribute('data-mode') === 'replay'; // live.js reads a replay's frames.json with no options; finding.js reads it, and state.json, as JSON (NO_STORE). var stateRead = sharedJSON(url + (replaying ? 'frames.json' : 'state.json'), replaying && !findingPath ? undefined : NO_STORE); - var results = findingPath ? record(url, undefined, true) : null, pre = null, unread = false; + var results = findingPath ? record(url, undefined, true) : null, unread = false; return Promise.all([stateRead, parsed]).then(function (x) { var raw = x[0]; var state = replaying ? raw && raw.frames && raw.frames.slice(-1)[0] : raw; @@ -412,19 +449,15 @@ var entry = fam && fam.kind === 'member' && (fam.families || [])[0]; if (child && entry) { keep(absolute(entry.url, url) + 'family.json', NO_STORE); - if (!replaying && !findingPath) { pre = keep(url + 'results.json', NO_STORE); } } return child; }).then(function (child) { if (!child && !results) { return { url: url, child: false, acts: [], opened: {}, order: [], perm: [] }; } - return (results || record(url, child, true, pre)).then(function (rec) { rec.child = child; rec.unread = unread; return rec; }); + return (results || record(url, child, true)).then(function (rec) { rec.child = child; rec.unread = unread; return rec; }); }).then(function (rec) { current = records[url] = rec; return consume(current); - }).then(function () { - ownsPage = shut(current); - if (ownsPage) { renderGate(); } - }).catch(function () { + }).then(showGateIfClosed).catch(function () { current = { child: true, unread: true, acts: null, opened: {}, order: [], perm: [] }; ownsPage = true; renderGate(); }); } @@ -558,7 +591,11 @@ return Promise.resolve(projectRuns(data)); } var ready = Promise.resolve(); - if (document.body.classList.contains('page-person') || document.body.classList.contains('page-finding')) { ready = preparePerson(); } + if (livePerson) { + ready = prepareSnapshot(); + } else if (document.body.classList.contains('page-person') || document.body.classList.contains('page-finding')) { + ready = preparePerson(); + } // Permission is checked after parsing too: a response started while open may finish after closing. function viewResponse(response) { var parse = response.json.bind(response); @@ -566,7 +603,7 @@ return response; } function closedRun(url) { return Object.keys(records).some(function (key) { return url.indexOf(key) === 0 && shut(records[key]); }); } - // Every view reads through here (and through EventSource below); one that reads a child's closed run gets nothing. + // Every view reads through here. One that reads a child's closed run gets nothing. window.fetch = function (url, options) { return ready.then(function () { var requestURL = absolute(url && url.url || url); @@ -583,7 +620,7 @@ if (!same(next.acts, current.acts)) { current = records[current.url] = next; // A result to act on that appeared or changed while the report was open closes it at once. - if (shut(current)) { ownsPage = true; eventSources.forEach(function (es) { es.close(); }); cleanPage(); transfer(); return new Promise(function () {}); } + if (shut(current)) { ownsPage = true; cleanPage(); transfer(); return new Promise(function () {}); } } return viewResponse(response); }; @@ -608,33 +645,18 @@ // A child's open report never stays in the back-forward cache: it is cleared on the way out, and a page shown // again from that cache loads afresh (closed). Other pages come back from the cache as they were. window.addEventListener('pagehide', function () { - if (current && current.child && current.acts && current.acts.length) { ownsPage = true; cleaned = true; eventSources.forEach(function (es) { es.close(); }); cleanPage(); } + if (current && current.child && current.acts && current.acts.length) { ownsPage = true; cleaned = true; cleanPage(); } }); window.addEventListener('pageshow', function (e) { if (e.persisted && cleaned) { location.reload(); } }); - var NativeEvents = window.EventSource; - // A view's event stream opens the moment the view asks for it, as without the gate (live.js asks right after - // state.json). What it says waits until the gate knows whether it owns the page: then it reaches the view, in - // order, or the stream closes unread. After that it reaches the view only while the gate does not own the page. - window.EventSource = function (url, options) { - var proxy = this, held = [], closed = false; - var source = ownsPage || closedRun(absolute(url)) ? null : new NativeEvents(url, options); - Object.defineProperty(proxy, 'readyState', { get: function () { return closed || !source ? 2 : source.readyState; } }); - proxy.close = function () { closed = true; if (source) { source.close(); } }; - if (!source) { return; } - eventSources.push(source); - function deliver(kind, e) { if (!ownsPage && !closed && proxy['on' + kind]) { proxy['on' + kind](e); } } - ['message', 'error', 'open'].forEach(function (kind) { - source['on' + kind] = function (e) { if (held) { held.push([kind, e]); } else { deliver(kind, e); } }; - }); - ready.then(function () { - var q = held; - held = null; - if (ownsPage || closedRun(absolute(url))) { source.close(); return; } - q.forEach(function (x) { deliver(x[0], x[1]); }); - }); - }; - window.EventSource.CLOSED = NativeEvents.CLOSED; window.PGPUI.ready = ready; + window.PGPUI.snapshot = function () { return ownsPage ? null : snapshot; }; + window.PGPUI.reloadSnapshot = function (allowReload) { + function reload() { if (!allowReload || allowReload()) { location.reload(); } } + if (current && current.child && current.order.length) { + return transfer(true, allowReload).catch(reload); + } + reload(); + }; window.PGPUI.gateOwnsPage = function () { return ownsPage; }; // Whether the gate treats this page's person as a child (the server's one rule), for person.js's closed page. window.PGPUI.gateChild = function () { return !!(current && current.child); }; @@ -646,7 +668,7 @@ if (!current || !current.child || !byId(current, id)) { return false; } delete current.opened[id]; current.order = current.order.filter(function (x) { return x !== id; }); - ownsPage = true; eventSources.forEach(function (es) { es.close(); }); cleanPage(); transfer(); return true; + ownsPage = true; cleanPage(); transfer(); return true; }; // What the family page knows of each child's results (for the tests): "DEMO-003:known", "DEMO-005:failed" for a // child with no run here. diff --git a/assets/live/live.js b/assets/live/live.js index 50a420267..30a558881 100644 --- a/assets/live/live.js +++ b/assets/live/live.js @@ -1,10 +1,5 @@ -// live.js: the run's progress on a person's page (assets/live/index.html, served by og live serve): -// the step timeline (one line per step), the step detail, the wire of what each step found, the event -// stream and the replay, in the report's "How the run went" section. One data source feeds the page: in live mode state.json plus the run's event stream; -// with a frames.json of recorded states played on a timer. person.js draws -// the results from the same states. No outside request, no inline script, no eval. Plugins call -// window.PGP.register({name, onState, onEvent, panel, slot}); a panel goes into the element whose id -// is slot when the page has one (the search box in the header), else beside the step timeline. +// The person's run timeline, wire and detail. The live document uses one +// snapshot, and the demo plays recorded states from frames.json. (function () { 'use strict'; var root = document.documentElement; @@ -268,7 +263,7 @@ } } - function show(state) { + function show(state, results) { last = state; window.PGP.state = state; legend(); @@ -278,47 +273,90 @@ drawMap(shown(state.steps)); found(state); detail(); - plugins.forEach(function (p) { if (p.onState) { try { p.onState(state); } catch (e) { console.error(p.name, e); } } }); - root.setAttribute('data-pgp-status', 'ready'); + return Promise.all(plugins.map(function (p) { return p.onState && p.onState(state, results); })).then(function () { + root.setAttribute('data-pgp-status', 'ready'); + }); } - // --- live: state.json and the event stream --- - var timer = null; - function refresh() { - fetch('state.json', { credentials: 'same-origin', cache: 'no-store' }).then(function (r) { - if (r.status === 401) { window.location.href = '/login?next=' + encodeURIComponent(window.location.pathname); return null; } - return r.ok ? r.json() : null; - }).then(function (s) { if (s) { show(s); } }).catch(function () { root.setAttribute('data-pgp-status', 'offline'); }); - } - function later() { if (timer) { clearTimeout(timer); } timer = setTimeout(refresh, 800); } - var opens = 0; + function offline() { root.setAttribute('data-pgp-status', 'offline'); } + function live() { - refresh(); - stream(); + var U = window.PGPUI; + U.ready.then(function () { + if (U.gateOwnsPage()) { return; } + var doc = U.snapshot(); + if (!doc) { return; } + if (doc.results.awaiting_publication || doc.results.report_available === false) { document.getElementById('report-link').hidden = true; } + return show(doc.state, doc.results).then(function () { + if (doc.state.run.state === 'running') { watch(); } + }); + }).catch(offline); } - function stream() { - var es = new EventSource('events'); - root.setAttribute('data-pgp-streams', String(++opens)); - es.onmessage = function (e) { - var m; - try { m = JSON.parse(e.data); } catch (x) { return; } - // Paint at once what a new message says, then let state.json settle it. A message the - // last state.json already counted (the stream replays from the start) is not painted. - var fresh = !last || Number(e.lastEventId) > (last.events || 0); - if (fresh && m.step && (m.event === 'process_started' || m.event === 'process_submitted' || m.state === 'started')) { paint(m.step, 'running'); } - plugins.forEach(function (p) { if (p.onEvent) { try { p.onEvent(m); } catch (x) { console.error(p.name, x); } } }); - later(); - }; - // EventSource retries a dropped stream by itself, but any refusal (a 401 when the session ended, - // a 503 when every stream slot is taken) closes it for good. Then ask state.json, whose 401 goes - // to the login, and open the stream again a little later. - es.onerror = function () { - if (es.readyState === EventSource.CLOSED) { - root.setAttribute('data-pgp-status', 'offline'); - refresh(); - setTimeout(stream, 3000); - } - }; + + function watch() { + var timer = null, active = true, checking = false; + var reloadKey = 'og-snapshot-reload:' + location.pathname + ':'; + var reloadWindow = 10000; + var hash = '"' + root.getAttribute('data-pgp-snapshot') + '"'; + function visible() { return document.visibilityState === 'visible'; } + function schedule() { + clearTimeout(timer); + if (active && !checking && visible()) { timer = setTimeout(check, 5000); } + } + function changed() { + root.setAttribute('data-pgp-status', 'stale'); + var note = el('p', { id: 'snapshot-changed', 'class': 'muted', role: 'status' }, 'Results changed. '); + var button = el('button', { type: 'button' }, 'Reload'); + button.addEventListener('click', function () { window.PGPUI.reloadSnapshot(); }); + note.appendChild(button); + document.getElementById('content').prepend(note); + } + function stop() { + active = false; + document.removeEventListener('visibilitychange', schedule); + } + function changedWhileActive(next) { + var now = performance.timeOrigin + performance.now(); + try { + if (sessionStorage.getItem(reloadKey + next)) { stop(); changed(); return; } + if (now < Number(sessionStorage.getItem(reloadKey + 'last')) + reloadWindow) { return; } + } catch (e) { stop(); changed(); return; } + stop(); + window.PGPUI.reloadSnapshot(function () { + if (!visible()) { changed(); return false; } + try { + sessionStorage.setItem(reloadKey + next, '1'); + sessionStorage.setItem(reloadKey + 'last', String(performance.timeOrigin + performance.now())); + } catch (e) { changed(); return false; } + root.setAttribute('data-pgp-status', 'loading'); + return true; + }); + } + function check() { + if (!active || checking || !visible()) { return; } + checking = true; + fetch('snapshot.json', { method: 'HEAD', credentials: 'same-origin', cache: 'no-store' }).then(function (r) { + if (r.status === 401) { + if (visible()) { location.href = '/login?next=' + encodeURIComponent(location.pathname); } + return; + } + var next = r.headers.get('ETag'); + var running = r.headers.get('X-Run-Active'); + if (!r.ok || !/^"[a-f0-9]{64}"$/.test(next || '') || (running !== 'true' && running !== 'false')) { + throw new Error('snapshot check failed'); + } + if (running === 'false') { + stop(); + if (next !== hash) { changed(); } + } else if (next !== hash && visible()) { + changedWhileActive(next); + } else if (next === hash) { + root.setAttribute('data-pgp-status', 'ready'); + } + }).catch(offline).finally(function () { checking = false; schedule(); }); + } + document.addEventListener('visibilitychange', schedule); + schedule(); } // --- replay: frames.json on a timer --- @@ -346,7 +384,7 @@ var time = document.getElementById('replay-time'); time.textContent = frameTime(frames[at].t); time.title = frames[at].t || ''; - show(frames[at].state); + Promise.resolve().then(function () { return show(frames[at].state); }).catch(offline); root.setAttribute('data-pgp-frame', String(at)); } function stop() { if (tick) { clearInterval(tick); tick = null; } play.textContent = 'Play'; } diff --git a/assets/live/person.js b/assets/live/person.js index 7b17866a0..721b36bdb 100644 --- a/assets/live/person.js +++ b/assets/live/person.js @@ -16,7 +16,7 @@ var U = window.PGPUI, el = U.el, add = U.add; var root = document.documentElement; var replay = root.getAttribute('data-mode') === 'replay'; - var results = null, state = null, family = null, familyFor = null, fetchedFor = null, drawnKey = null, folded = false; + var results = null, state = null, family = null, familyFor = null, familyRead = null, replayRead = null, folded = false; // 'none': in no family; 'pending' or 'failed': in one whose roles are not known (yet); 'known'. var familyStatus = 'none'; var openingSeeded = false; @@ -33,10 +33,6 @@ ((state && state.steps) || []).forEach(function (s) { by[s.step] = s; }); return by; } - function doneSet() { - return ((state && state.steps) || []).filter(function (s) { return s.state === 'done'; }) - .map(function (s) { return s.step; }).join(','); - } function running() { return !!(state && state.run && state.run.state === 'running'); } // What a card can show at this moment: 'show', 'waiting' (a step still to come), 'running' (one of its // steps runs now), 'failed', 'notrun' (none planned) or 'empty' (its steps ended and wrote nothing). @@ -85,21 +81,20 @@ function loadFamily() { var f = familyUrl(); var key = f ? f.url : (familyUnknown() ? '?' : null); - if (key === familyFor) { return; } + if (key === familyFor) { return familyRead; } familyFor = key; - if (!f) { family = null; familyStatus = key ? 'failed' : 'none'; return; } + if (!f) { family = null; familyStatus = key ? 'failed' : 'none'; familyRead = null; return; } familyStatus = 'pending'; - U.getJSON(f.url + 'family.json').then(function (d) { + familyRead = U.getJSON(f.url + 'family.json').then(function (d) { if (familyFor !== key) { return; } family = d && d.state ? { name: f.name, url: f.url, data: d } : null; familyStatus = family ? 'known' : 'failed'; - redraw(true); }).catch(function () { - if (familyFor !== key) { return; } // a late answer for a family this page no longer shows + if (familyFor !== key) { return; } family = null; familyStatus = 'failed'; - redraw(true); }); + return familyRead; } function me() { var ms = (family && family.data.state && family.data.state.members) || []; @@ -511,7 +506,7 @@ function setShown(id, on) { if (!on && U.closeAct(id)) { return; } shown[id] = !!on; - redraw(true); + render(); } // Whether the page shows a finding of the map at this moment: its card's steps are done (a replay draws // the run's end results from its first frame). A row with no finding of these results (the map's own APOE @@ -839,7 +834,8 @@ // reader left it. It asks this page's veil for each row, and opens or closes a result through it. if (window.PGPMap) { if (!genomeMap) { - genomeMap = window.PGPMap.create({ url: 'map.json', veil: mapVeil, now: mapNow, known: mapKnown, stepDone: stepDone, open: function (id) { setShown(id, true); }, + var mapUrl = replay ? 'map.json' : 'map.json?snapshot=' + encodeURIComponent(resultsKey); + genomeMap = window.PGPMap.create({ url: mapUrl, veil: mapVeil, now: mapNow, known: mapKnown, stepDone: stepDone, open: function (id) { setShown(id, true); }, close: function (id) { setShown(id, false); }, fallback: mapFallback }); } add(slot, genomeMap.node); @@ -1079,45 +1075,21 @@ // The redraw keeps every fold as the reader left it, the phone's folds too when the page went wide // and back (foldState); open the ones around the place the address names as well, without scrolling // back to it (the reader may be elsewhere now). - var redrawWide = function () { if (results) { redraw(true); var t = routeTarget(); if (t) { openAround(t); } } }; + var redrawWide = function () { if (results) { render(); var t = routeTarget(); if (t) { openAround(t); } } }; if (phoneQuery.addEventListener) { phoneQuery.addEventListener('change', redrawWide); } else if (phoneQuery.addListener) { phoneQuery.addListener(redrawWide); } } - // --- data --------------------------------------------------------------------------------------- - function load() { - var key = replay ? 'replay' : doneSet() + '|' + ((state && state.results_stamp) || ''); - if (key === fetchedFor) { return; } - fetchedFor = key; - U.getJSON('results.json').then(function (r) { - if (key !== fetchedFor) { return; } - // Results carry their chapters as a list, or only a note; chapters of any other shape would throw while - // drawing, after results was set, and leave a broken report. - if (!(r && (Array.isArray(r.chapters) || (!r.chapters && r.note)))) { notLoaded(key); return; } - unloaded = false; - results = r; - resultsKey = key; - redraw(true); - route(); - }).catch(function () { notLoaded(key); }); - } - // A failed read (an error answer, no answer, or one that is not results) is asked again on the next state. - // While nothing is drawn the report says it could not load them: a finished run never reads as a report with - // no results. Results already drawn stay as they are. data-pgp-status stays live.js's: it tells whether the - // run's state arrived, which it did. - function notLoaded(key) { - if (key !== fetchedFor) { return; } - fetchedFor = null; - if (results) { return; } - unloaded = true; - drawSections(); - } - function retry() { - unloaded = false; - fetchedFor = null; - panel.textContent = ''; - add(panel, el('p', { 'class': 'dim' }, 'Loading the results.')); - load(); + function replayResults() { + if (!replayRead) { + replayRead = U.getJSON('results.json').then(function (r) { + if (!r || !(Array.isArray(r.chapters) || (!r.chapters && r.note))) { throw new Error('replay results unavailable'); } + return r; + }); + } + return replayRead; } + + function retry() { window.location.reload(); } // Every fold of the report as the reader left it, open or closed, by a key that names the same fold in // the next drawing: its data-card (a finding's caveat "More" carries its finding's id), else the element // with an id around it, its class and its place among the folds of that class there (a card's "other @@ -1138,13 +1110,7 @@ } function keepFolds() { foldKeys().forEach(function (x) { foldState[x[0]] = x[1].open; }); } function restoreFolds() { foldKeys().forEach(function (x) { if (foldState[x[0]]) { x[1].open = true; } }); } - function redraw(force) { - var k = JSON.stringify([doneSet(), state && state.run && state.run.state, !!results, !!family, familyStatus, Object.keys(shown), - state && state.plugins && state.plugins.recheck && state.plugins.recheck.mtime, - // Every step's state: one can move from waiting to not finished with the done set unchanged. - ((state && state.steps) || []).map(function (s) { return s.step + ':' + s.state; })]); - if (!force && k === drawnKey) { header(); return; } - drawnKey = k; + function render() { var y = window.scrollY; keepFolds(); header(); @@ -1167,12 +1133,20 @@ window.PGP.register({ name: 'person', - onState: function (s) { + onState: function (s, recorded) { if (!openingSeeded) { shown = U.openedActs(); openingSeeded = true; } state = s; - loadFamily(); - if (!replay || !results) { load(); } - redraw(false); + return Promise.all([loadFamily(), replay ? replayResults() : recorded]).then(function (parts) { + results = parts[1]; + resultsKey = replay ? 'replay' : root.getAttribute('data-pgp-snapshot'); + render(); + route(); + }).catch(function (error) { + unloaded = true; + results = null; + drawSections(); + throw error; + }); } }); }()); diff --git a/assets/live/plugins/charts.js b/assets/live/plugins/charts.js index 3d208c41c..ae78c6472 100644 --- a/assets/live/plugins/charts.js +++ b/assets/live/plugins/charts.js @@ -127,12 +127,13 @@ function onState(state) { var c = state && state.plugins && state.plugins.charts; if (!list || !c) { return; } + if ('data' in c) { draw(c.data); return; } if (!c.file) { // The file went away (step 24 deletes it before it writes the report again). if (shownKey !== null) { clear(); } return; } - var key = c.file + '@' + c.mtime; + var key = c.file; if (key === shownKey) { return; } shownKey = key; fetch(encodeURIComponent(c.file), { credentials: 'same-origin', cache: 'no-store' }) diff --git a/assets/live/plugins/recheck.js b/assets/live/plugins/recheck.js index fcbe5928d..5f050b29d 100644 --- a/assets/live/plugins/recheck.js +++ b/assets/live/plugins/recheck.js @@ -8,8 +8,7 @@ 'use strict'; if (!window.PGP) { return; } var NS = 'http://www.w3.org/2000/svg'; - // shownKey starts undefined, so the first state draws the panel even when it has no re-check (null). - var banner = null, list = null, shownKey; + var banner = null, list = null; function el(tag, attrs, text) { var e = document.createElement(tag); @@ -54,11 +53,8 @@ Array.prototype.forEach.call(document.querySelectorAll('#map g.box'), function (g) { mark(g.getAttribute('data-step'), steps[g.getAttribute('data-step')]); }); - var key = r && r.file ? r.file + '@' + r.mtime : null; - if (key === shownKey) { return; } - shownKey = key; list.textContent = ''; - if (!key) { + if (!r || !r.file) { banner.textContent = 'No re-check yet: bin/og recheck writes one (docs/recheck.md).'; document.documentElement.removeAttribute('data-owngenome-recheck'); return; diff --git a/assets/live/plugins/search.js b/assets/live/plugins/search.js index cc5c48de4..5e59e3854 100644 --- a/assets/live/plugins/search.js +++ b/assets/live/plugins/search.js @@ -142,9 +142,19 @@ if (note) { out.appendChild(note); } } + function useIndex(data) { + if (!data || !data.terms) { return; } + index = data; + input.disabled = false; + input.placeholder = 'Gene or rsID, like BRCA2'; + status.textContent = Object.keys(data.terms).length + ' genes and rsIDs in these results. Typing searches them here, in this browser.'; + show(); + } + function onState(state) { var c = state && state.plugins && state.plugins.search; if (!out || !c) { return; } + if ('data' in c) { useIndex(c.data); return; } if (!c.file) { // The file went away (step 24 deletes it before it writes the report again). if (shownKey !== null) { @@ -152,7 +162,7 @@ } return; } - var key = c.file + '@' + c.mtime; + var key = c.file; if (key === shownKey) { return; } shownKey = key; fetch(encodeURIComponent(c.file), { credentials: 'same-origin', cache: 'no-store' }) @@ -163,13 +173,7 @@ return r.json(); }) .then(function (data) { - if (key !== shownKey || !data || !data.terms) { return; } - index = data; - input.disabled = false; - input.placeholder = 'Gene or rsID, like BRCA2'; - status.textContent = Object.keys(data.terms).length + ' genes and rsIDs in these results. Typing searches them here, ' - + 'in this browser.'; - show(); + if (key === shownKey) { useIndex(data); } }) .catch(function () { if (key === shownKey) { shownKey = null; } }); } diff --git a/docs/16b-mosdepth.md b/docs/16b-mosdepth.md index e400a2ef2..7d46ee90a 100644 --- a/docs/16b-mosdepth.md +++ b/docs/16b-mosdepth.md @@ -91,9 +91,13 @@ Shows what fraction of each region is covered at key depths: A gene can have several reasons. Gene positions are GENCODE 50 gene spans. The `owner` column names the step that calls the gene with a method of its own: `parascopy` (step 35, the genes of `assets/paralog_loci.tsv`), `pypgx` (step 32, the bam genes of `assets/pgx_genes.tsv` it can call on the no-ALT reference, so not GSTT1) or `cn_loci:` (the depth engine, `bin/cn_loci.tsv`: the genes a row names, HBA1, HBA2, LPA and RHD, not a gene that only holds one of its targets); `.` for none. -A gene counts as **read** when 90% or more of its bases have 10 or more reads of MAPQ 20 or more. The gene pass runs mosdepth without `--fast-mode`, so a base where the two mates of one pair overlap counts one read, not two, and a base inside a deletion of a read's CIGAR counts no read. With `--fast-mode` mosdepth counts every base from a read's start to its end once per read: short-insert pairs, whose mates overlap, and small deletions lift a base to 10x when fewer than 10 fragments read it, and the gene reads as read. The genome-wide pass (the 500 bp windows and their thresholds) keeps `--fast-mode`: it describes the run's depth, and nothing is decided per gene from it. Both reports have a section "Genes this genome could not read reliably" in the Quality chapter. It lists every gene with no owner that was not read, with the share of its bases that reached that depth, and every ALT-only gene with no owner as "not on this reference". Genes with an owner that were not read are listed apart: their own step's section says what it called. In `summary.json` each of them (`not_read_owned`) also names that step (`owner_step`: `35` for Parascopy and the HBA, CYP21A2, HP and CCL3L1 rows of the depth engine, `32` for pypgx, `46` for LPA, `41` for RHD) and says whether it ran for this sample (`owner_status`: `ran`, `not run` or `from an earlier run`). A step ran when it wrote the gene's file in the sample folder: for a Parascopy gene its own table, `paralogs/__copy_number.tsv` with the `table` of its row in `assets/paralog_loci.tsv` (the `smn` table for SMN1 and SMN2), `pypgx/_pypgx_summary.tsv`, `paralogs/_hba_copy_number.tsv`, `_cyp21a2_psv.tsv` or `_cn_dosage.tsv`, `lpa/_lpa_kiv2.tsv`, or `bloodtype/_bloodtype.tsv`. A file older than the start of the last run, from a step that was not `ok` in that run (`logs/run_status.tsv`), is `from an earlier run`: the rule that makes a section of `summary.json` stale. A gene whose own step did not run has no answer from it, only its coverage here. The share is the share of bases at the depth, to four decimals. On a partial BAM (the CI fixture, an exome) most genes are not read, because they have no reads at all. +A gene counts as **read** when 90% or more of its bases have 10 or more reads of MAPQ 20 or more. The gene pass runs mosdepth without `--fast-mode`, so a base where the two mates of one pair overlap counts one read, not two, and a base inside a deletion of a read's CIGAR counts no read. With `--fast-mode` mosdepth counts every base from a read's start to its end once per read: short-insert pairs, whose mates overlap, and small deletions lift a base to 10x when fewer than 10 fragments read it, and the gene reads as read. The genome-wide pass (the 500 bp windows and their thresholds) keeps `--fast-mode`: it describes the run's depth, and nothing is decided per gene from it. Both reports have a section "Genes this genome could not read reliably" in the Quality chapter. It lists every gene with no owner that was not read, with the share of its bases that reached that depth, and every ALT-only gene with no owner as "not on this reference". Genes with an owner that were not read are listed apart: their own step's section says what it called. In `summary.json` each of them (`not_read_owned`) also names that step (`owner_step`: `35` for Parascopy and the HBA, CYP21A2, HP and CCL3L1 rows of the depth engine, `32` for pypgx, `46` for LPA, `41` for RHD) and says whether it ran for this sample (`owner_status`: `ran`, `not run` or `from an earlier run`). A step ran when it wrote the gene's file in the sample folder: for a Parascopy gene its own table, `paralogs/_
_copy_number.tsv` with the `table` of its row in `assets/paralog_loci.tsv` (the `smn` table for SMN1 and SMN2), `pypgx/_pypgx_summary.tsv`, `paralogs/_hba_copy_number.tsv`, `_cyp21a2_psv.tsv` or `_cn_dosage.tsv`, `lpa/_lpa_kiv2.tsv`, or `bloodtype/_bloodtype.tsv`. A file older than the start of the last run, from a step that was not `ok` in that run (`logs/run_status.tsv`), is `from an earlier run`: the rule that makes a section of `summary.json` stale. A gene whose own step did not run has no answer from it, only its coverage here. The body and exon shares in `summary.json` are normally rounded to four decimal places. The collector keeps extra digits if rounding would turn a positive share into zero or move an unread share up to the cutoff. On a partial BAM (the CI fixture, an exome) most genes are not read, because they have no reads at all. -A gene also needs each of its **coding exons** read. 90% of a whole gene body can reach 10x while one exon has no read at all: the introns are most of the body, so a whole exon can fail and the gene still pass. `assets/callability_exons.tsv` lists the coding exons of each catalog gene with a position: the CDS records of the gene's MANE Select transcript in GENCODE 50, each with 2 bases more on both sides for the splice site, named `GENE:exonN` by the transcript's exon number. `scripts/ci/build-callability.sh` writes it beside the gene table from the same pinned GTF, and a CI case rebuilds it and fails on any difference. It has 11,888 exons of 1,501 genes; 52 catalog genes with a position have no MANE Select CDS on chr1-22, X or Y and are judged on their body alone: a gene whose MANE Select transcript codes no protein (H19), one whose MANE Select transcript sits on a patch or ALT scaffold of GRCh38 (ABO, NBPF1, GSTT2), and one GENCODE gives no MANE Select tag (MUC1, the T-cell receptor segment TRBV9). The exons ride in the gene pass: mosdepth reads the BAM once and measures each region on its own, and step 16b writes the rows named `GENE:exonN` to `_callability_exons.bed.gz` and the gene rows to `_callability.bed.gz`. The two tables stay apart because the report keys gene rows by name. A gene whose body reached the share but one of whose coding exons did not is **not read**: `summary.json` lists it with `status` `exon not read`, the share of its body, and `worst_exon` (`exon`, `share`), its exon with the lowest share. The text and HTML reports list it with the genes not read, with the share of its body and that exon with its own share, as in `GENE (95.0%; exon GENE:exon3 not read, 41.0%)`. The live page names the exon in its Status column. A gene not read on its body also names its worst exon when one is under the share. `exons_checked` counts the exon rows of catalog genes the table held. A folder without the exon table (one from before it existed) gives the summary it gave before: no gene is judged by its exons and neither key appears. +Text, HTML, live results and the OwnHealth export show body and exon percentages to one decimal place. A measured zero displays as 0.0%. A positive share smaller than 0.1% displays as less than 0.1%, with the exact cutoff shown when needed to distinguish its side. The collector writes the cutoff as `min_share: 0.9`. Saved summaries support cutoffs from 0 to 1 with up to 15 decimal places after accounting for any exponent and trailing zeros. Readers reject a cutoff outside that range or precision. Text and HTML show the accepted cutoff exactly. When a current saved summary has an unsupported cutoff, the live results page shows the validation error. An absent or stale summary triggers a fresh collection. + +The reports, live results, and OwnHealth read the saved caller status. A dedicated step counts as a current result only when it is marked `ran`. A missing or null `owner_status` appears as unknown. In OwnHealth, positive body coverage or a current dedicated result provides partial evidence for a catalogue-only row. Fixed-panel rows keep their panel assessment and include the saved caller status in the coverage note. The live callability table reserves up to 200 rows each for genes with and without a dedicated caller. + +A gene also needs each of its **coding exons** read. 90% of a whole gene body can reach 10x while one exon has no read at all: the introns are most of the body, so a whole exon can fail and the gene still pass. `assets/callability_exons.tsv` lists the coding exons of each catalog gene with a position: the CDS records of the gene's MANE Select transcript in GENCODE 50, each with 2 bases more on both sides for the splice site, named `GENE:exonN` by the transcript's exon number. `scripts/ci/build-callability.sh` writes it beside the gene table from the same pinned GTF, and a CI case rebuilds it and fails on any difference. It has 11,888 exons of 1,501 genes; 52 catalog genes with a position have no MANE Select CDS on chr1-22, X or Y and are judged on their body alone: a gene whose MANE Select transcript codes no protein (H19), one whose MANE Select transcript sits on a patch or ALT scaffold of GRCh38 (ABO, NBPF1, GSTT2), and one GENCODE gives no MANE Select tag (MUC1, the T-cell receptor segment TRBV9). The exons ride in the gene pass: mosdepth reads the BAM once and measures each region on its own, and step 16b writes the rows named `GENE:exonN` to `_callability_exons.bed.gz` and the gene rows to `_callability.bed.gz`. The two tables stay apart because the report keys gene rows by name. A gene whose body reached the share but one of whose coding exons did not is **not read**: `summary.json` lists it with `status` `exon not read`, the share of its body, and `worst_exon` (`exon`, `share`), its exon with the lowest share. The text and HTML reports list it with the genes not read, with the share of its body and that exon with its own share, as in `GENE (95.0%; exon GENE:exon3 not read, 41.0%)`. The live page names the exon in its Status column, including for genes with a dedicated caller. A gene not read on its body also names its worst exon when one is under the share. `exons_checked` counts the exon rows of catalog genes the table held. A folder without the exon table (one from before it existed) gives the summary it gave before: no gene is judged by its exons and neither key appears. `CALLABILITY_GENES` names another table with the same columns (the CI case uses a two-gene one), and `CALLABILITY_EXONS` another exon table; only the exons of the genes of the gene table are measured, so a gene table none of whose genes the exon table names writes no exon table. A table from an older catalog, one that lacks a gene of the current catalog, makes the section unreadable: run step 16b again. When only `_callability.bed.gz` is missing, or only `_callability_exons.bed.gz` while the exon table names a gene of the gene table, step 16b runs the gene pass alone. diff --git a/docs/50-mei.md b/docs/50-mei.md index 693fd4315..08ebc3f04 100644 --- a/docs/50-mei.md +++ b/docs/50-mei.md @@ -2,7 +2,7 @@ ## What This Does -Finds the copies of Alu, L1 (LINE-1) and SVA elements that the genome carries and the reference does not, and genotypes each one as one or two copies, with MEGAnE ([Kojima et al. 2023](https://pubmed.ncbi.nlm.nih.gov/37169872/), Nat Genet). Then it reads a short catalog of insertions known to cause disease as seen, call filtered out, not seen, or not callable. Opt-in. +Finds the copies of Alu, L1 (LINE-1) and SVA elements that the genome carries and the reference does not, and genotypes each one as one or two copies, with MEGAnE ([Kojima et al. 2023](https://pubmed.ncbi.nlm.nih.gov/37169872/), Nat Genet). Then it reads a short catalog of insertions known to cause disease as seen, call filtered out, not seen, or not assessed. Opt-in. Mobile elements are pieces of DNA that copy themselves into new places. In the 1000 Genomes Project each genome carried a median of about 1,200 insertions that the reference lacks, most of them Alu ([Sudmant et al. 2015](https://pubmed.ncbi.nlm.nih.gov/26432246/)), nearly all common and harmless. A few land in a gene and break it: @@ -90,7 +90,7 @@ With `run-all.sh`: `TOOLS=...,mei`; a run lists step 50 only when `TOOLS` names 3. MEGAnE writes `MEI_final_percentile_genotyped.vcf`, the file its log recommends for one sample. When it finds too few insertions to fit its filter thresholds (a BAM of one chromosome), it writes `MEI_final_failed_genotyped.vcf` with fixed thresholds instead; the step then uses that file and prints a warning. 4. `og mei report` keeps the Alu, L1 and SVA insertions that MEGAnE identified (`MEPRED=PASS`) with one or two copies. Other repeat classes in MEGAnE's VCF (DNA transposons, old LTRs) are left out: none is active in human genomes, so a call of one is read as an artefact. 5. With AnnotSV's data, `og mei annotsv-input` writes the kept insertions as the VCF AnnotSV reads, one `` record each with `END` at its position and an ID the table is joined on, and AnnotSV annotates them as [step 05](05-annotsv.md) does the other SVs (`-annotationMode both`, the MANE Select transcripts). MEGAnE gives no inserted length, so AnnotSV takes each insertion as a point and skips its minimum-size check. -6. Each catalog row is **seen** when a kept insertion of the same element lies in its window and passed MEGAnE's own filters (FILTER `PASS`). When the only such insertions in the window are ones MEGAnE flagged (FILTER `LC`, low confidence, or another flag), the row reads **call filtered out** with the flags, for example `call filtered out (LC)`, and names the first of them in `call`: MEGAnE saw something there but did not trust it, so it is neither seen nor not seen. Without any such insertion, the row is **not callable** when the BAM has no reads of that contig or the mean depth over the window is under 10 (zero included), and **not seen** otherwise. The 10x is this pipeline's choice, not a published value. +6. Each catalog row is **seen** when a kept insertion of the same element lies in its window and passed MEGAnE's own filters (FILTER `PASS`). When the only such insertions in the window are ones MEGAnE flagged (FILTER `LC`, low confidence, or another flag), the row reads **call filtered out** with the flags, for example `call filtered out (LC)`, and names the first of them in `call`: MEGAnE saw something there but did not trust it, so it is neither seen nor not seen. Without any such insertion, the row is **not assessed** when the BAM has no reads of that contig or the mean depth over the window is under 10 (zero included), and **not seen** otherwise. The 10x is this pipeline's choice, not a published value. ## Output @@ -98,12 +98,12 @@ With `run-all.sh`: `TOOLS=...,mei`; a run lists step 50 only when `TOOLS` names |---|---| | `mei/${SAMPLE}_mei.tsv` | one row per insertion: `chrom`, `pos`, `end` (MEGAnE's right breakpoint), `element` (Alu, L1, SVA), `subfamily` (for example AluYa5, L1HS, SVA_F), `copies` (1 or 2), `filter` (MEGAnE's FILTER: `PASS`, or flags such as `LC`, low confidence), `confidence` (`H` or `L`, how sure the copy number is), and from AnnotSV: `genes` (the genes the insertion falls in), `location` (each gene with where in it: `exon3`, `intron2-intron2`, ...), `benign_af` (`B_ins_AFmax`, the highest allele frequency of a benign insertion at that place in AnnotSV's benign set, gnomAD-SV among them) and `acmg_class` (AnnotSV's `ACMG_class`). All four are `.` without AnnotSV's data, and for a call AnnotSV did not annotate. A `benign_af` of `.` means the frequency is missing. This covers a blank `B_ins_AFmax` value or a configuration that omits the column. AnnotSV reports the frequency of an enclosing benign insertion that meets `-benignAF`, whose configurable default is 1%. | | `mei/${SAMPLE}_mei_annotsv.tsv` | AnnotSV's own table of those insertions, with AnnotSV's data only | -| `mei/${SAMPLE}_mei_sites.tsv` | the catalog with `status` (seen, `call filtered out (FLAGS)`, not seen, not callable), `mean_depth` over the window and `call` (the insertion seen, or the flagged one: position, subfamily, copies, filter) | +| `mei/${SAMPLE}_mei_sites.tsv` | the catalog with `status` (seen, `call filtered out (FLAGS)`, not seen, not assessed), `mean_depth` over the window and `call` (the insertion seen, or the flagged one: position, subfamily, copies, filter) | | `mei/${SAMPLE}_megane.vcf` | MEGAnE's VCF as it wrote it | | `mei/${SAMPLE}_mei_depth.tsv` | `samtools bedcov -c` over the catalog windows | | `mei/${SAMPLE}_megane.log` | MEGAnE's log | -Both reports show the count per element and the catalog in their "Mobile element insertions" section; the AnnotSV columns are in the calls table only. The note under the section says what each status means: not callable is too few reads to tell, not seen is not proof of absence, and call filtered out is an insertion MEGAnE called but flagged (`LC` is low confidence), so it is not a finding and not proof of absence either. +Both reports show the count per element and the catalog in their "Mobile element insertions" section; the AnnotSV columns are in the calls table only. The note under the section says what each status means: not assessed is too few reads to tell, not seen is not proof of absence, and call filtered out is an insertion MEGAnE called but flagged (`LC` is low confidence), so it is not a finding and not proof of absence either. AnnotSV classifies deletions and duplications only. In AnnotSV 3.5 the ranking of an insertion is empty (`SVrankingINS` in its `AnnotSV-ranking.tcl` scores nothing), so `acmg_class` is `NA` for every insertion. Read an insertion by its gene and location instead: one inside an exon can break the gene; most in introns or between genes do nothing, though some do (the TAF1 SVA above is intronic). A `benign_af` above a few percent means insertions at that place are common. A `benign_af` of `.` leaves the frequency unknown. AnnotSV reports a frequency when an enclosing benign record meets the cutoff. The configurable default for `-benignAF` is 1%. Without step 50, the report lists mobile element insertions under what the run did not assess. @@ -113,7 +113,7 @@ On HG002's chr20 at 30x (13 million mapped reads) on a 4-CPU GitHub runner, MEGA ## Validation -The e2e case `tests/e2e/mei-1.sh` runs the step on HG002's chr20: the reads of chr20 in GIAB's 60x novoalign BAM, half the pairs (30x), realigned with minimap2 to chr20 alone, the unmapped reads dropped (so the case fits a runner's time), and the k-mer set of that chromosome. Its Alu calls are scored against the GIAB v5.0q insertions of HG002 on chr20 (RepeatMasker SINE/Alu, interspersed, 250 to 400 bp, inside the benchmark regions): recall must be at least 0.70 and precision at least 0.80, within 100 bp. On 2026-10-27 it found 12 of the 15 insertions (0.80), and 13 of its 15 Alu calls inside the benchmark regions matched a GIAB insertion (0.87); with the unmapped reads kept, the same 12 of 15 and 13 of 15. With every read pair within 1 kb of a GIAB Alu insertion removed, it found 0 of 15 and the recall check failed. The same case then runs AnnotSV on the calls with made-up AnnotSV data (the bundle of `tests/fixtures/annotsv/class45.sh` plus one made-up gene over all of chr20) and checks that every call comes back inside that gene, with its location there and class `NA`; the same VCF read without AnnotSV's table fails that check. It also runs the Nextflow pipeline with `--tools mei` and `--annotsv_annotations` on the same BAM and checks that its calls table is the bash step's, byte for byte. `rust/crates/og-reports/tests/optin_mei.rs` plants an SVA in the FKTN window of a synthetic MEGAnE VCF and checks it is seen, and not seen without it, and joins a table in AnnotSV's columns back to the calls. `rust/crates/og-reports/tests/i411_mei_seen_pass.rs` checks that an SVA there that MEGAnE flagged `LC` reads `call filtered out (LC)`, not seen, that a `PASS` call in the same window wins over a flagged one, and that a window with zero depth and no call reads not callable, never not seen. The parity cases `mei-report/filtered` and `mei-report/filtered-pass` (`tests/parity/cases.tsv`) record the same two readings against the Python that `og mei report` replaced, which read any call in the window as seen: each has a golden sites table under `tests/parity/golden/mei-report/`. `rust/crates/og-render/tests/i411_mei_filtered_status_docs.rs` checks that both reports show a `call filtered out (LC)` row with the note that explains it. +The e2e case `tests/e2e/mei-1.sh` runs the step on HG002's chr20: the reads of chr20 in GIAB's 60x novoalign BAM, half the pairs (30x), realigned with minimap2 to chr20 alone, the unmapped reads dropped (so the case fits a runner's time), and the k-mer set of that chromosome. Its Alu calls are scored against the GIAB v5.0q insertions of HG002 on chr20 (RepeatMasker SINE/Alu, interspersed, 250 to 400 bp, inside the benchmark regions): recall must be at least 0.70 and precision at least 0.80, within 100 bp. On 2026-10-27 it found 12 of the 15 insertions (0.80), and 13 of its 15 Alu calls inside the benchmark regions matched a GIAB insertion (0.87); with the unmapped reads kept, the same 12 of 15 and 13 of 15. With every read pair within 1 kb of a GIAB Alu insertion removed, it found 0 of 15 and the recall check failed. The same case then runs AnnotSV on the calls with made-up AnnotSV data (the bundle of `tests/fixtures/annotsv/class45.sh` plus one made-up gene over all of chr20) and checks that every call comes back inside that gene, with its location there and class `NA`; the same VCF read without AnnotSV's table fails that check. It also runs the Nextflow pipeline with `--tools mei` and `--annotsv_annotations` on the same BAM and checks that its calls table is the bash step's, byte for byte. `rust/crates/og-reports/tests/optin_mei.rs` plants an SVA in the FKTN window of a synthetic MEGAnE VCF and checks it is seen, and not seen without it, and joins a table in AnnotSV's columns back to the calls. `rust/crates/og-reports/tests/i411_mei_seen_pass.rs` checks that an SVA there that MEGAnE flagged `LC` reads `call filtered out (LC)`, not seen, that a `PASS` call in the same window wins over a flagged one, and that a window with zero depth and no call reads not assessed, never not seen. The parity cases `mei-report/filtered` and `mei-report/filtered-pass` (`tests/parity/cases.tsv`) record the same two readings against the Python that `og mei report` replaced, which read any call in the window as seen: each has a golden sites table under `tests/parity/golden/mei-report/`. `rust/crates/og-render/tests/i411_mei_filtered_status_docs.rs` checks that both reports show a `call filtered out (LC)` row with the note that explains it. ## Notes diff --git a/docs/design/journal/BRIEF.md b/docs/design/journal/BRIEF.md index bf9d854cf..06bd3fe11 100644 --- a/docs/design/journal/BRIEF.md +++ b/docs/design/journal/BRIEF.md @@ -54,7 +54,7 @@ The site has to show the result families below. The report already groups them i | Variant prioritisation (31 slivar) | 4 groups; compound-het pairs with phase (trans/cis/unknown) | expert; most pairs are noise | info | phase is mostly unknown | | Symptom ranking (48 Exomiser, opt-in) | top 10: rank, gene, score, mode of inheritance, variants, ACMG class; the HPO terms used | a ranking to take to a geneticist | review | not a diagnosis; an empty list rules nothing out | | Structural variants (04/15/18/19/22/05) | type (DEL, DUP, INV, BND, INS), position, length, genotype, supporting callers, duphold DHFFC/DHBFC, AnnotSV class 1-5, genes, CDS overlap %, gnomAD-SV AF; counts per caller | 5-10k SVs is normal. **Only class 4-5 in a disease gene matters.** Single-caller BND calls are mostly artefacts | act (class 4-5) / info | short reads miss insertions and inversions | -| Mobile elements (50, opt-in) | 3 catalogued sites (FKTN, TAF1, BBS1): seen / call filtered out / not seen / not callable; about 1,200 Alu/L1/SVA calls | "not seen" is not proof of absence; "call filtered out" is a call MEGAnE flagged, not a finding | carrier / review | none | +| Mobile elements (50, opt-in) | 3 catalogued sites (FKTN, TAF1, BBS1): seen / call filtered out / not seen / not assessed; about 1,200 Alu/L1/SVA calls | "not seen" is not proof of absence; "call filtered out" is a call MEGAnE flagged, not a finding | carrier / review | none | | Repeat expansions (09/09b) | locus, gene, two allele counts with 95% CI, Stranger status (normal, pre_mutation, full_mutation), normal max, pathogenic min, sized or flanking-only | HTT, FMR1, C9orf72, DMPK and ATXN1 first. **Intermediate = no disease, may expand in children. Full mutation = see a clinical geneticist.** An unsized locus is never shown as normal | act (full) / review (pre or intermediate) / info | short-read sizing fails on long expansions; C9orf72 thresholds vary between labs | | MUC1 VNTR (52, opt-in) | positive / possible / negative / not assessed, sensitivity at this depth | ADTKD-MUC1, a kidney disease | act (positive) / review (possible) | needs confirmation (SNaPshot) | | Mito variants (20) | site, allele fraction (heteroplasmy), ClinVar class, gnomAD AF; poly-C length variants listed apart | above 95% = haplogroup marker; 10-95% = look it up; m.3243A>G or m.8344A>G = specialist | act / review / info | blood under-represents heteroplasmy in other tissues | diff --git a/docs/live-site.md b/docs/live-site.md index 000ca1f54..3f65063b6 100644 --- a/docs/live-site.md +++ b/docs/live-site.md @@ -129,7 +129,7 @@ The reads cross the network to the browser that logged in: only the byte ranges `GET /` lists the runs: each folder under `GENOME_DIR` holding `logs/run_status.tsv`, `nextflow/` or `run_manifest.tsv`, and each run the site has messages for. The home page reads `/runs.json`: each run's progress and attention count, and each family with its members and `unreadable` (whether a file of its folder cannot be read now). A run with results also has `levels` (its findings counted by level), `top` (up to four findings to show first, data-quality problems first: id, level, title; a finding that names a result to act on, such as a symptom ranking of its gene, is never among them), `lead` (its lead paragraph as plain text), `lead_closed` (the same with the names of the findings to act on left out, and every other part that names one, for a child's tile) and `screened` (whether ClinVar, the clinical filter or CPSR has a result; without one the home page never says that no finding needs a doctor). While a run goes these come from the summary its page last read, as long as no step has finished and `summary.json` has not changed since that read, so the home page never shows less than the person page. While a family's members cannot be read, the home page keeps the findings to act on closed for every run, by the gate's rule above. For a child with a result to act on in either summary, these fields come from the summary the child's `results.json` reads, even when `summary.json` is older. For a gated child the page replaces `levels`, `top` and `lead` with fixed text before the home page draws them (the report gate above). -The person page reads `/runs//results.json`. `og live results` turns the run's summary (its `summary.json` when step 24 wrote it after every finished step, else the step files read again when a step ends; a rewritten `summary.json` is read again too, and the page fetches the cards again) into the report's chapters, one card per section. Each card also has its `level`; the file adds `findings` (each with its id, level, section, title, plain text, gene, evidence, caveat, plan and related findings), `levels` (the counts), `journal` (the ten sections and the cards in each), `lead` (the lead paragraph as text pieces, the bold ones marked, and the names of the findings to act on marked `act`), `level_words`, `databases`, `saved_attention` (for a child whose report the server keeps closed: the flagged-card count of `summary.json`, as `family.json` counts it for anyone else) and `veil` (the rows outside a result's own card that name a result to act on, and `spans`, the results to act on with their gene and position; the report gate reads the findings of level `act` instead; on a child's page once its report is open, the charts and the search box still leave out a mark or hit whose tag names no finding of these results). It computes nothing about genetics and holds only what the report prints. The family page reads `/runs//family.json` from the family plugin, and asks again every 30 seconds, so a member's progress and a new couple screen show without a reload. +The person page reads progress, results and their ETag from one `/runs//snapshot.json` response. It checks every five seconds while the tab is visible and the run is active. A changed snapshot can reload the page once per ETag and at most once in ten seconds. A change detected after the run finishes or a repeated ETag gets a reload button. Bash and Nextflow publish the current run ID, status, summary, search and charts together in `logs/run_snapshot.json`. A new attempt shows a waiting notice until it publishes results. The report files remain available to command-line tools. Older runs without an attempt record can still use their saved summary or collect from completed steps. `/runs//results.json` gives the same results for finding pages. `og live results` turns the run's summary into the report's chapters, one card per section. Each card also has its `level`; the file adds `findings` (each with its id, level, section, title, plain text, gene, evidence, caveat, plan and related findings), `levels` (the counts), `journal` (the ten sections and the cards in each), `lead` (the lead paragraph as text pieces, the bold ones marked, and the names of the findings to act on marked `act`), `level_words`, `databases`, `saved_attention` (for a child whose report the server keeps closed: the flagged-card count of `summary.json`, as `family.json` counts it for anyone else) and `veil` (the rows outside a result's own card that name a result to act on, and `spans`, the results to act on with their gene and position; the report gate reads the findings of level `act` instead; on a child's page once its report is open, the charts and the search box still leave out a mark or hit whose tag names no finding of these results). It computes nothing about genetics and holds only what the report prints. The family page reads `/runs//family.json` from the family plugin, and asks again every 30 seconds, so a member's progress and a new couple screen show without a reload. ## Privacy and what is stored diff --git a/docs/pipeline-overview.md b/docs/pipeline-overview.md index f6c7f30f6..82afe28e7 100644 --- a/docs/pipeline-overview.md +++ b/docs/pipeline-overview.md @@ -24,7 +24,7 @@ | **Traits** | Lactase persistence, caffeine, alcohol flush, bitter taste, earwax, pigmentation, APOE and other replicated variants, each row citing its primary paper | 42 | | **Archaic Ancestry** | The Neanderthal and Denisovan shares and the segments carried, with IBDmix against the Altai and Vindija Neanderthals and the Altai Denisovan (opt-in) | 43 | | **Viral DNA** | Inherited integrated HHV-6 and the DNA of 23 human viruses (herpesviruses, HPV, HBV, HIV-1, polyomaviruses and others) in the reads that do not map to the human genome, with phiX as the lab control (opt-in) | 47 | -| **Mobile Elements** | Alu, L1 and SVA insertions the reference lacks, each genotyped as one or two copies, and three SVA insertions known to cause disease (FKTN, TAF1, BBS1) read as seen, call filtered out (a call MEGAnE flagged), not seen or not callable (opt-in; needs the BAM) | 50 | +| **Mobile Elements** | Alu, L1 and SVA insertions the reference lacks, each genotyped as one or two copies, and three SVA insertions known to cause disease (FKTN, TAF1, BBS1) read as seen, call filtered out (a call MEGAnE flagged), not seen or not assessed (opt-in; needs the BAM) | 50 | | **Mosaic Alterations** | Large gains, losses and copy-neutral loss of heterozygosity on chr1 to chr22 in a share of the blood cells, with the cell fraction (opt-in; mosaic loss of Y and X are step 33's) | 51 | ## Pipeline Overview diff --git a/docs/results/structural-and-repeats.md b/docs/results/structural-and-repeats.md index dabff751a..7ea571cf0 100644 --- a/docs/results/structural-and-repeats.md +++ b/docs/results/structural-and-repeats.md @@ -182,4 +182,4 @@ Fewer repeats or a risk allele point to a higher Lp(a); a 4925G>A copy lowers th **Where to look:** `${SAMPLE}/mei/${SAMPLE}_mei_sites.tsv` for the three known disease insertions (SVA insertions in FKTN, TAF1 and BBS1), and `${SAMPLE}/mei/${SAMPLE}_mei.tsv` for every Alu, L1 and SVA insertion MEGAnE called, with one or two copies. -Expect many calls: a genome carries about 1,200 such insertions, nearly all common and harmless. Read the catalog first. **Seen** means an insertion of the same element was called inside the site's window and passed MEGAnE's own filters; one copy of the FKTN or BBS1 insertion is carrier status for a recessive condition, and the TAF1 insertion on a male's single X is what causes X-linked dystonia-parkinsonism. **Not seen** is not proof of absence: short reads find an SVA's edges, not its body. **Call filtered out** (with MEGAnE's flags, such as `LC` for low confidence) means MEGAnE called one there but did not trust it: it is not a finding, and not proof of absence either; the `call` column names it, so a laboratory can check that site. **Not callable** means too few reads there (under 10x, or none) to tell: the site was not assessed. Both reports and the live person page show the status and the call. Confirm anything that matters in a clinical laboratory. [Step 50](../50-mei.md) explains the columns. +Expect many calls: a genome carries about 1,200 such insertions, nearly all common and harmless. Read the catalog first. **Seen** means an insertion of the same element was called inside the site's window and passed MEGAnE's own filters; one copy of the FKTN or BBS1 insertion is carrier status for a recessive condition, and the TAF1 insertion on a male's single X is what causes X-linked dystonia-parkinsonism. **Not seen** is not proof of absence: short reads find an SVA's edges, not its body. **Call filtered out** (with MEGAnE's flags, such as `LC` for low confidence) means MEGAnE called one there but did not trust it: it is not a finding, and not proof of absence either; the `call` column names it, so a laboratory can check that site. **Not assessed** means the depth was under 10x, including sites with zero reads. Both reports and the live person page show the status and the call. Confirm anything that matters in a clinical laboratory. [Step 50](../50-mei.md) explains the columns. diff --git a/main.nf b/main.nf index 71702a548..a1fcaef7c 100644 --- a/main.nf +++ b/main.nf @@ -57,6 +57,18 @@ include { exome_dropped } from './workflows/exome' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ +def publish_run(publisher, String action, sample, String id, stage = null) { + def command = ['bash', publisher.toString(), action, sample.toString(), id] + if (stage != null) { + command.add(stage.toString()) + } + def child = command.execute() + child.consumeProcessOutput(System.out, System.err) + if (child.waitFor() != 0) { + throw new IllegalStateException("Could not ${action} the report publication for ${sample.name}") + } +} + workflow { // ─── Validate inputs ──────────────────────────────────────────────── @@ -497,6 +509,26 @@ workflow { } } + // run-all.sh already recorded its attempt. Standalone Nextflow gets a + // fresh id even with -resume, before tasks can publish anything. + def publisher = file("${projectDir}/scripts/publish-run.sh") + def report_destinations = samplesheet_rows.collectEntries { row -> + [(row.sample): file("${params.outdir}/${row.sample}")] + } + def report_run_id = System.getenv('OWNGENOME_RUN_ID') + if (report_run_id && !(report_run_id ==~ /[0-9a-f]{32}/)) { + error 'Invalid run id from run-all.sh' + } + def standalone_report = !report_run_id && !workflow.stubRun && !workflow.preview + if (!report_run_id) { + report_run_id = UUID.randomUUID().toString() + } + if (standalone_report) { + report_destinations.values().each { sample -> + publish_run(publisher, 'start', sample, report_run_id) + } + } + ch_rows = Channel .fromList(samplesheet_rows) .map { row -> [[id: row.sample, sex: row.sex ? row.sex.toLowerCase() : null], row] } @@ -1389,7 +1421,7 @@ workflow { .join(ch_gvcf.map { meta, gvcf, idx -> [meta.id, [gvcf, idx]] }, remainder: true) .filter { items -> items[1] != null } .map { id, meta, vcf, files, gvcf -> - def report_meta = meta + [tools: tools_list, model_type: params.model_type] + def report_meta = meta + [tools: tools_list, model_type: params.model_type, run_id: report_run_id] gvcf ? [report_meta + [gvcf: gvcf.collect { f -> f.name }], vcf, files + gvcf] : [report_meta, vcf, files] } @@ -1400,6 +1432,12 @@ workflow { ch_report_inputs, ch_multiqc_files ) + if (!workflow.stubRun && !workflow.preview) { + REPORTING.out.report_bundles.subscribe { meta, report, summary, search, charts -> + publish_run(publisher, 'report', report_destinations[meta.id], meta.run_id, summary.parent) + } + } + // ─── Software versions ────────────────────────────────────────────── // Every task writes a versions.yml whose first line is the tag of the @@ -1484,6 +1522,13 @@ workflow { .collect { d -> file("${params.outdir}/${d}") } def index_skip = workflow.workDir.toAbsolutePath().normalize().toString() + '/' run_info.onComplete { + if (standalone_report) { + def stamp = java.time.Instant.now().toString() + report_destinations.values().each { sample -> + publish_run(publisher, 'finish', sample, report_run_id, stamp) + } + } + try { def start_ms = run_info.start.toInstant().toEpochMilli() def kept = [] diff --git a/modules/local/html_report/main.nf b/modules/local/html_report/main.nf index 2db5759ec..6287ee05d 100644 --- a/modules/local/html_report/main.nf +++ b/modules/local/html_report/main.nf @@ -57,16 +57,18 @@ process HTML_REPORT { tag "$meta.id" label 'process_low' - publishDir { "${params.outdir}/${meta.id}" }, mode: params.publish_dir_mode + // main.nf gives meta.run_id and publishes the report through + // scripts/publish-run.sh. Run alone (without a run id) or under -stub + // (where main.nf skips host publication), the module publishes its report + // files here. + publishDir { "${params.outdir}/${meta.id}" }, mode: params.publish_dir_mode, saveAs: { name -> name == "versions.yml" || !meta.run_id || workflow.stubRun ? name : null } input: tuple val(meta), path(vcf, stageAs: 'input/sample.vcf.gz'), path(outputs, stageAs: 'input/*') output: - tuple val(meta), path("${meta.id}_report.html"), emit: html_report - tuple val(meta), path("summary.json"), emit: summary - tuple val(meta), path("${meta.id}_search_index.json"), emit: search_index - tuple val(meta), path("${meta.id}_charts.json"), emit: charts + tuple val(meta), path("${meta.id}_report.html"), path("summary.json"), + path("${meta.id}_search_index.json"), path("${meta.id}_charts.json"), emit: bundle path "versions.yml", emit: versions when: @@ -84,6 +86,7 @@ process HTML_REPORT { // The run's --tools names (main.nf checks each against its known list), // single-quoted below like gvcf def tools = (meta.tools ?: []).join(' ').replace("'", "'\\''") + def run_id = meta.run_id ? "--run-id '${meta.run_id.toString().replace("'", "'\\''")}'" : '' def model_type = meta.model_type == 'WES' ? 'WES' : '' """ # Where og summary collect looks for each output (rust/crates/og-summary) @@ -181,6 +184,7 @@ process HTML_REPORT { --sample ${id} \\ --sample-dir "\$S" \\ --json summary.json \\ + ${run_id} \\ --declared-sex "${meta.sex ?: ''}" \\ -o ${id}_report.html \\ --search-index ${id}_search_index.json \\ @@ -192,7 +196,10 @@ process HTML_REPORT { stub: """ - touch ${meta.id}_report.html summary.json ${meta.id}_search_index.json ${meta.id}_charts.json + touch ${meta.id}_report.html + printf '{"run_id":"%s","sections":{}}\\n' '${meta.run_id}' > summary.json + printf '{}\\n' > ${meta.id}_search_index.json + printf '{}\\n' > ${meta.id}_charts.json cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/local/mei/main.nf b/modules/local/mei/main.nf index 9ddd74fd2..e16231f0c 100644 --- a/modules/local/mei/main.nf +++ b/modules/local/mei/main.nf @@ -198,7 +198,7 @@ process MEI_REPORT { """ printf 'chrom\\tpos\\tend\\telement\\tsubfamily\\tcopies\\tfilter\\tconfidence\\tgenes\\tlocation\\tbenign_af\\tacmg_class\\n' > ${meta.id}_mei.tsv printf 'gene\\tchrom\\tstart\\tend\\tsite\\telement\\tinheritance\\tcondition\\tclinvar\\tpmid\\tstatus\\tmean_depth\\tcall\\n' > ${meta.id}_mei_sites.tsv - printf 'FKTN\\tchr9\\t1\\t2\\t1\\tSVA\\tautosomal recessive\\tstub\\t.\\t.\\tnot callable\\t.\\t.\\n' >> ${meta.id}_mei_sites.tsv + printf 'FKTN\\tchr9\\t1\\t2\\t1\\tSVA\\tautosomal recessive\\tstub\\t.\\t.\\tnot assessed\\t.\\t.\\n' >> ${meta.id}_mei_sites.tsv ${annotations_dir ? "touch ${meta.id}_mei_annotsv.tsv" : ''} cat <<-END_VERSIONS > versions.yml diff --git a/rust/Cargo.lock b/rust/Cargo.lock index b87c18b0b..1003a662a 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -827,6 +827,7 @@ dependencies = [ "og-dev", "og-intervals", "og-pgx", + "og-summary", "pycompat", "sha2", ] diff --git a/rust/crates/og-browser/tests/live_gate.rs b/rust/crates/og-browser/tests/live_gate.rs index 6599b9322..8e684d9bb 100644 --- a/rust/crates/og-browser/tests/live_gate.rs +++ b/rust/crates/og-browser/tests/live_gate.rs @@ -264,16 +264,11 @@ const SEARCH_CLOSED: &str = // every wrapper of the page's own: the path, and for fetch its cache mode and // credentials. Installed before any script of the page runs. const REQUEST_LOG: &str = r#"(function () { - var log = window.ogRequests = [], f = window.fetch, E = window.EventSource; + var log = window.ogRequests = [], f = window.fetch; window.fetch = function (u, o) { log.push(['fetch', new URL(u && u.url || u, location.href).pathname, (o && o.cache) || 'default', (o && o.credentials) || 'same-origin']); return f.apply(this, arguments); }; - if (E) { - var W = function (u, o) { log.push(['events', new URL(u, location.href).pathname]); return new E(u, o); }; - W.prototype = E.prototype; W.CONNECTING = E.CONNECTING; W.OPEN = E.OPEN; W.CLOSED = E.CLOSED; - window.EventSource = W; - } }());"#; /// core.js with the report gate cut out: the transparent reference a page @@ -284,7 +279,13 @@ fn bare_core(source: &str) -> String { let (prefix, _) = source.split_once(marker).unwrap(); format!( "{prefix} - PGPUI.ready = Promise.resolve(); + var snapshot = null; + var hasSnapshot = document.body.classList.contains('page-person') && document.documentElement.dataset.mode === 'live'; + PGPUI.ready = hasSnapshot ? fetch('snapshot.json', {{cache: 'no-store', credentials: 'same-origin'}}).then(function (r) {{ + return r.json().then(function (doc) {{ snapshot = doc; document.documentElement.dataset.pgpSnapshot = r.headers.get('ETag').slice(1, -1); }}); + }}) : Promise.resolve(); + PGPUI.snapshot = function () {{ return snapshot; }}; + PGPUI.reloadSnapshot = function () {{ location.reload(); }}; PGPUI.gateOwnsPage = function () {{ return false; }}; PGPUI.openedActs = function () {{ return {{}}; }}; PGPUI.closeAct = function () {{ return false; }}; @@ -915,28 +916,15 @@ impl Guards<'_> { (items(&attrs).is_empty() && gone == Value::Bool(true), attrs) } Guard::Back => { - // Leave the open report for another page, then Back: from the - // back-forward cache the page loads afresh, closed. The - // static server sends no no-store, so Chrome may keep the - // page in that cache. + // Exercise the cache restore signal in Chrome even when its + // embedder chose to perform a network navigation on Back. self.opened(b); - // A page restored from that cache keeps its script state and - // gets pageshow with persisted true; a reloaded one has neither. eval( b, - "window.gateRestored = false; window.addEventListener('pageshow', function (e) { window.gateRestored = e.persisted; }); true", - ); - b.go(&format!("{}/", self.base)).unwrap(); - wait( - b, - &format!("({READY}) && !!document.documentElement.dataset.pgpPeople"), - ); - eval(b, "history.back(); true"); - b.wait( - &format!( - "location.pathname === '{CHILD_URL}' && document.readyState === 'complete'" - ), - WAIT, + "window.gateRestored = false; \ + window.addEventListener('pageshow', function (e) { window.gateRestored = e.persisted; }); \ + window.dispatchEvent(new PageTransitionEvent('pagehide', { persisted: true })); \ + window.dispatchEvent(new PageTransitionEvent('pageshow', { persisted: true })); true", ); let got = b .wait( @@ -1017,7 +1005,7 @@ fn gate_controls(f: &mut Fixture, base: &str, core: &Path, source: &str) { ( "a refresh leaves the old report visible", vec![( - "if (shut(current)) { ownsPage = true; eventSources.forEach(function (es) { es.close(); }); cleanPage(); transfer();", + "if (shut(current)) { ownsPage = true; cleanPage(); transfer();", "if (shut(current)) { transfer();", )], Guard::RefreshCleanup, @@ -1078,7 +1066,7 @@ fn gate_controls(f: &mut Fixture, base: &str, core: &Path, source: &str) { ( "closing skips the cleanup", vec![( - "ownsPage = true; eventSources.forEach(function (es) { es.close(); }); cleanPage(); transfer(); return true;", + "ownsPage = true; cleanPage(); transfer(); return true;", "return true;", )], Guard::Cleanup, @@ -1099,8 +1087,8 @@ fn gate_controls(f: &mut Fixture, base: &str, core: &Path, source: &str) { ( "pagehide keeps the open report", vec![( - "ownsPage = true; cleaned = true; eventSources.forEach(function (es) { es.close(); }); cleanPage(); }", - "ownsPage = true; cleaned = true; eventSources.forEach(function (es) { es.close(); }); }", + "ownsPage = true; cleaned = true; cleanPage(); }", + "ownsPage = true; cleaned = true; }", )], Guard::Pagehide, ), @@ -1486,7 +1474,7 @@ const CAPTURE: &str = r#"(() => { for (const attr of attrs) node.setAttributeNodeNS(attr); } const reads = window.ogRequests || []; - const first = reads.filter(r => /\/(state|frames|family|results)\.json$|\/events$/.test(r[1])); + const first = reads.filter(r => /\/(snapshot|state|frames|family|results)\.json$|\/events$/.test(r[1])); return [clone.outerHTML, location.href, Array.from(document.querySelectorAll('canvas'), c => c.toDataURL()), performance.getEntriesByType('resource').map(r => new URL(r.name).pathname) .filter(path => path !== '/favicon.ico').sort(), @@ -1887,15 +1875,21 @@ fn slow_open(b: &mut Browser, base: &str) -> bool { wait(b, &format!("{closed}.length === {before} - 1")); } wait(b, &format!("{closed}.length === 1")); + let clock = install( + b, + r#" + const now = Date.now.bind(Date); + Date.now = () => now() + 4000; + window.gateClockMoved = Date.now() - now() >= 3900; + "#, + ); call( b, "Network.emulateNetworkConditionsByRule", &format!( r#"{{"offline":false,"matchedNetworkConditions":[ - {{"urlPattern":{},"latency":4000,"downloadThroughput":-1,"uploadThroughput":-1}}, {{"urlPattern":{},"latency":6000,"downloadThroughput":-1,"uploadThroughput":-1}} - ]}}"#, - js_str(&format!("{base}{CHILD_URL}")), + ]}}"#, js_str(&format!("{base}{CHILD_URL}results.json")), ), ); @@ -1904,9 +1898,10 @@ fn slow_open(b: &mut Browser, base: &str) -> bool { &format!("setTimeout(() => {closed}[0].click(), 0); true"), ); let outcome = b.wait( - &format!("location.pathname === '{CHILD_URL}' && (({OPEN}) ? 'open' : (performance.getEntriesByType('navigation')[0]?.responseStart >= 3500 && ({CLOSED}) ? 'closed' : ''))"), + &format!("location.pathname === '{CHILD_URL}' && window.gateClockMoved && (({OPEN}) ? 'open' : ({CLOSED}) ? 'closed' : '')"), Duration::from_secs(25), ); + uninstall(b, &clock); call( b, "Network.emulateNetworkConditionsByRule", @@ -1916,11 +1911,11 @@ fn slow_open(b: &mut Browser, base: &str) -> bool { assert_eq!( eval( b, - r#"performance.getEntriesByType('navigation')[0].responseStart >= 3500 && - performance.getEntriesByType('resource').some(r => r.name.endsWith('/results.json') && r.responseStart - r.startTime >= 5500)"# + r#"window.gateClockMoved && performance.getEntriesByType('resource') + .some(r => r.name.endsWith('/results.json') && r.responseEnd - r.startTime >= 5500)"#, ), Value::Bool(true), - "Chrome must observe both delays" + "Chrome must observe the clock change and the delayed results" ); text(&outcome) == "open" } @@ -1930,9 +1925,7 @@ fn gate_slow_release(b: &mut Browser, base: &str, core: &Path, source: &str) { slow_open(b, base), "the slow reload did not release the report" ); - pass( - "gate release: a reload whose page takes 4 s and whose results.json takes 6 s still releases the report", - ); + pass("gate release: a clock change on navigation and delayed results still release the report"); let planted = replace_once( source, "sessionStorage.setItem(TRANSFER, JSON.stringify({ path: target,", @@ -1968,11 +1961,22 @@ fn demo_report_gate() { gate_order(&mut f, &base, &core, &source); gate_controls(&mut f, &base, &core, &source); gate_transparency(&mut f, &base, &core, &source); - gate_slow_release(&mut f.browser, &base, &core, &source); gate_family_payload(&mut f, &base, &core, &source); gate_family_independence(&mut f, &base, &core, &source); } +#[test] +fn a_slow_replay_release_accepts_its_opening_ticket() { + let Some(mut f) = Fixture::build("slow-release") else { + return; + }; + let server = StaticServer::start(&f.site, &[]).unwrap(); + let base = server.url("").trim_end_matches('/').to_owned(); + let core = f.site.join("assets/core.js"); + let source = fs::read_to_string(&core).unwrap(); + gate_slow_release(&mut f.browser, &base, &core, &source); +} + struct LiveServe { child: Child, base: String, @@ -1982,6 +1986,8 @@ impl LiveServe { fn start(og: &Path, root: &Path, state: &Path, assets: &Path) -> Self { let mut server = Self { child: Command::new(og) + // The report fixture stays independent of the runner's changing disk usage. + .env("OWNGENOME_DISK_WARN_PERCENT", "invalid") .args(["live", "serve", "--port", "0", "--quiet", "--root"]) .arg(root) .arg("--state-dir") @@ -2233,7 +2239,6 @@ fn live_family_payload(f: &mut Fixture, base: &str, core: &Path, source: &str) { &leaked, ); fs::write(&child_summary, saved).unwrap(); - touch(&child_summary, None); } fn copy_tree(from: &Path, to: &Path, rename: impl Fn(&str) -> String + Copy) { @@ -2252,6 +2257,7 @@ fn copy_tree(from: &Path, to: &Path, rename: impl Fn(&str) -> String + Copy) { // A person's page as text, without the timings that change on every load. const PAGE_JS: &str = r#"(function () { var clone = document.documentElement.cloneNode(true); + clone.removeAttribute('data-pgp-snapshot'); clone.querySelectorAll('[data-pgp-map-paint-ms],[data-pgp-map-parse-ms]').forEach(function (n) { n.removeAttribute('data-pgp-map-paint-ms'); n.removeAttribute('data-pgp-map-parse-ms'); }); clone.querySelectorAll('.ops-disk, #timing .v, #timing .r').forEach(function (n) { n.textContent = ''; }); @@ -2259,16 +2265,6 @@ const PAGE_JS: &str = r#"(function () { }())"#; const MAP_SETTLED: &str = "/^(drawn|failed|nodecompress|unavailable)$/.test((document.getElementById('genome-map') || {dataset: {}}).dataset.pgpMap || '')"; -// A copied answer read as JSON (Response.clone().json()) resolves 1 s late. -const SLOW_CLONE: &str = r#"(function () { - var clone = Response.prototype.clone; - Response.prototype.clone = function () { - var copy = clone.call(this), json = copy.json.bind(copy); - copy.json = function () { return json().then(function (v) { return new Promise(function (done) { setTimeout(function () { done(v); }, 1000); }); }); }; - return copy; - }; -}())"#; - /// A page script that holds back the answer of every fetch whose path ends /// with a key of `held` that many milliseconds: fixes which of two answers /// the page reads first. @@ -2311,17 +2307,13 @@ fn two_cards() -> String { format!(r#"{{"sections": {{{}}}}}"#, two_cards_sections()) } -/// Write a run's summary.json. The family view reads it as it is; the run's -/// own results.json reads its step files, as the demo's steps have no end -/// time (`og live serve` reads summary.json only when it is newer than the -/// end of every done step). +/// Publish a run's summary for the live report and family view. fn summary(work: &Path, run: &str, body: &str) { fs::write(work.join(run).join("summary.json"), body).unwrap(); } -/// Take the child's two results to act on (KCNH2, from its ClinVar hits and -/// from AnnotSV) out of its step files, and touch its summary.json so the -/// server reads the run again. The files as they were. +/// Remove the published child summary and omit its act rows from the inputs +/// used when the live site collects a summary. Return the original inputs. fn without_acts(work: &Path) -> Vec<(PathBuf, Vec)> { let d = work.join(CHILD); let files = [ @@ -2342,15 +2334,14 @@ fn without_acts(work: &Path) -> Vec<(PathBuf, Vec)> { assert!(kept.len() < all.len(), "no KCNH2 row in {p:?}"); fs::write(p, kept).unwrap(); } - touch(&d.join("summary.json"), None); + fs::remove_file(d.join("summary.json")).unwrap(); saved } -fn put_back(work: &Path, saved: Vec<(PathBuf, Vec)>) { +fn put_back(saved: Vec<(PathBuf, Vec)>) { for (p, raw) in saved { fs::write(p, raw).unwrap(); } - touch(&work.join(CHILD).join("summary.json"), None); } /// Set a file's time to now, or to `stamp` (touch -t). @@ -2370,15 +2361,9 @@ fn capture_live( core: &Path, core_text: &str, held: &[(&str, u32)], - slow_clone: bool, ) -> Vec { fs::write(core, core_text).unwrap(); - let mut ids = Vec::new(); - if slow_clone { - ids.push(install(b, SLOW_CLONE)); - } - ids.push(install(b, &hold(held))); - ids.push(install(b, REQUEST_LOG)); + let ids = vec![install(b, &hold(held)), install(b, REQUEST_LOG)]; go(b, url); wait( b, @@ -2420,9 +2405,9 @@ fn differences(x: &str, y: &str) -> Vec<(String, String)> { } /// test_owngenome_live_family.py's live browser checks: in live mode -/// (state.json, then the event stream) an adult's and a no-act child's page +/// an adult's and a no-act child's page /// make the requests of the page without the gate, in its order; the marks a -/// section address sets follow main's outcome in each answer order; a +/// section address sets stay after the complete document renders; a /// parent's page is the same whichever card holds a child's results. fn live_mode_checks(f: &mut Fixture, base: &str, core: &Path, source: &str) { let child_summary = f.work.join(CHILD).join("summary.json"); @@ -2435,8 +2420,8 @@ fn live_mode_checks(f: &mut Fixture, base: &str, core: &Path, source: &str) { for (label, run) in [("an adult", LIVE_ADULT), ("a no-act child", CHILD)] { let url = run_url(base, run); let pair = [ - capture_live(b, &url, core, &bare, &map_last, false), - capture_live(b, &url, core, source, &map_last, false), + capture_live(b, &url, core, &bare, &map_last), + capture_live(b, &url, core, source, &map_last), ]; let (bare_page, gated_page) = (hidden_state(&pair[0][0]), hidden_state(&pair[1][0])); assert!( @@ -2457,7 +2442,7 @@ fn live_mode_checks(f: &mut Fixture, base: &str, core: &Path, source: &str) { } let first: Vec<&str> = adult_bare .iter() - .take(3) + .take(2) .map(|r| { text(r) .split(' ') @@ -2468,70 +2453,45 @@ fn live_mode_checks(f: &mut Fixture, base: &str, core: &Path, source: &str) { .unwrap() }) .collect(); - assert_eq!( - first, - ["state.json", "events", "family.json"], - "live mode: the first reads without the gate: {adult_bare:?}" - ); - pass( - "live mode: without the gate the page asks for state.json, then the event stream, then family.json", - ); - - // A section address on an adult's and a no-act child's page: the marks it - // sets depend on whether the family or the results answer first. Each - // order is forced by holding the other answer back, twice each, and the - // map's document comes last. The outcomes are the ones main's own view - // files give: the marks stay when the family answers first and the - // family's redraw clears them when the results answer first, and the - // map's tooltip stays hidden="hidden". A copied answer read as JSON - // resolves late, so a gate that checked a child's results on such a copy - // would give the family-first outcome in the results-first order. + assert_eq!(first, ["snapshot.json", "family.json"], "{adult_bare:?}"); + pass("live mode: the snapshot arrives before the family is read"); + + // The section anchor is applied once, after the complete render. A slow + // snapshot or family request cannot erase the section or card mark. let tip = regex::Regex::new(r#"
]*>"#).unwrap(); let target = regex::Regex::new(r#"
= marks.iter().filter(|m| !m.4).collect(); - assert!( - bad.is_empty(), - "live mode: section marks in each order: {bad:?}" - ); - pass( - "live mode: an adult's and a no-act child's page at a section address give main's outcome in each order", - ); + pass("live mode: a delayed snapshot or family keeps the section address marked"); - put_back(&f.work, steps); + put_back(steps); // A parent's page, whichever card holds the child's two results to act on. // The two summaries must give different flagged-card counts, or the @@ -2550,17 +2510,7 @@ fn live_mode_checks(f: &mut Fixture, base: &str, core: &Path, source: &str) { let mut seen = Vec::new(); for body in [two_in_one_card(), two_cards()] { summary(&f.work, CHILD, &body); - seen.push( - capture_live( - b, - &run_url(base, LIVE_ADULT), - core, - source, - &map_last, - false, - )[0] - .clone(), - ); + seen.push(capture_live(b, &run_url(base, LIVE_ADULT), core, source, &map_last)[0].clone()); } let (one_card, two_cards) = (hidden_state(&seen[0]), hidden_state(&seen[1])); assert!( diff --git a/rust/crates/og-facts/Cargo.toml b/rust/crates/og-facts/Cargo.toml index 47b6d9182..efa68786d 100644 --- a/rust/crates/og-facts/Cargo.toml +++ b/rust/crates/og-facts/Cargo.toml @@ -10,6 +10,7 @@ publish.workspace = true pycompat.workspace = true og-intervals.workspace = true og-pgx.workspace = true +og-summary.workspace = true # SHA-256 for the fact ids and the file hashes OwnHealth checks, SHA-512 for # the GA4GH VRS identifiers; RustCrypto's crate, pure Rust. sha2 = "0.11" diff --git a/rust/crates/og-facts/src/build.rs b/rust/crates/og-facts/src/build.rs index 94ea2ef3d..3ef5a2d9e 100644 --- a/rust/crates/og-facts/src/build.rs +++ b/rust/crates/og-facts/src/build.rs @@ -13,10 +13,13 @@ use std::collections::{BTreeMap, HashSet}; use std::io::Read; use std::path::Path; +use og_summary::callability::{ + CALLABLE_SHARE, OwnerStatus, format_percent, has_callable_bases, load_summary, +}; use pycompat::json::{self, Value}; use crate::panels::{Panels, Site}; -use crate::rules::{clean_text, drug_ok, fact_id, gene_ok, hex, term_ok}; +use crate::rules::{MAX_TEXT, clean_text, drug_ok, fact_id, gene_ok, hex, term_ok}; use crate::vrs::{self, Bases}; /// The genome the calls were made on, read for VRS normalisation. @@ -1310,8 +1313,39 @@ fn cov( o } +fn unread_exon_note(e: &Value, min_share: f64, limit: usize) -> Option { + let exon = text(e, &["worst_exon", "exon"])?; + let share = number(get(e, &["worst_exon", "share"]))?; + let percent = format_percent(share, min_share); + let suffix = format!(" was not read ({percent}% callable)"); + let max_name = limit.saturating_sub("Exon ".len() + suffix.chars().count()); + let name: String = exon.chars().take(max_name).collect(); + Some(format!("Exon {name}{suffix}")) +} + +fn dedicated_caller_note(e: &Value) -> Option { + let owner = text(e, &["owner"])?; + let caller = match text(e, &["owner_step"]) { + Some(step) => format!("{owner}, step {step}"), + None => owner.to_owned(), + }; + let (prefix, suffix) = match OwnerStatus::from_row(e) { + OwnerStatus::Ran => ("the dedicated caller (", ") ran"), + OwnerStatus::NotRun => ("the dedicated caller (", ") did not run"), + OwnerStatus::Earlier => ( + "the dedicated caller (", + ") has a result from an earlier run", + ), + OwnerStatus::Unknown => ("run status of the dedicated caller (", ") is unknown"), + }; + // Bound a saved caller label so both the status and an exon can fit. + let max_caller = MAX_TEXT / 2 - prefix.len() - suffix.len(); + let caller: String = caller.chars().take(max_caller).collect(); + Some(format!("{prefix}{caller}{suffix}")) +} + /// The callability catalogue's verdict on a gene short reads did not read. -fn callability_row(id: &str, panel: &str, e: &Value) -> Value { +fn callability_row(id: &str, panel: &str, e: &Value, min_share: f64) -> Value { let share = number(get(e, &["share"])); let reasons: Vec<&str> = list(e, &["reasons"]) .iter() @@ -1320,12 +1354,18 @@ fn callability_row(id: &str, panel: &str, e: &Value) -> Value { _ => None, }) .collect(); - let owner = text(e, &["owner"]); + let current_owner_run = + text(e, &["owner"]).is_some() && OwnerStatus::from_row(e) == OwnerStatus::Ran; + let state = if share.is_some_and(has_callable_bases) || current_owner_run { + "partial" + } else { + "not_assessed" + }; let Some(share) = share else { return cov( id, panel, - "not_assessed", + state, Some("other"), None, Some("not on the reference this run used".to_owned()), @@ -1341,21 +1381,12 @@ fn callability_row(id: &str, panel: &str, e: &Value) -> Value { } else { "low_depth" }; - let mut note = format!( - "{:.0}% of the gene had 10 or more reads of mapping quality 20 or more", - share * 100.0 - ); + let percent = format_percent(share, min_share); + let mut note = + format!("{percent}% of the gene had 10 or more reads of mapping quality 20 or more"); if !reasons.is_empty() { note.push_str(&format!(" ({})", reasons.join(", "))); } - if let Some(o) = owner { - note.push_str(&format!("; called by its own method ({o})")); - } - let state = if share > 0.0 || owner.is_some() { - "partial" - } else { - "not_assessed" - }; cov(id, panel, state, Some(reason), Some(share), Some(note)) } @@ -1374,6 +1405,9 @@ fn coverage(ctx: &Ctx<'_>, summary: &Value) -> Vec { } } } + let min_share = call + .and_then(|c| number(get(c, &["min_share"]))) + .unwrap_or(CALLABLE_SHARE); let clinvar = section(summary, "clinvar").is_some(); let cpic = section(summary, "cpic"); let hla = section(summary, "hla"); @@ -1415,7 +1449,7 @@ fn coverage(ctx: &Ctx<'_>, summary: &Value) -> Vec { ); } match (unread.get(gene), &unproven) { - (Some(e), _) => callability_row(gene, panel, e), + (Some(e), _) => callability_row(gene, panel, e, min_share), (None, Some((reason, note))) => cov( gene, panel, @@ -1514,7 +1548,9 @@ fn coverage(ctx: &Ctx<'_>, summary: &Value) -> Vec { } else if ctx.panels.carrier_gene(gene).is_some() { Some(screen(gene, "carrier")) } else { - unread.get(gene).map(|e| callability_row(gene, "cpic", e)) + unread + .get(gene) + .map(|e| callability_row(gene, "cpic", e, min_share)) }; let rest = rest.filter(|r| text(r, &["state"]) != Some("assessed")); let mut row = row; @@ -1569,7 +1605,7 @@ fn coverage(ctx: &Ctx<'_>, summary: &Value) -> Vec { } for (gene, e) in &unread { if seen.insert(gene.clone()) { - rows.push(callability_row(gene, "callability", e)); + rows.push(callability_row(gene, "callability", e, min_share)); } } // A gene with a PGx or HLA call that no panel names (CYP3A4 has DPWG @@ -1657,6 +1693,37 @@ fn coverage(ctx: &Ctx<'_>, summary: &Value) -> Vec { } } } + // Keep the panel's state and reason. Add the independent coverage facts + // after the row is built so every panel keeps the same evidence. + for row in &mut rows { + let Some(e) = text(row, &["id"]).and_then(|gene| unread.get(gene)) else { + continue; + }; + let caller = dedicated_caller_note(e); + let caller_len = caller.as_ref().map_or(0, |note| note.chars().count() + 2); + let exon = unread_exon_note(e, min_share, MAX_TEXT - caller_len); + let evidence = [caller, exon] + .into_iter() + .flatten() + .collect::>() + .join(". "); + if evidence.is_empty() { + continue; + } + let room = MAX_TEXT.saturating_sub(evidence.chars().count() + 2); + let prefix: String = text(row, &["note"]) + .unwrap_or_default() + .chars() + .take(room) + .collect(); + let prefix = prefix.trim_end_matches(|c: char| c == '.' || c.is_whitespace()); + let note = if prefix.is_empty() { + evidence + } else { + format!("{prefix}. {evidence}") + }; + put(row, "note", s(&clean_text(¬e))); + } rows } @@ -1749,7 +1816,7 @@ pub fn build( let path = dir.join("summary.json"); let raw = std::fs::read_to_string(&path) .map_err(|e| format!("{}: {e} (step 24 writes it)", path.display()))?; - let summary = json::loads(&raw).map_err(|e| format!("{}: not JSON ({e:?})", path.display()))?; + let summary = load_summary(&raw).map_err(|e| format!("{}: {e}", path.display()))?; // The folder's own sample, or the file would carry one person's // findings under another's name. if let Some(named) = text(&summary, &["sample"]).filter(|n| *n != sample) { diff --git a/rust/crates/og-facts/tests/facts.rs b/rust/crates/og-facts/tests/facts.rs index b75369fbc..6033396a6 100644 --- a/rust/crates/og-facts/tests/facts.rs +++ b/rust/crates/og-facts/tests/facts.rs @@ -1073,6 +1073,80 @@ fn a_one_site_gene_whose_site_cannot_be_cited_is_partly_assessed() { assert_eq!(st(coverage(&b, "ABCG2")[0], &["state"]), "assessed"); } +#[test] +fn coverage_note_keeps_the_unread_exon_when_present() { + let sections = full_sections(); + let (before, _) = run("without-worst-exon", §ions); + let baseline = coverage(&before, "PMS2")[0]; + let note = st(baseline, &["note"]); + assert_eq!( + note, + "81.0% of the gene had 10 or more reads of mapping quality 20 or more (segdup)" + ); + + let sections = sections.replace( + r#""share":0.81,"status":"not read""#, + r#""share":0.81,"status":"exon not read","worst_exon":{"exon":"PMS2:exon3","share":0.412}"#, + ); + let (after, _) = run("with-worst-exon", §ions); + let row = coverage(&after, "PMS2")[0]; + assert_eq!(st(row, &["state"]), "partial"); + assert_eq!( + st(row, &["note"]), + format!("{note}. Exon PMS2:exon3 was not read (41.2% callable)") + ); +} + +#[test] +fn coverage_note_keeps_unread_exons_without_clinvar() { + let sections = swap("clinvar", r#""clinvar":{"state":"missing"}"#) + .replace( + r#""not_read":["#, + r#""not_read":[ + {"gene":"PMS2","reasons":[],"share":0.95,"status":"exon not read", + "worst_exon":{"exon":"PMS2:exon3","share":0.412}}, + {"gene":"GJB2","reasons":[],"share":0.95,"status":"exon not read", + "worst_exon":{"exon":"GJB2:exon2","share":0.7}},"#, + ) + .replace( + r#"{"gene":"PMS2","reasons":["segdup"],"share":0.81,"status":"not read"},"#, + "", + ); + let (bundle, _) = run("unread-exons-without-clinvar", §ions); + + for (gene, panel, exon, share) in [ + ("PMS2", "acmg_sf_v3.3", "PMS2:exon3", "41.2"), + ("GJB2", "carrier", "GJB2:exon2", "70.0"), + ] { + let row = coverage(&bundle, gene)[0]; + assert_eq!(st(row, &["panel"]), panel); + assert_eq!(st(row, &["state"]), "not_assessed"); + assert_eq!(st(row, &["reason"]), "not_run"); + assert_eq!( + st(row, &["note"]), + format!( + "the ClinVar screen (step 06) did not run. Exon {exon} was not read ({share}% callable)" + ) + ); + } +} + +#[test] +fn coverage_note_does_not_round_an_unread_exon_up_to_the_cutoff() { + let sections = full_sections().replace( + r#""share":0.81,"status":"not read""#, + r#""share":0.95,"status":"exon not read","worst_exon":{"exon":"PMS2:exon3","share":0.8999}"#, + ); + let (bundle, _) = run("unread-exon-below-cutoff", §ions); + let row = coverage(&bundle, "PMS2")[0]; + assert_eq!(st(row, &["state"]), "partial"); + let note = st(row, &["note"]); + assert!( + note.contains("PMS2:exon3 was not read (89.9% callable)"), + "{note}" + ); +} + #[test] fn a_carrier_or_unread_gene_with_a_pgx_call_is_partly_assessed() { // CFTR and VKORC1 are on the CPIC and carrier lists. At mean depth 4.2 @@ -1116,7 +1190,10 @@ fn a_carrier_or_unread_gene_with_a_pgx_call_is_partly_assessed() { ); assert_eq!(get(row, &["fraction_callable"]), Some(&Value::Float(0.41))); let note = st(row, &["note"]); - assert!(note.contains("PGx call") && note.contains("41%"), "{note}"); + assert!( + note.contains("PGx call") && note.contains("41.0%"), + "{note}" + ); // Read at full depth, VKORC1 is assessed, and CFTR's row names only the // hit the file left out. let (b, _) = run( @@ -1409,3 +1486,226 @@ fn a_wes_manifest_is_an_exome_without_coverage() { let b = build(SAMPLE, &dir, &panels(), &mut genome()).expect("builds"); assert_eq!(st(&b.doc, &["assay", "type"]), "wgs"); } + +const CALLABILITY_PERCENT_CASES: [(&str, f64, &str); 11] = [ + ("below", 0.8999, "89.9"), + ("rounds-up", 0.89995, "89.9"), + ("equal", 0.9, "90.0"), + ("above", 0.90004, "90.0"), + ("empty", 0.0, "0.0"), + ("one-base", 1.0, "100.0"), + ("ordinary", 0.4286, "42.9"), + ("above-rounds", 0.9009, "90.1"), + ("tiny", 5e-20, "<0.1"), + ("under-precision", 0.0009, "<0.1"), + ("at-precision", 0.001, "0.1"), +]; + +#[test] +fn coverage_keeps_unread_exons_for_each_hla_and_cpic_route() { + let mut failures = Vec::new(); + for (tag, call_state, hla_state) in [ + ("present", "ok", "partial"), + ("typed", "ok", "assessed"), + ("missing", "missing", "not_assessed"), + ] { + let mut sections = full_sections() + .replacen( + "\"hla\":{\"state\":\"ok\"", + &format!("\"hla\":{{\"state\":\"{call_state}\""), + 1, + ) + .replacen( + "\"cpic\":{\"state\":\"ok\"", + &format!("\"cpic\":{{\"state\":\"{call_state}\""), + 1, + ); + if tag == "typed" { + sections = sections.replacen(r#""state":"not_determined""#, r#""state":"absent""#, 1); + } + for (edge, share, display) in CALLABILITY_PERCENT_CASES { + let rows = ["HLA-A", "CYP2B6", "VKORC1", "GJB2", "OR4F5"].map(|gene| { + format!( + r#"{{"gene":"{gene}","reasons":[],"share":0.95,"status":"exon not read","worst_exon":{{"exon":"{gene}:exon2","share":{share}}}}}"# + ) + }); + let owned = format!( + r#""not_read_owned":[{{"gene":"CYP2D6","owner":"pypgx","share":0.95,"status":"exon not read", + "worst_exon":{{"exon":"CYP2D6:exon2","share":{share}}}}}]"# + ); + let sections = sections + .replace( + r#"{"gene":"OR4F5","reasons":["segdup"],"share":0.0,"status":"not read"},"#, + "", + ) + .replacen( + r#""not_read":["#, + &format!(r#""not_read":[{},"#, rows.join(",")), + 1, + ) + .replacen(r#""not_read_owned":[]"#, &owned, 1); + let (bundle, _) = run(&format!("coverage-exon-path-{tag}-{edge}"), §ions); + let pgx_state = if call_state == "ok" { + "partial" + } else { + "not_assessed" + }; + for (gene, state) in [ + ("HLA-A", hla_state), + ("CYP2B6", "not_assessed"), + ("VKORC1", pgx_state), + ("CYP2D6", pgx_state), + ("GJB2", "partial"), + ("OR4F5", "partial"), + ] { + let row = coverage(&bundle, gene)[0]; + let exon = format!("{gene}:exon2 was not read ({display}% callable)"); + if st(row, &["state"]) != state + || get(row, &["note"]).is_none() + || st(row, &["note"]).matches(&exon).count() != 1 + { + failures.push(format!( + "{tag} {edge} {gene}: expected {state} with the exon once, got {row:?}" + )); + } + } + } + } + assert!(failures.is_empty(), "{}", failures.join("\n")); +} + +#[test] +fn coverage_percentages_respect_the_cutoff_and_round_to_the_nearest_when_possible() { + let mut failures = Vec::new(); + for (tag, share, display) in CALLABILITY_PERCENT_CASES { + let sections = full_sections().replace( + r#""share":0.81,"status":"not read""#, + &format!( + r#""share":{share},"status":"not read","worst_exon":{{"exon":"PMS2:exon3","share":{share}}}"# + ), + ); + let (bundle, _) = run(&format!("coverage-percent-{tag}"), §ions); + let note = st(coverage(&bundle, "PMS2")[0], &["note"]); + if !note.starts_with(&format!("{display}% of the gene")) + || !note.ends_with(&format!("PMS2:exon3 was not read ({display}% callable)")) + { + failures.push(format!( + "{tag}: expected {display}% for the body and exon, got {note}" + )); + } + } + assert!(failures.is_empty(), "{}", failures.join("\n")); +} + +#[test] +fn ownhealth_keeps_the_unread_exon_at_the_note_limit() { + let reasons = "é".repeat(2500); + let sections = full_sections().replace( + r#"{"gene":"PMS2","reasons":["segdup"],"share":0.81,"status":"not read"}"#, + &format!( + r#"{{"gene":"PMS2","reasons":["segdup","{reasons}"],"share":0.81,"status":"not read", + "worst_exon":{{"exon":"PMS2:exon3","share":0.89995}}}}"# + ), + ); + let (bundle, _) = run("unread-exon-with-long-note", §ions); + let row = coverage(&bundle, "PMS2")[0]; + assert_eq!(st(row, &["state"]), "partial"); + assert_eq!(st(row, &["reason"]), "paralog"); + let note = st(row, &["note"]); + assert!(note.chars().count() <= 2000); + assert!(note.starts_with("81.0% of the gene had")); + assert!( + note.ends_with("Exon PMS2:exon3 was not read (89.9% callable)"), + "the full exon must survive the note limit" + ); +} + +#[test] +fn ownhealth_uses_nonzero_coverage_from_the_raw_body_counts() { + use og_summary::collect::sections::{Callability, CatalogRow, Data}; + + let catalog = [CatalogRow { + gene: "PMS2".into(), + hgnc_id: ".".into(), + chrom: "chr7".into(), + start: "0".into(), + reasons: "segdup".into(), + owner: ".".into(), + table: None, + }]; + let mut observed = Vec::new(); + for count in [0, 1] { + let dir = folder(&format!("body-counts-{count}"), &full_sections()); + let table = dir.join("callability.tsv"); + std::fs::write( + &table, + format!("#chrom\tstart\tend\tregion\t10X\nchr7\t0\t50000\tPMS2\t{count}\n"), + ) + .unwrap(); + let collected = Callability::read(&catalog, table.to_str().unwrap()).unwrap(); + let data = pycompat::json::dumps( + &Data::Callability(collected).to_json(), + &pycompat::json::Dump::default(), + ) + .unwrap(); + let sections = swap( + "callability", + &format!(r#""callability":{{"state":"ok","data":{data}}}"#), + ); + let (bundle, _) = run(&format!("fact-from-body-counts-{count}"), §ions); + observed.push(st(coverage(&bundle, "PMS2")[0], &["state"]).to_owned()); + } + assert_eq!(observed, ["not_assessed", "partial"]); +} + +#[test] +fn ownhealth_distinguishes_dedicated_caller_run_states() { + let mut failures = Vec::new(); + for (tag, status, expected_note) in [ + ( + "ran", + r#","owner_status":"ran""#, + "the dedicated caller (pypgx, step 32) ran", + ), + ( + "absent", + r#","owner_status":"not run""#, + "the dedicated caller (pypgx, step 32) did not run", + ), + ( + "stale", + r#","owner_status":"from an earlier run""#, + "the dedicated caller (pypgx, step 32) has a result from an earlier run", + ), + ( + "legacy", + "", + "run status of the dedicated caller (pypgx, step 32) is unknown", + ), + ( + "null", + r#","owner_status":null"#, + "run status of the dedicated caller (pypgx, step 32) is unknown", + ), + ] { + for (share, positive) in [(0.0, false), (0.4286, true)] { + let owned = format!( + r#""not_read_owned":[{{"gene":"TESTGENE","owner":"pypgx","owner_step":"32"{status},"share":{share},"status":"not read"}}]"# + ); + let sections = full_sections().replacen(r#""not_read_owned":[]"#, &owned, 1); + let (bundle, _) = run(&format!("owner-{tag}-{positive}"), §ions); + let row = coverage(&bundle, "TESTGENE")[0]; + let state = if positive || tag == "ran" { + "partial" + } else { + "not_assessed" + }; + if st(row, &["state"]) != state || !st(row, &["note"]).contains(expected_note) { + failures.push(format!( + "{tag}, {share}: expected {state} and {expected_note}, got {row:?}" + )); + } + } + } + assert!(failures.is_empty(), "{}", failures.join("\n")); +} diff --git a/rust/crates/og-live/src/auth.rs b/rust/crates/og-live/src/auth.rs index 6add9f848..4e51779c8 100644 --- a/rust/crates/og-live/src/auth.rs +++ b/rust/crates/og-live/src/auth.rs @@ -77,7 +77,7 @@ pub fn pbkdf2_sha256(password: &[u8], salt: &[u8], iterations: u32) -> [u8; 32] out } -fn hex(bytes: &[u8]) -> String { +pub(crate) fn hex(bytes: &[u8]) -> String { bytes.iter().map(|b| format!("{b:02x}")).collect() } diff --git a/rust/crates/og-live/src/demo.rs b/rust/crates/og-live/src/demo.rs index 76cf7ffa9..2a7c2e8c0 100644 --- a/rust/crates/og-live/src/demo.rs +++ b/rust/crates/og-live/src/demo.rs @@ -660,12 +660,11 @@ impl Demo<'_> { let src = run.folder(&self.live.root); let dst = out.join("runs").join(name); let files = runs::run_files(name, Some(&src)); - let (base, events) = self.live.base_state(run); - let state = self.live.base_json(&base, events.len()); + let (base, _) = self.live.base_state(run); let mut results = plugins::results_body(&self.live, run, &results::FNS)?; let result = fields(&mut results)?; result.insert("generated_utc".into(), s(&checked.to_string())); - if self.live.gated(name, &src, &state, None) { + if self.live.gated(name, &src, &base, None) { result.insert( "saved_attention".into(), self.live.attention(&src).0.unwrap_or(Value::Null), diff --git a/rust/crates/og-live/src/lib.rs b/rust/crates/og-live/src/lib.rs index 330bb389e..3bd21beb3 100644 --- a/rust/crates/og-live/src/lib.rs +++ b/rust/crates/og-live/src/lib.rs @@ -19,6 +19,7 @@ pub mod results; pub mod runs; pub mod search; pub mod server; +mod snapshot; pub mod state; pub mod static_files; pub mod veil; diff --git a/rust/crates/og-live/src/map.rs b/rust/crates/og-live/src/map.rs index 5f13274c6..09c793efc 100644 --- a/rust/crates/og-live/src/map.rs +++ b/rust/crates/og-live/src/map.rs @@ -205,7 +205,23 @@ pub fn build(req: &mut Req<'_>, name: &str) -> io::Result<()> { req.log("map", &run.name, "-", 503); return req.send_body(503, TEXT, NO_RESULTS); }; - let body = match crate::plugins::results_body(live, &run, &fns) { + let body = if let Some(hash) = crate::static_files::query_value(&req.query, "snapshot") { + match crate::snapshot::Snapshot::read(live, &run) { + Ok(snapshot) if snapshot.hash == hash => Ok(snapshot.results), + Ok(_) => { + req.log("map", &run.name, "-", 409); + return req.send_body( + 409, + TEXT, + "The report changed. Reload it for the new map.\n", + ); + } + Err(e) => Err(e), + } + } else { + crate::plugins::results_body(live, &run, &fns) + }; + let body = match body { Ok(b) => b, Err(e) => { eprintln!( diff --git a/rust/crates/og-live/src/plugins.rs b/rust/crates/og-live/src/plugins.rs index 327494ca8..7e943110f 100644 --- a/rust/crates/og-live/src/plugins.rs +++ b/rust/crates/og-live/src/plugins.rs @@ -22,7 +22,7 @@ use crate::family::{self, inside, realpath}; use crate::ops::{self, Asker, Ctx}; use crate::runs::{self, Run}; use crate::server::{Req, quote}; -use crate::state::{Live, get, now, obj, s}; +use crate::state::{Live, get, has_act, now, obj, s}; use crate::static_files as sf; use crate::viewer::{self, LIVE_CSP, unquote}; use indexmap::IndexMap; @@ -408,8 +408,7 @@ pub(crate) fn family_page(live: &Live, name: &str, d: &Path) -> Result = bst .steps .iter() @@ -420,7 +419,7 @@ pub(crate) fn family_page(live: &Live, name: &str, d: &Path) -> Result) -> io::Result<()> { // --- results ------------------------------------------------------------------------------ /// What `GET /runs//results.json` sends, built the same way for the -/// map: the results of the run's summary, or a note while no step is done. +/// map: the run summary results, a saved cutoff error, or a note while no step is done. pub fn results_body(live: &Live, run: &Run, fns: &ResultsFns) -> Result { let d = run.folder(&live.root); - let (st, events) = live.base_state(run); - let v = live.base_json(&st, events.len()); - match live.summary(&run.name, &d, &v) { - Some(sm) => { + let (st, _) = live.base_state(run); + results_from(run, fns, live.summary_with_error(&run.name, &d, &st)) +} + +fn results_from( + run: &Run, + fns: &ResultsFns, + summary: crate::state::SummaryRead, +) -> Result { + match summary { + Ok(Some(sm)) => { let files = if run.dir.is_some() { runs::run_files(&run.name, run.dir.as_deref()) } else { @@ -526,7 +532,21 @@ pub fn results_body(live: &Live, run: &Run, fns: &ResultsFns) -> Result Ok(note(&run.name, NO_STEP_NOTE)), + Ok(None) => Ok(note(&run.name, NO_STEP_NOTE)), + Err(crate::state::SummaryError::Unpublished) => { + let mut result = note(&run.name, "No results yet for this run."); + if let Value::Object(fields) = &mut result { + fields.insert("awaiting_publication".into(), Value::Bool(true)); + } + Ok(result) + } + Err(crate::state::SummaryError::Cutoff) => Ok(note( + &run.name, + &format!( + "The saved summary could not be read. {}.", + og_summary::callability::CUTOFF_ERROR + ), + )), } } @@ -539,6 +559,31 @@ fn note(name: &str, text: &str) -> Value { ]) } +pub(crate) fn run_results( + live: &Live, + run: &Run, + summary: crate::state::SummaryRead, +) -> Result { + let Some(fns) = live.cfg.results.as_ref() else { + return Ok(note(&run.name, NO_RESULTS_NOTE)); + }; + let gated_overview = match summary.as_ref() { + Ok(Some(sm)) if live.child(&run.name, None) => (fns.overview)(sm).ok(), + _ => None, + }; + let mut out = results_from(run, fns, summary)?; + if has_act(gated_overview.as_ref()) + && let Value::Object(o) = &mut out + { + let attention = gated_overview.as_ref().and_then(|v| get(v, "attention")); + o.insert( + "saved_attention".into(), + attention.cloned().unwrap_or(Value::Null), + ); + } + Ok(out) +} + /// `GET /runs//results.json`: the person's results page data. A reader /// error gives no cards and a note, never a 500. fn results(req: &mut Req<'_>, name: &str) -> io::Result<()> { @@ -547,38 +592,16 @@ fn results(req: &mut Req<'_>, name: &str) -> io::Result<()> { req.log("results", name, "-", 404); return req.send_body(404, TEXT, "not found\n"); }; - let out = match live.cfg.results { - None => note(&run.name, NO_RESULTS_NOTE), - Some(fns) => { - let d = run.folder(&live.root); - let (st, events) = live.base_state(&run); - let v = live.base_json(&st, events.len()); - match results_body(live, &run, &fns) { - Ok(mut out) => { - // A child whose report the site keeps closed: the - // flagged-card count of summary.json, which the family - // page shows once every result to act on is opened. - if live.summary(&run.name, &d, &v).is_some() - && live.gated(&run.name, &d, &v, None) - && let Value::Object(o) = &mut out - { - o.insert( - "saved_attention".into(), - live.attention(&d).0.unwrap_or(Value::Null), - ); - } - out - } - Err(_) => { - eprintln!("og live serve: results of {} not built", run.name); - note( - &run.name, - "The results could not be read; the report and the Progress tab still work.", - ) - } - } - } - }; + let d = run.folder(&live.root); + let (st, _) = live.base_state(&run); + let summary = live.summary_with_error(name, &d, &st); + let out = run_results(live, &run, summary).unwrap_or_else(|_| { + eprintln!("og live serve: results of {} not built", run.name); + note( + &run.name, + "The results could not be read; the report and the Progress tab still work.", + ) + }); req.log("results", &run.name, "-", 200); req.send_json(&out) } @@ -595,9 +618,8 @@ fn finding(req: &mut Req<'_>, name: &str, id: &str) -> io::Result<()> { && valid_finding_id(id) { let d = run.folder(&live.root); - let (st, events) = live.base_state(run); - let v = live.base_json(&st, events.len()); - let found = match live.summary(&run.name, &d, &v) { + let (st, _) = live.base_state(run); + let found = match live.summary(&run.name, &d, &st) { Some(sm) => (fns.build)(&run.name, &sm, None).map(|b| match get(&b, "findings") { Some(Value::Array(f)) => f.clone(), _ => Vec::new(), diff --git a/rust/crates/og-live/src/results/mod.rs b/rust/crates/og-live/src/results/mod.rs index cf723e496..dd18d1b78 100644 --- a/rust/crates/og-live/src/results/mod.rs +++ b/rust/crates/og-live/src/results/mod.rs @@ -147,17 +147,21 @@ fn strings(items: impl IntoIterator>) -> Value { Value::Array(items.into_iter().map(|item| s(item.as_ref())).collect()) } -fn table(columns: &[&str], rows: Vec>) -> Value { +fn table(columns: &[&str], groups: [Vec>; N]) -> Value { + let more = groups + .iter() + .map(|rows| rows.len().saturating_sub(TABLE_LIMIT)) + .sum::(); + let rows: Vec<_> = groups + .into_iter() + .flat_map(|rows| rows.into_iter().take(TABLE_LIMIT).map(strings)) + .collect(); if rows.is_empty() { return Value::Null; } - let more = rows.len().saturating_sub(TABLE_LIMIT); let mut table = Obj::from([ ("columns".into(), strings(columns)), - ( - "rows".into(), - Value::Array(rows.into_iter().take(TABLE_LIMIT).map(strings).collect()), - ), + ("rows".into(), Value::Array(rows)), ]); if more > 0 { table.insert("more".into(), int(more)); @@ -188,7 +192,7 @@ impl Adapter { } fn table(&mut self, columns: &[&str], rows: Vec>) { - self.table = Some(table(columns, rows)); + self.table = Some(table(columns, [rows])); } fn fields_table(&mut self, columns: &[&str], items: &[Value], keys: &[&str]) { @@ -276,6 +280,7 @@ fn card(section: &Sec, chapter: &str, summary: &Summary, files: Option<&BTreeSet .iter() .filter_map(|name| { let name = match *name { + "MEI_NOTE" => return Some(og_render::sections::mei::note()), "ROH_NOTE" => notes::roh_note_key(get(summary.section("roh").data, "af_used")), name => name, }; @@ -1092,13 +1097,15 @@ pub fn cli(argv: &[String], out: &mut dyn Write, err: &mut dyn Write) -> u8 { std::fs::read_to_string(&args.summary) } .map_err(|e| e.to_string())?; - let root = pycompat::json::loads(&text).map_err(|e| e.to_string())?; + let result = if args.tag_search { + let root = pycompat::json::loads(&text).map_err(|e| e.to_string())?; let summary = parsed(val(&root, "summary"))?; let mut terms = val(&root, "terms").clone(); veil::tag_search(&mut terms, &veil::spans(&finding_rows(&summary)))?; terms } else { + let root = og_summary::callability::load_summary(&text).map_err(|e| e.to_string())?; let summary = parsed(&root)?; if args.spans { veil::spans_json(&finding_rows(&summary)) diff --git a/rust/crates/og-live/src/results/qc.rs b/rust/crates/og-live/src/results/qc.rs index f5d90d9e7..ff012fc42 100644 --- a/rust/crates/og-live/src/results/qc.rs +++ b/rust/crates/og-live/src/results/qc.rs @@ -1,5 +1,6 @@ use super::*; -use og_render::sections::{callability, qc}; +use og_render::sections::qc; +use og_summary::callability::{CALLABLE_SHARE, OwnerCounts, OwnerStatus, format_percent}; use pycompat::fmt::fixed; pub(super) fn card(id: &str, summary: &Summary) -> Read { @@ -98,53 +99,60 @@ pub(super) fn card(id: &str, summary: &Summary) -> Read { "Not read, no other step calls them", genes.len().to_string(), ); - // As the report: when the summary says which owner steps ran, an - // owned gene whose step gave no result is not counted as handled. let owned = array(d, "not_read_owned")?; - let ran = owned - .iter() - .filter(|g| !truthy(val(g, "owner_status")) || string(g, "owner_status") == "ran") - .count(); + let counts = OwnerCounts::from_rows(owned); out.fact( "Not read here, called by a step of their own", - ran.to_string(), + counts.ran.to_string(), ); - if owned.iter().any(|g| get(g, "owner_status").is_some()) { + if counts.ran + counts.no_result > 0 { out.fact( "Not read here, their own step gave no result", - (owned.len() - ran).to_string(), + counts.no_result.to_string(), + ); + } + if counts.unknown > 0 { + out.fact( + "Not read here, dedicated caller status unknown", + counts.unknown.to_string(), ); } // The report's rule: one decimal, never at the bar when under it. - let min = num(get(d, "min_share")).unwrap_or(0.9); - let pct = - |v: Option<&Value>| num(v).map(|n| format!("{}%", callability::percent(n, min))); - let rows = genes - .iter() - .map(|g| { - object_row(g)?; - let share = pct(get(g, "share")).unwrap_or_else(|| ".".into()); - let w = val(g, "worst_exon"); - let status = match pct(get(w, "share")) { - Some(p) if truthy(val(w, "exon")) => { - format!("exon {} not read, {p}", text(val(w, "exon"))) - } - _ => cell(val(g, "status")), - }; + let min = num(get(d, "min_share")).unwrap_or(CALLABLE_SHARE); + let pct = |v: Option<&Value>| num(v).map(|n| format!("{}%", format_percent(n, min))); + let render_row = |g: &Value| { + object_row(g)?; + let share = pct(get(g, "share")).unwrap_or_else(|| ".".into()); + let w = val(g, "worst_exon"); + let status = match pct(get(w, "share")) { + Some(p) if truthy(val(w, "exon")) => { + format!("exon {} not read, {p}", text(val(w, "exon"))) + } + _ => cell(val(g, "status")), + }; + let owner = string(g, "owner"); + let why = if owner.is_empty() { let reasons = array(g, "reasons")? .iter() .map(text) .collect::>() .join(", "); - Ok(vec![ - cell(val(g, "gene")), - status, - share, - cell(&s(&reasons)), - ]) - }) - .collect::>()?; - out.table(&["Gene", "Status", "Bases read", "Why"], rows); + cell(&s(&reasons)) + } else { + let status = OwnerStatus::from_row(g).word(); + match string(g, "owner_step") { + "" => format!("{owner} ({status})"), + step => format!("{owner} (step {step} {status})"), + } + }; + Ok(vec![cell(val(g, "gene")), status, share, why]) + }; + let owned_rows = owned.iter().map(render_row).collect::>()?; + let ordinary_rows = genes.iter().map(render_row).collect::>()?; + out.table = Some(table( + &["Gene", "Status", "Bases read", "Why"], + [owned_rows, ordinary_rows], + )); } "variants" => { out.facts( @@ -345,6 +353,8 @@ S\tS\t-9\t-9\t1\t-9\t-9\t30.0\t5000\t6000\t4000\t0.010\t15.0\t39\t0\t0\t39\t14.0 assert_eq!( val(&table, "rows"), &Value::Array(vec![ + strings(["GENEC", "not read", "30.0%", "parascopy (step 35 not run)"]), + strings(["GENED", "not read", "80.0%", "pypgx (step 32 ran)"]), strings(["GENEA", "not read", "89.9%", "paralog"]), strings([ "GENEB", @@ -355,7 +365,7 @@ S\tS\t-9\t-9\t1\t-9\t-9\t30.0\t5000\t6000\t4000\t0.010\t15.0\t39\t0\t0\t39\t14.0 ]) ); - // A summary from before owner_status keeps the single owned fact. + // A summary from before owner_status has no confirmed result. let summary = Summary::parse( r#"{"sections":{"callability":{"state":"ok","data":{ "min_share":0.9,"catalog_genes":120,"read":119,"not_read":[], @@ -365,10 +375,91 @@ S\tS\t-9\t-9\t1\t-9\t-9\t30.0\t5000\t6000\t4000\t0.010\t15.0\t39\t0\t0\t39\t14.0 .unwrap(); assert_eq!( card("callability", &summary).unwrap().facts[2..], - [strings([ - "Not read here, called by a step of their own", - "1" - ])] + [ + strings(["Not read here, called by a step of their own", "0"]), + strings(["Not read here, dedicated caller status unknown", "1"]), + ] + ); + } + + #[test] + fn live_callability_shows_body_and_exon_percentage_edges() { + for (share, display) in [ + (0.8999, "89.9%"), + (0.89995, "89.9%"), + (0.9, "90.0%"), + (0.90004, "90.0%"), + (0.0, "0.0%"), + (5e-20, "<0.1%"), + (0.0009, "<0.1%"), + (0.001, "0.1%"), + (1.0, "100.0%"), + (0.4286, "42.9%"), + ] { + let summary = Summary::parse(&format!( + r#"{{"sections":{{"callability":{{"state":"ok","data":{{ + "min_share":0.9,"catalog_genes":1,"read":0,"not_read_owned":[], + "not_read":[{{"gene":"GENE","reasons":[],"share":{share},"status":"exon not read", + "worst_exon":{{"exon":"GENE:exon1","share":{share}}}}}] + }}}}}}}}"# + )) + .unwrap(); + let table = card("callability", &summary).unwrap().table.unwrap(); + let exon = format!("exon GENE:exon1 not read, {display}"); + assert_eq!( + val(&table, "rows"), + &Value::Array(vec![strings(["GENE", &exon, display, "."])]), + "{share}" + ); + } + } + + #[test] + fn live_callability_shows_owned_bodies_and_exons_before_the_table_limit() { + let ordinary = r#"{"gene":"GENE","reasons":[],"share":0.3,"status":"not read"}"#; + let genes = (0..201) + .map(|i| ordinary.replace("GENE", &format!("GENE{i}"))) + .collect::>() + .join(","); + let summary = Summary::parse(&format!( + r#"{{"sections":{{"callability":{{"state":"ok","data":{{ + "min_share":0.9,"catalog_genes":203,"read":0,"not_read":[{genes}], + "not_read_owned":[ + {{"gene":"RAN","owner":"pypgx","owner_step":"32","owner_status":"ran", + "share":0.89995,"status":"not read", + "worst_exon":{{"exon":"RAN:exon2","share":0.4286}}}}, + {{"gene":"NOTRUN","owner":"parascopy","owner_step":"35","owner_status":"not run", + "share":0.95,"status":"exon not read", + "worst_exon":{{"exon":"NOTRUN:exon3","share":0.89995}}}}] + }}}}}}}}"# + )) + .unwrap(); + let shown = card("callability", &summary).unwrap(); + let table = shown.table.unwrap(); + let displayed = rows(val(&table, "rows")); + assert_eq!( + displayed.len(), + 202, + "both owned rows and the first 200 ordinary rows" + ); + assert_eq!(rows(&displayed[201])[0], s("GENE199")); + assert_eq!(val(&table, "more"), &Value::Int(1)); + assert_eq!( + &rows(val(&table, "rows"))[..2], + &[ + strings([ + "RAN", + "exon RAN:exon2 not read, 42.9%", + "89.9%", + "pypgx (step 32 ran)" + ]), + strings([ + "NOTRUN", + "exon NOTRUN:exon3 not read, 89.9%", + "95.0%", + "parascopy (step 35 not run)" + ]), + ] ); } diff --git a/rust/crates/og-live/src/results/sv.rs b/rust/crates/og-live/src/results/sv.rs index 5ac96522d..351e571c0 100644 --- a/rust/crates/og-live/src/results/sv.rs +++ b/rust/crates/og-live/src/results/sv.rs @@ -836,7 +836,7 @@ mod tests { } /// The MEI table names the call MEGAnE flagged, beside its status, and - /// shows a site with too few reads as not callable. + /// shows a site with too few reads as not assessed, including older summaries. #[test] fn live_mei_names_the_filtered_call_and_the_site_not_assessed() { let summary = parse( @@ -862,7 +862,7 @@ mod tests { "chr9:105639660 SVA_F 1 copy LC" ] ); - assert_eq!(row(1)[4], "not callable"); + assert_eq!(row(1)[4], "not assessed"); assert!(shown.attention); } diff --git a/rust/crates/og-live/src/runs.rs b/rust/crates/og-live/src/runs.rs index 6d123451c..dc71488be 100644 --- a/rust/crates/og-live/src/runs.rs +++ b/rust/crates/og-live/src/runs.rs @@ -121,9 +121,14 @@ pub fn list(root: &Path, known: &[String]) -> BTreeMap { if n.starts_with('.') || !valid_run(&n) || !inside(&d, root) || !d.is_dir() { continue; } - if ["logs/run_status.tsv", "nextflow", "run_manifest.tsv"] - .iter() - .any(|x| d.join(x).exists()) + if [ + og_summary::publication::SNAPSHOT, + "logs/run_status.tsv", + "nextflow", + "run_manifest.tsv", + ] + .iter() + .any(|x| d.join(x).exists()) { out.insert( n.clone(), diff --git a/rust/crates/og-live/src/server.rs b/rust/crates/og-live/src/server.rs index 9d19060bc..5d82620c8 100644 --- a/rust/crates/og-live/src/server.rs +++ b/rust/crates/og-live/src/server.rs @@ -630,6 +630,23 @@ fn run_path(req: &mut Req<'_>, run: &Run, rest: &str) -> io::Result<()> { Err(_) => req.deny(500, None), }; } + "snapshot.json" if !run.is_family() => { + let Ok(snapshot) = crate::snapshot::Snapshot::read(req.live, run) else { + req.log("snapshot", name, "-", 500); + return req.deny(500, None); + }; + req.log("snapshot", name, "-", 200); + return req.send( + 200, + "application/json", + snapshot.body.as_bytes(), + &[ + ("ETag", format!("\"{}\"", snapshot.hash)), + ("X-Run-Active", snapshot.active.to_string()), + ], + CSP, + ); + } "state.json" => { req.log("state", name, "-", 200); let v = req.live.state(run); @@ -641,15 +658,25 @@ fn run_path(req: &mut Req<'_>, run: &Run, rest: &str) -> io::Result<()> { let root = req.live.root.clone(); let d = run.dir.as_deref(); if rest == "report.html" { - let p = d.map(|d| d.join(format!("{name}_report.html"))); - let ok = matches!((&p, d), (Some(p), Some(d)) if p.is_file() && inside(p, &realpath(d))); - let page = p.filter(|_| ok).and_then(|p| fs::read(p).ok()); + let page = d.and_then(|d| match req.live.publication(d) { + Ok(Some(p)) => p.text("html").map(str::to_owned), + Err(_) => None, + Ok(None) => { + let path = d.join(format!("{name}_report.html")); + if path.is_file() && inside(&path, d) { + fs::read(path) + .ok() + .map(|data| String::from_utf8_lossy(&data).into_owned()) + } else { + None + } + } + }); let Some(page) = page else { req.log("report", name, "-", 404); return req.deny(404, None); }; - let page = - plugins::report_filter(req.live, name, String::from_utf8_lossy(&page).into_owned()); + let page = plugins::report_filter(req.live, name, page); req.log("report", name, "-", 200); return req.send( 200, @@ -660,6 +687,23 @@ fn run_path(req: &mut Req<'_>, run: &Run, rest: &str) -> io::Result<()> { ); } let rel = sf::normpath(&unquote(rest)); + if let Some(d) = d { + for (suffix, field) in [("_search_index.json", "search"), ("_charts.json", "charts")] { + if rel != format!("{name}{suffix}") { + continue; + } + match req.live.publication(d) { + Ok(Some(publication)) => { + if let Some(data) = publication.value(field) { + return req.send_json(data); + } + return req.deny(404, None); + } + Err(_) => return req.deny(404, None), + Ok(None) => break, + } + } + } let Some(d) = d.filter(|_| { !rel.starts_with("..") && !rel.starts_with('/') && runs::file_allowed(run, &root, &rel) }) else { diff --git a/rust/crates/og-live/src/snapshot.rs b/rust/crates/og-live/src/snapshot.rs new file mode 100644 index 000000000..bdb6772bb --- /dev/null +++ b/rust/crates/og-live/src/snapshot.rs @@ -0,0 +1,196 @@ +//! One coherent person page, from one run state and one publication. + +use crate::auth::hex; +use crate::family::inside; +use crate::ops::{self, Ctx}; +use crate::plugins; +use crate::runs::Run; +use crate::state::{Live, Obj, dumps_compact, obj, s}; +use og_runlog::{host::System, state::RunState}; +use og_summary::publication::Publication; +use pycompat::json::Value; +use sha2::{Digest, Sha256}; +use std::fs; +use std::path::Path; + +pub(crate) struct Snapshot { + pub body: String, + pub hash: String, + pub active: bool, + pub results: Value, +} + +impl Snapshot { + pub(crate) fn read(live: &Live, run: &Run) -> Result { + let d = run.folder(&live.root); + let published = live + .publication(&d) + .map_err(|_| "run snapshot not readable")?; + let publication = published.as_ref(); + let run_id = publication.map(Publication::run_id); + let (st, events) = live.published_state(run, publication); + let summary = live.summary_for_snapshot(&run.name, &d, &st, publication); + let producer = if matches!(summary, Ok(Some(_))) { + run_id.map_or(Value::Null, s) + } else { + Value::Null + }; + // This is the time shown alongside the recorded progress. It does + // not advance just because another request arrives. + let at = st + .steps + .iter() + .flat_map(|step| [&step.started_utc, &step.ended_utc]) + .chain([&st.finished_utc]) + .filter_map(|field| field.as_ref()?.parse::().ok()) + .map(|time| time.as_second() as f64) + .chain(st.started) + .reduce(f64::max); + let host = System; + let ctx = Ctx { + now: at.unwrap_or(0.0), + steps: &live.steps, + host: &host, + tz: &live.tz, + }; + let mut addons = plugins::state_hooks_with(live, &d, || { + ops::hook(Some(&d), &st, &events, &live.cfg.ops, &ctx).to_json() + }); + visible_addons(&mut addons, &d, &live.root, publication); + let mut state = live.state_json( + &st, + events.len(), + addons, + summary.as_ref().ok().and_then(Option::as_deref), + ); + if let Value::Object(fields) = &mut state { + fields.shift_remove("events"); + fields.insert( + "generated_utc".into(), + at.and_then(og_nf::time::iso) + .map_or(Value::Null, Value::Str), + ); + if st.run != RunState::Stopped + && let Some(Value::Object(run)) = fields.get_mut("run") + { + run.shift_remove("last_heard_utc"); + } + } + let mut results = plugins::run_results(live, run, summary)?; + if let Value::Object(results) = &mut results { + results.shift_remove("generated_utc"); + if let Some(p) = publication { + results.insert( + "report_available".into(), + Value::Bool(p.text("html").is_some()), + ); + } + } + let latest = live + .publication(&d) + .map_err(|_| "run snapshot not readable")?; + if latest.as_ref().map(Publication::run_id) != run_id { + return Err("run changed during snapshot".into()); + } + let body = dumps_compact(&obj([ + ("state", state), + ("results", results.clone()), + ("summary_run_id", producer), + ])); + let hash = hex(&Sha256::digest(body.as_bytes())); + Ok(Self { + body, + hash, + active: st.run == RunState::Running, + results, + }) + } +} + +pub(crate) fn published_addons(addons: &mut Value, publication: &Publication) { + let Value::Object(addons) = addons else { + return; + }; + for kind in ["charts", "search"] { + let mut data = publication.value(kind).cloned().unwrap_or(Value::Null); + canonical_sidecar(&mut data); + addons.insert(kind.into(), obj([("data", data)])); + } +} + +fn visible_addons(addons: &mut Value, d: &Path, root: &Path, publication: Option<&Publication>) { + if let Some(p) = publication { + published_addons(addons, p); + } + let Value::Object(addons) = addons else { + return; + }; + for kind in ["charts", "search"] { + if publication.is_none() + && let Some(Value::Object(addon)) = addons.get_mut(kind) + { + addon.shift_remove("mtime"); + let data = if let Some(Value::Str(file)) = addon.get("file") { + let p = d.join(file); + if inside(&p, d) && inside(&p, root) { + fs::read_to_string(p) + .ok() + .and_then(|text| pycompat::json::loads(&text).ok()) + } else { + None + } + } else { + None + }; + let mut data = data.unwrap_or(Value::Null); + canonical_sidecar(&mut data); + addon.insert("data".into(), data); + } + } + if let Some(Value::Object(recheck)) = addons.get_mut("recheck") { + recheck.shift_remove("mtime"); + } + if let Some(Value::Object(ops)) = addons.get_mut("ops") { + ops.shift_remove("run"); + if let Some(Value::Array(disks)) = ops.get_mut("disk") { + for disk in disks { + if let Value::Object(disk) = disk { + disk_for_display(disk); + } + } + } + } +} + +// Chart fields are addressed by name. Search sorts its matches, and +// arrays carry the display order in both files. +fn canonical_sidecar(value: &mut Value) { + match value { + Value::Object(fields) => { + fields.sort_keys(); + fields.values_mut().for_each(canonical_sidecar); + } + Value::Array(items) => items.iter_mut().for_each(canonical_sidecar), + _ => {} + } +} + +// The page prints whole percentage points and tenths of the displayed size +// unit. Bytes written to the access log must not change those numbers. +fn disk_for_display(disk: &mut Obj) { + for key in ["used_ratio", "inodes_used_ratio"] { + if let Some(Value::Float(ratio)) = disk.get_mut(key) { + *ratio = (*ratio * 100.0).round() / 100.0; + } + } + if let Some(Value::Int(bytes)) = disk.get_mut("free_bytes") { + let mut unit = 1.0; + let raw = *bytes as f64; + while raw >= unit * 1024.0 && unit < 1024_f64.powi(4) { + unit *= 1024.0; + } + if unit > 1.0 { + *bytes = ((raw / unit * 10.0).round() * unit / 10.0) as i128; + } + } +} diff --git a/rust/crates/og-live/src/state.rs b/rust/crates/og-live/src/state.rs index 5eab88384..292cd2777 100644 --- a/rust/crates/og-live/src/state.rs +++ b/rust/crates/og-live/src/state.rs @@ -22,13 +22,17 @@ use jiff::tz::TimeZone; use og_render::model::{Malformed, Summary}; use og_render::sections::clinvar::D; use og_runlog::files; -use og_runlog::state::{Inputs, RunState, State, trace_files}; +use og_runlog::state::{Inputs, RunState, State, StepState, trace_files}; use og_runlog::steps::Step; use og_runlog::tasks; +use og_summary::callability::{CUTOFF_ERROR, load_summary}; +use og_summary::publication::{Publication, SNAPSHOT}; use pycompat::json::{self, Dump, Value}; use pycompat::value::{py_str, truthy}; +use sha2::{Digest, Sha256}; use std::collections::{BTreeMap, BTreeSet, HashMap}; use std::fs; +use std::io::Read; use std::path::{Path, PathBuf}; use std::sync::atomic::{AtomicBool, AtomicUsize, Ordering}; use std::sync::{Arc, Mutex, MutexGuard, PoisonError}; @@ -87,21 +91,15 @@ pub fn now() -> f64 { .map_or(0.0, |d| d.as_secs_f64()) } -/// A file's (mtime in ns, size); `None` when it cannot be read. -pub fn file_stamp(p: &Path) -> Option<(i128, u64)> { - let m = fs::metadata(p).ok()?; - Some((pycompat::mtime::mtime_ns(p).ok()?, m.len())) -} - // --- the stored messages ------------------------------------------------------------------ struct Cached { - stamp: Option<(i128, u64)>, + digest: ContentHash, events: Arc>, } /// `STATE_DIR/runs//events.jsonl` of every run, kept in memory and read -/// again when the file's time or size changes. +/// again from a new content snapshot. pub struct Store { dir: PathBuf, runs: Mutex>, @@ -139,20 +137,25 @@ impl Store { /// The stored messages of `run`: each line that is a JSON object. pub fn events(&self, run: &str) -> Arc> { let p = self.path(run); - let stamp = file_stamp(&p); + let raw = if p.is_file() { + fs::read(&p).unwrap_or_default() + } else { + Vec::new() + }; + let digest = content_hash(&raw); + let mut runs = lock(&self.runs); + if let Some(c) = runs.get(run) + && c.digest == digest { - let runs = lock(&self.runs); - if let Some(c) = runs.get(run) - && c.stamp == stamp - { - return Arc::clone(&c.events); - } + return Arc::clone(&c.events); } - let events = Arc::new(files::read_events(Some(&p)).unwrap_or_default()); - lock(&self.runs).insert( + let events = Arc::new(files::events_from_lines( + String::from_utf8_lossy(&raw).split(['\n', '\r']), + )); + runs.insert( run.to_owned(), Cached { - stamp, + digest, events: Arc::clone(&events), }, ); @@ -169,10 +172,18 @@ impl Store { stop: &AtomicBool, ) -> Vec { let end = Instant::now() + timeout; + let path = self.path(run); + let mut seen = None; loop { - let evs = self.events(run); - if evs.len() > after { - return evs[after..].to_vec(); + // Weblog writers append. State requests also read the complete + // contents, so the stream can wait for a length change. + let length = fs::metadata(&path).ok().map(|m| m.len()); + if seen != Some(length) { + let evs = self.events(run); + if evs.len() > after { + return evs[after..].to_vec(); + } + seen = Some(length); } let left = end.saturating_duration_since(Instant::now()); if left.is_zero() || stop.load(Ordering::SeqCst) { @@ -527,52 +538,63 @@ fn utc_seconds(text: &str) -> Option { Some(z.timestamp().as_second() as f64) } -/// The done steps of a state's JSON, by number. -fn done_steps(st: &Value) -> Vec<&Value> { - match get(st, "steps") { - Some(Value::Array(a)) => a - .iter() - .filter(|s| get_str(s, "state") == Some("done")) - .collect(), - _ => Vec::new(), - } +type ContentHash = [u8; 32]; + +fn content_hash(bytes: &[u8]) -> ContentHash { + Sha256::digest(bytes).into() } -/// `/summary.json` when it is newer than every done step's end, else -/// `None`. A summary.json that links out of the run folder is never read. -pub fn summary_file(d: &Path, st: &Value) -> Option { - let p = d.join("summary.json"); - if !inside(&p, &realpath(d)) { - return None; - } - let mtime = pycompat::mtime::mtime(&p).ok()?; - for s in done_steps(st) { - let e = get_str(s, "ended_utc").filter(|e| !e.is_empty())?; - if utc_seconds(e)? > mtime { +fn done_steps<'s, 'a>( + st: &'s State<'a>, +) -> impl Iterator> { + st.steps.iter().filter(|s| s.state == StepState::Done) +} + +struct SavedSummary { + bytes: Vec, + digest: ContentHash, + modified: Option, +} + +impl SavedSummary { + fn read(d: &Path, root: &Path) -> Option { + let p = d.join("summary.json"); + if !inside(&p, &realpath(d)) || !inside(&p, root) || !p.is_file() { return None; } + let mut file = fs::File::open(p).ok()?; + let modified = file + .metadata() + .ok()? + .modified() + .ok() + .and_then(|m| m.duration_since(UNIX_EPOCH).ok()) + .map(|t| t.as_secs_f64()); + let mut bytes = Vec::new(); + file.read_to_end(&mut bytes).ok()?; + Some(Self { + digest: content_hash(&bytes), + bytes, + modified, + }) } - let v = json::loads(&String::from_utf8_lossy(&fs::read(&p).ok()?)).ok()?; - matches!(get(&v, "sections"), Some(Value::Object(_))).then_some(v) -} -/// The cache key of a run's summary: the done steps, the message count and -/// summary.json's stamp. -#[derive(Debug, Clone, PartialEq)] -pub struct SummaryKey { - pub done: Vec, - pub events: Option, - pub stamp: Option<(i128, u64)>, + fn parse(&self) -> Result, &'static str> { + match load_summary(&String::from_utf8_lossy(&self.bytes)) { + Ok(v) => Ok(matches!(get(&v, "sections"), Some(Value::Object(_))).then_some(v)), + Err(json::JsonError::Decode(CUTOFF_ERROR, _)) => Err(CUTOFF_ERROR), + Err(_) => Ok(None), + } + } } -struct SummaryEntry { - key: SummaryKey, - headlines: Option, - summary: Option>, +pub(crate) enum SummaryError { + Cutoff, + Unpublished, } -/// A summary.json's stamp and the overview read from it. -type Stamped = ((i128, u64), Value); +pub(crate) type SummaryRead = Result>, SummaryError>; +type Stamped = (ContentHash, Value); /// The overview of a summary for the home page (`levels`, `attention`, /// `top`, `lead`, ...), and the results built from one: what @@ -596,13 +618,33 @@ pub struct Live { pub streams: AtomicUsize, pub max_streams: AtomicUsize, pub stopping: AtomicBool, - summaries: Mutex>, - /// summary.json path -> (its stamp, its overview). + /// Cached overview of a saved summary, keyed by its bytes. attention_cache: Mutex>, - /// run -> (the summary results.json reads now, its overview). - summary_overviews: Mutex, Overview)>>, - /// run -> (the summary key, the overview of that summary). - live_overview: Mutex>, +} + +fn headlines(st: &State<'_>, summary: Option<&Value>) -> Value { + let mut out = Obj::new(); + if let Some(sm) = summary + && let Ok(parsed) = Summary::parse(&dumps(sm)) + { + let sections = get(sm, "sections"); + for step in done_steps(st) { + for k in &step.step.sections { + let sec = sections.and_then(|x| get(x, k)); + if let Some((text, tone)) = headline(k, sec, &parsed) { + out.insert( + k.clone(), + obj([ + ("text", Value::Str(text)), + ("tone", s(tone)), + ("step", s(&step.step.step)), + ]), + ); + } + } + } + } + Value::Object(out) } impl Live { @@ -629,10 +671,7 @@ impl Live { allowed, streams: AtomicUsize::new(0), stopping: AtomicBool::new(false), - summaries: Mutex::new(HashMap::new()), attention_cache: Mutex::new(HashMap::new()), - summary_overviews: Mutex::new(HashMap::new()), - live_overview: Mutex::new(HashMap::new()), cfg, } } @@ -653,15 +692,26 @@ impl Live { /// The state of `run`'s newest run, without headlines or plugins (the /// home page's view), and its messages. pub fn base_state(&self, run: &Run) -> (State<'_>, Arc>) { + let d = run.folder(&self.root); + let publication = self.publication(&d).ok().flatten(); + self.published_state(run, publication.as_ref()) + } + + pub(crate) fn published_state( + &self, + run: &Run, + publication: Option<&Publication>, + ) -> (State<'_>, Arc>) { let d = run.folder(&self.root); let events = self.store.events(&run.name); - let st = self.base_state_of(&run.name, &d, &events); + let st = self.base_state_of_at(&run.name, &d, &events, None, publication); (st, events) } - /// [`Live::base_state`] of the messages `events`. + /// Run state from the supplied messages. pub fn base_state_of(&self, name: &str, d: &Path, events: &[Value]) -> State<'_> { - self.base_state_of_at(name, d, events, None) + let publication = self.publication(d).ok().flatten(); + self.base_state_of_at(name, d, events, None, publication.as_ref()) } fn base_state_of_at( @@ -670,14 +720,46 @@ impl Live { d: &Path, events: &[Value], replay: Option, + publication: Option<&Publication>, ) -> State<'_> { - let cur = current_run(events); - let status = files::read_run_status(&d.join("logs").join("run_status.tsv")) - .ok() - .flatten(); + let status = match publication { + Some(p) => Some(files::RunStatus::from_text( + p.text("progress").unwrap_or_default(), + )), + None => files::read_run_status(&d.join("logs/run_status.tsv")) + .ok() + .flatten(), + }; let started = status.as_ref().and_then(|s| s.started()); + let scoped; + let events = if let Some(p) = publication { + scoped = events + .iter() + .filter(|event| { + if get_str(event, "event").is_some_and(|kind| kind.starts_with("pgp_")) + && let Some(id) = get_str(event, "runId") + { + return id == p.run_id(); + } + started.is_some_and(|start| { + get_str(event, "utcTime") + .and_then(utc_seconds) + .is_some_and(|at| at >= start.floor()) + }) + }) + .cloned() + .collect::>(); + &scoped + } else { + events + }; + let cur = current_run(events); let pt_path = d.join("nextflow").join("process_status.tsv"); - let mut pt = files::read_process_status(&pt_path).ok().flatten(); + let mut pt = if publication.is_none() { + files::read_process_status(&pt_path).ok().flatten() + } else { + None + }; if pt.is_some() && let Some(st) = started && pycompat::mtime::mtime(&pt_path).is_ok_and(|m| m < st) @@ -726,12 +808,22 @@ impl Live { } /// `state.json` of `run`: the base state, each section's report anchor, - /// the headlines, the summary's stamp and what the plugins add. + /// the headlines and what the plugins add. pub fn state(&self, run: &Run) -> Value { let d = run.folder(&self.root); - let (st, events) = self.base_state(run); - let plugins = crate::plugins::state_hooks(self, run, &d, &st, &Value::Null, &events); - self.state_json(run, &d, &st, events.len(), plugins) + let publication = self.publication(&d).ok().flatten(); + let (st, events) = self.published_state(run, publication.as_ref()); + let mut plugins = crate::plugins::state_hooks(self, run, &d, &st, &Value::Null, &events); + if let Some(p) = &publication { + crate::snapshot::published_addons(&mut plugins, p); + } + let summary = self.summary_for_snapshot(&run.name, &d, &st, publication.as_ref()); + self.state_json( + &st, + events.len(), + plugins, + summary.as_ref().ok().and_then(Option::as_deref), + ) } /// The same page state at a replayed time, with the demo's invented host. @@ -743,7 +835,7 @@ impl Live { ) -> Value { let d = run.folder(&self.root); let events = self.store.events(&run.name); - let st = self.base_state_of_at(&run.name, &d, &events, Some(at)); + let st = self.base_state_of_at(&run.name, &d, &events, Some(at), None); let ctx = crate::ops::Ctx { now: at, steps: &self.steps, @@ -753,16 +845,21 @@ impl Live { let plugins = crate::plugins::state_hooks_with(self, &d, || { crate::ops::hook(Some(&d), &st, &events, &self.cfg.ops, &ctx).to_json() }); - self.state_json(run, &d, &st, events.len(), plugins) + let summary = self.summary_with_error(&run.name, &d, &st); + self.state_json( + &st, + events.len(), + plugins, + summary.as_ref().ok().and_then(Option::as_deref), + ) } - fn state_json( + pub(crate) fn state_json( &self, - run: &Run, - d: &Path, st: &State<'_>, events: usize, plugins: Value, + summary: Option<&Value>, ) -> Value { let mut v = self.base_json(st, events); let mut anchors = Obj::new(); @@ -771,56 +868,55 @@ impl Live { anchors.insert(k.clone(), s(a)); } } - let headlines = self.headlines(&run.name, d, &v); - let stamp = file_stamp(&d.join("summary.json")) - .map_or(Value::Null, |(m, n)| Value::Str(format!("{m}-{n}"))); + let headlines = headlines(st, summary); if let Value::Object(o) = &mut v { o.insert("anchors".into(), Value::Object(anchors)); o.insert("headlines".into(), headlines); - o.insert("results_stamp".into(), stamp); o.insert("plugins".into(), plugins); } v } - fn summary_key(&self, d: Option<&Path>, st: &Value) -> SummaryKey { - SummaryKey { - done: done_steps(st) - .iter() - .filter_map(|s| get_str(s, "step").map(str::to_owned)) - .collect(), - events: get(st, "events").cloned(), - stamp: d.and_then(|d| file_stamp(&d.join("summary.json"))), + /// The saved publication, or a collection from completed steps when none exists. + pub fn summary(&self, sample: &str, d: &Path, st: &State<'_>) -> Option> { + self.summary_with_error(sample, d, st).ok().flatten() + } + + pub(crate) fn publication(&self, d: &Path) -> Result, SummaryError> { + let path = d.join(SNAPSHOT); + if !inside(&path, d) || !inside(&path, &self.root) { + return Err(SummaryError::Unpublished); } + Publication::read(d).map_err(|_| SummaryError::Unpublished) } - /// The run's summary for the steps that are done: its summary.json when - /// that is newer than the end of every done step, else collected now. - /// Read again only when the done steps, the message count or - /// summary.json change; `None` while nothing is done. - pub fn summary(&self, sample: &str, d: &Path, st: &Value) -> Option> { - let key = self.summary_key(Some(d), st); - if let Some(e) = lock(&self.summaries).get(sample) - && e.key == key - { - return e.summary.clone(); + pub(crate) fn summary_with_error(&self, sample: &str, d: &Path, st: &State<'_>) -> SummaryRead { + let publication = self.publication(d)?; + self.summary_for_snapshot(sample, d, st, publication.as_ref()) + } + + pub(crate) fn summary_for_snapshot( + &self, + sample: &str, + d: &Path, + st: &State<'_>, + publication: Option<&Publication>, + ) -> SummaryRead { + if let Some(p) = publication { + return p + .value("summary") + .cloned() + .map(|summary| Some(Arc::new(summary))) + .ok_or(SummaryError::Unpublished); } - let summary = if !key.done.is_empty() && d.is_dir() { - summary_file(d, st) - .or_else(|| self.collect(sample, d)) - .map(Arc::new) - } else { - None - }; - lock(&self.summaries).insert( - sample.to_owned(), - SummaryEntry { - key, - headlines: None, - summary: summary.clone(), - }, - ); - summary + if done_steps(st).next().is_none() || !d.is_dir() { + return Ok(None); + } + SavedSummary::read(d, &self.root) + .as_ref() + .map_or(Ok(None), SavedSummary::parse) + .map(|saved| saved.or_else(|| self.collect(sample, d)).map(Arc::new)) + .map_err(|_| SummaryError::Cutoff) } /// `og summary collect` of the folder, in this process; `None` (and a @@ -845,96 +941,49 @@ impl Live { } } - /// `{section: {text, tone, step}}` for the sections of the done steps. - pub fn headlines(&self, sample: &str, d: &Path, st: &Value) -> Value { - let summary = self.summary(sample, d, st); - let key = self.summary_key(Some(d), st); - if let Some(e) = lock(&self.summaries).get(sample) - && e.key == key - && let Some(h) = &e.headlines - { - return h.clone(); - } - let mut out = Obj::new(); - let parsed = summary - .as_ref() - .and_then(|sm| Summary::parse(&dumps(sm)).ok()); - if let (Some(sm), Some(parsed)) = (&summary, &parsed) { - let sections = get(sm, "sections"); - for step in done_steps(st) { - let Some(Value::Array(keys)) = get(step, "sections") else { - continue; - }; - for k in keys.iter().filter_map(|k| match k { - Value::Str(x) => Some(x.as_str()), - _ => None, - }) { - let sec = sections.and_then(|x| get(x, k)); - if let Some((text, tone)) = headline(k, sec, parsed) { - out.insert( - k.to_owned(), - obj([ - ("text", Value::Str(text)), - ("tone", s(tone)), - ("step", get(step, "step").cloned().unwrap_or(Value::Null)), - ]), - ); - } - } + /// The saved summary's overview and its time. The content hash keys the cache. + pub fn overview(&self, d: &Path) -> (Overview, Option) { + match self.publication(d) { + Ok(Some(publication)) => { + let summary = publication.value("summary"); + let value = self + .cfg + .results + .as_ref() + .and_then(|fns| (fns.overview)(summary?).ok()); + let modified = summary.and_then(|_| pycompat::mtime::mtime(d.join(SNAPSHOT)).ok()); + return (value, modified); } + Err(_) => return (None, None), + Ok(None) => {} } - let out = Value::Object(out); - if let Some(e) = lock(&self.summaries).get_mut(sample) - && e.key == key - && e.summary.as_ref().map(Arc::as_ptr) == summary.as_ref().map(Arc::as_ptr) - { - e.headlines = Some(out.clone()); - } - out + let saved = SavedSummary::read(d, &self.root); + self.saved_overview(d, saved.as_ref()) } - /// The overview of `/summary.json` and its time, cached by its - /// stamp; `(None, None)` without one. A summary.json that links out of - /// its run is never read. Without the results the overview is `None`. - pub fn overview(&self, d: &Path) -> (Overview, Option) { + fn saved_overview(&self, d: &Path, saved: Option<&SavedSummary>) -> (Overview, Option) { + let Some(saved) = saved else { + return (None, None); + }; let p = d.join("summary.json"); - if !inside(&p, &realpath(d)) || !inside(&p, &self.root) { + if !inside(&p, &self.root) { return (None, None); } - let Ok(mtime) = pycompat::mtime::mtime(&p) else { - return (None, None); - }; let Some(fns) = &self.cfg.results else { - return (None, Some(mtime)); + return (None, saved.modified); }; - let stamp = file_stamp(&p); - if let Some(st) = stamp - && let Some((h, v)) = lock(&self.attention_cache).get(&p) - && *h == st + if let Some((digest, value)) = lock(&self.attention_cache).get(&p) + && *digest == saved.digest { - return (Some(v.clone()), Some(mtime)); + return (Some(value.clone()), saved.modified); } - let n = fs::read(&p) - .ok() - .and_then(|b| json::loads(&String::from_utf8_lossy(&b)).ok()) - .ok_or_else(|| "not JSON".to_owned()) - .and_then(|v| (fns.overview)(&v)); - match n { - Ok(v) => { - if let Some(st) = stamp { - lock(&self.attention_cache).insert(p, (st, v.clone())); - } - (Some(v), Some(mtime)) - } - Err(_) => { - let run = d.file_name().map(|n| n.to_string_lossy().into_owned()); - eprintln!( - "og live serve: {}/summary.json not read", - run.unwrap_or_default() - ); - (None, Some(mtime)) - } + if let Ok(Some(summary)) = saved.parse() + && let Ok(value) = (fns.overview)(&summary) + { + lock(&self.attention_cache).insert(p, (saved.digest, value.clone())); + return (Some(value), saved.modified); } + (None, saved.modified) } /// The count of cards worth a look, from `/summary.json` alone. @@ -953,25 +1002,11 @@ impl Live { runs::child_of(&fams, name) } - /// The overview of the summary results.json reads now, cached with that - /// summary; `None` while there is none. - pub fn summary_overview(&self, name: &str, d: &Path, st: &Value) -> Overview { - let sm = self.summary(name, d, st)?; + /// The overview of the same publication used for results.json. + fn summary_overview(&self, name: &str, d: &Path, st: &State<'_>) -> Overview { let fns = self.cfg.results.as_ref()?; - if let Some((s0, o)) = lock(&self.summary_overviews).get(name) - && Arc::ptr_eq(s0, &sm) - { - return o.clone(); - } - let o = match (fns.overview)(&sm) { - Ok(v) => Some(v), - Err(_) => { - eprintln!("og live serve: overview of {name} not built"); - None - } - }; - lock(&self.summary_overviews).insert(name.to_owned(), (sm, o.clone())); - o + let summary = self.summary(name, d, st)?; + (fns.overview)(&summary).ok() } /// Whether `name`'s own page keeps its report closed: a child whose @@ -981,7 +1016,7 @@ impl Live { &self, name: &str, d: &Path, - st: &Value, + st: &State<'_>, runs: Option<&BTreeMap>, ) -> bool { if !self.child(name, runs) { @@ -999,9 +1034,6 @@ impl Live { /// no path. pub fn runs_index(&self) -> Value { let runs = self.runs(); - lock(&self.summaries).retain(|k, _| runs.contains_key(k)); - lock(&self.live_overview).retain(|k, _| runs.contains_key(k)); - lock(&self.summary_overviews).retain(|k, _| runs.contains_key(k)); let keep: BTreeSet = runs .values() .map(|r| r.folder(&self.root).join("summary.json")) @@ -1045,43 +1077,12 @@ impl Live { item.insert("running".into(), Value::Int(count("running"))); item.insert("failed".into(), Value::Int(count("failed"))); let (mut o, mtime) = self.overview(&d); - // While a run goes, the summary its page last read (results.json's - // own) is newer than summary.json: count from it while it is - // current, so the home never says less than the person page. - if st.run == RunState::Running && self.cfg.results.is_some() { - let key = self.summary_key(Some(&d), &v); - let hit = lock(&self.summaries) - .get(name) - .filter(|e| e.key.done == key.done && e.key.stamp == key.stamp) - .map(|e| (e.key.clone(), e.summary.clone())); - if let Some((hk, Some(sm))) = hit { - let cached = lock(&self.live_overview) - .get(name) - .filter(|(k, _)| *k == hk) - .map(|(_, o)| o.clone()); - let lo = cached.unwrap_or_else(|| { - let fns = self.cfg.results.as_ref().map(|f| f.overview); - let lo = fns.and_then(|f| match f(&sm) { - Ok(v) => Some(v), - Err(_) => { - eprintln!("og live serve: overview of {name} not built"); - None - } - }); - lock(&self.live_overview).insert(name.clone(), (hk, lo.clone())); - lo - }); - if lo.is_some() { - o = lo; - } - } - } // A child's results to act on decide whether its own page is // closed: when the summary its results.json reads, or the // overview above, has one, that summary's overview replaces it, // so the home page closes the child exactly when its page does. if self.child(name, Some(&runs)) { - let so = self.summary_overview(name, &d, &v); + let so = self.summary_overview(name, &d, &st); if so.is_some() && (has_act(so.as_ref()) || has_act(o.as_ref())) { o = so; } diff --git a/rust/crates/og-live/tests/port_live_server.rs b/rust/crates/og-live/tests/port_live_server.rs index e3be013d9..37d3299f5 100644 --- a/rust/crates/og-live/tests/port_live_server.rs +++ b/rust/crates/og-live/tests/port_live_server.rs @@ -859,3 +859,310 @@ fn cli_configuration_serves_the_journal_and_finding_pages() { 1 ); } + +#[test] +fn live_results_explain_an_invalid_publication_and_collect_when_absent() { + let w = Work::new("saved-callability-cutoff"); + let root = make_root(&w); + store(&w, RUN, &[CLINVAR_DONE, STEP06_OK]); + let path = root.join(RUN).join("summary.json"); + let save = |cutoff: &str, stamp| { + write( + &path, + &format!( + r#"{{"run_id":"historical-save","sample":"{RUN}","sections":{{"callability":{{"state":"ok","data":{{ + "min_share":{cutoff},"catalog_genes":1,"read":0, + "not_read":[{{"gene":"SAVEDGENE","share":0.9,"status":"not read"}}], + "not_read_owned":[]}}}}}}}}"# + ), + ); + fs::File::options() + .write(true) + .open(&path) + .unwrap() + .set_modified(stamp) + .unwrap(); + }; + let mut c = config(&w); + c.results = Some(og_live::plugins::ResultsFns { + build: og_live::results::build, + overview: og_live::results::overview, + }); + let srv = start(c); + let results = || { + let response = get(srv.port(), &format!("/runs/{RUN}/results.json")); + assert_eq!(response.status, 200); + response.json() + }; + let has_cards = + |result: &Value| matches!(get_key(result, "chapters"), Value::Array(c) if !c.is_empty()); + let fresh = std::time::SystemTime::now() + Duration::from_secs(3600); + save("0.904123456000001", fresh); + assert!(format!("{:?}", results()).contains("SAVEDGENE")); + + let invalid = "0.9041234560000011"; + save(invalid, fresh + Duration::from_secs(1)); + let error = results(); + let note = s(get_key(&error, "note")); + assert!( + note.contains("callability.min_share") && note.contains("15 decimal places"), + "{note:?}" + ); + assert!( + !has_cards(&error), + "an invalid current summary must not be recollected" + ); + assert_eq!( + results(), + error, + "the cached read must keep the validation error" + ); + + save( + "0.9041234560000012", + std::time::UNIX_EPOCH + Duration::from_secs(946_684_800), + ); + assert!( + s(get_key(&results(), "note")).contains("15 decimal places"), + "the saved error stays visible after changing the file time" + ); + fs::remove_file(path).unwrap(); + let absent = results(); + assert!(has_cards(&absent), "an absent summary must recollect"); + assert!(!format!("{absent:?}").contains("SAVEDGENE")); +} + +#[test] +fn a_late_trace_completion_changes_the_snapshot_and_keeps_the_publication() { + let w = Work::new("late-trace-cutoff"); + let root = make_root(&w); + store(&w, RUN, &[CLINVAR_DONE, STEP06_OK]); + let path = root.join(RUN).join("summary.json"); + write( + &path, + r#"{"sample":"DEMO-001","sections":{"callability":{"state":"ok","data":{ + "min_share":0.9041234560000011,"not_read":[],"not_read_owned":[] + }}}}"#, + ); + let summary_time = std::time::UNIX_EPOCH + Duration::from_secs(1_767_398_400); + fs::File::options() + .write(true) + .open(&path) + .unwrap() + .set_modified(summary_time) + .unwrap(); + + let mut c = config(&w); + c.results = Some(og_live::plugins::ResultsFns { + build: og_live::results::build, + overview: og_live::results::overview, + }); + let srv = start(c); + let json = |name: &str| { + let response = get(srv.port(), &format!("/runs/{RUN}/{name}.json")); + assert_eq!(response.status, 200); + response.json() + }; + let first_hash = snapshot_hash(&srv); + let before = json("state"); + assert!(s(get_key(&json("results"), "note")).contains("15 decimal places")); + write( + &root.join("pipeline_info/trace_2026-01-04_12-00-00.txt"), + &format!( + "task_id\thash\tnative_id\tname\tstatus\texit\tsubmit\tduration\trealtime\n\ + 19\tab/000019\t1\tCLINICAL:CLINVAR_SCREEN ({RUN})\tCOMPLETED\t0\t2026-01-04 12:00:00.000\t5m\t5m\n" + ), + ); + let after = json("state"); + assert_eq!(get_key(&before, "events"), get_key(&after, "events")); + assert_eq!(steps_of(&before), steps_of(&after)); + assert_eq!( + fs::metadata(&path).unwrap().modified().unwrap(), + summary_time + ); + assert!( + completion(&after) > completion(&before), + "the late trace must advance the done step" + ); + + assert_ne!(snapshot_hash(&srv), first_hash); + assert!(s(get_key(&json("results"), "note")).contains("15 decimal places")); +} + +fn cutoff_snapshot_fixture(name: &str) -> (Work, std::path::PathBuf) { + let w = Work::new(name); + let root = make_root(&w); + let first = CLINVAR_DONE.replace( + r#""task_id": 9,"#, + r#""task_id": 9, "attempt": 1, "hash": "ab/000009","#, + ); + store(&w, RUN, &[&first, STEP06_OK]); + let path = root.join(RUN).join("summary.json"); + write( + &path, + r#"{"sample":"DEMO-001","sections":{"callability":{"state":"ok","data":{ + "min_share":0.9041234560000011,"catalog_genes":1,"read":0, + "not_read":[{"gene":"REVISIONGENE","share":0.9,"status":"not read"}],"not_read_owned":[] + }}}}"#, + ); + set_cutoff_mtime(&path); + (w, path) +} + +fn set_cutoff_mtime(path: &Path) { + fs::File::options() + .write(true) + .open(path) + .unwrap() + .set_modified(std::time::UNIX_EPOCH + Duration::new(1_767_348_390, 400_000_000)) + .unwrap(); +} + +fn cutoff_snapshot_server(w: &Work) -> Server { + let mut c = config(w); + // Keep host disk telemetry out of the ETag comparison. + c.ops.disk_warn_percent = Some("invalid".into()); + c.results = Some(og_live::plugins::ResultsFns { + build: og_live::results::build, + overview: og_live::results::overview, + }); + start(c) +} + +fn cutoff_snapshot_response(server: &Server, endpoint: &str) -> Value { + let response = get(server.port(), &format!("/runs/{RUN}/{endpoint}.json")); + assert_eq!(response.status, 200); + response.json() +} + +fn snapshot_hash(server: &Server) -> String { + let path = format!("/runs/{RUN}/snapshot.json"); + let response = request(server.port(), "HEAD", &path, &[]); + assert_eq!(response.status, 200); + assert!(response.body.is_empty()); + assert_eq!(response.header("x-run-active"), Some("true")); + response.header("etag").unwrap().to_owned() +} + +fn completion(state: &Value) -> String { + let Value::Array(steps) = get_key(state, "steps") else { + panic!("expected steps") + }; + let step = steps + .iter() + .find(|step| s(get_key(step, "step")) == "06") + .unwrap(); + s(get_key(step, "ended_utc")).to_owned() +} + +fn cutoff_snapshot_trace(w: &Work, id: u32, attempt: u32, submit: &str, duration: &str) { + write( + &w.root().join("pipeline_info/trace_snapshot.txt"), + &format!( + "task_id\thash\tnative_id\tname\tstatus\texit\tsubmit\tduration\trealtime\tattempt\n\ + {id}\tab/000019\t1\tCLINICAL:CLINVAR_SCREEN ({RUN})\tCOMPLETED\t0\t2026-01-02 {submit}\t{duration}\t{duration}\t{attempt}\n" + ), + ); +} + +fn cutoff_notice(server: &Server) -> String { + s(get_key( + &cutoff_snapshot_response(server, "results"), + "note", + )) + .to_owned() +} + +fn assert_trace_snapshot(submit: &str, duration: &str, id: u32, attempt: u32, expected: &str) { + let (w, _) = cutoff_snapshot_fixture("trace-selection"); + let server = cutoff_snapshot_server(&w); + let before = snapshot_hash(&server); + cutoff_snapshot_trace(&w, id, attempt, submit, duration); + let after = snapshot_hash(&server); + let state = cutoff_snapshot_response(&server, "state"); + assert_eq!(completion(&state), expected); + assert_ne!(after, before); + assert_eq!(snapshot_hash(&cutoff_snapshot_server(&w)), after); + assert!(cutoff_notice(&server).contains("15 decimal places")); +} + +#[test] +fn snapshot_ignores_subsecond_changes_outside_the_rendered_precision() { + let (w, _) = cutoff_snapshot_fixture("subsecond"); + let server = cutoff_snapshot_server(&w); + // Match the unaffected display start and change only the completion's fraction. + cutoff_snapshot_trace(&w, 19, 1, "10:06:00.000", "30s 200ms"); + let before = snapshot_hash(&server); + cutoff_snapshot_trace(&w, 19, 1, "10:06:00.000", "30s 800ms"); + assert_eq!(snapshot_hash(&server), before); +} + +#[test] +fn snapshot_displays_a_new_attempt_after_a_clock_rollback() { + assert_trace_snapshot("10:06:19.000", "1s", 19, 2, "2026-01-02T10:06:20Z"); +} + +#[test] +fn snapshot_displays_the_latest_attempt_after_reusing_a_task_id() { + assert_trace_snapshot("10:07:00.000", "1s", 9, 2, "2026-01-02T10:07:01Z"); +} + +#[test] +fn snapshot_reads_a_same_size_same_mtime_summary_replacement() { + let (w, path) = cutoff_snapshot_fixture("snapshot-replacement"); + let server = cutoff_snapshot_server(&w); + let before = snapshot_hash(&server); + assert!(cutoff_notice(&server).contains("15 decimal places")); + let old = fs::read_to_string(&path).unwrap(); + let replacement = old.replace("0.9041234560000011", "0.9041234560000010"); + assert_eq!(old.len(), replacement.len()); + let temp = path.with_extension("new"); + write(&temp, &replacement); + set_cutoff_mtime(&temp); + fs::rename(temp, &path).unwrap(); + let result = cutoff_snapshot_response(&server, "results"); + assert!( + s(get_key(&result, "note")).is_empty(), + "cached cutoff notice" + ); + assert!( + format!("{result:?}").contains("REVISIONGENE"), + "saved results should be served" + ); + let after = snapshot_hash(&server); + assert_ne!(before, after); + assert_eq!(snapshot_hash(&server), after); +} + +#[test] +fn snapshot_ignores_a_summary_mtime_change_with_unchanged_content() { + let (w, path) = cutoff_snapshot_fixture("snapshot-mtime-only"); + let summary = fs::read_to_string(&path) + .unwrap() + .replace("0.9041234560000011", "0.9041234560000010"); + write(&path, &summary); + set_cutoff_mtime(&path); + let server = cutoff_snapshot_server(&w); + let before = snapshot_hash(&server); + let results = || cutoff_snapshot_response(&server, "results"); + assert!(format!("{:?}", results()).contains("REVISIONGENE")); + + fs::File::options() + .write(true) + .open(path) + .unwrap() + .set_modified(std::time::UNIX_EPOCH + Duration::from_secs(1_767_348_300)) + .unwrap(); + assert!( + format!("{:?}", results()).contains("REVISIONGENE"), + "a timestamp-only change must not replace the cached saved results" + ); + assert_eq!(snapshot_hash(&server), before); +} + +#[test] +fn parallel_fixtures_with_the_same_label_have_distinct_directories() { + let first = Work::new("parallel-fixture"); + let second = Work::new("parallel-fixture"); + assert_ne!(first.dir, second.dir); +} diff --git a/rust/crates/og-live/tests/port_live_server_browser.rs b/rust/crates/og-live/tests/port_live_server_browser.rs index 9f76765f9..8d1a74f58 100644 --- a/rust/crates/og-live/tests/port_live_server_browser.rs +++ b/rust/crates/og-live/tests/port_live_server_browser.rs @@ -1,15 +1,11 @@ //! The live run page served by `og live serve`, in a headless Chrome -//! (og-browser; skipped without Chrome, except in CI): the step map, a box -//! that repaints after a stored message, a stream refused with 503 and -//! opened again, a box's detail with its tasks and its report anchors, and -//! no policy violation. +//! (og-browser; skipped without Chrome, except in CI): the step map, a +//! snapshot reload after a stored message, report anchors and the site's policy. #[path = "port_live_server_util.rs"] mod util; use og_browser::{Browser, Value, chrome_or_skip}; -use std::sync::atomic::Ordering; -use std::thread; use std::time::Duration; use util::*; @@ -27,7 +23,7 @@ fn box_state(b: &mut Browser, step: &str) -> String { } #[test] -fn the_run_page_draws_the_steps_and_follows_the_stream() { +fn the_run_page_draws_steps_from_a_fresh_document() { let Some(chrome) = chrome_or_skip("load the live run page") else { return; }; @@ -69,7 +65,8 @@ fn the_run_page_draws_the_steps_and_follows_the_stream() { assert!(n.parse::().is_ok_and(|n| n >= 4), "boxes: {n}"); assert_eq!(box_state(&mut b, "06"), "done"); - // A stored message repaints its box. + // A stored message produces a new document. + b.eval("window.previousDocument = true").unwrap(); assert_eq!(box_state(&mut b, "07"), "waiting"); store( &w, @@ -85,42 +82,9 @@ fn the_run_page_draws_the_steps_and_follows_the_stream() { ); assert_eq!(text(after), "running", "07 did not repaint"); - // Every stream slot taken: the stream answers 503, and the page opens it - // again once a slot is free. - let live = srv.live(); - let keep = live.max_streams.swap(0, Ordering::SeqCst); - b.go(&format!("{base}/runs/{RUN}/")).unwrap(); - let refused = wait( - &mut b, - "document.documentElement.dataset.pgpStatus === 'offline' || \ - (document.documentElement.dataset.pgpStreams === '1' && \ - document.documentElement.dataset.pgpStatus === 'ready' && window.PGP.state && 'loaded')", - 10, - ); - thread::sleep(Duration::from_secs(1)); - live.max_streams.store(keep, Ordering::SeqCst); - let reopened = wait( - &mut b, - "Number(document.documentElement.dataset.pgpStreams) >= 2 && 'reopened'", - 15, - ); - let n0 = text(b.eval("window.PGP.state.events").ok()); - thread::sleep(Duration::from_secs(1)); - store( - &w, - RUN, - &[ - r#"{"event": "pgp_step", "step": "07", "state": "ok", "utcTime": "2026-01-02T10:07:30Z"}"#, - ], - ); - let n1 = wait( - &mut b, - &format!("window.PGP.state && window.PGP.state.events > {n0} && window.PGP.state.events"), - 10, - ); - assert!( - refused.is_some() && text(reopened.clone()) == "reopened" && n1.is_some(), - "{refused:?} {reopened:?} {n0} {n1:?}" + assert_eq!( + b.eval("typeof window.previousDocument").unwrap(), + Value::Str("undefined".into()) ); // A box's detail: its tasks, and a link to each section's report anchor. diff --git a/rust/crates/og-live/tests/port_live_server_map.rs b/rust/crates/og-live/tests/port_live_server_map.rs index 644c617c6..8712f82ed 100644 --- a/rust/crates/og-live/tests/port_live_server_map.rs +++ b/rust/crates/og-live/tests/port_live_server_map.rs @@ -395,3 +395,50 @@ fn a_finding_page_is_served_only_for_a_finding_of_the_run() { .to_lowercase(); assert!(!log.contains("plantgene1"), "the gene in the access log"); } + +#[test] +fn the_map_only_uses_results_from_the_requested_snapshot() { + let m = Map::new("snapshot-map"); + let mut cfg = m.config(true); + cfg.ops.disk_warn_percent = Some("invalid".into()); + let server = start(cfg); + let route = format!("/runs/{RUN}/snapshot.json"); + let hash = |response: &Resp| { + assert_eq!(response.status, 200); + response + .header("etag") + .unwrap() + .trim_matches('"') + .to_owned() + }; + let before = hash(&get(server.port(), &route)); + write( + &m.w.root().join(RUN).join("summary.json"), + r#"{"sections": {}, "planted": false}"#, + ); + let request_map = |hash: &str| { + get( + server.port(), + &format!("/runs/{RUN}/map.json?snapshot={hash}"), + ) + }; + let old = request_map(&before); + assert_eq!( + old.status, 409, + "a map was built with newer results than its page" + ); + assert!(m.calls().is_empty()); + + let current = get(server.port(), &route); + let want = current.json(); + assert_eq!(request_map(&hash(¤t)).status, 200); + let calls = m.calls(); + assert_eq!(calls.len(), 1); + let Value::Object(sent) = loads(&calls[0].1).unwrap() else { + panic!("invalid map input"); + }; + let Value::Object(want) = want else { + panic!("invalid snapshot"); + }; + assert_eq!(sent.get("results"), want.get("results")); +} diff --git a/rust/crates/og-live/tests/port_live_server_util.rs b/rust/crates/og-live/tests/port_live_server_util.rs index 4fbd8d6bd..63dd04dff 100644 --- a/rust/crates/og-live/tests/port_live_server_util.rs +++ b/rust/crates/og-live/tests/port_live_server_util.rs @@ -9,6 +9,7 @@ use std::fs; use std::io::{Read, Write}; use std::net::TcpStream; use std::path::{Path, PathBuf}; +use std::sync::atomic::{AtomicUsize, Ordering}; use std::time::Duration; pub const RUN: &str = "DEMO-001"; @@ -29,10 +30,12 @@ pub struct Work { impl Work { pub fn new(name: &str) -> Work { - let d = Path::new(env!("CARGO_TARGET_TMPDIR")) - .join(format!("og-live-{name}-{}", std::process::id())); - let _ = fs::remove_dir_all(&d); - fs::create_dir_all(&d).unwrap(); + static NEXT: AtomicUsize = AtomicUsize::new(0); + let sequence = NEXT.fetch_add(1, Ordering::Relaxed); + let root = Path::new(env!("CARGO_TARGET_TMPDIR")); + fs::create_dir_all(root).unwrap(); + let d = root.join(format!("og-live-{name}-{}-{sequence}", std::process::id())); + fs::create_dir(&d).unwrap(); Work { dir: fs::canonicalize(&d).unwrap(), } diff --git a/rust/crates/og-live/tests/port_live_snapshot_browser.rs b/rust/crates/og-live/tests/port_live_snapshot_browser.rs new file mode 100644 index 000000000..238996070 --- /dev/null +++ b/rust/crates/og-live/tests/port_live_snapshot_browser.rs @@ -0,0 +1,738 @@ +//! Live document refreshes in headless Chromium, against the real site and +//! synthetic run files. The fetch fixture lets a publication land between +//! navigation and the initial snapshot without a timing race in the test. + +#[path = "port_live_server_util.rs"] +mod util; + +use og_browser::{Browser, Value, chrome_or_skip, js_str}; +use og_live::server::{Config, Server}; +use pycompat::json::loads; +use std::fs; +use std::thread; +use std::time::{Duration, Instant}; +use util::*; + +const TASK: &str = r#"{"event":"process_completed","utcTime":"2026-01-02T10:06:30Z","trace":{"task_id":9,"attempt":1,"hash":"ab/000009","name":"CLINICAL:CLINVAR_SCREEN (DEMO-001)","status":"COMPLETED","start":1767348360000,"complete":1767348390000}}"#; +const DONE: &str = + r#"{"event":"pgp_step","step":"06","state":"ok","utcTime":"2026-01-02T10:06:40Z"}"#; +const FINISHED: &str = r#"{"event":"pgp_run_finished","utcTime":"2026-01-02T10:06:40Z"}"#; +const OLD: &str = "SYNTHETICOLD"; +const NEW: &str = "SYNTHETICNEW"; +const CARD: &str = "document.getElementById('results').textContent"; +const READY: &str = "document.documentElement.dataset.pgpStatus === 'ready'"; +const POLL: Duration = Duration::from_millis(5_500); + +fn publication(w: &Work, gene: &str, planned: &str) { + let d = w.root().join(RUN); + let path = d.join("summary.json"); + let temp = d.join("summary.new"); + write( + &temp, + &format!( + r#"{{"sample":"{RUN}","sections":{{"clinvar":{{"state":"ok","data":{{"hits":[{{"gene":"{gene}","chrom":"chr1","pos":100,"ref":"A","alt":"G","significance":"Pathogenic","stars":2}}]}}}}}}}}"# + ), + ); + fs::rename(temp, path).unwrap(); + if !planned.is_empty() { + write(&d.join("logs/run_status.tsv"), planned); + } +} + +fn run_config(w: &Work) -> Config { + let mut cfg = config(w); + cfg.results = Some(og_live::results::FNS); + // Keep the runner's changing disk usage out of this synthetic report. + cfg.ops.disk_warn_percent = Some("invalid".into()); + cfg +} + +fn fixture(w: &Work, final_run: bool) -> Server { + make_root(w); + store(w, RUN, &[TASK, DONE]); + if final_run { + store(w, RUN, &[FINISHED]); + } + publication(w, OLD, ""); + start(run_config(w)) +} + +fn path(server: &Server) -> String { + format!("http://127.0.0.1:{}/runs/{RUN}/", server.port()) +} + +fn browser(w: &Work, script: &str) -> Option { + let chrome = chrome_or_skip("check the live document in dark mode")?; + let mut b = Browser::launch(&chrome, &w.dir.join("chrome")).unwrap(); + b.call( + "Emulation.setEmulatedMedia", + loads(r#"{"features":[{"name":"prefers-color-scheme","value":"dark"}]}"#).unwrap(), + ) + .unwrap(); + b.call( + "Page.addScriptToEvaluateOnNewDocument", + loads(&format!(r#"{{"source":{}}}"#, js_str(script))).unwrap(), + ) + .unwrap(); + Some(b) +} + +fn is_true(b: &mut Browser, expression: &str) -> bool { + b.eval(expression) == Ok(Value::Bool(true)) +} + +fn wait(b: &mut Browser, expression: &str) -> bool { + b.wait(expression, Duration::from_secs(9)).is_some() +} + +fn ready_with(gene: &str) -> String { + format!("{READY} && {CARD}.includes('{gene}')") +} + +const COUNT: &str = r#" +sessionStorage.r8Navigations = Number(sessionStorage.r8Navigations || 0) + 1; +const trigger = sessionStorage.getItem('og-snapshot-reload:' + location.pathname + ':last'); +if (trigger !== null) { + const triggers = JSON.parse(sessionStorage.reloadTriggers || '[]'); + triggers.push(Number(trigger)); + sessionStorage.reloadTriggers = JSON.stringify(triggers); +} +const r8Native = window.fetch.bind(window); +window.fetch = (url, opts) => { + if (/(state|snapshot)\.json$/.test(String(url))) sessionStorage.r8Requests = Number(sessionStorage.r8Requests || 0) + 1; + return r8Native(url, opts); +}; +"#; + +#[test] +fn fresh_snapshot_renders_the_person_before_reporting_ready() { + let w = Work::new("fresh-ready"); + let Some(mut b) = browser(&w, COUNT) else { + return; + }; + let server = fixture(&w, false); + b.go(&path(&server)).unwrap(); + assert!(wait(&mut b, READY), "the person page did not report ready"); + assert!( + is_true(&mut b, &ready_with(OLD)), + "the document claimed ready without rendering the saved finding: {:?}", + b.page_errors() + ); + assert!(b.page_errors().is_empty()); +} + +#[test] +fn fresh_snapshot_never_reports_ready_after_a_failed_results_load() { + let w = Work::new("fresh-failed"); + let Some(mut b) = browser( + &w, + r#" + const native = window.fetch.bind(window); + window.fetch = (url, opts) => /(results|snapshot)\.json$/.test(String(url)) + ? Promise.resolve(new Response('', {status: 503})) : native(url, opts); + "#, + ) else { + return; + }; + let server = fixture(&w, false); + b.go(&path(&server)).unwrap(); + assert!( + wait( + &mut b, + "document.documentElement.hasAttribute('data-pgp-status')" + ), + "the failed request never settled" + ); + assert!( + !is_true(&mut b, READY), + "a failed results request claimed ready" + ); +} + +#[test] +fn fresh_snapshot_reloads_when_a_restarted_server_has_different_content() { + let w = Work::new("fresh-restart"); + let Some(mut b) = browser(&w, COUNT) else { + return; + }; + let first = fixture(&w, false); + let url = path(&first); + let port = first.port(); + assert_eq!(get(port, &format!("/runs/{RUN}/results.json")).status, 200); + b.go(&url).unwrap(); + assert!(wait(&mut b, READY)); + drop(first); + publication(&w, NEW, ""); + let mut cfg = run_config(&w); + cfg.port = port; + let restarted = start(cfg); + assert!( + get(restarted.port(), &format!("/runs/{RUN}/results.json")) + .text() + .contains(NEW) + ); + assert!( + wait( + &mut b, + &format!( + "Number(sessionStorage.r8Navigations) === 2 && {}", + ready_with(NEW) + ) + ), + "the open document did not reload to the restarted server's finding" + ); +} + +#[test] +fn fresh_snapshot_bootstraps_if_the_initial_fetch_crosses_a_publication() { + let w = Work::new("fresh-mid-fetch"); + let script = format!( + "{COUNT}\n{}", + r#" + const counted = window.fetch; + window.fetch = (url, opts) => { + if (sessionStorage.r8Navigations === '1' && /(results|snapshot)\.json$/.test(String(url))) { + return new Promise(resolve => { window.r8Release = () => resolve(counted(url, opts)); }); + } + return counted(url, opts); + }; + "#, + ); + let Some(mut b) = browser(&w, &script) else { + return; + }; + let server = fixture(&w, false); + b.go(&path(&server)).unwrap(); + assert!( + wait(&mut b, "typeof window.r8Release === 'function'"), + "initial results request never started" + ); + assert!( + !is_true(&mut b, READY), + "the page claimed ready with results in flight" + ); + publication(&w, NEW, "step\t07\tplanned\n"); + b.eval("window.r8Release(); true").unwrap(); + assert!( + wait( + &mut b, + &format!( + "Number(sessionStorage.r8Navigations) === 1 && {} && document.querySelector('g.box[data-step=\"07\"]').dataset.state === 'waiting'", + ready_with(NEW) + ) + ), + "snapshot bootstrap did not render both updates in the first document" + ); +} + +#[test] +fn fresh_snapshot_reuses_identical_rendered_content_after_a_rerun() { + let w = Work::new("fresh-identical"); + let Some(mut b) = browser(&w, COUNT) else { + return; + }; + let warm = fixture(&w, false); + let route = format!("/runs/{RUN}/results.json"); + assert!(get(warm.port(), &route).text().contains(OLD)); + b.go(&path(&warm)).unwrap(); + assert!(wait(&mut b, READY)); + let repeated = TASK + .replace("ab/000009", "ab/000010") + .replace("\"attempt\":1", "\"attempt\":2"); + store( + &w, + RUN, + &[ + r#"{"event":"started","runId":"synthetic-rerun"}"#, + &repeated, + DONE, + ], + ); + publication(&w, OLD, ""); + let cold = start(run_config(&w)); + let warm_body = get(warm.port(), &route).text(); + let cold_body = get(cold.port(), &route).text(); + assert!( + warm_body.contains(OLD) && cold_body.contains(OLD), + "warm and cold servers disagreed about an identical publication" + ); + thread::sleep(POLL); + assert!(is_true( + &mut b, + &format!( + "sessionStorage.r8Navigations === '1' && {}", + ready_with(OLD) + ) + )); +} + +#[test] +fn fresh_snapshot_polls_only_while_visible() { + let w = Work::new("fresh-hidden"); + let script = format!( + "{COUNT}\n{}", + r#" + window.r8Visibility = 'hidden'; + Object.defineProperty(document, 'visibilityState', {get: () => window.r8Visibility}); + "# + ); + let Some(mut b) = browser(&w, &script) else { + return; + }; + let server = fixture(&w, false); + b.go(&path(&server)).unwrap(); + assert!(wait(&mut b, READY)); + b.eval("window.r8Before = Number(sessionStorage.r8Requests || 0)") + .unwrap(); + thread::sleep(POLL); + assert!( + is_true( + &mut b, + "Number(sessionStorage.r8Requests || 0) === window.r8Before" + ), + "a hidden document polled" + ); + b.eval("window.r8Visibility = 'visible'; document.dispatchEvent(new Event('visibilitychange')); true").unwrap(); + assert!( + wait( + &mut b, + "Number(sessionStorage.r8Requests || 0) > window.r8Before" + ), + "an active visible document did not resume polling" + ); +} + +#[test] +fn fresh_snapshot_never_polls_a_finished_run() { + let w = Work::new("fresh-finished"); + let Some(mut b) = browser(&w, COUNT) else { + return; + }; + let server = fixture(&w, true); + b.go(&path(&server)).unwrap(); + assert!(wait(&mut b, READY)); + b.eval("window.r8Before = Number(sessionStorage.r8Requests || 0)") + .unwrap(); + thread::sleep(POLL); + assert!( + is_true( + &mut b, + "Number(sessionStorage.r8Requests || 0) === window.r8Before" + ), + "a finished document polled" + ); + b.eval("document.dispatchEvent(new Event('visibilitychange')); true") + .unwrap(); + thread::sleep(POLL); + assert!( + is_true( + &mut b, + "Number(sessionStorage.r8Requests || 0) === window.r8Before" + ), + "visibility restarted a finished poll" + ); +} + +#[test] +fn fresh_snapshot_bounds_reload_rate_during_trace_progress() { + let w = Work::new("fresh-trace-rate"); + let Some(mut b) = browser(&w, COUNT) else { + return; + }; + let server = fixture(&w, false); + b.go(&path(&server)).unwrap(); + assert!(wait(&mut b, &ready_with(OLD))); + let publishing = Instant::now(); + for seconds in 0..17 { + write( + &w.root().join("pipeline_info/trace_browser.txt"), + &format!( + "task_id\thash\tnative_id\tname\tstatus\texit\tsubmit\tduration\trealtime\n\ + 21\tab/000021\t1\tPGX:PHARMCAT_PREPROCESS ({RUN})\tCOMPLETED\t0\t2026-01-02 10:07:{seconds:02}.000\t200ms\t200ms\n" + ), + ); + thread::sleep(Duration::from_secs(1)); + } + assert!( + wait(&mut b, "Number(sessionStorage.r8Navigations) >= 3"), + "the second trace reload did not arrive" + ); + assert!(wait(&mut b, READY), "the last reload did not render"); + let triggers = reload_triggers(&mut b); + let gaps: Vec<_> = triggers.windows(2).map(|p| p[1] - p[0]).collect(); + println!( + "17 trace publications over {:.2} seconds, {} reloads, trigger gaps (ms) {gaps:.1?}", + publishing.elapsed().as_secs_f64(), + triggers.len(), + ); + assert!(!gaps.is_empty(), "too few reload triggers: {triggers:?}"); + assert!( + gaps.iter().all(|gap| *gap >= 10_000.0), + "reloaded too often: {gaps:?}" + ); +} + +fn reload_triggers(b: &mut Browser) -> Vec { + let Value::Array(values) = b + .eval("JSON.parse(sessionStorage.reloadTriggers || '[]')") + .unwrap() + else { + panic!("missing reload trigger times"); + }; + values + .into_iter() + .map(|value| match value { + Value::Float(time) => time, + Value::Int(time) => time as f64, + _ => panic!("{value:?}"), + }) + .collect() +} + +fn current_run(w: &Work, id: &str) { + let d = w.root().join(RUN); + let progress = fs::read_to_string(d.join("logs/run_status.tsv")).unwrap(); + og_summary::publication::start(&d, id).unwrap(); + assert!(og_summary::publication::progress(&d, id, progress).unwrap()); +} + +fn publish_as(w: &Work, id: &str) -> bool { + let d = w.root().join(RUN); + let stage = w.dir.join(format!("stage-{id}")); + write( + &stage.join("summary.json"), + &format!( + r#"{{"run_id":"{id}","sample":"{RUN}","sections":{{"clinvar":{{"state":"ok","data":{{"hits":[{{"gene":"{OLD}","chrom":"chr1","pos":100,"ref":"A","alt":"G","significance":"Pathogenic","stars":2}}]}}}}}}}}"# + ), + ); + write( + &stage.join(format!("{RUN}_search_index.json")), + r#"{"terms":{"CURRENTSEARCH":[{"anchor":"clinvar","label":"CURRENTSEARCH"}]}}"#, + ); + og_summary::publication::report(&d, id, &stage).unwrap() +} + +#[test] +fn an_unpublished_rerun_has_no_old_results_in_http_or_chromium() { + let w = Work::new("unpublished-rerun"); + let Some(mut b) = browser(&w, COUNT) else { + return; + }; + let server = fixture(&w, true); + let route = format!("/runs/{RUN}/snapshot.json"); + current_run(&w, "first-run"); + assert!(publish_as(&w, "first-run")); + let before = get(server.port(), &route); + assert!(before.text().contains(OLD)); + current_run(&w, "next-run"); + store(&w, RUN, &[TASK, DONE, FINISHED]); + let after = get(server.port(), &route); + assert_eq!(after.status, 200); + + b.go(&path(&server)).unwrap(); + assert!(wait(&mut b, READY)); + let shown = b.eval(CARD).unwrap(); + assert!( + !after.text().contains(OLD) && !format!("{shown:?}").contains(OLD), + "HTTP and browser must both withhold the previous finding (HTTP: {}, browser: {shown:?})", + after.text().contains(OLD) + ); + assert!(after.text().contains("No results yet for this run")); + assert!(format!("{shown:?}").contains("No results yet for this run")); + + // The new attempt can publish the same findings without inheriting the old publication. + assert!(publish_as(&w, "next-run")); + let republished = get(server.port(), &route); + assert!(republished.text().contains(OLD)); + assert!( + republished + .text() + .contains(r#""summary_run_id":"next-run""#) + ); + b.go(&path(&server)).unwrap(); + assert!(wait(&mut b, &ready_with(OLD))); +} + +const ACCELERATED: &str = r#" +const realTimeout = window.setTimeout.bind(window); +window.setTimeout = (callback, ms, ...args) => realTimeout(callback, ms === 5000 ? 100 : ms, ...args); +"#; + +// Lets a test hold the HEAD polls. r8InFlight counts the polls the server +// is still answering. +const POLL_GATE: &str = r#" +let r8Gate = null; +window.r8InFlight = 0; +window.r8Hold = () => { r8Gate = new Promise(resolve => { window.r8Release = resolve; }); return true; }; +const r8Ungated = window.fetch; +window.fetch = async (url, opts) => { + if (!String(url).endsWith('snapshot.json') || !opts || opts.method !== 'HEAD') return r8Ungated(url, opts); + if (r8Gate) await r8Gate; + window.r8InFlight += 1; + try { return await r8Ungated(url, opts); } finally { window.r8InFlight -= 1; } +}; +"#; + +#[test] +fn a_hidden_finished_document_bootstraps_from_one_response() { + let w = Work::new("initial-snapshot-mismatches"); + let script = format!( + "{COUNT}\n{ACCELERATED}\n{}", + r#" + Object.defineProperty(document, 'visibilityState', {get: () => 'hidden'}); + const counted = window.fetch; + window.fetch = async (url, opts) => { + const response = await counted(url, opts); + const fetches = Number(sessionStorage.r8Requests); + if (!String(url).endsWith('snapshot.json') || fetches > 3) return response; + const headers = new Headers(response.headers); + headers.set('ETag', '"' + String(fetches).repeat(64) + '"'); + return new Response(await response.text(), {status: response.status, headers}); + }; + "#, + ); + let Some(mut b) = browser(&w, &script) else { + return; + }; + let server = fixture(&w, true); + b.go(&path(&server)).unwrap(); + assert!(wait(&mut b, &ready_with(OLD))); + thread::sleep(Duration::from_millis(450)); + assert_eq!( + b.eval("Number(sessionStorage.r8Navigations)").unwrap(), + Value::Int(1), + "bootstrap mismatch reloaded a hidden, finished page" + ); + assert!(is_true( + &mut b, + "sessionStorage.r8Requests === '1' && document.documentElement.dataset.pgpSnapshot === '1'.repeat(64)" + )); +} + +#[test] +fn repeated_poll_mismatches_allow_only_one_automatic_reload() { + let w = Work::new("repeat-snapshot-mismatches"); + let script = format!( + "{COUNT}\n{ACCELERATED}\n{}", + r#" + const counted = window.fetch; + window.fetch = async (url, opts) => { + const response = await counted(url, opts); + if (!String(url).endsWith('snapshot.json') || opts.method !== 'HEAD') return response; + sessionStorage.r9Mismatch = Number(sessionStorage.r9Mismatch || 0) + 1; + return new Response(null, {headers: {'ETag': '"' + 'a'.repeat(64) + '"', 'X-Run-Active': 'true'}}); + }; + "#, + ); + let Some(mut b) = browser(&w, &script) else { + return; + }; + let server = fixture(&w, false); + b.go(&path(&server)).unwrap(); + assert!(wait(&mut b, "Number(sessionStorage.r9Mismatch) >= 2")); + thread::sleep(Duration::from_millis(400)); + assert_eq!( + b.eval("Number(sessionStorage.r8Navigations)").unwrap(), + Value::Int(2), + "more than one automatic reload targeted the same hash" + ); + assert!(is_true( + &mut b, + "document.documentElement.dataset.pgpStatus === 'stale' && document.body.textContent.includes('Results changed. Reload')" + )); +} + +#[test] +fn a_poll_reporting_final_never_navigates() { + let w = Work::new("finished-snapshot-mismatch"); + let Some(mut b) = browser(&w, &format!("{COUNT}\n{ACCELERATED}\n{POLL_GATE}")) else { + return; + }; + let server = fixture(&w, false); + b.go(&path(&server)).unwrap(); + assert!(wait(&mut b, &ready_with(OLD))); + // The new finding and the end of the run land in two files. Hold the + // polls so none reads one file without the other. + assert!(is_true(&mut b, "window.r8Hold()")); + assert!( + wait(&mut b, "window.r8InFlight === 0"), + "a poll never ended" + ); + publication(&w, NEW, ""); + store(&w, RUN, &[FINISHED]); + b.eval("window.r8Release(); true").unwrap(); + thread::sleep(Duration::from_millis(600)); + assert_eq!( + b.eval("Number(sessionStorage.r8Navigations)").unwrap(), + Value::Int(1), + "the finished run triggered a navigation" + ); + assert!(is_true( + &mut b, + "document.documentElement.dataset.pgpStatus === 'stale' && document.body.textContent.includes('Results changed. Reload')" + )); +} + +#[test] +fn chart_object_key_order_does_not_change_the_snapshot_etag() { + let w = Work::new("snapshot-chart-order"); + let server = fixture(&w, false); + let route = format!("/runs/{RUN}/snapshot.json"); + let charts = w.root().join(RUN).join(format!("{RUN}_charts.json")); + write(&charts, r#"{"charts":[],"unused":{"a":1,"b":2}}"#); + let original = get(server.port(), &route); + assert!(original.text().contains(r#""unused""#)); + write(&charts, r#"{"unused":{"b":2,"a":1},"charts":[]}"#); + let reordered = get(server.port(), &route); + assert_eq!(original.header("etag"), reordered.header("etag")); +} + +#[test] +fn a_new_progress_file_cannot_pair_with_an_old_summary() { + let w = Work::new("publication-progress"); + let Some(mut b) = browser(&w, COUNT) else { + return; + }; + let server = fixture(&w, false); + current_run(&w, "first-run"); + assert!(publish_as(&w, "first-run")); + let route = format!("/runs/{RUN}/snapshot.json"); + let old = get(server.port(), &route); + assert!(old.text().contains(OLD)); + + // Pause Bash immediately after the write that used to precede the ID transition. + let status = w.root().join(RUN).join("logs/run_status.tsv"); + write(&status, "meta\tstarted_epoch\t1767348277\nstep\t06\tok\n"); + let current = get(server.port(), &route); + assert_eq!(current.status, 200); + b.go(&path(&server)).unwrap(); + assert!(wait(&mut b, READY)); + let mixed_http = current.text().contains("10:04:37Z") && current.text().contains(OLD); + let mixed_browser = is_true( + &mut b, + &format!( + "window.PGP.state.run.started_utc === '2026-01-02T10:04:37Z' && {CARD}.includes('{OLD}')" + ), + ); + assert!( + !mixed_http && !mixed_browser, + "new progress and the old finding appeared together" + ); +} + +#[test] +fn a_current_summary_cannot_expose_an_older_search_sidecar() { + let w = Work::new("publication-search"); + let Some(mut b) = browser(&w, COUNT) else { + return; + }; + let server = fixture(&w, true); + current_run(&w, "current-run"); + assert!(publish_as(&w, "current-run")); + write( + &w.root().join(RUN).join(format!("{RUN}_search_index.json")), + r#"{"terms":{"OLDERSEARCH":[{"anchor":"clinvar","label":"OLDERSEARCH"}]}}"#, + ); + for file in [ + format!("{RUN}_search_index.json"), + format!("{RUN}%5fsearch_index.json"), + ] { + let export = get(server.port(), &format!("/runs/{RUN}/{file}")); + assert_eq!(export.status, 200); + assert!(export.text().contains("CURRENTSEARCH")); + assert!(!export.text().contains("OLDERSEARCH")); + } + let response = get(server.port(), &format!("/runs/{RUN}/snapshot.json")); + assert_eq!(response.status, 200); + b.go(&path(&server)).unwrap(); + assert!(wait(&mut b, &ready_with(OLD))); + assert!( + response.text().contains("CURRENTSEARCH") + && !response.text().contains("OLDERSEARCH") + && is_true( + &mut b, + "!JSON.stringify(window.PGP.state.plugins.search).includes('OLDERSEARCH')" + ), + "the older search index accompanied the current finding" + ); +} + +#[test] +fn an_older_publication_cannot_make_current_results_disappear() { + let w = Work::new("publication-order"); + let Some(mut b) = browser(&w, COUNT) else { + return; + }; + let server = fixture(&w, true); + current_run(&w, "current-run"); + assert!(publish_as(&w, "current-run")); + let route = format!("/runs/{RUN}/snapshot.json"); + let current = get(server.port(), &route); + assert!(current.text().contains(OLD)); + + // Leave the old writer's compatibility export as a synthetic late write. + assert!(!publish_as(&w, "previous-run")); + let d = w.root().join(RUN); + assert!( + fs::read_to_string(d.join("summary.json")) + .unwrap() + .contains("current-run") + ); + fs::copy( + w.dir.join("stage-previous-run/summary.json"), + d.join("summary.json"), + ) + .unwrap(); + let next = get(server.port(), &route); + b.go(&path(&server)).unwrap(); + assert!(wait(&mut b, READY)); + assert!( + next.text().contains(OLD) && is_true(&mut b, &ready_with(OLD)), + "a late writer hid the committed current finding" + ); +} + +#[test] +fn distinct_etags_share_a_ten_second_reload_window() { + let w = Work::new("distinct-reload-window"); + let script = format!( + "{COUNT}\n{ACCELERATED}\n{}", + r#" + const counted = window.fetch; + window.fetch = async (url, opts) => { + const response = await counted(url, opts); + if (!String(url).endsWith('snapshot.json') || opts.method !== 'HEAD') return response; + const count = Number(sessionStorage.r10Changes || 0) + 1; + sessionStorage.r10Changes = count; + const next = String(Math.min(count, 3)).repeat(64); + return new Response(null, {headers: {'ETag': '"' + next + '"', 'X-Run-Active': 'true'}}); + }; + "#, + ); + let Some(mut b) = browser(&w, &script) else { + return; + }; + let server = fixture(&w, false); + b.go(&path(&server)).unwrap(); + assert!(wait(&mut b, "Number(sessionStorage.r10Changes) >= 3")); + thread::sleep(Duration::from_millis(250)); + assert_eq!( + b.eval("Number(sessionStorage.r8Navigations)").unwrap(), + Value::Int(2), + "three rapid distinct ETags may cause only one reload" + ); + assert!( + b.wait( + "Number(sessionStorage.r8Navigations) === 3", + Duration::from_secs(12) + ) + .is_some(), + "the latest change did not reload after the window" + ); + let triggers = reload_triggers(&mut b); + let [first, second] = triggers.as_slice() else { + panic!("expected two reload triggers, got {triggers:?}"); + }; + let gap = second - first; + assert!(gap >= 10_000.0, "reloads triggered {gap:.1} ms apart"); +} diff --git a/rust/crates/og-live/tests/port_live_switch.rs b/rust/crates/og-live/tests/port_live_switch.rs index 205991b73..714976dec 100644 --- a/rust/crates/og-live/tests/port_live_switch.rs +++ b/rust/crates/og-live/tests/port_live_switch.rs @@ -445,17 +445,17 @@ fn family_entry(port: u16, name: &str) -> Value { #[test] fn home_counts_a_childs_results_to_act_on_from_the_summary_results_json_reads() { - // child_a's summary.json has no result to act on and is older than its - // step 06; the summary the site collects (results.json's) has two. + // Without a publication, the site collects two results to act on. + // The saved control below publishes an empty result. let f = Fam::new("switch-stale-child"); f.run("child_a", r#"{"sections": {}, "planted_attention": 5}"#); - f.stale("child_a"); + fs::remove_file(f.w.root().join("child_a/summary.json")).unwrap(); let srv = start(f.config()); let e = index_entry(srv.port(), "child_a"); assert_eq!( acts(&e), Some(Value::Int(2)), - "home counts the stale summary.json: {e:?}" + "home failed to count the collected summary: {e:?}" ); assert_eq!( field(&family_entry(srv.port(), "child_a"), "attention"), @@ -501,7 +501,6 @@ fn a_child_with_no_result_to_act_on_keeps_the_numbers_of_its_summary_json() { Some(Value::Str("stale lead".into())), ]; for round in ["first", "second"] { - // The second request finds the collected summary cached by the first. let e = index_entry(srv.port(), "father_a"); assert_eq!(want(&e), stale, "{round} /runs.json: {e:?}"); } diff --git a/rust/crates/og-live/tests/results_journal.rs b/rust/crates/og-live/tests/results_journal.rs index 65ecda3fe..c4d48b3d5 100644 --- a/rust/crates/og-live/tests/results_journal.rs +++ b/rust/crates/og-live/tests/results_journal.rs @@ -378,7 +378,10 @@ fn cards_keep_the_report_order_and_caveats_word_for_word() { assert_eq!(text(field(card, "id")), section.id); let want: Vec<_> = notes::section_notes(section.id) .iter() - .map(|name| notes::text(name).unwrap()) + .map(|name| match *name { + "MEI_NOTE" => og_render::sections::mei::note(), + name => notes::text(name).unwrap(), + }) .collect(); let got: Vec<_> = list(field(card, "caveat")).iter().map(text).collect(); assert!(!got.is_empty(), "{}", section.id); diff --git a/rust/crates/og-render/src/model.rs b/rust/crates/og-render/src/model.rs index 5823bb0d5..33a430e69 100644 --- a/rust/crates/og-render/src/model.rs +++ b/rust/crates/og-render/src/model.rs @@ -151,12 +151,32 @@ pub struct Summary { blank: Value, } +/// Older saved summaries used a different label for unread MEI sites. +fn normalize_mei_sites(mut data: &mut Value) { + for key in ["sections", "mei", "data", "sites"] { + let Value::Object(fields) = data else { + return; + }; + let Some(value) = fields.get_mut(key) else { + return; + }; + data = value; + } + if let Value::Array(sites) = data { + sites + .iter_mut() + .for_each(og_summary::collect::group_c::normalize_mei_site_status); + } +} + impl Summary { /// Reads summary.json's text. The top level must be an object holding /// `sections`; the frame's other keys are checked where they are read. pub fn parse(text: &str) -> Result { - let root = pycompat::json::loads(text).map_err(|e| Malformed(e.to_string()))?; + let mut root = + og_summary::callability::load_summary(text).map_err(|e| Malformed(e.to_string()))?; need(&root, "sections", "summary")?; + normalize_mei_sites(&mut root); Ok(Summary { root, empty: Value::Object(IndexMap::new()), diff --git a/rust/crates/og-render/src/render.rs b/rust/crates/og-render/src/render.rs index 42b053edd..9115041f4 100644 --- a/rust/crates/og-render/src/render.rs +++ b/rust/crates/og-render/src/render.rs @@ -3,7 +3,7 @@ //! //! ```text //! og report render (--summary IN.json | --sample S --sample-dir DIR [--json OUT.json] -//! [--declared-sex SEX] [--assets DIR]) +//! [--declared-sex SEX] [--assets DIR] [--run-id ID]) //! [-o REPORT.txt] [-o REPORT.html] //! [--search-index INDEX.json] [--charts-json CHARTS.json] //! ``` @@ -35,7 +35,7 @@ use crate::model::{Summary, py}; use crate::{charts, html, index, text}; const USAGE: &str = "usage: og report render (--summary IN.json | --sample SAMPLE --sample-dir SAMPLE_DIR \ -[--json OUT.json] [--declared-sex SEX] [--assets ASSETS]) [-o REPORT.txt] [-o REPORT.html] \ +[--json OUT.json] [--declared-sex SEX] [--assets ASSETS] [--run-id ID]) [-o REPORT.txt] [-o REPORT.html] \ [--search-index INDEX.json] [--charts-json CHARTS.json]"; #[derive(Debug, Default)] @@ -45,6 +45,7 @@ struct Args { sample_dir: Option, json: Option, declared_sex: Option, + run_id: Option, assets: Option, out: Vec, search_index: Option, @@ -75,6 +76,7 @@ fn parse(args: &[String]) -> Result { "--sample-dir" => a.sample_dir = Some(value()?), "--json" => a.json = Some(value()?), "--declared-sex" => a.declared_sex = Some(value()?), + "--run-id" => a.run_id = Some(value()?), "--assets" => a.assets = Some(value()?), "-o" | "--out" => a.out.push(value()?), "--search-index" => a.search_index = Some(value()?), @@ -153,6 +155,9 @@ fn collect(a: &Args, dest: &str, err: &mut dyn Write) -> Result if let Some(sex) = a.declared_sex.as_ref().filter(|s| !s.is_empty()) { argv.extend(["--declared-sex".to_owned(), sex.clone()]); } + if let Some(run_id) = &a.run_id { + argv.extend(["--run-id".to_owned(), run_id.clone()]); + } let rc = og_summary::collect::cli(&argv, &mut std::io::sink(), &mut &mut *err); if rc != 0 { return Err(format!( diff --git a/rust/crates/og-render/src/sections/callability.rs b/rust/crates/og-render/src/sections/callability.rs index 1309269b3..21449b877 100644 --- a/rust/crates/og-render/src/sections/callability.rs +++ b/rust/crates/og-render/src/sections/callability.rs @@ -5,7 +5,7 @@ //! body passed names the coding exon that did not; an owned gene says when //! its own step did not run. -use pycompat::fmt::fixed; +use og_summary::callability::{OwnerCounts, OwnerStatus, format_cutoff, format_percent}; use crate::model::{Card, Colour, HtmlPart, Inline, Line, Malformed, State, Summary}; use crate::notes::CALLABILITY_NOTE; @@ -14,55 +14,42 @@ use crate::{html, text}; const TITLE: &str = "Genes This Genome Could Not Read Reliably"; -/// `share` as a percent at one decimal. A share under `min` never prints at -/// or above it: 0.8999 is 89.9%, not 90.0%. The bar is compared as printed, -/// since `100.0 * 0.55` is `55.00000000000001` and `55.0` would pass under it. -pub fn percent(share: f64, min: f64) -> String { - let p = 100.0 * share; - let t = fixed(p, 1); - let bar = fixed(100.0 * min, 1).parse::().unwrap_or(100.0 * min); - if share < min && t.parse::().is_ok_and(|x| x >= bar) { - let down = (p * 10.0).floor() / 10.0; - return fixed(if down >= bar { bar - 0.1 } else { down }, 1); - } - t -} - /// `GENE (37.0%)`, `GENE (95.0%; exon GENE:exon3 not read, 41.0%)`, or /// `GENE (not on this reference)`. fn gene(g: &D<'_>, min: f64) -> Result { if g.at("status")?.is("not on this reference") { return Ok(format!("{} (not on this reference)", g.s("gene")?)); } - let mut out = format!("{} ({}%", g.s("gene")?, percent(g.at("share")?.num()?, min)); + let mut out = format!( + "{} ({}%", + g.s("gene")?, + format_percent(g.at("share")?.num()?, min) + ); if let Some(w) = g.opt("worst_exon")? { out += &format!( "; exon {} not read, {}%", w.s("exon")?, - percent(w.at("share")?.num()?, min) + format_percent(w.at("share")?.num()?, min) ); } out.push(')'); Ok(out) } -/// An owned gene and its owner, with the owner's step when it did not run -/// (`owner_status`, from the summaries that carry it). -fn owned_gene(g: &D<'_>, min: f64) -> Result { +/// An owned gene and its owner, with the run status if a current result is unconfirmed. +fn owned_gene(g: &D<'_>, min: f64, status: OwnerStatus) -> Result { let mut out = format!("{} by {}", gene(g, min)?, g.s("owner")?); - if let (Some(step), Some(status)) = (g.opt("owner_step")?, g.opt("owner_status")?) - && !status.is("ran") - { - out += &format!(", owner step {} {}", step.text()?, status.text()?); + if status != OwnerStatus::Ran { + let status = status.word(); + if let Some(step) = g.opt("owner_step")? { + out += &format!(", owner step {} {status}", step.text()?); + } else { + out += &format!(", owner status {status}"); + } } Ok(out) } -/// Whether an owned gene's step ran: true when the summary does not say. -fn owner_ran(g: &D<'_>) -> Result { - Ok(g.opt("owner_status")?.is_none_or(|s| s.is("ran"))) -} - /// The share's caveat: it counts introns, so the exon check says what it /// adds, or that this run had none. fn introns_line(d: &D<'_>) -> Result { @@ -92,7 +79,7 @@ pub fn lines(d: &D<'_>) -> Result, Malformed> { bases had {} or more reads of mapping quality {} or more.", d.s("read")?, d.s("catalog_genes")?, - fixed(100.0 * min, 0), + format_cutoff(min), d.s("min_depth")?, d.s("min_mapq")? )]; @@ -110,14 +97,15 @@ pub fn lines(d: &D<'_>) -> Result, Malformed> { "Not read, and no other step calls them ({}): {listed}", nr.len() )); - let (mut ran, mut not_ran) = (Vec::new(), Vec::new()); + let (mut ran, mut not_ran, mut unknown) = (Vec::new(), Vec::new(), Vec::new()); for g in d.at("not_read_owned")?.items()? { - let line = owned_gene(&g, min)?; - if owner_ran(&g)? { - ran.push(line); - } else { - not_ran.push(line); - } + let status = OwnerStatus::from_row(g.v); + let group = match status { + OwnerStatus::Ran => &mut ran, + OwnerStatus::NotRun | OwnerStatus::Earlier => &mut not_ran, + OwnerStatus::Unknown => &mut unknown, + }; + group.push(owned_gene(&g, min, status)?); } if !not_ran.is_empty() { out.push(format!( @@ -126,6 +114,13 @@ pub fn lines(d: &D<'_>) -> Result, Malformed> { not_ran.join(", ") )); } + if !unknown.is_empty() { + out.push(format!( + "Not read here, dedicated caller status unknown ({}): {}", + unknown.len(), + unknown.join(", ") + )); + } if !ran.is_empty() { out.push(format!( "Not read here, called by a step of their own ({}): {}", @@ -136,22 +131,6 @@ pub fn lines(d: &D<'_>) -> Result, Malformed> { Ok(out) } -/// The owned genes whose step gave no result in this run, when the summary -/// says which ran. -fn owner_not_run(d: &D<'_>) -> Result, Malformed> { - let owned = d.at("not_read_owned")?.items()?; - if !owned.iter().any(|g| g.has("owner_status")) { - return Ok(None); - } - let mut n = 0; - for g in &owned { - if !owner_ran(g)? { - n += 1; - } - } - Ok(Some(n)) -} - /// The text report's block. pub fn text(s: &Summary) -> Result, Malformed> { let Some(head) = text::head(s, "callability", Some(TITLE))? else { @@ -192,10 +171,18 @@ pub fn html(s: &Summary) -> Result { "Not read, no other caller".to_owned(), count_badge(not_read), )); - if let Some(n) = owner_not_run(&d)? { + let owned = d.at("not_read_owned")?.items()?; + let counts = OwnerCounts::from_rows(owned.iter().map(|g| g.v)); + if counts.ran + counts.no_result > 0 { body.push(Line::Stat( "Not read, their own step gave no result".to_owned(), - count_badge(n), + count_badge(counts.no_result), + )); + } + if counts.unknown > 0 { + body.push(Line::Stat( + "Not read here, dedicated caller status unknown".to_owned(), + Inline::Badge(counts.unknown.to_string(), Colour::Gray), )); } body.extend(lines(&d)?.into_iter().map(Line::Note)); diff --git a/rust/crates/og-render/src/sections/mei.rs b/rust/crates/og-render/src/sections/mei.rs index 32a44fd1d..4007acb80 100644 --- a/rust/crates/og-render/src/sections/mei.rs +++ b/rust/crates/og-render/src/sections/mei.rs @@ -2,6 +2,7 @@ //! then each known disease insertion of the catalog, seen or not. use pycompat::json::Value; +use std::sync::LazyLock; use crate::model::{ Card, Cell, HtmlPart, Inline, Layout, Line, Malformed, Section, State, Summary, Table, is_str, @@ -12,6 +13,13 @@ use crate::{html, text}; const PATH: &str = "sections.mei.data.sites[]"; +/// The catalog caveat with the same status wording as the site table. +pub fn note() -> &'static str { + static NOTE: LazyLock = + LazyLock::new(|| MEI_NOTE.replace("Not callable:", "Not assessed:")); + &NOTE +} + fn sites<'a>(d: &Section<'a>) -> Result<&'a [Value], Malformed> { match d.get("sites")? { None => Ok(&[]), @@ -64,7 +72,7 @@ pub fn lines(d: &Section<'_>) -> Result, Malformed> { f("mean_depth")? )); } - out.push(MEI_NOTE.to_owned()); + out.push(note().to_owned()); Ok(out) } @@ -94,7 +102,7 @@ pub fn html(s: &Summary) -> Result { let mut card = Card { title: "Mobile Element Insertions".to_owned(), full: true, - caveats: vec![MEI_NOTE], + caveats: vec![note()], ..Card::default() }; if d.state.ran() || d.state == State::Other { diff --git a/rust/crates/og-render/tests/charts.rs b/rust/crates/og-render/tests/charts.rs index a9f95c5d1..d3e494b9a 100644 --- a/rust/crates/og-render/tests/charts.rs +++ b/rust/crates/og-render/tests/charts.rs @@ -847,5 +847,6 @@ fn both_report_paths_write_the_charts_beside_the_report() { .unwrap() .contains("${meta.id}_charts.json") ); - assert!(sh.contains("--charts-json \"/genome/${SAMPLE}/${SAMPLE}_charts.json\"")); + assert!(sh.contains("--charts-json \"${destination}/${SAMPLE}_charts.json\"")); + assert!(sh.contains("publish-run.sh\" report \"$SAMPLE_DIR\" \"$run_id\" \"$stage\"")); } diff --git a/rust/crates/og-render/tests/display_clinical_clinvar.rs b/rust/crates/og-render/tests/display_clinical_clinvar.rs index 77c3c0f72..57deea344 100644 --- a/rust/crates/og-render/tests/display_clinical_clinvar.rs +++ b/rust/crates/og-render/tests/display_clinical_clinvar.rs @@ -93,10 +93,15 @@ fn an_owned_gene_whose_step_did_not_run_says_so() { } assert!(html.contains("Not read, their own step gave no result")); assert!(html.contains(r#"class="badge badge-red">2<"#)); - // A summary from before owner_status lists every owned gene as called. + // A summary from before owner_status leaves the run status unknown. let old = r#"{"gene": "SMN1", "owner": "parascopy", "share": 0.3712, "status": "not read"}"#; let [text, html] = reports(&callability(NEAR, old, "")); - assert!(text.contains("called by a step of their own (1): SMN1 (37.1%) by parascopy")); + for report in [&text, &html] { + assert!(report.contains( + "dedicated caller status unknown (1): SMN1 (37.1%) by parascopy, owner status unknown" + )); + assert!(!report.contains("called by a step of their own")); + } assert!(!text.contains("gave no result")); assert!(!html.contains("their own step gave no result")); } @@ -191,22 +196,22 @@ fn a_list_that_was_not_checked_never_reads_as_zero() { #[test] fn a_share_under_any_bar_never_prints_the_bar() { - use og_render::sections::callability::percent; + use og_summary::callability::format_percent; use pycompat::fmt::fixed; // 100 * 0.55 is 55.00000000000001 in binary, so a check against the // unrounded bar let 0.5499999 print as 55.0. - assert_eq!(percent(0.5499999, 0.55), "54.9"); + assert_eq!(format_percent(0.5499999, 0.55), "54.9"); for b in 50..100 { let min = f64::from(b) / 100.0; let bar = fixed(100.0 * min, 1); for share in [min - 1e-7, min - 1e-9, f64::from_bits(min.to_bits() - 1)] { assert_ne!( - percent(share, min), + format_percent(share, min), bar, "share {share} under the bar {min}" ); } - assert_eq!(percent(min, min), bar); + assert_eq!(format_percent(min, min), bar); } } @@ -228,3 +233,95 @@ fn an_exon_table_with_no_catalog_exon_says_no_exon_was_checked() { "{text}" ); } + +#[test] +fn text_and_html_show_callability_edges_for_bodies_and_exons() { + // Saved summaries can contain a measured share on either side of the + // threshold. Rendering reads the saved verdict and formats both shares. + let cases = [ + (0.8999, "89.9"), + (0.89995, "89.9"), + (0.9, "90.0"), + (0.90004, "90.0"), + (0.0, "0.0"), + (5e-20, "<0.1"), + (0.0009, "<0.1"), + (0.001, "0.1"), + (1.0, "100.0"), + (0.4286, "42.9"), + ]; + for (share, display) in cases { + let gene = format!( + r#"{{"gene":"GENE","reasons":[],"share":{share},"status":"exon not read", + "worst_exon":{{"exon":"GENE:exon1","share":{share}}}}}"# + ); + let expected = format!("GENE ({display}%; exon GENE:exon1 not read, {display}%)"); + let [text, html] = reports(&callability(&gene, "", "")); + assert!(text.contains(&expected), "{share}: {text}"); + assert!( + html.contains(&expected.replace('<', "<")), + "{share}: {html}" + ); + } +} + +#[test] +fn reports_show_the_saved_fractional_callability_cutoff() { + let mut failures = Vec::new(); + for (cutoff, body, exon, heading, body_pct, exon_pct) in [ + (0.904, 0.901, 0.90396, "90.4", "90.1", "90.3"), + (0.876, 0.87596, 0.876, "87.6", "87.5", "87.6"), + ] { + // The second is a saved-row formatting control at equality. + let gene = format!( + r#"{{"gene":"GENE","reasons":[],"share":{body},"status":"not read", + "worst_exon":{{"exon":"GENE:exon1","share":{exon}}}}}"# + ); + let sections = callability(&gene, "", "") + .replace(r#""min_share": 0.9"#, &format!(r#""min_share": {cutoff}"#)); + let reading = format!("GENE ({body_pct}%; exon GENE:exon1 not read, {exon_pct}%)"); + for report in reports(§ions) { + if !report.contains(&format!("{heading}% or more")) || !report.contains(&reading) { + failures.push(format!( + "cutoff {cutoff}: expected {heading}% or more and {reading}" + )); + } + } + } + assert!(failures.is_empty(), "{}", failures.join("\n")); +} + +#[test] +fn saved_callability_cutoff_accepts_supported_precision_and_rejects_extra_digits() { + let gene = r#"{"gene":"GENE","reasons":[],"share":0.9,"status":"not read"}"#; + let with_cutoff = |cutoff: &str| { + callability(gene, "", "") + .replace(r#""min_share": 0.9"#, &format!(r#""min_share": {cutoff}"#)) + }; + for cutoff in [ + "0.904123456000001", + "904123456000001e-15", + "0.9041234560000010", + ] { + for report in reports(&with_cutoff(cutoff)) { + assert!(report.contains("90.4123456000001% or more")); + } + } + for cutoff in ["1e-15", "10.0e-16", "0.0000000000000010"] { + for report in reports(&with_cutoff(cutoff)) { + assert!(report.contains("0.0000000000001% or more")); + } + } + for cutoff in [ + "0.90000000000000001", + "0.9041234560000011", + "90000000000000001e-17", + ] { + let raw = format!(r#"{{"sections":{{{}}}}}"#, with_cutoff(cutoff)); + let error = Summary::parse(&raw).unwrap_err().to_string(); + assert!( + error.contains("callability.min_share") && error.contains("15 decimal places"), + "{error}" + ); + } +} diff --git a/rust/crates/og-render/tests/display_sv.rs b/rust/crates/og-render/tests/display_sv.rs index 2fb5b4329..0ce0dcb9c 100644 --- a/rust/crates/og-render/tests/display_sv.rs +++ b/rust/crates/og-render/tests/display_sv.rs @@ -15,7 +15,7 @@ //! line: a reader saw Stranger's plain "full_mutation". //! - LPA (step 46) says its 95% interval covers read sampling only; the //! headline still said a bare "95% interval". -//! - MEI (step 50) "call filtered out (LC)" and "not callable" reach both +//! - MEI (step 50) "call filtered out (LC)" and "not assessed" reach both //! reports with the call and the note that explains them. //! //! A summary without the new keys keeps its old lines (the control of each @@ -240,7 +240,7 @@ fn both_reports_show_a_filtered_call_and_a_site_not_assessed() { "inheritance": "autosomal recessive", "status": "call filtered out (LC)", "mean_depth": "30.0", "call": "chr9:105639660 SVA_F 1 copy LC"}, {"gene": "TAF1", "element": "SVA", "condition": "X-linked dystonia-parkinsonism", - "inheritance": "X-linked", "status": "not callable", "mean_depth": "4.0", "call": "."}]}"#, + "inheritance": "X-linked", "status": "not assessed", "mean_depth": "4.0", "call": "."}]}"#, )); let (txt, page) = reports(&s); assert!( @@ -252,14 +252,14 @@ fn both_reports_show_a_filtered_call_and_a_site_not_assessed() { ); assert!( txt.contains( - " TAF1 SVA (X-linked dystonia-parkinsonism; X-linked): not callable (depth 4.0)\n" + " TAF1 SVA (X-linked dystonia-parkinsonism; X-linked): not assessed (depth 4.0)\n" ), "{txt}" ); let card = frame(&page, "mei"); assert!(card.contains("
"), "{card}"); - assert!(card.contains(""), "{card}"); - assert!(card.contains("Not callable: too few reads"), "{card}"); + assert!(card.contains(""), "{card}"); + assert!(card.contains("Not assessed: too few reads"), "{card}"); } // --- HTT: reduced penetrance --------------------------------------------------------- diff --git a/rust/crates/og-render/tests/i411_mei_filtered_status_docs.rs b/rust/crates/og-render/tests/i411_mei_filtered_status_docs.rs index 214d63abb..c66920127 100644 --- a/rust/crates/og-render/tests/i411_mei_filtered_status_docs.rs +++ b/rust/crates/og-render/tests/i411_mei_filtered_status_docs.rs @@ -1,6 +1,6 @@ //! The MEI section explains every status step 50 writes (#411 sv-34). //! -//! `og mei report` reads a catalog site as seen, not seen, not callable, or +//! `og mei report` reads a catalog site as seen, not seen, not assessed, or //! `call filtered out (FLAGS)` when the only calls MEGAnE made there are ones //! it flagged. The note under the section explained the first three only, so //! a reader saw "call filtered out (LC)" with nothing to say what it means. @@ -11,7 +11,6 @@ //! note, byte for byte. use og_render::model::Summary; -use og_render::notes::MEI_NOTE; use og_render::sections::mei; use og_render::{html, text}; @@ -49,16 +48,14 @@ fn summary() -> String { /// filtered-out call means. #[test] fn the_note_explains_every_status() { - assert!(MEI_NOTE.contains(FILTERED), "{MEI_NOTE}"); + let note = mei::note(); + assert!(note.contains(FILTERED), "{note}"); for status in [ - "Not callable:", + "Not assessed:", "Not seen is not proof of absence", "Call filtered out:", ] { - assert!( - MEI_NOTE.contains(status), - "{status} is not explained: {MEI_NOTE}" - ); + assert!(note.contains(status), "{status} is not explained: {note}"); } } @@ -72,7 +69,11 @@ fn both_reports_explain_a_filtered_out_call() { "FKTN SVA (Fukuyama congenital muscular dystrophy; autosomal recessive): call filtered out (LC) \ (depth 30.0, chr9:105639660 SVA_F 1 copy LC)" ); - assert_eq!(lines.last().unwrap(), MEI_NOTE); + assert_eq!( + lines[2], + "TAF1 SVA (X-linked dystonia-parkinsonism; X-linked): not assessed (depth 0.0)" + ); + assert_eq!(lines.last().unwrap(), mei::note()); let txt = text::report(&s).expect("the text report"); assert!(txt.contains("call filtered out (LC)"), "{txt}"); diff --git a/rust/crates/og-render/tests/optin_report.rs b/rust/crates/og-render/tests/optin_report.rs index e93156d19..a8923bd3f 100644 --- a/rust/crates/og-render/tests/optin_report.rs +++ b/rust/crates/og-render/tests/optin_report.rs @@ -10,7 +10,7 @@ //! of each step (og-summary's `tests/optin_summary.rs`). use og_render::model::{Line, Summary}; -use og_render::notes::{CHIP_NOTE, MCA_NOTE, MEI_NOTE, VIRAL_NOTE}; +use og_render::notes::{CHIP_NOTE, MCA_NOTE, VIRAL_NOTE}; use og_render::sections::{cdna_scan, chip, exomiser, mei, mocha, sv_callers, viral}; use og_render::{html, text}; @@ -213,7 +213,7 @@ fn the_mei_lines_and_card() { lines[1], "FKTN SVA (Fukuyama congenital muscular dystrophy; autosomal recessive): seen (depth 30.0, chr9:105639660 SVA_F 1 copy PASS)" ); - assert_eq!(lines.last().unwrap(), MEI_NOTE); + assert_eq!(lines.last().unwrap(), mei::note()); let (_, page) = both(&json); let card = frame_of(&page, "mei"); assert!(page.contains("Mobile Element Insertions") && card.contains("SVA_F")); diff --git a/rust/crates/og-reports/src/mei.rs b/rust/crates/og-reports/src/mei.rs index 155661d09..817e57bd8 100644 --- a/rust/crates/og-reports/src/mei.rs +++ b/rust/crates/og-reports/src/mei.rs @@ -21,7 +21,7 @@ //! window that passed MEGAnE's filters, FILTER `PASS`), `call filtered out //! (FLAGS)` (only calls MEGAnE flagged, such as `LC`: the first one is //! named, with its FILTER), `not seen` (none, with a mean depth of at least -//! 10 over the window), or `not callable` (no bedcov line for the window, +//! 10 over the window), or `not assessed` (no bedcov line for the window, //! or no call there and a mean under 10, zero included: too few reads to //! tell). //! @@ -399,7 +399,7 @@ fn site_status( }; let (chrom, lo, hi) = (&site[1], coord(2)?, coord(3)?); let Some(&mean) = depth.get(&(chrom.clone(), lo - 1, hi)) else { - return Ok(["not callable".into(), ".".into(), ".".into()]); + return Ok(["not assessed".into(), ".".into(), ".".into()]); }; let shown = crate::fixed(mean, 1); let calls = by_chrom.get(chrom.as_str()).map_or(&[][..], Vec::as_slice); @@ -424,7 +424,7 @@ fn site_status( return Ok([format!("call filtered out ({})", c.filter), shown, named(c)]); } if mean < MIN_DEPTH { - return Ok(["not callable".into(), shown, ".".into()]); + return Ok(["not assessed".into(), shown, ".".into()]); } Ok(["not seen".into(), shown, ".".into()]) } @@ -640,7 +640,7 @@ mod tests { rows[1] ); // The second FKTN window has its own bedcov line: 5x, too few reads. - assert!(rows[2].ends_with("\tnot callable\t5.0\t."), "{}", rows[2]); + assert!(rows[2].ends_with("\tnot assessed\t5.0\t."), "{}", rows[2]); } /// Red first: a mean depth of exactly 10 is enough to say "not seen". diff --git a/rust/crates/og-reports/tests/i411_mei_seen_pass.rs b/rust/crates/og-reports/tests/i411_mei_seen_pass.rs index a16b1b138..877eadebc 100644 --- a/rust/crates/og-reports/tests/i411_mei_seen_pass.rs +++ b/rust/crates/og-reports/tests/i411_mei_seen_pass.rs @@ -6,7 +6,7 @@ //! failed MEGAnE's filters must not make a catalog site "seen"; the site //! names the filtered call instead. Without a call, a window with too few //! reads (no bedcov line, or a mean under 10x, zero included) reads -//! "not callable", never "not seen". +//! "not assessed", never "not seen". //! //! Each case writes a synthetic MEGAnE VCF, a two-row catalog (the FKTN SVA //! window and the TAF1 SVA window) and `samtools bedcov -c` lines, then @@ -113,7 +113,7 @@ fn red_first_a_filtered_call_is_not_seen() { } /// Red first: a filtered call at a thin window still names the call; it -/// does not hide behind "not callable". +/// does not hide behind "not assessed". #[test] fn red_first_a_filtered_call_at_low_depth() { let thin = "chr9\t105639155\t105640156\tFKTN\t5005\t30\n"; @@ -147,10 +147,10 @@ fn a_pass_call_in_the_window_is_seen() { assert_eq!(status(&rows, "FKTN").0, "seen"); } -/// Without a call, zero depth, or no bedcov line at all, is "not callable" +/// Without a call, zero depth, or no bedcov line at all, is "not assessed" /// with no call, never "not seen". #[test] -fn zero_depth_is_not_callable() { +fn zero_depth_is_not_assessed() { let zero = "chr9\t105639155\t105640156\tFKTN\t0\t0\nchrX\t71439992\t71440993\tTAF1\t0\t0\n"; let rows = sites("zero", &[], zero); for gene in ["FKTN", "TAF1"] { @@ -160,15 +160,15 @@ fn zero_depth_is_not_callable() { &rows[gene]["mean_depth"], &rows[gene]["call"] ], - ["not callable", "0.0", "."], + ["not assessed", "0.0", "."], "{gene}" ); } let rows = sites("no-line", &[], ""); - assert_eq!(status(&rows, "FKTN").0, "not callable"); + assert_eq!(status(&rows, "FKTN").0, "not assessed"); assert_eq!(rows["FKTN"]["mean_depth"], "."); // Only a filtered call far from the window: depth decides, as without // any call. let rows = sites("lc-far", &[sva("chr9", 105_700_000, "LC")], zero); - assert_eq!(status(&rows, "FKTN").0, "not callable"); + assert_eq!(status(&rows, "FKTN").0, "not assessed"); } diff --git a/rust/crates/og-reports/tests/optin_mei.rs b/rust/crates/og-reports/tests/optin_mei.rs index af45a73bb..016e80a2e 100644 --- a/rust/crates/og-reports/tests/optin_mei.rs +++ b/rust/crates/og-reports/tests/optin_mei.rs @@ -254,13 +254,13 @@ fn too_few_reads() { &site(&r, "TAF1")["status"], &site(&r, "TAF1")["mean_depth"] ], - ["not callable", "9.0", "not callable", "."] + ["not assessed", "9.0", "not assessed", "."] ); let r = run("thin-call", &[fktn_sva()], thin); assert_eq!(site(&r, "FKTN")["status"], "seen", "a call at low depth"); let r = run("nodepth", &[fktn_sva()], ""); let all: Vec<&str> = r.1.iter().map(|x| x["status"].as_str()).collect(); - assert_eq!(all, ["not callable", "not callable"]); + assert_eq!(all, ["not assessed", "not assessed"]); } #[test] @@ -388,7 +388,7 @@ fn the_real_catalog() { ); let (_, s, _) = run_with("real", &vcf(&[fktn_sva()]), DEPTH_30X, &text, None).unwrap(); let all: Vec<&str> = s.iter().map(|x| x["status"].as_str()).collect(); - assert_eq!(all, ["seen", "not seen", "not callable"]); + assert_eq!(all, ["seen", "not seen", "not assessed"]); } const AHEAD: &str = "AnnotSV_ID\tSV_chrom\tSV_start\tSV_end\tSV_type\tID\tAnnotation_mode\tGene_name\tLocation\tB_ins_AFmax\tACMG_class\n"; diff --git a/rust/crates/og-runlog/src/files.rs b/rust/crates/og-runlog/src/files.rs index 61c5ecddf..955549d78 100644 --- a/rust/crates/og-runlog/src/files.rs +++ b/rust/crates/og-runlog/src/files.rs @@ -44,23 +44,35 @@ pub fn read_run_status(path: &Path) -> io::Result> { let Some(lines) = lines(path)? else { return Ok(None); }; - let mut st = RunStatus::default(); - for line in &lines { - let c: Vec<&str> = line.split('\t').collect(); - if c.len() < 3 || c[0].starts_with('#') { - continue; - } - match c[0] { - "meta" => { - st.meta.insert(c[1].to_owned(), c[2].to_owned()); + Ok(Some(RunStatus::from_lines( + lines.iter().map(String::as_str), + ))) +} + +impl RunStatus { + pub fn from_text(text: &str) -> Self { + Self::from_lines(text.lines()) + } + + fn from_lines<'a>(lines: impl IntoIterator) -> Self { + let mut st = RunStatus::default(); + for line in lines { + let c: Vec<&str> = line.split('\t').collect(); + if c.len() < 3 || c[0].starts_with('#') { + continue; } - "step" => { - st.steps.insert(c[1].to_owned(), c[2].to_owned()); + match c[0] { + "meta" => { + st.meta.insert(c[1].to_owned(), c[2].to_owned()); + } + "step" => { + st.steps.insert(c[1].to_owned(), c[2].to_owned()); + } + _ => {} } - _ => {} } + st } - Ok(Some(st)) } /// One process's row of main.nf's `nextflow/process_status.tsv`. @@ -143,13 +155,18 @@ pub fn read_events(path: Option<&Path>) -> io::Result> { }) else { return Ok(Vec::new()); }; - Ok(lines - .iter() + Ok(events_from_lines(lines.iter().map(String::as_str))) +} + +/// Decode the JSON objects in a saved weblog snapshot. +pub fn events_from_lines<'a>(lines: impl IntoIterator) -> Vec { + lines + .into_iter() .map(|l| pycompat::text::strip(l, None)) .filter(|l| !l.is_empty()) .filter_map(|l| loads(l).ok()) .filter(|v| matches!(v, Value::Object(_))) - .collect()) + .collect() } /// `{section: (source path as summary.json gives it, its file time now)}` diff --git a/rust/crates/og-runlog/src/state.rs b/rust/crates/og-runlog/src/state.rs index 8653f91f2..c00e1f7a6 100644 --- a/rust/crates/og-runlog/src/state.rs +++ b/rust/crates/og-runlog/src/state.rs @@ -583,6 +583,8 @@ mod tests { status: status.into(), start, end: start.map(|s| s + 10.0), + attempt: None, + hash: None, } } diff --git a/rust/crates/og-runlog/src/tasks.rs b/rust/crates/og-runlog/src/tasks.rs index 5e04bffd7..8b65b9e4d 100644 --- a/rust/crates/og-runlog/src/tasks.rs +++ b/rust/crates/og-runlog/src/tasks.rs @@ -5,6 +5,7 @@ use jiff::tz::TimeZone; use og_nf::task_name; use pycompat::json::Value; use pycompat::value::{py_str, truthy}; +use std::cmp::Ordering; use std::path::Path; /// Processes that run once per run with a tag that is not a sample id (the @@ -36,6 +37,9 @@ pub struct Task { /// Epoch seconds. pub start: Option, pub end: Option, + /// Retry number and execution hash, when Nextflow reported them. + pub attempt: Option, + pub hash: Option, } /// A task is the sample's when its tag is the sample id, or the id and @@ -74,6 +78,11 @@ pub fn trace_tasks(paths: &[impl AsRef], sample: &str, tz: &TimeZone) -> V status: pycompat::text::upper(r.get("status").unwrap_or("")), start, end: start.zip(dur).map(|(s, d)| s + d), + attempt: r.get("attempt").and_then(|n| n.parse().ok()), + hash: r + .get("hash") + .filter(|h| !h.is_empty() && *h != "-") + .map(str::to_owned), }); }); } @@ -168,48 +177,78 @@ pub fn event_tasks(events: &[Value], sample: &str) -> Vec { status: st, start: ms(field(tr, "start")).or_else(|| ms(field(tr, "submit"))), end: ms(field(tr, "complete")), + attempt: field(tr, "attempt").and_then(|n| text(Some(n)).parse().ok()), + hash: match field(tr, "hash") { + Some(Value::Str(h)) if !h.is_empty() && h != "-" => Some(h.clone()), + _ => None, + }, name, }); } tasks } -/// One task per task id (the trace first, then the messages in order: the -/// later wins, except that a late `started` does not undo a finished -/// task), then one per task name: the attempt with the highest id is the -/// task's outcome (a retry replaces a failed attempt). +fn id_order(a: &Task, b: &Task) -> Ordering { + let key = |t: &Task| pycompat::num::parse_int(&t.id).ok(); + match (key(a), key(b)) { + (Some(x), Some(y)) => x.cmp(&y), + (Some(_), None) => Ordering::Less, + (None, Some(_)) => Ordering::Greater, + (None, None) => a.id.cmp(&b.id), + } +} + +fn compatible(a: Option<&T>, b: Option<&T>) -> bool { + a.zip(b).is_none_or(|(a, b)| a == b) +} + +fn merge_observations(old: &Task, mut new: Task) -> Task { + let finished = |s: &str| done_ok(s) || done_bad(s); + if finished(&old.status) && !finished(&new.status) { + new.status.clone_from(&old.status); + } + new.start = new.start.or(old.start); + new.end = match (old.end, new.end) { + (Some(a), Some(b)) => Some(a.max(b)), + (a, b) => a.or(b), + }; + new.attempt = new.attempt.or(old.attempt); + if new.hash.is_none() { + new.hash.clone_from(&old.hash); + } + new +} + +/// Reconcile trace and weblog observations of the same execution, then +/// take the latest attempt of each task. Task IDs can be reused. pub fn latest_tasks(trace: Vec, events: Vec) -> Vec { - let mut by_id: IndexMap = IndexMap::new(); + let mut by_id: IndexMap<(String, String), Vec> = IndexMap::new(); for t in trace.into_iter().chain(events) { - let merged = match by_id.get(&t.id) { - Some(old) => { - let finished = |s: &str| done_ok(s) || done_bad(s); - if finished(&old.status) && !finished(&t.status) { - continue; - } - Task { - start: t.start.or(old.start), - end: t.end.or(old.end), - ..t - } - } - None => t, - }; - by_id.insert(merged.id.clone(), merged); - } - let mut all: Vec = by_id.into_values().collect(); - // Numeric ids first, in number order, then the rest in text order. - all.sort_by(|a, b| { - let key = |t: &Task| pycompat::num::parse_int(&t.id).ok(); - match (key(a), key(b)) { - (Some(x), Some(y)) => x.cmp(&y), - (Some(_), None) => std::cmp::Ordering::Less, - (None, Some(_)) => std::cmp::Ordering::Greater, - (None, None) => a.id.cmp(&b.id), + let versions = by_id.entry((t.name.clone(), t.id.clone())).or_default(); + let mut candidates = versions.iter_mut().filter(|old| { + compatible(old.attempt.as_ref(), t.attempt.as_ref()) + && compatible(old.hash.as_ref(), t.hash.as_ref()) + }); + let same = candidates.next().filter(|_| candidates.next().is_none()); + match same { + Some(old) => *old = merge_observations(old, t), + None => versions.push(t), } - }); + } + let mut all: Vec = by_id.into_values().flatten().collect(); + all.sort_by(id_order); let mut by_name: IndexMap = IndexMap::new(); for t in all { + if let Some(old) = by_name.get(&t.name) { + let order = t + .attempt + .unwrap_or(1) + .cmp(&old.attempt.unwrap_or(1)) + .then_with(|| id_order(&t, old)); + if order == Ordering::Less || (order == Ordering::Equal && t.end < old.end) { + continue; + } + } by_name.insert(t.name.clone(), t); } by_name.into_values().collect() @@ -228,6 +267,8 @@ mod tests { status: status.into(), start: None, end: None, + attempt: None, + hash: None, } } diff --git a/rust/crates/og-summary/src/callability.rs b/rust/crates/og-summary/src/callability.rs new file mode 100644 index 000000000..7facfaa86 --- /dev/null +++ b/rust/crates/og-summary/src/callability.rs @@ -0,0 +1,211 @@ +//! The step 16b cutoff and the percentage shown for its measurements. + +use pycompat::fmt::{fixed, round}; +use pycompat::json::{self, JsonError, Value}; +use std::cmp::Ordering; + +const MIN_NUMERATOR: u128 = 9; +const MIN_DENOMINATOR: u128 = 10; +const CUTOFF_DECIMAL_PLACES: i64 = 15; +/// The validation message for a saved cutoff outside the supported range or precision. +pub const CUTOFF_ERROR: &str = + "callability.min_share must be between 0 and 1 with at most 15 decimal places"; +const DISPLAY_DECIMALS: usize = 1; +const DISPLAY_STEP: f64 = 0.1; +const DISPLAY_STEP_SHARE: f64 = DISPLAY_STEP / 100.0; + +/// The cutoff carried in summary.json. +pub const CALLABLE_SHARE: f64 = MIN_NUMERATOR as f64 / MIN_DENOMINATOR as f64; + +/// Read a saved summary. Check the original cutoff token before converting +/// it to a float can conceal unsupported precision. +pub fn load_summary(text: &str) -> Result { + json::loads_with_field_check( + text, + &["sections", "callability", "data", "min_share"], + check_cutoff, + ) +} + +fn check_cutoff(token: &str, value: &Value) -> Result<(), &'static str> { + match value { + Value::Float(n) if (0.0..=1.0).contains(n) => {} + Value::Int(0 | 1) => return Ok(()), + _ => return Err(CUTOFF_ERROR), + } + let (mantissa, exponent) = token.split_once(['e', 'E']).unwrap_or((token, "0")); + if mantissa.bytes().all(|b| !matches!(b, b'1'..=b'9')) { + return Ok(()); + } + let exponent = exponent.parse::().map_err(|_| CUTOFF_ERROR)?; + let (integer, fraction) = mantissa.split_once('.').unwrap_or((mantissa, "")); + let fraction = fraction.trim_end_matches('0'); + // An exponent moves the point, so zeros in the integer can matter too. + let decimal_places = if fraction.is_empty() { + integer.trim_end_matches('0').len() as i64 - integer.len() as i64 + } else { + fraction.len() as i64 + }; + if decimal_places > exponent.saturating_add(CUTOFF_DECIMAL_PLACES) { + return Err(CUTOFF_ERROR); + } + Ok(()) +} + +/// The saved run status for a gene with a dedicated caller. +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum OwnerStatus { + /// The caller left a result for this run. + Ran, + /// The caller left no result. + NotRun, + /// The saved result predates this run. + Earlier, + /// An older summary or an unrecognized status gives no run evidence. + Unknown, +} + +impl OwnerStatus { + /// Read a saved gene row. Only an explicit `ran` is a current result. + pub fn from_row(row: &Value) -> Self { + let Value::Object(fields) = row else { + return Self::Unknown; + }; + match fields.get("owner_status") { + Some(Value::Str(status)) => match status.as_str() { + "ran" => Self::Ran, + "not run" => Self::NotRun, + "from an earlier run" => Self::Earlier, + _ => Self::Unknown, + }, + _ => Self::Unknown, + } + } + + pub fn word(self) -> &'static str { + match self { + Self::Ran => "ran", + Self::NotRun => "not run", + Self::Earlier => "from an earlier run", + Self::Unknown => "unknown", + } + } +} + +#[derive(Default)] +pub struct OwnerCounts { + pub ran: usize, + pub no_result: usize, + pub unknown: usize, +} + +impl OwnerCounts { + pub fn from_rows<'a>(rows: impl IntoIterator) -> Self { + let mut counts = Self::default(); + for row in rows { + match OwnerStatus::from_row(row) { + OwnerStatus::Ran => counts.ran += 1, + OwnerStatus::NotRun | OwnerStatus::Earlier => counts.no_result += 1, + OwnerStatus::Unknown => counts.unknown += 1, + } + } + counts + } +} + +#[derive(Clone, Copy)] +pub(crate) struct CallableBases { + callable: u64, + total: u64, +} + +impl CallableBases { + pub(crate) fn new(callable: i128, total: i128) -> Option { + let callable = u64::try_from(callable).ok()?; + let total = u64::try_from(total).ok()?; + (callable <= total).then_some(Self { callable, total }) + } + + /// Empty intervals are unread. Widen the products before comparing them. + pub(crate) fn is_read(self) -> bool { + self.total != 0 + && u128::from(self.callable) * MIN_DENOMINATOR >= u128::from(self.total) * MIN_NUMERATOR + } + + /// Rank the original fractions, treating an empty interval as zero. + pub(crate) fn compare_share(self, other: Self) -> Ordering { + let left = u128::from(self.callable) * u128::from(other.total.max(1)); + let right = u128::from(other.callable) * u128::from(self.total.max(1)); + left.cmp(&right) + } + + /// Keep the existing wire precision unless rounding would change the + /// cutoff verdict or hide a nonzero callable-base count. + pub(crate) fn summary_share(self) -> f64 { + let read = self.is_read(); + let share = self.callable as f64 / self.total.max(1) as f64; + let rounded = round(share, 4).unwrap_or(share); + if self.callable != 0 && rounded == 0.0 { + share + } else if !read && rounded == CALLABLE_SHARE { + share.min(CALLABLE_SHARE.next_down()) + } else { + rounded + } + } +} + +/// Read the zero/nonzero count distinction from the wire share. The +/// collector preserves it even when rounding would erase a positive count. +pub fn has_callable_bases(share: f64) -> bool { + share > 0.0 +} + +/// Format a measured share at one decimal place. Preserve its side of the +/// cutoff and show positive shares under one display step as a bound. +pub fn format_percent(share: f64, min_share: f64) -> String { + if has_callable_bases(share) && share < DISPLAY_STEP_SHARE { + // If the cutoff is itself below one display step, include it so + // the bound still tells the reader which side the measurement is on. + if min_share > 0.0 && min_share < DISPLAY_STEP_SHARE { + let cutoff = format_cutoff(min_share); + if share < min_share { + return format!("<{cutoff}"); + } + return format!("≥{cutoff}% and <{DISPLAY_STEP}"); + } + return format!("<{DISPLAY_STEP}"); + } + let rounded = fixed(share * 100.0, DISPLAY_DECIMALS); + // Convert the displayed decimal to a share in one parse. Dividing a + // parsed float by 100 would make 87.6% compare below the saved 0.876. + let Ok(shown_share) = format!("{rounded}e-2").parse::() else { + return rounded; + }; + let adjustment = match (share < min_share, shown_share < min_share) { + (true, false) => -1.0, + (false, true) => 1.0, + _ => return rounded, + }; + let Ok(shown) = rounded.parse::() else { + return rounded; + }; + fixed(shown + adjustment * DISPLAY_STEP, DISPLAY_DECIMALS) +} + +/// State the saved cutoff as a percent with all its decimal digits. +pub fn format_cutoff(min_share: f64) -> String { + let saved = min_share.to_string(); + let Some(fraction) = saved.strip_prefix("0.") else { + return fixed(min_share * 100.0, 0); + }; + let digits = format!("{fraction:0<2}"); + let (whole, rest) = digits.split_at(2); + let whole = whole.trim_start_matches('0'); + let whole = if whole.is_empty() { "0" } else { whole }; + if rest.is_empty() { + whole.to_owned() + } else { + format!("{whole}.{rest}") + } +} diff --git a/rust/crates/og-summary/src/collect.rs b/rust/crates/og-summary/src/collect.rs index 16b757e32..94472c731 100644 --- a/rust/crates/og-summary/src/collect.rs +++ b/rust/crates/og-summary/src/collect.rs @@ -53,7 +53,7 @@ use std::io::Write; use std::path::Path; const USAGE: &str = "usage: og summary collect --sample SAMPLE --sample-dir SAMPLE_DIR [--out OUT] - [--declared-sex DECLARED_SEX] [--assets ASSETS] [--only {a,b,c}] + [--declared-sex DECLARED_SEX] [--assets ASSETS] [--only {a,b,c}] [--run-id ID] "; const OPTS: &[Opt] = &[ @@ -61,6 +61,7 @@ const OPTS: &[Opt] = &[ Opt("--sample-dir", Kind::Value, true), Opt("--declared-sex", Kind::Value, false), Opt("--out", Kind::Value, false), + Opt("--run-id", Kind::Value, false), Opt("--assets", Kind::Value, false), Opt("--only", Kind::Choice(&["a", "b", "c"]), false), ]; @@ -147,10 +148,18 @@ pub fn cli(argv: &[String], out: &mut impl Write, err: &mut impl Write) -> u8 { Group::B => group_b::collect(&input).map(|s| s.to_json()), Group::A | Group::C => collect(&input).map(|s| s.to_json()), }; - let value = match read { + let mut value = match read { Ok(v) => v, Err(e) => return crate::finish(Err(e), err), }; + if let Some(run_id) = a.get("--run-id") + && let pycompat::json::Value::Object(fields) = &mut value + { + fields.insert( + "run_id".into(), + pycompat::json::Value::Str(run_id.to_owned()), + ); + } let body = match dumps( &value, &Dump { diff --git a/rust/crates/og-summary/src/collect/carrier.rs b/rust/crates/og-summary/src/collect/carrier.rs index 435081419..b553f0741 100644 --- a/rust/crates/og-summary/src/collect/carrier.rs +++ b/rust/crates/og-summary/src/collect/carrier.rs @@ -20,6 +20,7 @@ //! (low-confidence call); a pair the confident calls prove alone keeps its //! word, whatever weak call sits beside it. +use super::acmg::phenotypes; use super::assets::carrier_genes; use super::clinvar::{ Floor, Hit, HitRecords, VarKey, allele_copies, carrier_genotype, condition_fields, obj, @@ -245,6 +246,7 @@ impl Carrier { Ok((f, r)) => (*f, r), Err(e) => return Ok(unavailable(e.clone())), }; + let pheno = phenotypes(assets).unwrap_or_default(); let mut items: Vec> = Vec::new(); // Which list each item is on: carriers (false) or set aside (true). let mut aside: Vec = Vec::new(); @@ -283,6 +285,12 @@ impl Carrier { for (k, v) in condition_fields(c) { item.insert(k.into(), v); } + if let Some(p) = pheno.get(g) { + item.insert( + "condition_not_acmg".into(), + Value::Bool(p.other_disease(g, c)), + ); + } } if row.combined_allele != "." { item.insert( diff --git a/rust/crates/og-summary/src/collect/group_c.rs b/rust/crates/og-summary/src/collect/group_c.rs index fc456a6d6..c9e6f71ff 100644 --- a/rust/crates/og-summary/src/collect/group_c.rs +++ b/rust/crates/og-summary/src/collect/group_c.rs @@ -22,7 +22,10 @@ mod tables; mod traits; pub mod util; +pub use tables::normalize_mei_site_status; + use super::model::{Spec, State}; + use super::scan::FolderIndex; use super::sections::Data; use pycompat::json::Value; diff --git a/rust/crates/og-summary/src/collect/group_c/repeats.rs b/rust/crates/og-summary/src/collect/group_c/repeats.rs index e45290cbd..bc9051392 100644 --- a/rust/crates/og-summary/src/collect/group_c/repeats.rs +++ b/rust/crates/og-summary/src/collect/group_c/repeats.rs @@ -955,7 +955,16 @@ fn ugt1a1(c: &Ctx<'_>, by: &IndexMap, cpic: State) -> Value { .into_iter() .find(|r| r.get("Gene").flatten() == Some("UGT1A1")) }); - if let Some(row) = row { + // Step 27 can keep a non-normal status when it flags unread positions. + let incomplete = row.as_ref().is_some_and(|r| { + r.get("Status").flatten() == Some("incomplete") + || r.get("Phenotype") + .flatten() + .is_some_and(|p| p.contains(" [incomplete: positions not read: ")) + }); + if let Some(row) = row + && !incomplete + { let d = super::util::or(&row, "Diplotype", ""); let d = pycompat::num::py_strip(&d); pc = if d.is_empty() { @@ -990,6 +999,9 @@ fn ugt1a1(c: &Ctx<'_>, by: &IndexMap, cpic: State) -> Value { "differs" => format!( " PharmCAT (step 7) called {pc}, a different number of *28 and *37 copies{old}: read the reads at chr2:233760234 before using either." ), + _ if incomplete => { + " Not compared with PharmCAT because it did not read all defining positions.".to_owned() + } _ if !readable => format!( " Not compared with PharmCAT (step 27's table is {}).", other_state(cpic) diff --git a/rust/crates/og-summary/src/collect/group_c/tables.rs b/rust/crates/og-summary/src/collect/group_c/tables.rs index f84b8f908..d0f3e3824 100644 --- a/rust/crates/og-summary/src/collect/group_c/tables.rs +++ b/rust/crates/og-summary/src/collect/group_c/tables.rs @@ -1398,6 +1398,16 @@ pub fn chip(c: &Ctx<'_>) -> Out { // --- step 50 -------------------------------------------------------------------- +/// Normalize the status used by step 50 before "not assessed". +pub fn normalize_mei_site_status(site: &mut Value) { + if let Value::Object(fields) = site + && let Some(Value::Str(status)) = fields.get_mut("status") + && status == "not callable" + { + *status = "not assessed".into(); + } +} + pub fn mei(c: &Ctx<'_>) -> Out { let Some(p) = c.find1(format!("mei/{}_mei_sites.tsv", c.s())) else { return Ok(None); @@ -1447,7 +1457,17 @@ pub fn mei(c: &Ctx<'_>) -> Out { ) .set( "sites", - Value::Array(sites.rows.iter().map(|r| dots(r, &need)).collect()), + Value::Array( + sites + .rows + .iter() + .map(|r| { + let mut site = dots(r, &need); + normalize_mei_site_status(&mut site); + site + }) + .collect(), + ), ) .val(); Ok(Some((p, v))) diff --git a/rust/crates/og-summary/src/collect/sections.rs b/rust/crates/og-summary/src/collect/sections.rs index 14cc9b582..a802ecd0b 100644 --- a/rust/crates/og-summary/src/collect/sections.rs +++ b/rust/crates/og-summary/src/collect/sections.rs @@ -4,10 +4,13 @@ //! the step wrote nothing, or the note of an unreadable section. use super::model::{Manifest, RUN_ALL_STEPS, RunStatus, Section, State, is_stale, opt_str}; +pub use crate::callability::OwnerStatus; +use crate::callability::{CALLABLE_SHARE, CallableBases}; use crate::{basename, float, int, text_lines}; use indexmap::IndexMap; use pycompat::csv::{DictReader, DictRow, Quoting}; use pycompat::json::Value; +use std::collections::HashMap; use std::io::BufRead; /// The data of one section. @@ -271,9 +274,6 @@ pub fn selected_no_result( // --- gene callability (step 16b) ----------------------------------------------------- -/// A gene counts as read when this share of its bases reached the depth. -pub const CALLABLE_SHARE: f64 = 0.9; - /// The share of a gene's bases at the depth, and what it means. #[derive(Debug, Clone, PartialEq)] pub enum Reading { @@ -332,28 +332,6 @@ pub struct OwnerRun { pub status: OwnerStatus, } -/// What the owner's step left in the sample folder. -#[derive(Debug, Clone, Copy, PartialEq, Eq)] -pub enum OwnerStatus { - /// Its file is there, from this run. - Ran, - /// Its file is not there. - NotRun, - /// Its file is older than the last run and the step was not ok in that - /// run: the rule that makes a section stale. - Earlier, -} - -impl OwnerStatus { - fn word(self) -> &'static str { - match self { - OwnerStatus::Ran => "ran", - OwnerStatus::NotRun => "not run", - OwnerStatus::Earlier => "from an earlier run", - } - } -} - /// The step behind an owner of `assets/callability_genes.tsv` and the file /// that step writes in the sample folder (`{s}` the sample, `{t}` the /// gene's table in `assets/paralog_loci.tsv`) when it ran. `None` for an @@ -423,8 +401,8 @@ pub struct Callability { } /// The data rows of a mosdepth thresholds table of one depth: the depth, -/// and (chrom, region, bases, bases at the depth) of each row. -type Thresholds = (i128, Vec<(String, String, i128, i128)>); +/// and each row's chromosome, region and callable counts. +type Thresholds = (i128, Vec<(String, String, CallableBases)>); fn thresholds(table: &str) -> Result { let name = basename(table); @@ -461,42 +439,36 @@ fn thresholds(table: &str) -> Result { } let v = |s: &str| int(s).map_err(|e| py_error("ValueError", &e)); let (start, end, ok) = (v(&c[1])?, v(&c[2])?, v(&c[4])?); - out.push((c[0].clone(), c[3].clone(), end - start, ok)); + let counts = end + .checked_sub(start) + .and_then(|total| CallableBases::new(ok, total)) + .ok_or_else(|| format!("{name}: invalid callable base count for {}", c[3]))?; + out.push((c[0].clone(), c[3].clone(), counts)); } Ok((min_depth, out)) } -/// The share of `n` bases that `ok` are, to four decimals; 0 for no bases. -fn share(n: i128, ok: i128) -> Result { - if n == 0 { - return Ok(0.0); - } - pycompat::fmt::round(ok as f64 / n as f64, 4) - .map_err(|e| py_error(e.exception(), &e.to_string())) +struct MeasuredExon { + exon: String, + number: u64, + counts: CallableBases, } -/// Step 16b's exon table (`_callability_exons.bed.gz`, rows named -/// `GENE:exonN`) read against the catalog: the worst coding exon of each -/// catalog gene it has rows for (the lower exon number on a tie), and how -/// many exon rows of catalog genes it holds. Rows of other genes are left -/// out: the table follows the catalog it was measured with. -fn worst_exons( +/// Read the exon table against the catalog. Keep each gene's least +/// callable unread exon, using its exon number to break exact ties. +fn worst_unread_exons( catalog: &[CatalogRow], table: &str, -) -> Result<(std::collections::HashMap, usize), String> { +) -> Result<(HashMap, usize), String> { let name = basename(table); let (_, rows) = thresholds(table)?; let genes: std::collections::HashSet<&str> = catalog.iter().map(|r| r.gene.as_str()).collect(); - let number = |exon: &str| { - exon.rsplit_once(":exon") - .and_then(|(_, n)| n.parse::().ok()) - }; - let mut worst: std::collections::HashMap = std::collections::HashMap::new(); + let mut worst: HashMap = HashMap::new(); let mut checked = 0; - for (_, region, n, ok) in rows { - let Some((gene, _)) = region + for (_, region, counts) in rows { + let Some((gene, number)) = region .rsplit_once(":exon") - .filter(|_| number(®ion).is_some()) + .and_then(|(gene, n)| n.parse::().ok().map(|number| (gene, number))) else { return Err(format!("{name}: {region:?} is not named GENE:exonN")); }; @@ -504,17 +476,21 @@ fn worst_exons( continue; } checked += 1; - let s = share(n, ok)?; - let gene = gene.to_owned(); - let better = worst - .get(&gene) - .is_none_or(|w| (s, number(®ion)) < (w.share, number(&w.exon))); - if better { + if counts.is_read() { + continue; + } + if worst.get(gene).is_none_or(|w| { + counts + .compare_share(w.counts) + .then_with(|| number.cmp(&w.number)) + .is_lt() + }) { worst.insert( - gene, - WorstExon { + gene.to_owned(), + MeasuredExon { exon: region, - share: s, + number, + counts, }, ); } @@ -595,11 +571,10 @@ impl Callability { pub fn read(catalog: &[CatalogRow], table: &str) -> Result { let name = basename(table); let (min_depth, rows) = thresholds(table)?; - let mut bases: std::collections::HashMap<&str, (i128, i128)> = - std::collections::HashMap::new(); - for (_, region, n, ok) in &rows { - bases.insert(region, (*n, *ok)); - } + let bases: HashMap<&str, CallableBases> = rows + .iter() + .map(|(_, region, counts)| (region.as_str(), *counts)) + .collect(); if bases.is_empty() { return Err(format!("{name} has no gene rows")); } @@ -628,39 +603,37 @@ impl Callability { }); let (worst, exons_checked) = match &exon_table { Some(p) => { - let (w, n) = worst_exons(catalog, p)?; + let (w, n) = worst_unread_exons(catalog, p)?; (w, Some(n)) } - None => (std::collections::HashMap::new(), None), + None => (HashMap::new(), None), }; let mut genes = Vec::with_capacity(catalog.len()); for r in catalog { - let reading = if r.start == "." || !contigs.contains(r.chrom.as_str()) { - Reading::NotOnReference + let (reading, worst_exon) = if r.start == "." || !contigs.contains(r.chrom.as_str()) { + (Reading::NotOnReference, None) } else { - let Some(&(n, ok)) = bases.get(r.gene.as_str()) else { + let Some(&counts) = bases.get(r.gene.as_str()) else { return Err(format!( "{name} has no row for {}: it was written from another assets/callability_genes.tsv; run step 16b again", r.gene )); }; - let share = share(n, ok)?; - if share < CALLABLE_SHARE { + let read = counts.is_read(); + let share = counts.summary_share(); + let worst_exon = worst.get(r.gene.as_str()).map(|w| WorstExon { + exon: w.exon.clone(), + share: w.counts.summary_share(), + }); + let reading = if !read { Reading::NotRead(share) - } else if worst - .get(r.gene.as_str()) - .is_some_and(|w| w.share < CALLABLE_SHARE) - { + } else if worst_exon.is_some() { Reading::ExonNotRead(share) } else { Reading::Read(share) - } + }; + (reading, worst_exon) }; - // The worst coding exon, named only when it was not read. - let worst_exon = worst - .get(r.gene.as_str()) - .filter(|w| w.share < CALLABLE_SHARE && reading != Reading::NotOnReference) - .cloned(); let owner = (r.owner != ".").then(|| r.owner.clone()); let owner_run = match (folder, sample) { (Some(dir), Some(s)) => owner_file(r, dir, s).map(|(step, file)| OwnerRun { diff --git a/rust/crates/og-summary/src/lib.rs b/rust/crates/og-summary/src/lib.rs index 4aa53eeca..38e965f6e 100644 --- a/rust/crates/og-summary/src/lib.rs +++ b/rust/crates/og-summary/src/lib.rs @@ -14,9 +14,11 @@ //! when an input cannot be read or the table cannot be written, and 2 with //! the usage for a command line it cannot read. +pub mod callability; pub mod collect; pub mod mito; pub mod prs; +pub mod publication; pub mod qc; mod args; diff --git a/rust/crates/og-summary/src/publication.rs b/rust/crates/og-summary/src/publication.rs new file mode 100644 index 000000000..2e008cd9b --- /dev/null +++ b/rust/crates/og-summary/src/publication.rs @@ -0,0 +1,257 @@ +//! The atomic report and progress publication for the current run. + +use indexmap::IndexMap; +use pycompat::json::{Dump, Value, dumps, loads}; +use std::fs::{self, File, OpenOptions}; +use std::io::{self, Write}; +use std::path::Path; + +pub const SNAPSHOT: &str = "logs/run_snapshot.json"; + +type Fields = IndexMap; + +pub struct Publication(Fields); + +impl Publication { + pub fn read(dir: &Path) -> io::Result> { + let text = match fs::read_to_string(dir.join(SNAPSHOT)) { + Ok(text) => text, + Err(e) if e.kind() == io::ErrorKind::NotFound => return Ok(None), + Err(e) => return Err(e), + }; + match loads(&text) { + Ok(Value::Object(fields)) if matches!(fields.get("run_id"), Some(Value::Str(id)) if !id.is_empty()) => { + Ok(Some(Self(fields))) + } + _ => Err(io::Error::new( + io::ErrorKind::InvalidData, + "invalid run snapshot", + )), + } + } + + pub fn run_id(&self) -> &str { + self.text("run_id").unwrap_or_default() + } + + pub fn text(&self, key: &str) -> Option<&str> { + match self.value(key) { + Some(Value::Str(text)) => Some(text), + _ => None, + } + } + + pub fn value(&self, key: &str) -> Option<&Value> { + self.0.get(key) + } + + fn stage(self, dir: &Path) -> io::Result { + let mut file = og_io::AtomicFile::create(dir.join(SNAPSHOT))?; + let bytes = dumps(&Value::Object(self.0), &Dump::default()).map_err(|_| { + io::Error::new(io::ErrorKind::InvalidData, "cannot encode run snapshot") + })?; + file.write_all(bytes.as_bytes())?; + Ok(file) + } +} + +fn lock(dir: &Path) -> io::Result { + fs::create_dir_all(dir.join("logs"))?; + let file = OpenOptions::new() + .create(true) + .truncate(false) + .read(true) + .write(true) + .open(dir.join("logs/.publication.lock"))?; + file.lock()?; + Ok(file) +} + +fn write(path: &Path, bytes: &[u8]) -> io::Result<()> { + let mut file = og_io::AtomicFile::create(path)?; + file.write_all(bytes)?; + file.commit() +} + +/// Start a new run before any of its progress can become visible. +pub fn start(dir: &Path, id: &str) -> io::Result<()> { + let _lock = lock(dir)?; + let epoch = std::time::SystemTime::now() + .duration_since(std::time::UNIX_EPOCH) + .unwrap_or_default() + .as_secs(); + Publication(Fields::from([ + ("run_id".into(), Value::Str(id.into())), + ( + "progress".into(), + Value::Str(format!("meta\tstarted_epoch\t{epoch}\n")), + ), + ])) + .stage(dir)? + .commit() +} + +enum Change { + Progress(String), + Finish(String), + Text(String), + Report { + fields: Fields, + exports: Vec<(String, String)>, + }, +} + +fn change(dir: &Path, id: &str, change: Change) -> io::Result { + let _lock = lock(dir)?; + let Some(mut saved) = Publication::read(dir)?.filter(|p| p.run_id() == id) else { + return Ok(false); + }; + let exports = match change { + Change::Progress(text) => { + saved.0.insert("progress".into(), Value::Str(text.clone())); + vec![("logs/run_status.tsv".to_owned(), text)] + } + Change::Finish(at) => { + let progress = format!( + "{}meta\tfinished_utc\t{at}\n", + saved.text("progress").unwrap_or_default() + ); + saved + .0 + .insert("progress".into(), Value::Str(progress.clone())); + vec![("logs/run_status.tsv".to_owned(), progress)] + } + Change::Text(text) => { + let name = dir.file_name().and_then(|x| x.to_str()).ok_or_else(|| { + io::Error::new(io::ErrorKind::InvalidInput, "missing sample directory name") + })?; + write(&dir.join(format!("{name}_report.txt")), text.as_bytes())?; + return Ok(true); + } + Change::Report { fields, exports } => { + for key in ["summary", "search", "charts", "html"] { + saved.0.shift_remove(key); + } + saved.0.extend(fields); + exports + } + }; + let staged = saved.stage(dir)?; + for (name, text) in exports { + write(&dir.join(name), text.as_bytes())?; + } + staged.commit()?; + Ok(true) +} + +pub fn progress(dir: &Path, id: &str, text: String) -> io::Result { + change(dir, id, Change::Progress(text)) +} + +/// The renderer's work directory is private to this attempt. Once all +/// outputs exist, commit their content together and refresh the report +/// exports used by command-line consumers. +pub fn report(dir: &Path, id: &str, stage: &Path) -> io::Result { + let sample = dir.file_name().and_then(|s| s.to_str()).ok_or_else(|| { + io::Error::new(io::ErrorKind::InvalidInput, "missing sample directory name") + })?; + let mut fields = Fields::new(); + let mut exports = Vec::new(); + for (key, name) in [ + ("summary", "summary.json".to_owned()), + ("search", format!("{sample}_search_index.json")), + ("charts", format!("{sample}_charts.json")), + ("html", format!("{sample}_report.html")), + ("", format!("{sample}_report.txt")), + ] { + let path = stage.join(&name); + let text = match fs::read_to_string(&path) { + Ok(text) => text, + Err(e) if e.kind() == io::ErrorKind::NotFound && key != "summary" => continue, + Err(e) => return Err(e), + }; + if !key.is_empty() { + let v = match key { + "html" => Value::Str(text.clone()), + "summary" => crate::callability::load_summary(&text) + .map_err(|e| io::Error::new(io::ErrorKind::InvalidData, e.to_string()))?, + _ => loads(&text) + .map_err(|e| io::Error::new(io::ErrorKind::InvalidData, e.to_string()))?, + }; + if key == "summary" + && !matches!(&v, Value::Object(o) if o.get("run_id") == Some(&Value::Str(id.into())) && o.contains_key("sections")) + { + return Err(io::Error::new( + io::ErrorKind::InvalidData, + "summary belongs to a different run", + )); + } + fields.insert(key.into(), v); + } + exports.push((name, text)); + } + change(dir, id, Change::Report { fields, exports }) +} + +const USAGE: &str = "usage: og report publish start RUN_DIR RUN_ID | progress RUN_DIR RUN_ID TSV | report RUN_DIR RUN_ID STAGING_DIR | text RUN_DIR RUN_ID STAGING_DIR | finish RUN_DIR RUN_ID UTC | id RUN_DIR\n"; + +pub fn cli(args: &[String], out: &mut dyn Write, err: &mut dyn Write) -> u8 { + if args.iter().any(|a| matches!(a.as_str(), "--help" | "-h")) { + let _ = write!(out, "{USAGE}"); + return 0; + } + if let [op, dir] = args + && op == "id" + { + return match Publication::read(Path::new(dir)) { + Ok(Some(saved)) => { + let _ = writeln!(out, "{}", saved.run_id()); + 0 + } + Ok(None) => 0, + Err(e) => { + let _ = writeln!(err, "og report publish: {e}"); + 1 + } + }; + } + let result = match args { + [op, dir, id, at] if op == "finish" => { + change(Path::new(dir), id, Change::Finish(at.clone())) + } + [op, dir, id, source] if op == "text" => { + let path = Path::new(dir); + let name = path + .file_name() + .and_then(|x| x.to_str()) + .unwrap_or_default(); + fs::read_to_string(Path::new(source).join(format!("{name}_report.txt"))) + .and_then(|text| change(path, id, Change::Text(text))) + } + [op, dir, id] if op == "start" && !id.trim().is_empty() => { + start(Path::new(dir), id).map(|()| true) + } + [op, dir, id, source] if op == "progress" => { + fs::read_to_string(source).and_then(|data| progress(Path::new(dir), id, data)) + } + [op, dir, id, source] if op == "report" => report(Path::new(dir), id, Path::new(source)), + _ => { + let _ = write!(err, "{USAGE}"); + return 2; + } + }; + match result { + Ok(true) => 0, + Ok(false) => { + let _ = writeln!( + err, + "og report publish: skipped an earlier run's publication" + ); + 0 + } + Err(e) => { + let _ = writeln!(err, "og report publish: {e}"); + 1 + } + } +} diff --git a/rust/crates/og-summary/tests/i411_callability_exons.rs b/rust/crates/og-summary/tests/i411_callability_exons.rs index bc063fdf4..202abd6a4 100644 --- a/rust/crates/og-summary/tests/i411_callability_exons.rs +++ b/rust/crates/og-summary/tests/i411_callability_exons.rs @@ -462,3 +462,109 @@ fn a_gene_not_read_on_its_body_with_every_exon_read_names_no_exon() { "an exon is named only when it was not read: {g:?}" ); } + +/// The collector must classify the integer counts before serializing a share. +#[test] +fn raw_callability_cutoff_for_bodies_and_exons() { + use og_summary::collect::sections::{Callability, CatalogRow, Data}; + + let cases = [ + ("below", 8_999, 10_000, false), + ("rounds-up", 17_999, 20_000, false), + ("body-real-length", 7_512, 8_347, false), + ("exon-real-length", 10_844, 12_049, false), + ("equal", 9, 10, true), + ("above", 22_501, 25_000, true), + ("tiny-positive", 1, 50_000, false), + ("empty", 0, 0, false), + ("one-base", 1, 1, true), + ]; + let catalog = |gene: &str| CatalogRow { + gene: gene.into(), + hgnc_id: ".".into(), + chrom: "chr1".into(), + start: "0".into(), + reasons: "segdup".into(), + owner: ".".into(), + table: None, + }; + let mut failures = Vec::new(); + for (tag, callable, total, read) in cases { + let d = Dir::new(tag); + d.put_gz( + "mosdepth/S_callability.bed.gz", + &format!("{HEAD}chr1\t0\t{total}\tBODY\t{callable}\nchr1\t0\t10\tEXON\t10\n"), + ); + d.put_gz( + "mosdepth/S_callability_exons.bed.gz", + &format!("{HEAD}chr1\t0\t{total}\tEXON:exon1\t{callable}\n"), + ); + let collected = Callability::read( + &[catalog("BODY"), catalog("EXON")], + d.0.join("mosdepth/S_callability.bed.gz").to_str().unwrap(), + ) + .unwrap(); + let data = Data::Callability(collected).to_json(); + let Value::Array(unread) = at(&data, "not_read") else { + panic!("{data:?}"); + }; + for (gene, status) in [("BODY", "not read"), ("EXON", "exon not read")] { + let row = unread.iter().find(|g| st(at(g, "gene")) == gene); + if read { + if row.is_some() { + failures.push(format!("{tag} {gene}: expected read, got {row:?}")); + } + } else if let Some(row) = row { + assert_eq!(st(at(row, "status")), status, "{tag} {gene}"); + let share = if gene == "EXON" { + num(at(at(row, "worst_exon"), "share")) + } else { + num(at(row, "share")) + }; + assert!(share < 0.9, "{tag} {gene}: {share}"); + if (share > 0.0) != (callable != 0) { + failures.push(format!( + "{tag} {gene}: {callable}/{total} serialized as {share}" + )); + } + } else { + failures.push(format!( + "{tag} {gene}: {callable}/{total} was reported read" + )); + } + } + } + assert!(failures.is_empty(), "{}", failures.join("\n")); +} + +#[test] +fn worst_exon_uses_raw_shares_when_display_precision_ties() { + use og_summary::collect::sections::{Callability, CatalogRow}; + + let d = Dir::new("raw-worst-exon"); + d.put_gz( + "mosdepth/S_callability.bed.gz", + &format!("{HEAD}chr1\t0\t100000\tGENE\t100000\n"), + ); + d.put_gz( + "mosdepth/S_callability_exons.bed.gz", + &format!("{HEAD}chr1\t0\t100000\tGENE:exon1\t89912\nchr1\t0\t20000\tGENE:exon2\t17982\n"), + ); + let report = Callability::read( + &[CatalogRow { + gene: "GENE".into(), + hgnc_id: ".".into(), + chrom: "chr1".into(), + start: "0".into(), + reasons: "segdup".into(), + owner: ".".into(), + table: None, + }], + d.0.join("mosdepth/S_callability.bed.gz").to_str().unwrap(), + ) + .unwrap(); + assert_eq!( + report.genes[0].worst_exon.as_ref().unwrap().exon, + "GENE:exon2" + ); +} diff --git a/rust/crates/og-summary/tests/i411_sf_condition_shown.rs b/rust/crates/og-summary/tests/i411_sf_condition_shown.rs index 8a809c282..2937729be 100644 --- a/rust/crates/og-summary/tests/i411_sf_condition_shown.rs +++ b/rust/crates/og-summary/tests/i411_sf_condition_shown.rs @@ -318,6 +318,33 @@ fn a_carrier_row_keeps_clinvar_condition() { assert!(!without.contains_key("clinvar_condition"), "{without:?}"); } +#[test] +fn carrier_and_acmg_rows_agree_about_the_clinvar_condition() { + let hits = vec![ + hit("chr10", 43_100_000, "RET", HIRSCHSPRUNG), + hit("chr10", 43_114_500, "RET", MEN2), + hit("chr7", 117_559_590, "CFTR", ";CLNDN=Cystic_fibrosis"), + ]; + let sf = tier(ASSETS, hits.clone()); + let c = Carrier::read(ASSETS, &Ok((Floor::default(), hits)), &no_deletions()) + .unwrap() + .to_json(); + let carriers = rows(&c, "carriers"); + for (pos, other) in [(43_100_000, true), (43_114_500, false)] { + let sf = sf_row(&sf, pos); + let carrier = carriers + .iter() + .find(|m| s(m, "variant") == s(sf, "variant")) + .unwrap(); + assert_eq!(s(carrier, "clinvar_condition"), s(sf, "clinvar_condition")); + assert_eq!(mark(carrier), mark(sf)); + assert_eq!(mark(carrier), Some(&Value::Bool(other))); + } + let cftr = carriers.iter().find(|m| s(m, "gene") == "CFTR").unwrap(); + assert_eq!(s(cftr, "clinvar_condition"), "Cystic fibrosis"); + assert!(mark(cftr).is_none(), "{cftr:?}"); +} + #[test] fn the_clinvar_section_hit_keeps_clinvar_condition() { let hits = HitsVcf { diff --git a/rust/crates/og-summary/tests/optin_summary.rs b/rust/crates/og-summary/tests/optin_summary.rs index 936200f9d..cde5976a5 100644 --- a/rust/crates/og-summary/tests/optin_summary.rs +++ b/rust/crates/og-summary/tests/optin_summary.rs @@ -401,6 +401,14 @@ fn mei_section_and_its_not_assessed_line() { ); assert!(!not_assessed(&s).iter().any(|x| x == MEI_NOT_ASSESSED)); + d.put( + "S/mei/S_mei_sites.tsv", + &MEI_SITES.replace("\tnot seen\t30.0\t.", "\tnot callable\t0.0\t."), + ); + let s = collect(&d.p("S"), "S"); + let sites = list(at(data(&s, "mei"), &["sites"])); + assert_eq!(text(at(&sites[1], &["status"])), "not assessed"); + fs::write(&calls, format!("{}\n", MEI_CALLS.lines().next().unwrap())).unwrap(); assert_eq!( text(at(data(&collect(&d.p("S"), "S"), "mei"), &["calls"])), diff --git a/rust/crates/og-summary/tests/port_tests_summary.rs b/rust/crates/og-summary/tests/port_tests_summary.rs index 455dc7f88..37aaa2287 100644 --- a/rust/crates/og-summary/tests/port_tests_summary.rs +++ b/rust/crates/og-summary/tests/port_tests_summary.rs @@ -1469,6 +1469,70 @@ fn combined_ugt1a1_agrees(case: &str, pharmcat: &str) { ugt1a1_call(&d.collect(), "*1/*28", "agrees"); } +#[test] +fn extra_repeats_do_not_compare_an_incomplete_ugt1a1_call() { + let d = Sample::new("extra-repeats-incomplete-ugt1a1", "S"); + put_extra_repeats( + &d, + ExtraRepeats { + ugt: "7/7", + ..ExtraRepeats::default() + }, + ); + let cpic = "Gene\tDiplotype\tPhenotype\tStatus\n\ +UGT1A1\t*1/*1\tNormal Metabolizer\t"; + d.put("cpic/S_phenotypes.tsv", format!("{cpic}incomplete\n")); + let summary = d.collect(); + ugt1a1_call(&summary, "*1/*1", "not_compared"); + let ugt = repeat_reading(&summary, "UGT1A1"); + expect(ugt, "pharmcat", r#"".""#); + assert!(string(ugt, "reading").contains("Not compared with PharmCAT")); + + d.put("cpic/S_phenotypes.tsv", format!("{cpic}normal\n")); + let summary = d.collect(); + ugt1a1_call(&summary, "*1/*1", "agrees"); + expect(repeat_reading(&summary, "UGT1A1"), "pharmcat", r#""*1/*1""#); +} + +#[test] +fn extra_repeats_do_not_compare_a_non_normal_ugt1a1_call_with_unread_sites() { + let d = Sample::new("extra-repeats-ugt1a1-unread-sites", "S"); + put_extra_repeats( + &d, + ExtraRepeats { + ugt: "7/8", + ..ExtraRepeats::default() + }, + ); + let cpic = "Gene\tDiplotype\tPhenotype\tStatus\n\ +UGT1A1\t*1/*28\tIntermediate Metabolizer"; + d.put( + "cpic/S_phenotypes.tsv", + format!("{cpic} [incomplete: positions not read: rs1]\tnon-normal\n"), + ); + + let summary = d.collect(); + ugt1a1_call(&summary, "*1/*28", "not_compared"); + let ugt = repeat_reading(&summary, "UGT1A1"); + expect(ugt, "status", r#""read""#); + expect(ugt, "pharmcat", r#"".""#); + let reading = string(ugt, "reading"); + assert!(reading.contains("1 decreased-function allele"), "{reading}"); + assert!( + reading.contains("did not read all defining positions"), + "{reading}" + ); + + d.put("cpic/S_phenotypes.tsv", format!("{cpic}\tnon-normal\n")); + let summary = d.collect(); + ugt1a1_call(&summary, "*1/*28", "agrees"); + expect( + repeat_reading(&summary, "UGT1A1"), + "pharmcat", + r#""*1/*28""#, + ); +} + #[test] fn extra_repeats_compare_a_combined_pharmcat_allele() { combined_ugt1a1_agrees("extra-repeats-exf", "*80+*28/*1"); diff --git a/rust/crates/pycompat/src/json.rs b/rust/crates/pycompat/src/json.rs index 5a6bdecc1..8d93367ab 100644 --- a/rust/crates/pycompat/src/json.rs +++ b/rust/crates/pycompat/src/json.rs @@ -210,14 +210,31 @@ pub fn quote(out: &mut String, s: &str, ensure_ascii: bool) { /// `json.loads(text)`. pub fn loads(text: &str) -> Result { + parse(text, &[], None) +} + +type FieldCheck = fn(&str, &Value) -> Result<(), &'static str>; + +/// Parse JSON and check a named object field using its original token. +/// The path consists of object keys from the root to the field. +pub fn loads_with_field_check( + text: &str, + path: &[&str], + check: FieldCheck, +) -> Result { + parse(text, path, Some(check)) +} + +fn parse(text: &str, path: &[&str], check: Option) -> Result { let mut p = Parser { + check, s: text.as_bytes(), text, i: 0, depth: 0, }; p.ws(); - let v = p.value()?; + let v = p.value(path)?; p.ws(); if p.i != p.s.len() { return Err(JsonError::Decode("Extra data", p.i)); @@ -226,6 +243,7 @@ pub fn loads(text: &str) -> Result { } struct Parser<'a> { + check: Option, s: &'a [u8], text: &'a str, i: usize, @@ -253,7 +271,7 @@ impl Parser<'_> { } } - fn value(&mut self) -> Result { + fn value(&mut self, path: &[&str]) -> Result { match self.s.get(self.i) { Some(b'{' | b'[') => { if self.depth == MAX_DEPTH { @@ -261,7 +279,7 @@ impl Parser<'_> { } self.depth += 1; let v = if self.s[self.i] == b'{' { - self.object() + self.object(path) } else { self.array() }; @@ -426,7 +444,7 @@ impl Parser<'_> { } loop { self.ws(); - a.push(self.value()?); + a.push(self.value(&[])?); self.ws(); if self.eat("]") { return Ok(Value::Array(a)); @@ -437,7 +455,7 @@ impl Parser<'_> { } } - fn object(&mut self) -> Result { + fn object(&mut self, path: &[&str]) -> Result { self.i += 1; let mut m = IndexMap::new(); self.ws(); @@ -455,7 +473,18 @@ impl Parser<'_> { return self.err("Expecting ':' delimiter"); } self.ws(); - let v = self.value()?; + let remaining = path + .split_first() + .filter(|(key, _)| **key == k) + .map(|(_, rest)| rest); + let start = self.i; + let v = self.value(remaining.unwrap_or_default())?; + if remaining == Some(&[]) + && let Some(check) = self.check + { + check(&self.text[start..self.i], &v) + .map_err(|why| JsonError::Decode(why, start))?; + } // A duplicate key keeps its first place and takes the last value, as a dict does. m.insert(k, v); self.ws(); diff --git a/rust/og/src/main.rs b/rust/og/src/main.rs index 060822490..5bfe07a23 100644 --- a/rust/og/src/main.rs +++ b/rust/og/src/main.rs @@ -38,6 +38,7 @@ Run a genome (docs/getting-started.md): og lookup query|resolve|report [args] your genotype at an rsID, a position or in a gene, from a finished run og report render [args] + og report publish [args] the text and HTML report from a run's summary.json og live serve [args] the live site of a run @@ -192,6 +193,7 @@ const OWN_HELP: &[&str] = &[ "str catalog", "qc sex-loss", "report render", + "report publish", "couple screen|genes", "ancestry-fine panel-map|check-map|freqs|project|chroms|report|simulate", "archaic table|strict|genotypes|report", @@ -575,6 +577,7 @@ fn main() -> ExitCode { &rest[1..], ), Some("charts") => io(og_render::charts::cli, &rest[1..]), + Some("publish") => io(og_summary::publication::cli, &rest[1..]), Some(other) => usage_error(&format!("unknown report tool '{other}'")), None => usage_error("the following arguments are required: report tool"), }, diff --git a/rust/og/tests/callability_outputs.rs b/rust/og/tests/callability_outputs.rs new file mode 100644 index 000000000..a3d1e899c --- /dev/null +++ b/rust/og/tests/callability_outputs.rs @@ -0,0 +1,330 @@ +use std::path::{Path, PathBuf}; + +use og_facts::build::Genome; +use og_render::{escape::e, model::Summary}; +use og_summary::callability::{format_cutoff, format_percent}; +use pycompat::json::Value; +use pycompat::value::get; + +const SAMPLE: &str = "SYN-01"; + +fn fixture(cutoff: &str, ordinary: &str, owned: &str) -> String { + format!( + r#"{{"sample":"{SAMPLE}","generated_utc":"2026-01-02 03:04 UTC", + "run":{{"started_utc":null,"declared_sex":"female"}}, + "databases":{{"clinvar_release":null,"cpsr_clinvar_release":null,"hla_database":null}}, + "cyp2d6":null,"manifest":[],"not_run":[],"not_assessed":[], + "sections":{{"callability":{{"title":"Gene callability","state":"ok","data":{{ + "min_share":{cutoff},"min_depth":10,"min_mapq":20,"catalog_genes":10,"read":0, + "not_read":[{ordinary}],"not_read_owned":[{owned}],"not_on_reference":[]}}}}}}}}"# + ) +} + +struct Scratch(PathBuf); + +impl Drop for Scratch { + fn drop(&mut self) { + let _ = std::fs::remove_dir_all(&self.0); + } +} + +struct NoSequence; + +impl Genome for NoSequence { + fn get(&mut self, _: &str, _: u64, _: u64) -> Result, String> { + panic!("the synthetic coverage fixture has no sequence or calls") + } +} + +struct Outputs { + text: String, + html: String, + live: Value, + facts: Value, +} + +fn render(name: &str, raw: &str) -> Outputs { + let summary = Summary::parse(raw).unwrap(); + let scratch = + Scratch(std::env::temp_dir().join(format!("og-callability-{}-{name}", std::process::id()))); + std::fs::create_dir_all(&scratch.0).unwrap(); + std::fs::write(scratch.0.join("summary.json"), raw).unwrap(); + let panels = + og_facts::panels::Panels::load(&Path::new(env!("CARGO_MANIFEST_DIR")).join("../../assets")) + .unwrap(); + Outputs { + text: og_render::text::report(&summary).unwrap(), + html: og_render::html::report(&summary).unwrap(), + live: og_live::results::build(SAMPLE, summary.root(), None).unwrap(), + facts: og_facts::build::build(SAMPLE, &scratch.0, &panels, &mut NoSequence) + .unwrap() + .doc, + } +} + +fn field<'a>(obj: &'a Value, key: &str) -> &'a Value { + get(obj, key).unwrap().unwrap() +} + +fn list(v: &Value) -> &[Value] { + let Value::Array(rows) = v else { + panic!("expected an array: {v:?}") + }; + rows +} + +fn string(v: &Value) -> &str { + let Value::Str(s) = v else { + panic!("expected a string: {v:?}") + }; + s +} + +impl Outputs { + fn card(&self) -> &Value { + list(field(&self.live, "chapters")) + .iter() + .flat_map(|c| list(field(c, "sections"))) + .find(|c| string(field(c, "id")) == "callability") + .unwrap() + } + + fn live_row(&self, gene: &str) -> &[Value] { + list(field(field(self.card(), "table"), "rows")) + .iter() + .map(list) + .find(|r| string(&r[0]) == gene) + .unwrap() + } + + fn coverage(&self, gene: &str) -> &Value { + list(field(&self.facts, "coverage")) + .iter() + .find(|r| string(field(r, "id")) == gene) + .unwrap() + } + + fn report_line(&self, expected: &str) { + assert!(self.text.contains(expected), "text missing {expected:?}"); + assert!( + self.html.contains(e(expected).as_ref()), + "HTML missing {expected:?}" + ); + } + fn report_group(&self, expected: &str) { + assert!( + self.text.lines().any(|line| line.trim() == expected), + "text missing complete group {expected:?}" + ); + let html = format!(r#"

{}

"#, e(expected)); + assert!( + self.html.lines().any(|line| line.trim() == html), + "HTML missing complete group {expected:?}" + ); + } +} + +#[test] +fn callability_displays_the_shared_format_at_every_output_boundary() { + let cases = [ + ( + "default", + "0.9", + &[ + "0", + "5e-324", + "0.0009999999999999998", + "0.001", + "0.8999999999999999", + "0.9", + ][..], + ), + ( + "fractional", + "0.904123456000001", + &["0.904123456", "0.904123456000001"][..], + ), + ]; + for (name, cutoff, shares) in cases { + let data = shares + .iter() + .enumerate() + .map(|(i, share)| { + format!( + r#"{{"gene":"TEST{i}","reasons":[],"share":{share},"status":"exon not read", + "worst_exon":{{"exon":"TEST{i}:exon1","share":{share}}}}}"# + ) + }) + .collect::>() + .join(","); + let out = render(name, &fixture(cutoff, &data, "")); + let min = cutoff.parse::().unwrap(); + out.report_line(&format!(" {}% or more of their bases", format_cutoff(min))); + for (i, share) in shares.iter().enumerate() { + let gene = format!("TEST{i}"); + let percent = format!("{}%", format_percent(share.parse::().unwrap(), min)); + out.report_line(&format!( + "{gene} ({percent}; exon {gene}:exon1 not read, {percent})" + )); + let row = out.live_row(&gene); + assert_eq!(string(&row[2]), percent, "live body at {cutoff}/{share}"); + assert_eq!( + string(&row[1]), + format!("exon {gene}:exon1 not read, {percent}") + ); + let note = string(field(out.coverage(&gene), "note")); + assert!( + note.starts_with(&format!("{percent} of the gene ")), + "OwnHealth body: {note}" + ); + assert!( + note.ends_with(&format!( + "Exon {gene}:exon1 was not read ({percent} callable)" + )), + "OwnHealth exon: {note}" + ); + } + } +} + +#[test] +fn all_outputs_distinguish_saved_and_unknown_caller_status() { + let cases = [ + ("RAN", r#","owner_status":"ran""#, "ran", "ran"), + ( + "ABSENT", + r#","owner_status":"not run""#, + "not run", + "did not run", + ), + ( + "EARLIER", + r#","owner_status":"from an earlier run""#, + "from an earlier run", + "has a result from an earlier run", + ), + ("LEGACY", "", "unknown", "is unknown"), + ("NULL", r#","owner_status":null"#, "unknown", "is unknown"), + ]; + let data = cases.iter().flat_map(|(tag, status, _, _)| { + [0.0, 0.31].into_iter().enumerate().map(move |(i, share)| format!( + r#"{{"gene":"{tag}{i}","owner":"pypgx","owner_step":"32"{status},"share":{share},"status":"not read"}}"# + )) + }).collect::>().join(","); + let out = render("owner-status", &fixture("0.9", "", &data)); + let facts = list(field(out.card(), "facts")); + let fact = |label| { + facts + .iter() + .map(list) + .find(|f| string(&f[0]) == label) + .map(|f| string(&f[1])) + }; + assert_eq!( + fact("Not read here, called by a step of their own"), + Some("2") + ); + assert_eq!( + fact("Not read here, their own step gave no result"), + Some("4") + ); + assert_eq!( + fact("Not read here, dedicated caller status unknown"), + Some("4") + ); + out.report_line("Not read here, called by a step of their own (2): RAN0 (0.0%) by pypgx, RAN1 (31.0%) by pypgx"); + out.report_line("Not read here, and the step that calls them gave no result in this run (4):"); + out.report_line("Not read here, dedicated caller status unknown (4):"); + for (tag, _, status, note_status) in cases { + for i in 0..2 { + let gene = format!("{tag}{i}"); + assert_eq!( + string(&out.live_row(&gene)[3]), + format!("pypgx (step 32 {status})") + ); + if tag != "RAN" { + out.report_line(&format!( + "{gene} ({}%) by pypgx, owner step 32 {status}", + if i == 0 { "0.0" } else { "31.0" } + )); + } + let own = out.coverage(&gene); + let note = string(field(own, "note")); + assert!(note.ends_with(note_status), "{gene}: {note}"); + let state = if tag == "RAN" || i == 1 { + "partial" + } else { + "not_assessed" + }; + assert_eq!(string(field(own, "state")), state, "{gene}"); + } + } +} + +#[test] +fn all_outputs_keep_caller_status_for_fixed_panels_without_their_screen() { + let owned = r#" + {"gene":"PMS2","owner":"parascopy","owner_step":"35","share":0,"status":"not read"}, + {"gene":"SMN1","owner":"parascopy","owner_step":"35","owner_status":null,"share":0.31, + "status":"not read","worst_exon":{"exon":"SMN1:exon1","share":0.12}}, + {"gene":"CYP2D6","owner":"pypgx","owner_step":"32","owner_status":"ran","share":0,"status":"not read"} + "#; + let out = render("fixed-panels-no-screen", &fixture("0.9", "", owned)); + let clinvar = "the ClinVar screen (step 06) did not run"; + let cases = [ + ( + "PMS2", + "acmg_sf_v3.3", + "parascopy (step 35 unknown)", + "PMS2 (0.0%) by parascopy, owner step 35 unknown", + clinvar, + "run status of the dedicated caller (parascopy, step 35) is unknown", + ), + ( + "SMN1", + "carrier", + "parascopy (step 35 unknown)", + "SMN1 (31.0%; exon SMN1:exon1 not read, 12.0%) by parascopy, owner step 35 unknown", + clinvar, + "run status of the dedicated caller (parascopy, step 35) is unknown", + ), + ( + "CYP2D6", + "cpic", + "pypgx (step 32 ran)", + "Not read here, called by a step of their own (1): CYP2D6 (0.0%) by pypgx", + "the PGx steps (07, 27) did not run", + "the dedicated caller (pypgx, step 32) ran", + ), + ]; + let mut missing = Vec::new(); + for (gene, panel, live, report, screen, caller) in cases { + assert_eq!(string(&out.live_row(gene)[3]), live); + if gene == "CYP2D6" { + out.report_group(report); + } else { + out.report_line(report); + } + let row = out.coverage(gene); + assert_eq!(string(field(row, "panel")), panel, "{gene}"); + assert_eq!(string(field(row, "state")), "not_assessed", "{gene}"); + assert_eq!(string(field(row, "reason")), "not_run", "{gene}"); + let note = string(field(row, "note")); + assert!(note.starts_with(screen), "{gene}: {note}"); + if note.matches(caller).count() != 1 { + missing.push(format!( + "{gene}: expected one dedicated caller note, got {note}" + )); + } + if gene == "SMN1" { + assert!( + note.ends_with("Exon SMN1:exon1 was not read (12.0% callable)"), + "{note}" + ); + } + } + let unknown = owned.replace(r#""owner_status":"ran""#, r#""owner_status":null"#); + let out = render("fixed-panels-unknown", &fixture("0.9", "", &unknown)); + out.report_group("Not read here, dedicated caller status unknown (3): PMS2 (0.0%) by parascopy, owner step 35 unknown, SMN1 (31.0%; exon SMN1:exon1 not read, 12.0%) by parascopy, owner step 35 unknown, CYP2D6 (0.0%) by pypgx, owner step 32 unknown"); + assert!(missing.is_empty(), "{}", missing.join("\n")); +} diff --git a/scripts/24-html-report.sh b/scripts/24-html-report.sh index bb9240126..c13bf002d 100755 --- a/scripts/24-html-report.sh +++ b/scripts/24-html-report.sh @@ -21,6 +21,9 @@ GENOME_DIR=${GENOME_DIR:?Set GENOME_DIR to your data directory} validate_sample "$SAMPLE" SAMPLE_DIR="${GENOME_DIR}/${SAMPLE}" OUTPUT="${SAMPLE_DIR}/${SAMPLE}_report.html" +run_id=$(summary_run_id "$SAMPLE_DIR") +provenance=() +[ -z "$run_id" ] || provenance=(--run-id "$run_id") if [ ! -d "$SAMPLE_DIR" ]; then echo "ERROR: Sample directory not found: ${SAMPLE_DIR}" >&2 @@ -41,18 +44,31 @@ if [ ! -f "${SAMPLE_DIR}/run_manifest.tsv" ]; then fi echo "Reading pipeline outputs and writing the report..." -rm -f "$OUTPUT" "${SAMPLE_DIR}/${SAMPLE}_search_index.json" "${SAMPLE_DIR}/${SAMPLE}_charts.json" +destination="/genome/$SAMPLE" +stage= +if [ -n "$run_id" ] && [ -f "$SAMPLE_DIR/logs/run_snapshot.json" ]; then + stage=$(mktemp -d "$SAMPLE_DIR/logs/.report.XXXXXXXX") + trap 'rm -rf "$stage"' EXIT + destination="/genome/$SAMPLE/logs/${stage##*/}" +else + rm -f "$OUTPUT" "$SAMPLE_DIR/${SAMPLE}_search_index.json" "$SAMPLE_DIR/${SAMPLE}_charts.json" +fi # assets/: the ACMG SF rules (acmg_sf.tsv) and the carrier list (carrier_genes.tsv). # og is the static binary, so OG_IMAGE (stock Ubuntu) runs it. run_in -v "${PGP_ROOT}/bin:/pgp-bin:ro" -v "${PGP_ROOT}/assets:/pgp-assets:ro" "${OG_IMAGE}" \ /pgp-bin/og report render \ + "${provenance[@]}" \ --assets /pgp-assets \ --sample "$SAMPLE" \ --sample-dir "/genome/${SAMPLE}" \ - --json "/genome/${SAMPLE}/summary.json" \ - -o "/genome/${SAMPLE}/${SAMPLE}_report.html" \ - --search-index "/genome/${SAMPLE}/${SAMPLE}_search_index.json" \ - --charts-json "/genome/${SAMPLE}/${SAMPLE}_charts.json" + --json "${destination}/summary.json" \ + -o "${destination}/${SAMPLE}_report.html" \ + --search-index "${destination}/${SAMPLE}_search_index.json" \ + --charts-json "${destination}/${SAMPLE}_charts.json" + +if [ -n "${stage:-}" ]; then + bash "$PGP_ROOT/scripts/publish-run.sh" report "$SAMPLE_DIR" "$run_id" "$stage" +fi if [ ! -f "$OUTPUT" ]; then echo "ERROR: the report was not written: ${OUTPUT}" >&2 diff --git a/scripts/50-mei.sh b/scripts/50-mei.sh index 782756bee..332126583 100755 --- a/scripts/50-mei.sh +++ b/scripts/50-mei.sh @@ -10,7 +10,7 @@ # cause disease (assets/mei_sites.tsv: the FKTN SVA of Fukuyama muscular # dystrophy, the TAF1 SVA of X-linked dystonia-parkinsonism, the BBS1 SVA of # Bardet-Biedl syndrome) as seen (a call that passed MEGAnE's filters), call -# filtered out (only calls MEGAnE flagged), not seen, or not callable (too few +# filtered out (only calls MEGAnE flagged), not seen, or not assessed (too few # reads there to tell). With AnnotSV's data in GENOME_DIR (annotsv_annotations/, as # step 05 reads it), AnnotSV annotates the insertions the table lists: the # genes each falls in, where in them, the frequency of a benign insertion at @@ -28,7 +28,7 @@ # with at least one copy, and AnnotSV's genes, location, # benign frequency and class ("." without AnnotSV's data) # mei/_mei_annotsv.tsv AnnotSV's table of those insertions (with its data only) -# mei/_mei_sites.tsv the catalog with seen / call filtered out / not seen / not callable +# mei/_mei_sites.tsv the catalog with seen / call filtered out / not seen / not assessed # mei/_mei_depth.tsv samtools bedcov over the catalog windows # mei/_megane.log MEGAnE's log # MEGAnE reads the whole BAM; about an hour for a 30x genome on 4 threads, in diff --git a/scripts/ci/fake-docker/lib.sh b/scripts/ci/fake-docker/lib.sh index 22610b767..c5d224716 100644 --- a/scripts/ci/fake-docker/lib.sh +++ b/scripts/ci/fake-docker/lib.sh @@ -229,6 +229,28 @@ mk() { *) mkdir -p "$(dirname "$h")"; : > "$h" ;; esac } +# A tracked report is promoted by the real publisher, which reads its JSON. +if [ "$#" -ge 3 ] && [ "$1 $2 $3" = '/pgp-bin/og report render' ]; then + run_id= summary= search= charts= + while [ "$#" -ge 2 ]; do + case "$1" in + --run-id) run_id=$2 ;; + --json) summary=$2 ;; + --search-index) search=$2 ;; + --charts-json) charts=$2 ;; + esac + shift + done + if [ -n "$run_id" ] && [ -n "$summary" ]; then + mk "$summary" + printf '{"run_id":"%s","sections":{}}\n' "$run_id" > "$(host_path "$summary")" + for output in "$search" "$charts"; do + [ -n "$output" ] || continue + mk "$output" + printf '{}\n' > "$(host_path "$output")" + done + fi +fi q="['\"]?" path='/[^[:space:];&|"'\'']+' while read -r p; do diff --git a/scripts/generate-report.sh b/scripts/generate-report.sh index e6c79ea13..a3c448fe3 100755 --- a/scripts/generate-report.sh +++ b/scripts/generate-report.sh @@ -25,6 +25,7 @@ GENOME_DIR=${GENOME_DIR:?Set GENOME_DIR to your data directory} validate_sample "$SAMPLE" SAMPLE_DIR="${GENOME_DIR}/${SAMPLE}" REPORT="${SAMPLE_DIR}/${SAMPLE}_report.txt" +run_id=$(summary_run_id "$SAMPLE_DIR") # Check sample directory exists if [ ! -d "$SAMPLE_DIR" ]; then @@ -49,6 +50,7 @@ fi summary_current() { local s="${SAMPLE_DIR}/summary.json" newer src [ -s "$s" ] && [ ! -L "$s" ] || return 1 + [ -z "$run_id" ] || grep -Fqx -e " \"run_id\": \"$run_id\"" -e " \"run_id\": \"$run_id\"," "$s" || return 1 if grep -q '^ "status_file": true' "$s"; then [ -e "${SAMPLE_DIR}/logs/run_status.tsv" ] || return 1 fi @@ -73,13 +75,28 @@ summary_current() { [ -z "$newer" ] } -rm -f "$REPORT" -if summary_current; then +reuse=false +if summary_current; then reuse=true; fi +destination="/genome/$SAMPLE" +stage= +if [ -n "$run_id" ] && [ -f "$SAMPLE_DIR/logs/run_snapshot.json" ]; then + stage=$(mktemp -d "$SAMPLE_DIR/logs/.report.XXXXXXXX") + trap 'rm -rf "$stage"' EXIT + destination="/genome/$SAMPLE/logs/${stage##*/}" +else + rm -f "$REPORT" +fi +if $reuse; then echo "Rendering from summary.json: step 24 wrote it and nothing it reads has changed since" from=(--summary "/genome/${SAMPLE}/summary.json") else # assets/: the ACMG SF rules (acmg_sf.tsv) and the carrier list (carrier_genes.tsv). - from=(--assets /pgp-assets --json "/genome/${SAMPLE}/summary.json") + from=(--assets /pgp-assets --json "$destination/summary.json") + [ -z "$run_id" ] || from+=(--run-id "$run_id") + if [ -n "${stage:-}" ]; then + from+=(--search-index "$destination/${SAMPLE}_search_index.json" + --charts-json "$destination/${SAMPLE}_charts.json") + fi fi # og is the static binary, so OG_IMAGE (stock Ubuntu) runs it. run_in -v "${PGP_ROOT}/bin:/pgp-bin:ro" -v "${PGP_ROOT}/assets:/pgp-assets:ro" "${OG_IMAGE}" \ @@ -87,7 +104,15 @@ run_in -v "${PGP_ROOT}/bin:/pgp-bin:ro" -v "${PGP_ROOT}/assets:/pgp-assets:ro" " "${from[@]}" \ --sample "$SAMPLE" \ --sample-dir "/genome/${SAMPLE}" \ - -o "/genome/${SAMPLE}/${SAMPLE}_report.txt" + -o "$destination/${SAMPLE}_report.txt" + +if [ -n "${stage:-}" ]; then + if [ -f "$stage/summary.json" ]; then + bash "$PGP_ROOT/scripts/publish-run.sh" report "$SAMPLE_DIR" "$run_id" "$stage" + else + bash "$PGP_ROOT/scripts/publish-run.sh" text "$SAMPLE_DIR" "$run_id" "$stage" + fi +fi if [ ! -f "$REPORT" ]; then echo "ERROR: the report was not written: ${REPORT}" >&2 diff --git a/scripts/lib/common.sh b/scripts/lib/common.sh index 2e00e5aa5..db087a4ff 100644 --- a/scripts/lib/common.sh +++ b/scripts/lib/common.sh @@ -1146,3 +1146,13 @@ live_post() { fi return 0 } + +# The pipeline passes its own id even if another invocation starts before +# publication. A manual report uses the attempt visible when it starts. +summary_run_id() { + if [ -n "${OWNGENOME_RUN_ID:-}" ]; then + printf '%s\n' "$OWNGENOME_RUN_ID" + elif [ -f "$1/logs/run_snapshot.json" ]; then + bash "$PGP_ROOT/scripts/publish-run.sh" id "$1" + fi +} diff --git a/scripts/publish-run.sh b/scripts/publish-run.sh new file mode 100755 index 000000000..69d1f2b78 --- /dev/null +++ b/scripts/publish-run.sh @@ -0,0 +1,30 @@ +#!/usr/bin/env bash +# The host publisher works for both launchers. The container fallback +# supports hosts with only the pipeline's Linux binary. +set -euo pipefail +command=$1 +sample_dir=$2 +shift 2 +if [ "$command" = id ] && [ ! -e "$sample_dir/logs/run_snapshot.json" ]; then exit 0; fi +GENOME_DIR=$(dirname "$sample_dir") +# The publisher reads no reference. A REF_FASTA from the caller's +# environment may lie outside this GENOME_DIR, and common.sh would stop on it. +unset REF_FASTA +# shellcheck source=lib/common.sh +. "$(dirname "$0")/lib/common.sh" +og="$PGP_ROOT/bin/og" +if "$og" --version >/dev/null 2>&1; then + exec "$og" report publish "$command" "$sample_dir" "$@" +fi + +target="/publication/$(basename "$sample_dir")" +mounts=(-v "$PGP_ROOT/bin:/pgp-bin:ro" -v "$sample_dir:$target") +args=() +[ "$#" -eq 0 ] || args+=("$1") +if [ "$command" = finish ]; then + args+=("$2") +elif [ "$#" -eq 2 ]; then + mounts+=(-v "$2:/staging:ro") + args+=(/staging) +fi +run_in "${mounts[@]}" "$OG_IMAGE" /pgp-bin/og report publish "$command" "$target" "${args[@]}" diff --git a/scripts/run-all.sh b/scripts/run-all.sh index 207657875..b42ad9a41 100755 --- a/scripts/run-all.sh +++ b/scripts/run-all.sh @@ -195,20 +195,25 @@ if [ -n "${FAMILIES:-}" ]; then fi mkdir -p "${S}/nextflow" "$LOG_DIR" GENOME_DIR="$G" bash "${PGP_ROOT}/bin/write_manifest.sh" "$SAMPLE" run-all.sh "$SEX" || echo "WARNING: could not write ${S}/run_manifest.tsv" -STATUS="${LOG_DIR}/run_status.tsv" # og summary collect marks results older than this run stale -# EVERYTHING=true can still refuse before Nextflow: keep the last run's status to put back then. -[ -z "$EV" ] || [ ! -f "$STATUS" ] || cp "$STATUS" "${STATUS}.prev" +STATUS_STAGE=$(mktemp -d "$LOG_DIR/.run-status.XXXXXXXX") +STATUS="$STATUS_STAGE/run_status.tsv" +started=false +publish_progress() { + bash "$SCRIPT_DIR/publish-run.sh" progress "$S" "$OWNGENOME_RUN_ID" "$STATUS" +} printf '# run-all.sh: when this run started and how each step ended\nmeta\tstarted_epoch\t%s\nmeta\tstarted_utc\t%s\nmeta\tdeclared_sex\t%s\nmeta\tcommand\t%s\nmeta\tswitches\t%s\n' \ "$(date +%s)" "$(date -u '+%Y-%m-%d %H:%M:%S UTC')" "$SEX" "$RERUN_CMD" "${SWITCHES[*]}" > "$STATUS" # As run-all.sh ends, however it ends: a step still 'planned' did not finish, and the time is recorded # (og run state reads both). A planned row gives way to the step's result, so each step keeps one row. finish_status() { local rc=$? - live_post "$SAMPLE" "{\"event\":\"pgp_run_finished\",\"exit\":${rc},\"utcTime\":\"$(date -u +%Y-%m-%dT%H:%M:%SZ)\"}" + if ! $started; then rm -rf "$STATUS_STAGE"; return; fi + live_post "$SAMPLE" "{\"event\":\"pgp_run_finished\",\"exit\":${rc},\"utcTime\":\"$(date -u +%Y-%m-%dT%H:%M:%SZ)\",\"runId\":\"$OWNGENOME_RUN_ID\"}" awk -F'\t' -v OFS='\t' 'NR == FNR { if ($1 == "step" && $3 != "planned") ended[$2] = 1; next } $1 == "step" && $3 == "planned" { if ($2 in ended) next; $3 = "not finished" } { print }' "$STATUS" "$STATUS" \ > "${STATUS}.tmp" && mv "${STATUS}.tmp" "$STATUS" || true - printf 'meta\tfinished_utc\t%s\n' "$(date -u '+%Y-%m-%d %H:%M:%S UTC')" >> "$STATUS" || true + printf 'meta\tfinished_utc\t%s\n' "$(date -u '+%Y-%m-%d %H:%M:%S UTC')" >> "$STATUS" && publish_progress || true + rm -rf "$STATUS_STAGE" } trap finish_status EXIT NF=() SEL=() RUNS=() KNOWN="" OPTIN=() # every step of a default run: it runs, or it is skipped with the reason @@ -460,9 +465,14 @@ if [ "${#EVMISS[@]}" -gt 0 ]; then { echo "ERROR: EVERYTHING=true runs every optional step, and ${#EVMISS[@]} cannot run (Nextflow did not start):"; printf ' %s\n' "${EVMISS[@]}" echo "Install what is missing, or run without EVERYTHING=true to skip them."; } >&2 # Nothing ran: the last run's status stays as it was (or there is none), and no run-finished event goes out. - trap - EXIT; if [ -f "${STATUS}.prev" ]; then mv "${STATUS}.prev" "$STATUS"; else rm -f "$STATUS"; fi; exit 2 + exit 2 fi -rm -f "${STATUS}.prev" +# Switch identity before the staged progress is committed. +OWNGENOME_RUN_ID=$(od -An -N16 -tx1 /dev/urandom | tr -d '[:space:]') +export OWNGENOME_RUN_ID +bash "$SCRIPT_DIR/publish-run.sh" start "$S" "$OWNGENOME_RUN_ID" +started=true +publish_progress arg --cytoband "$(data_file cytoband || true)"; ! GEX=$(data_file gencode_exons) || NF+=(--gencode_exons "$GEX"); arg --delly_exclude "$(data_file delly_exclude || true)"; arg --manta_call_regions "${MANTA_CALL_REGIONS:-}" # Step 20's annotation of the chrM calls (MITO_VARIANTS_ANNOTATE): ClinVar with its index, and gnomAD's chrM sites. MC="${G}/clinvar/clinvar_chr.vcf.gz"; if [ -s "$MC" ] && [ -s "${MC}.tbi" ]; then NF+=(--mito_clinvar "$MC"); fi; arg --gnomad_mito "${G}/gnomad_mito/${GNOMAD_MITO_URL##*/}" @@ -538,11 +548,12 @@ if [ -n "${OWNGENOME_LIVE_URL:-}" ]; then else rm -f "${S}/nextflow/live.config" fi -live_step() { live_post "$SAMPLE" "{\"event\":\"pgp_step\",\"step\":\"$1\",\"state\":\"$2\",\"utcTime\":\"$(date -u +%Y-%m-%dT%H:%M:%SZ)\"}"; } +live_step() { live_post "$SAMPLE" "{\"event\":\"pgp_step\",\"step\":\"$1\",\"state\":\"$2\",\"utcTime\":\"$(date -u +%Y-%m-%dT%H:%M:%SZ)\",\"runId\":\"$OWNGENOME_RUN_ID\"}"; } echo "[Nextflow ${NXF_VER}] launch directory ${S}/nextflow: .nextflow.log, and every task's files under work/" FT="${S}/nextflow/failed_tasks.tsv" PT="${S}/nextflow/process_status.tsv"; rm -f "$FT" "$PT" # main.nf writes both as the run ends # Every step that will run, before it starts: 'planned' until its result row (og run state shows the run as it goes). for n in "${RUNS[@]}" "${OPTIN[@]}"; do n=${n%%-*}; [[ "$n" != [0-9]* ]] || printf 'step\t%s\tplanned\n' "$n" >> "$STATUS"; done +publish_progress # An earlier run's OwnHealth file goes before any result changes, so a run cut short never leaves it beside new results. rm -f "${S}/facts/${SAMPLE}_genome_facts.json" rc=0; (cd "${S}/nextflow" && nextflow run "${PGP_ROOT}/main.nf" -profile docker -resume --input "$SHEET" --reference "$REF_FASTA" \ @@ -622,6 +633,7 @@ family_steps() { *) printf 'step\t39\tskipped (%s)\n' "${d39#*$'\t'}" >> "$STATUS"; echo " 39 Couple carrier screen: skipped: ${d39#*$'\t'}" ;; esac } +publish_progress # The OwnHealth file reads summary.json, so it is written only after step 24 wrote a fresh one. report=failed facts=skipped for sc in "${OPTIN[@]}" 24-html-report.sh generate-report.sh ownhealth-facts.sh; do @@ -631,7 +643,7 @@ for sc in "${OPTIN[@]}" 24-html-report.sh generate-report.sh ownhealth-facts.sh; if [[ "$sc" == [0-9]*-*.sh && "$sc" != 24-* ]]; then live_step "${sc%%-*}" started; fi r=ok; echo "[${sc%.sh}] log: ${LOG_DIR}/${sc%.sh}.log"; bash "${SCRIPT_DIR}/${sc}" "$SAMPLE" > "${LOG_DIR}/${sc%.sh}.log" 2>&1 || { r=failed failed=1; echo " FAILED"; } case $sc in 24-html-report.sh) report=$r ;; ownhealth-facts.sh) facts=$r ;; esac - if [[ "$sc" == [0-9]*-*.sh && "$sc" != 24-* ]]; then printf 'step\t%s\t%s\n' "${sc%%-*}" "$r" >> "$STATUS"; live_step "${sc%%-*}" "$r"; fi + if [[ "$sc" == [0-9]*-*.sh && "$sc" != 24-* ]]; then printf 'step\t%s\t%s\n' "${sc%%-*}" "$r" >> "$STATUS"; publish_progress; live_step "${sc%%-*}" "$r"; fi done [ "$rc" -eq 0 ] || exit "$rc" [ "$facts" = ok ] && oh=", the OwnHealth file ${S}/facts/${SAMPLE}_genome_facts.json" || oh="; the OwnHealth file was not written (${facts})" diff --git a/tests/e2e/family-joint-1.sh b/tests/e2e/family-joint-1.sh index 1a72337dc..c009d34b4 100755 --- a/tests/e2e/family-joint-1.sh +++ b/tests/e2e/family-joint-1.sh @@ -295,11 +295,14 @@ check_eq "with both parents homozygous reference" "$(cut -f7,8 <<< "$DN" | cut - # the md5 of its text without the lines that hold a date or a command line. # An index (.tbi, .csi) is listed by name only: it holds byte offsets into the # compressed file, and those move when the dated header compresses to another -# size, so two runs with the same records give different indexes. +# size, so two runs with the same records give different indexes. The run's +# publication files (logs/run_snapshot.json, logs/run_status.tsv) are listed +# by name only: they hold the run's own id and times. norm() { ( cd "$1" && find . -type f ! -path './pipeline_info/*' | LC_ALL=C sort | while read -r f; do case "$f" in *.tbi|*.csi) printf '%s index\n' "$f" ;; + */logs/run_snapshot.json|*/logs/run_status.tsv) printf '%s run\n' "$f" ;; *) printf '%s %s\n' "$f" "$(gzip -cdf "$f" | grep -avE 'Date=|^##[A-Za-z_]*[Cc]ommand(line)?=|^# The command line' | md5sum | cut -d' ' -f1)" ;; esac done ) @@ -326,7 +329,7 @@ check "the trio run publishes every file the single-sample run does for HG002, w check "no family/ folder without --pedigree" test ! -e "${SINGLE}/out/family" # Not a .gz file: norm() reads through gzip -cdf, which drops trailing # garbage after a gzip stream, so a line added to one would not show. -F1=$(awk '$2 != "index" && $1 !~ /\.gz$/ {print $1; exit}' "${SINGLE}/files.txt") +F1=$(awk '$2 != "index" && $2 != "run" && $1 !~ /\.gz$/ {print $1; exit}' "${SINGLE}/files.txt") rm -rf "${CASE_TMP}/single-planted" cp -r "${SINGLE}/out" "${CASE_TMP}/single-planted" echo "planted" >> "${CASE_TMP}/single-planted/${F1#./}" diff --git a/tests/e2e/mei-1.sh b/tests/e2e/mei-1.sh index f8fcf6fe9..134ab62f2 100755 --- a/tests/e2e/mei-1.sh +++ b/tests/e2e/mei-1.sh @@ -18,7 +18,7 @@ # precision, the Alu calls inside the benchmark regions within 100 bp of # any GIAB insertion, at least 0.80; # - the catalog: the BAM has none of chr9, chrX and chr11, so all three -# known disease insertions are not callable; +# known disease insertions are not assessed; # - AnnotSV on the calls, with the made-up AnnotSV data of # tests/fixtures/annotsv/class45.sh plus one made-up gene, FIXCHR20, over # all of chr20 (two exons at its ends): every call comes back in @@ -136,9 +136,9 @@ M="${G}/${H}/mei/${H}" check "the step says MEGAnE used its fixed thresholds on one chromosome" grep -q "used fixed ones" "$STEP_LOG" check "MEGAnE's VCF is kept" grep -q '^#CHROM' "${M}_megane.vcf" check_ge "the calls table has insertions" "$(awk 'NR > 1' "${M}_mei.tsv" 2>/dev/null | wc -l | tr -d ' ')" 10 -check_eq "the catalog: chr9, chrX and chr11 are not in the BAM, so every row is not callable" \ +check_eq "the catalog: chr9, chrX and chr11 are not in the BAM, so every row is not assessed" \ "$(awk -F'\t' 'NR > 1 {print $1 ":" $(NF - 2)}' "${M}_mei_sites.tsv" 2>/dev/null | paste -sd, -)" \ - "FKTN:not callable,TAF1:not callable,BBS1:not callable" + "FKTN:not assessed,TAF1:not assessed,BBS1:not assessed" # AnnotSV's columns: every call inside FIXCHR20, with a location there, class NA. annotsv_cols() { # annotsv_cols TABLE: "///" diff --git a/tests/e2e/nf-wiring-2-sv-str-tools.sh b/tests/e2e/nf-wiring-2-sv-str-tools.sh index 87f1dc5fa..c9d59c532 100644 --- a/tests/e2e/nf-wiring-2-sv-str-tools.sh +++ b/tests/e2e/nf-wiring-2-sv-str-tools.sh @@ -107,7 +107,7 @@ BROKEN="${CASE_TMP}/broken" rm -rf "$BROKEN" mkdir -p "$BROKEN" cp -R "${REPO}/main.nf" "${REPO}/nextflow.config" "${REPO}/nextflow_schema.json" "${REPO}/versions.env" \ - "${REPO}/conf" "${REPO}/modules" "${REPO}/workflows" "${REPO}/bin" "${REPO}/assets" "$BROKEN/" + "${REPO}/conf" "${REPO}/modules" "${REPO}/workflows" "${REPO}/bin" "${REPO}/assets" "${REPO}/scripts" "$BROKEN/" sed -i 's/--reads \${bam}/--readz ${bam}/' "${BROKEN}/modules/local/expansion_hunter/main.nf" check_eq "control copy: EXPANSION_HUNTER passes --readz" \ "$(grep -c -- '--readz \${bam}' "${BROKEN}/modules/local/expansion_hunter/main.nf")" 1 diff --git a/tests/fake-docker/single-source-sample-name.sh b/tests/fake-docker/single-source-sample-name.sh index 9cdd5b65b..5719c3644 100755 --- a/tests/fake-docker/single-source-sample-name.sh +++ b/tests/fake-docker/single-source-sample-name.sh @@ -16,7 +16,8 @@ export PLATFORM=ont # the long-read scripts ask for it before anything else checked=0 for s in "${SCRIPTS}"/*.sh; do name=$(basename "$s") - [ "$name" != setup.sh ] || continue # takes a directory, not a sample + # These commands take a directory path. + case "$name" in setup.sh|publish-run.sh) continue ;; esac for bad in '../x' '..' '.' 'a b' 'x;id' 'x$(id)' '-x' ''; do [ -n "$bad" ] || [ "$name" != validate-setup.sh ] || continue # no sample is valid there rc=0 diff --git a/tests/parity/cases.tsv b/tests/parity/cases.tsv index eb563c2b8..5ce786867 100644 --- a/tests/parity/cases.tsv +++ b/tests/parity/cases.tsv @@ -19,6 +19,7 @@ pgx-cyp2d6-check multimapped_with_alt pgx-cyp2d6-check/multimapped_with_alt.q0.b pgx-cyp2d6-check deleted_both pgx-cyp2d6-check/deleted_both.q0.bed,pgx-cyp2d6-check/deleted_both.q1.bed --all deleted_both.q0.bed --mapq1 deleted_both.q1.bed --out check.tsv check.tsv bytes pgx cyp2d6-check pgx-cyp2d6-check deleted_one pgx-cyp2d6-check/deleted_one.q0.bed,pgx-cyp2d6-check/deleted_one.q1.bed --all deleted_one.q0.bed --mapq1 deleted_one.q1.bed --out check.tsv check.tsv bytes pgx cyp2d6-check pgx-cyp2d6-check no_flank_reads pgx-cyp2d6-check/no_flank_reads.q0.bed,pgx-cyp2d6-check/no_flank_reads.q1.bed --all no_flank_reads.q0.bed --mapq1 no_flank_reads.q1.bed --out check.tsv check.tsv bytes pgx cyp2d6-check +pgx-cyp2d6-check shallow_flanks pgx-cyp2d6-check/shallow_flanks.q0.bed,pgx-cyp2d6-check/shallow_flanks.q1.bed --all shallow_flanks.q0.bed --mapq1 shallow_flanks.q1.bed --out check.tsv check.tsv bytes pgx cyp2d6-check pgx-cyp2d6-check measured pgx-cyp2d6-check/clean_no_alt.q0.bed,pgx-cyp2d6-check/clean_no_alt.q1.bed,pgx-cyp2d6-check/shares.tsv --all clean_no_alt.q0.bed --mapq1 clean_no_alt.q1.bed --measure shares.tsv --out check.tsv check.tsv bytes pgx cyp2d6-check qc-sex-loss male fixture:sex-loss-m.bed,qc-sex-loss/male.tsv --table male.tsv --regions m.bed.gz male.tsv bytes qc sex-loss qc-sex-loss drift fixture:sex-loss-drift.bed,qc-sex-loss/male.tsv --table male.tsv --regions drift.bed.gz male.tsv bytes qc sex-loss @@ -828,6 +829,7 @@ summary-collect declared-arg gen:summary-collect.sh --sample S --sample-dir decl summary-collect no-assets gen:summary-collect.sh --sample S --sample-dir full --assets nowhere --out no-assets.json --only a no-assets.json json:paths=schema_version,sample,run,databases,manifest,sections.coverage,sections.callability,sections.sex_check,sections.sample_qc,sections.mosaic_sex_loss,sections.read_count,sections.variants summary collect summary-collect no-folder gen:summary-collect.sh --sample S --sample-dir no-such-folder --assets assets --out no-folder.json --only a no-folder.json json:paths=schema_version,sample,run,databases,manifest,sections.coverage,sections.callability,sections.sex_check,sections.sample_qc,sections.mosaic_sex_loss,sections.read_count,sections.variants summary collect summary-collect c-full gen:summary-collect-c.sh --sample S --sample-dir full --assets assets --out full.json --only c full.json json:paths=schema_version,sample,run,databases,manifest,sections.couple,sections.parascopy,sections.paralogs,sections.hla,sections.prs,sections.ancestry_fine,sections.manta,sections.delly,sections.cnvpytor,sections.sv_consensus,sections.annotsv,sections.expansions,sections.telomere,sections.roh,sections.haplogroup,sections.y_haplogroup,sections.y_tree,sections.y_str,sections.consumer_export,sections.bloodtype,sections.lpa,sections.vntyper,sections.locityper,sections.mito,sections.traits,sections.archaic,sections.ancient,sections.viral,sections.exomiser,sections.chip,sections.mei,sections.mosaic summary collect +summary-collect c-pms2-legacy gen:summary-collect-c.sh --sample S --sample-dir pms2-legacy --assets assets --out pms2-legacy.json --only c pms2-legacy.json json:paths=sections.parascopy summary collect summary-collect c-float-nan gen:summary-collect-c.sh --sample S --sample-dir float-nan --assets assets --out float-nan.json --only c float-nan.json json:paths=schema_version,sample,run,databases,manifest,sections.couple,sections.parascopy,sections.paralogs,sections.hla,sections.prs,sections.ancestry_fine,sections.manta,sections.delly,sections.cnvpytor,sections.sv_consensus,sections.annotsv,sections.expansions,sections.telomere,sections.roh,sections.haplogroup,sections.y_haplogroup,sections.y_tree,sections.y_str,sections.consumer_export,sections.bloodtype,sections.lpa,sections.vntyper,sections.locityper,sections.mito,sections.traits,sections.archaic,sections.ancient,sections.viral,sections.exomiser,sections.chip,sections.mei,sections.mosaic summary collect summary-collect c-float-inf gen:summary-collect-c.sh --sample S --sample-dir float-inf --assets assets --out float-inf.json --only c float-inf.json json:paths=schema_version,sample,run,databases,manifest,sections.couple,sections.parascopy,sections.paralogs,sections.hla,sections.prs,sections.ancestry_fine,sections.manta,sections.delly,sections.cnvpytor,sections.sv_consensus,sections.annotsv,sections.expansions,sections.telomere,sections.roh,sections.haplogroup,sections.y_haplogroup,sections.y_tree,sections.y_str,sections.consumer_export,sections.bloodtype,sections.lpa,sections.vntyper,sections.locityper,sections.mito,sections.traits,sections.archaic,sections.ancient,sections.viral,sections.exomiser,sections.chip,sections.mei,sections.mosaic summary collect summary-collect c-float--inf gen:summary-collect-c.sh --sample S --sample-dir float--inf --assets assets --out float--inf.json --only c float--inf.json json:paths=schema_version,sample,run,databases,manifest,sections.couple,sections.parascopy,sections.paralogs,sections.hla,sections.prs,sections.ancestry_fine,sections.manta,sections.delly,sections.cnvpytor,sections.sv_consensus,sections.annotsv,sections.expansions,sections.telomere,sections.roh,sections.haplogroup,sections.y_haplogroup,sections.y_tree,sections.y_str,sections.consumer_export,sections.bloodtype,sections.lpa,sections.vntyper,sections.locityper,sections.mito,sections.traits,sections.archaic,sections.ancient,sections.viral,sections.exomiser,sections.chip,sections.mei,sections.mosaic summary collect diff --git a/tests/parity/gen/report-corpus.sh b/tests/parity/gen/report-corpus.sh index bbd422206..5bde7c4bd 100644 --- a/tests/parity/gen/report-corpus.sh +++ b/tests/parity/gen/report-corpus.sh @@ -203,7 +203,7 @@ optin='.sections.chip += {state: "ok", source: "chip/S1_chip.tsv", file_date: "2 {gene: "FKTN", element: "SVA", condition: "Fukuyama congenital muscular dystrophy", inheritance: "autosomal recessive", status: "seen", mean_depth: "30.0", call: "chr9:105639660 SVA_F 1 copy PASS"}, {gene: "TAF1", element: "SVA", condition: "X-linked dystonia-parkinsonism", inheritance: "X-linked", - status: "not callable", mean_depth: ".", call: "."}]}} + status: "not assessed", mean_depth: ".", call: "."}]}} | .sections.mosaic += {state: "ok", source: "mosaic/S1_mocha_summary.tsv", data: {status: "assessed", message: ".", depth: "30.0", het_sites: "2090000", het_per_10mb: "3000", chromosomes: "chr1-chr22", floor_read: "0.020", floor_min: "0.05", floor: "0.050", calls_mocha: "3", calls_reported: "1", phasing: "input", not_reported: 2, calls: [ diff --git a/tests/parity/gen/summary-collect-c.sh b/tests/parity/gen/summary-collect-c.sh index ee0f02320..707ccdadc 100644 --- a/tests/parity/gen/summary-collect-c.sh +++ b/tests/parity/gen/summary-collect-c.sh @@ -42,9 +42,12 @@ put $f/paralogs/S_smn1_marker.tsv "metric\tvalue\nmarker\tSMN1 g.27134T>G\nstatu put $f/paralogs/S_gba1_copy_number.tsv "chrom\tstart\tend\tagCN_filter\tagCN\tagCN_qual\tpsCN_filter\tpsCN\tpsCN_qual chr1\t155231478\t155240000\tPASS\t4\t60\tPASS\t2,2\t30,30 chr1\t155240000\t155244699\tPASS\t4\t35.25\tPASS\t2,2\t30,30\n" -put $f/paralogs/S_pms2_copy_number.tsv "chrom\tstart\tend\tagCN_filter\tagCN\tagCN_qual\tpsCN_filter\tpsCN\tpsCN_qual +put $f/paralogs/S_pms2_pms2cl_copy_number.tsv "chrom\tstart\tend\tagCN_filter\tagCN\tagCN_qual\tpsCN_filter\tpsCN\tpsCN_qual chr7\t5970000\t5980000\tPASS\t4\t50\tPASS\t2,2\t30,30 chr7\t5980000\t5990000\tLowQual\t3\t12\tPASS\t2,1\t30,30\n" +# The old fixture name remains an uncatalogued table, even with the same contents. +mkdir -p pms2-legacy/paralogs +cp -p "$f/paralogs/S_pms2_pms2cl_copy_number.tsv" pms2-legacy/paralogs/S_pms2_copy_number.tsv put $f/paralogs/S_mytable_copy_number.tsv "chrom\tstart\tend\tagCN_filter\tagCN\tagCN_qual\tpsCN_filter\tpsCN\tpsCN_qual chr9\t1\t100\tnot assessed: no read over the locus\t.\t.\t.\t.\t.\n" put $f/paralogs/S_strc_copy_number.tsv "chrom\tstart\tend\tagCN\n" @@ -226,7 +229,7 @@ DNMT3A\t30.5\t0.1\tcovered\t0.990\t0.600\nTET2\t40\t0.08\tcovered\t1.000\t0.900\ JAK2\t35\t0.1\tcovered\t0.980\t0.550\nTP53\t25\t0.1\tcovered\t0.950\t0.400\nSRSF2\t28\t\tpartly_covered\t0.700\t0.650\n" put $f/mei/S_mei_sites.tsv "gene\telement\tcondition\tinheritance\tstatus\tmean_depth\tcall FKTN\tSVA\tFukuyama\tAR\tcallable\t30\tnot seen -TAF1\tSVA\tXDP\tXL\tnot callable\t2\t\n" +TAF1\tSVA\tXDP\tXL\tnot assessed\t2\t\n" put $f/mei/S_mei.tsv "chrom\tpos\telement\tcopies\nchr1\t1\tALU\t1\nchr2\t2\tL1\t1\nchr3\t3\tALU\t2\n" put $f/mosaic/S_mocha_summary.tsv "metric\tvalue\nstatus\tassessed\ndepth\t30\ncalls_reported\t1\nfloor\t0.05\n" put $f/mosaic/S_mocha.tsv "chrom\tstart\tend\tlength_mb\tarms\ttype\tcell_fraction\tn_hets\tlod_baf_phase\treported\treason @@ -355,7 +358,7 @@ for special in nan inf -inf; do put "$f/chip/S_chip_depth.tsv" "gene\tmean_depth\tdetection_limit_vaf\tstatus\nA\t30\t.\tcovered\nB\t${special}\t.\tcovered\nC\t40\t.\tcovered\n" for spec in \ 'paralogs/S_smn_copy_number.tsv:agCN_qual,psCN_qual' \ - 'paralogs/S_pms2_copy_number.tsv:agCN_qual,psCN_qual' \ + 'paralogs/S_pms2_pms2cl_copy_number.tsv:agCN_qual,psCN_qual' \ 'ancestry_fine/S_ancestry_fine.tsv:fraction,low,high' \ 'telomere/S/S/S_summary.tsv:read_lengths' \ 'mito/S_chrM_deletions.tsv:level_pct' \ diff --git a/tests/parity/golden/mei-report/catalog/s.tsv b/tests/parity/golden/mei-report/catalog/s.tsv index ffbf5fd49..2b37f0829 100644 --- a/tests/parity/golden/mei-report/catalog/s.tsv +++ b/tests/parity/golden/mei-report/catalog/s.tsv @@ -1,4 +1,4 @@ gene chrom start end site element inheritance condition clinvar pmid status mean_depth call FKTN chr9 105639156 105640156 105639656 SVA autosomal recessive Fukuyama congenital muscular dystrophy (3' UTR insertion) 3199 9690476 seen 31.0 chr9:105639660 SVA_F 1 copy PASS -TAF1 chrX 71439993 71440993 71440493 SVA X-linked X-linked dystonia-parkinsonism (intron 32 insertion) 9862 29474918 not callable 2.0 . -BBS1 chr11 66526182 66527182 66526682 SVA autosomal recessive Bardet-Biedl syndrome 1 (exon 13 insertion, c.1214_1215insSVA) 981241 33169370 not callable . . +TAF1 chrX 71439993 71440993 71440493 SVA X-linked X-linked dystonia-parkinsonism (intron 32 insertion) 9862 29474918 not assessed 2.0 . +BBS1 chr11 66526182 66527182 66526682 SVA autosomal recessive Bardet-Biedl syndrome 1 (exon 13 insertion, c.1214_1215insSVA) 981241 33169370 not assessed . . diff --git a/tests/parity/golden/mei-report/empty-depth/s.tsv b/tests/parity/golden/mei-report/empty-depth/s.tsv index 2a6020e88..5e6b8bb9f 100644 --- a/tests/parity/golden/mei-report/empty-depth/s.tsv +++ b/tests/parity/golden/mei-report/empty-depth/s.tsv @@ -1,3 +1,3 @@ gene chrom start end site element inheritance condition clinvar pmid status mean_depth call -FKTN chr9 105639156 105640156 105639656 SVA autosomal recessive Fukuyama congenital muscular dystrophy 3199 9690476 not callable . . -TAF1 chrX 71439993 71440993 71440493 SVA X-linked X-linked dystonia-parkinsonism 9862 29474918 not callable . . +FKTN chr9 105639156 105640156 105639656 SVA autosomal recessive Fukuyama congenital muscular dystrophy 3199 9690476 not assessed . . +TAF1 chrX 71439993 71440993 71440493 SVA X-linked X-linked dystonia-parkinsonism 9862 29474918 not assessed . . diff --git a/tests/parity/golden/mei-report/thin-no-call/s.tsv b/tests/parity/golden/mei-report/thin-no-call/s.tsv index 43b20cfee..39c9b0750 100644 --- a/tests/parity/golden/mei-report/thin-no-call/s.tsv +++ b/tests/parity/golden/mei-report/thin-no-call/s.tsv @@ -1,3 +1,3 @@ gene chrom start end site element inheritance condition clinvar pmid status mean_depth call -FKTN chr9 105639156 105640156 105639656 SVA autosomal recessive Fukuyama congenital muscular dystrophy 3199 9690476 not callable 9.0 . -TAF1 chrX 71439993 71440993 71440493 SVA X-linked X-linked dystonia-parkinsonism 9862 29474918 not callable . . +FKTN chr9 105639156 105640156 105639656 SVA autosomal recessive Fukuyama congenital muscular dystrophy 3199 9690476 not assessed 9.0 . +TAF1 chrX 71439993 71440993 71440493 SVA X-linked X-linked dystonia-parkinsonism 9862 29474918 not assessed . . diff --git a/tests/parity/golden/mei-report/thin/s.tsv b/tests/parity/golden/mei-report/thin/s.tsv index a2e8620f3..92473fd4d 100644 --- a/tests/parity/golden/mei-report/thin/s.tsv +++ b/tests/parity/golden/mei-report/thin/s.tsv @@ -1,3 +1,3 @@ gene chrom start end site element inheritance condition clinvar pmid status mean_depth call FKTN chr9 105639156 105640156 105639656 SVA autosomal recessive Fukuyama congenital muscular dystrophy 3199 9690476 seen 9.0 chr9:105639660 SVA_F 1 copy PASS -TAF1 chrX 71439993 71440993 71440493 SVA X-linked X-linked dystonia-parkinsonism 9862 29474918 not callable . . +TAF1 chrX 71439993 71440993 71440493 SVA X-linked X-linked dystonia-parkinsonism 9862 29474918 not assessed . . diff --git a/tests/parity/golden/mei-report/two-windows/s.tsv b/tests/parity/golden/mei-report/two-windows/s.tsv index 72c11247c..23db1a125 100644 --- a/tests/parity/golden/mei-report/two-windows/s.tsv +++ b/tests/parity/golden/mei-report/two-windows/s.tsv @@ -1,4 +1,4 @@ gene chrom start end site element inheritance condition clinvar pmid status mean_depth call FKTN chr9 105639156 105640156 105639656 SVA autosomal recessive Fukuyama congenital muscular dystrophy 3199 9690476 seen 30.0 chr9:105639660 SVA_F 1 copy PASS -TAF1 chrX 71439993 71440993 71440493 SVA X-linked X-linked dystonia-parkinsonism 9862 29474918 not callable . . -FKTN chr9 105700000 105701000 105700500 SVA autosomal recessive a second window . . not callable 5.0 . +TAF1 chrX 71439993 71440993 71440493 SVA X-linked X-linked dystonia-parkinsonism 9862 29474918 not assessed . . +FKTN chr9 105700000 105701000 105700500 SVA autosomal recessive a second window . . not assessed 5.0 . diff --git a/tests/parity/golden/pgx-cyp2d6-check/shallow_flanks/check.tsv b/tests/parity/golden/pgx-cyp2d6-check/shallow_flanks/check.tsv new file mode 100644 index 000000000..a2b15a523 --- /dev/null +++ b/tests/parity/golden/pgx-cyp2d6-check/shallow_flanks/check.tsv @@ -0,0 +1,12 @@ +metric value +status unreliable +message CYP2D6 copy number unreliable, agreement not counted (depth): the flanks of CYP2D6 (chr22:42.05-42.25 Mb) have under 10x at MAPQ >= 1, too few reads for a copy-number call +gene_depth_all 8.00 +gene_depth_mapq1 7.90 +flank_depth_all 10.00 +flank_depth_mapq1 9.90 +gene_mapq1_share 0.99 +gene_mapq20_share not measured +body_depth_all not measured +body_mapq1_share not measured +body_mapq20_share not measured diff --git a/tests/parity/golden/pgx-cyp2d6-check/shallow_flanks/exit b/tests/parity/golden/pgx-cyp2d6-check/shallow_flanks/exit new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/tests/parity/golden/pgx-cyp2d6-check/shallow_flanks/exit @@ -0,0 +1 @@ +0 diff --git a/tests/parity/golden/pgx-cyp2d6-check/shallow_flanks/stderr b/tests/parity/golden/pgx-cyp2d6-check/shallow_flanks/stderr new file mode 100644 index 000000000..e69de29bb diff --git a/tests/parity/golden/pgx-cyp2d6-check/shallow_flanks/stdout b/tests/parity/golden/pgx-cyp2d6-check/shallow_flanks/stdout new file mode 100644 index 000000000..d042f983d --- /dev/null +++ b/tests/parity/golden/pgx-cyp2d6-check/shallow_flanks/stdout @@ -0,0 +1,3 @@ +CYP2D6 depth check: unreliable: CYP2D6 copy number unreliable, agreement not counted (depth): the flanks of CYP2D6 (chr22:42.05-42.25 Mb) have under 10x at MAPQ >= 1, too few reads for a copy-number call + mean depth, all reads: CYP2D6 8.00, flanks 10.00; MAPQ >= 1: CYP2D6 7.90, flanks 9.90 + share of the depth at MAPQ >= 1 / >= 20: Cyrius's region (with REP6) 0.99 / not measured; gene body without REP6 not measured / not measured diff --git a/tests/parity/golden/report-render/a-escape/a-escape.html b/tests/parity/golden/report-render/a-escape/a-escape.html index f5c7eeb76..e53a6ac0b 100644 --- a/tests/parity/golden/report-render/a-escape/a-escape.html +++ b/tests/parity/golden/report-render/a-escape/a-escape.html @@ -325,9 +325,9 @@

Moved to class 3 by step 05's rules

Mobile Element Insertions

Step 50 · Complete · file date 2021-03-04 05:06 UTC · link to this section

-

Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not callable: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/<sample>_mei.tsv.

+

Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not assessed: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/<sample>_mei.tsv.

Insertions called3 (ALU 2, L1 1)
-
call filtered out (LC)not callablenot assessed
GeneElementConditionInheritanceStatusDepthCall
FKTNSVAFukuyamaARcallable30not seen
TAF1SVAXDPXLnot callable2.
+
GeneElementConditionInheritanceStatusDepthCall
FKTNSVAFukuyamaARcallable30not seen
TAF1SVAXDPXLnot assessed2.
@@ -487,7 +487,7 @@

SMN1/SMN2 Copy Number (Parascopy)

HP (haptoglobin) copies (from depth)2 (estimate 2.1). Reading: usual
LCE3B/LCE3C copies (from depth)1 (estimate 1.0). Reading: one deleted
CCL3L1/CCL3L3 copies (from depth)not assessed (low depth)
-
GenesCopies together (agCN)Reading
GBA1, GBAP14 (2 region(s), quality 35.25 or more, filter PASS)agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy
STRC, STRCP1unreadable: S_strc_copy_number.tsv lacks the copy-number columns.
mytablenot assessed: no read over the locus.
pms2chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual).
+
GenesCopies together (agCN)Reading
GBA1, GBAP14 (2 region(s), quality 35.25 or more, filter PASS)agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy
PMS2, PMS2CLchr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual).
STRC, STRCP1unreadable: S_strc_copy_number.tsv lacks the copy-number columns.
mytablenot assessed: no read over the locus.
Copy-number intervals (ClinGen recurrent regions, carrier deletions, AZF; from depth)4 rows (3 called, 1 not assessed); 2 with a deletion or a duplication
RegionRowPlaceCopiesChange
AZFcAZFcchrY:23000001-260000000 of 1deletion
dupX1chr1:2-23 of 2duplication
@@ -908,7 +908,8 @@

Genes and rsIDs in these results

  • MT-TK: Mitochondrial variants
  • MT-TL1: Mitochondrial variants
  • MT-TL2: Mitochondrial variants
  • -
  • PMS2: Paralog genes (Paraphase, PacBio HiFi)
  • +
  • PMS2: SMN1/SMN2 copy number (Parascopy, short reads), Paralog genes (Paraphase, PacBio HiFi)
  • +
  • PMS2CL: SMN1/SMN2 copy number (Parascopy, short reads)
  • RFC1: Repeat expansions (ExpansionHunter) (2)
  • SLC6A4: Repeat expansions (ExpansionHunter)
  • SMN1: Paralog genes (Paraphase, PacBio HiFi)
  • diff --git a/tests/parity/golden/report-render/a-escape/a-escape.txt b/tests/parity/golden/report-render/a-escape/a-escape.txt index 4e8639966..5e39e69ea 100644 --- a/tests/parity/golden/report-render/a-escape/a-escape.txt +++ b/tests/parity/golden/report-render/a-escape/a-escape.txt @@ -74,8 +74,8 @@ --- Insertions called: 3 (ALU 2, L1 1) FKTN SVA (Fukuyama; AR): callable (depth 30, not seen) - TAF1 SVA (XDP; XL): not callable (depth 2) - Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not callable: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. + TAF1 SVA (XDP; XL): not assessed (depth 2) + Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not assessed: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. ## Repeat Expansions (ExpansionHunter) --- @@ -209,9 +209,9 @@ LCE3B/LCE3C copies (from depth): 1 (estimate 1.0). Reading: one deleted CCL3L1/CCL3L3 copies (from depth): not assessed (low depth) GBA1, GBAP1 (agCN): 4 (2 region(s), quality 35.25 or more, filter PASS). Reading: agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy + PMS2, PMS2CL (agCN): chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual) STRC, STRCP1 (agCN): unreadable: S_strc_copy_number.tsv lacks the copy-number columns mytable (agCN): not assessed: no read over the locus - pms2 (agCN): chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual) Copy-number intervals (ClinGen recurrent regions, carrier deletions, AZF; from depth): 4 rows (3 called, 1 not assessed); 2 with a deletion or a duplication Deletion: AZFc (AZFc, chrY:23000001-26000000), 0 of 1 copies Duplication: dup (X1, chr1:2-2), 3 of 2 copies diff --git a/tests/parity/golden/report-render/a-failed/a-failed.html b/tests/parity/golden/report-render/a-failed/a-failed.html index ff5cf5b51..5dfd87ec7 100644 --- a/tests/parity/golden/report-render/a-failed/a-failed.html +++ b/tests/parity/golden/report-render/a-failed/a-failed.html @@ -321,9 +321,9 @@

    Moved to class 3 by step 05's rules

    Mobile Element Insertions

    Step 50 · Complete · file date 2021-03-04 05:06 UTC · link to this section

    -

    Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not callable: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/<sample>_mei.tsv.

    +

    Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not assessed: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/<sample>_mei.tsv.

    Insertions called3 (ALU 2, L1 1)
    -
    GeneElementConditionInheritanceStatusDepthCall
    FKTNSVAFukuyamaARcallable30not seen
    TAF1SVAXDPXLnot callable2.
    +
    GeneElementConditionInheritanceStatusDepthCall
    FKTNSVAFukuyamaARcallable30not seen
    TAF1SVAXDPXLnot assessed2.
    @@ -483,7 +483,7 @@

    SMN1/SMN2 Copy Number (Parascopy)

    HP (haptoglobin) copies (from depth)2 (estimate 2.1). Reading: usual
    LCE3B/LCE3C copies (from depth)1 (estimate 1.0). Reading: one deleted
    CCL3L1/CCL3L3 copies (from depth)not assessed (low depth)
    -
    GenesCopies together (agCN)Reading
    GBA1, GBAP14 (2 region(s), quality 35.25 or more, filter PASS)agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy
    STRC, STRCP1unreadable: S_strc_copy_number.tsv lacks the copy-number columns.
    mytablenot assessed: no read over the locus.
    pms2chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual).
    +
    GenesCopies together (agCN)Reading
    GBA1, GBAP14 (2 region(s), quality 35.25 or more, filter PASS)agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy
    PMS2, PMS2CLchr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual).
    STRC, STRCP1unreadable: S_strc_copy_number.tsv lacks the copy-number columns.
    mytablenot assessed: no read over the locus.
    Copy-number intervals (ClinGen recurrent regions, carrier deletions, AZF; from depth)4 rows (3 called, 1 not assessed); 2 with a deletion or a duplication
    RegionRowPlaceCopiesChange
    AZFcAZFcchrY:23000001-260000000 of 1deletion
    dupX1chr1:2-23 of 2duplication
    @@ -842,7 +842,8 @@

    Genes and rsIDs in these results

  • MT-TK: Mitochondrial variants
  • MT-TL1: Mitochondrial variants
  • MT-TL2: Mitochondrial variants
  • -
  • PMS2: Paralog genes (Paraphase, PacBio HiFi)
  • +
  • PMS2: SMN1/SMN2 copy number (Parascopy, short reads), Paralog genes (Paraphase, PacBio HiFi)
  • +
  • PMS2CL: SMN1/SMN2 copy number (Parascopy, short reads)
  • RFC1: Repeat expansions (ExpansionHunter) (2)
  • SLC6A4: Repeat expansions (ExpansionHunter)
  • SMN1: Paralog genes (Paraphase, PacBio HiFi)
  • diff --git a/tests/parity/golden/report-render/a-failed/a-failed.txt b/tests/parity/golden/report-render/a-failed/a-failed.txt index e57a7f7c4..893ab056d 100644 --- a/tests/parity/golden/report-render/a-failed/a-failed.txt +++ b/tests/parity/golden/report-render/a-failed/a-failed.txt @@ -71,8 +71,8 @@ --- Insertions called: 3 (ALU 2, L1 1) FKTN SVA (Fukuyama; AR): callable (depth 30, not seen) - TAF1 SVA (XDP; XL): not callable (depth 2) - Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not callable: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. + TAF1 SVA (XDP; XL): not assessed (depth 2) + Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not assessed: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. ## Repeat Expansions (ExpansionHunter) --- @@ -206,9 +206,9 @@ LCE3B/LCE3C copies (from depth): 1 (estimate 1.0). Reading: one deleted CCL3L1/CCL3L3 copies (from depth): not assessed (low depth) GBA1, GBAP1 (agCN): 4 (2 region(s), quality 35.25 or more, filter PASS). Reading: agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy + PMS2, PMS2CL (agCN): chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual) STRC, STRCP1 (agCN): unreadable: S_strc_copy_number.tsv lacks the copy-number columns mytable (agCN): not assessed: no read over the locus - pms2 (agCN): chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual) Copy-number intervals (ClinGen recurrent regions, carrier deletions, AZF; from depth): 4 rows (3 called, 1 not assessed); 2 with a deletion or a duplication Deletion: AZFc (AZFc, chrY:23000001-26000000), 0 of 1 copies Duplication: dup (X1, chr1:2-2), 3 of 2 copies diff --git a/tests/parity/golden/report-render/a-full/a-full.html b/tests/parity/golden/report-render/a-full/a-full.html index f6f695284..545d85287 100644 --- a/tests/parity/golden/report-render/a-full/a-full.html +++ b/tests/parity/golden/report-render/a-full/a-full.html @@ -325,9 +325,9 @@

    Moved to class 3 by step 05's rules

    Mobile Element Insertions

    Step 50 · Complete · file date 2021-03-04 05:06 UTC · link to this section

    -

    Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not callable: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/<sample>_mei.tsv.

    +

    Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not assessed: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/<sample>_mei.tsv.

    Insertions called3 (ALU 2, L1 1)
    -
    GeneElementConditionInheritanceStatusDepthCall
    FKTNSVAFukuyamaARcallable30not seen
    TAF1SVAXDPXLnot callable2.
    +
    GeneElementConditionInheritanceStatusDepthCall
    FKTNSVAFukuyamaARcallable30not seen
    TAF1SVAXDPXLnot assessed2.
    @@ -487,7 +487,7 @@

    SMN1/SMN2 Copy Number (Parascopy)

    HP (haptoglobin) copies (from depth)2 (estimate 2.1). Reading: usual
    LCE3B/LCE3C copies (from depth)1 (estimate 1.0). Reading: one deleted
    CCL3L1/CCL3L3 copies (from depth)not assessed (low depth)
    -
    GenesCopies together (agCN)Reading
    GBA1, GBAP14 (2 region(s), quality 35.25 or more, filter PASS)agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy
    STRC, STRCP1unreadable: S_strc_copy_number.tsv lacks the copy-number columns.
    mytablenot assessed: no read over the locus.
    pms2chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual).
    +
    GenesCopies together (agCN)Reading
    GBA1, GBAP14 (2 region(s), quality 35.25 or more, filter PASS)agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy
    PMS2, PMS2CLchr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual).
    STRC, STRCP1unreadable: S_strc_copy_number.tsv lacks the copy-number columns.
    mytablenot assessed: no read over the locus.
    Copy-number intervals (ClinGen recurrent regions, carrier deletions, AZF; from depth)4 rows (3 called, 1 not assessed); 2 with a deletion or a duplication
    RegionRowPlaceCopiesChange
    AZFcAZFcchrY:23000001-260000000 of 1deletion
    dupX1chr1:2-23 of 2duplication
    @@ -910,7 +910,8 @@

    Genes and rsIDs in these results

  • MT-TK: Mitochondrial variants
  • MT-TL1: Mitochondrial variants
  • MT-TL2: Mitochondrial variants
  • -
  • PMS2: Paralog genes (Paraphase, PacBio HiFi)
  • +
  • PMS2: SMN1/SMN2 copy number (Parascopy, short reads), Paralog genes (Paraphase, PacBio HiFi)
  • +
  • PMS2CL: SMN1/SMN2 copy number (Parascopy, short reads)
  • RFC1: Repeat expansions (ExpansionHunter) (2)
  • SLC6A4: Repeat expansions (ExpansionHunter)
  • SMN1: Paralog genes (Paraphase, PacBio HiFi)
  • diff --git a/tests/parity/golden/report-render/a-full/a-full.txt b/tests/parity/golden/report-render/a-full/a-full.txt index e5cd15ac3..67bd4d39b 100644 --- a/tests/parity/golden/report-render/a-full/a-full.txt +++ b/tests/parity/golden/report-render/a-full/a-full.txt @@ -74,8 +74,8 @@ --- Insertions called: 3 (ALU 2, L1 1) FKTN SVA (Fukuyama; AR): callable (depth 30, not seen) - TAF1 SVA (XDP; XL): not callable (depth 2) - Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not callable: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. + TAF1 SVA (XDP; XL): not assessed (depth 2) + Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not assessed: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. ## Repeat Expansions (ExpansionHunter) --- @@ -209,9 +209,9 @@ LCE3B/LCE3C copies (from depth): 1 (estimate 1.0). Reading: one deleted CCL3L1/CCL3L3 copies (from depth): not assessed (low depth) GBA1, GBAP1 (agCN): 4 (2 region(s), quality 35.25 or more, filter PASS). Reading: agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy + PMS2, PMS2CL (agCN): chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual) STRC, STRCP1 (agCN): unreadable: S_strc_copy_number.tsv lacks the copy-number columns mytable (agCN): not assessed: no read over the locus - pms2 (agCN): chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual) Copy-number intervals (ClinGen recurrent regions, carrier deletions, AZF; from depth): 4 rows (3 called, 1 not assessed); 2 with a deletion or a duplication Deletion: AZFc (AZFc, chrY:23000001-26000000), 0 of 1 copies Duplication: dup (X1, chr1:2-2), 3 of 2 copies diff --git a/tests/parity/golden/report-render/a-missing/a-missing.html b/tests/parity/golden/report-render/a-missing/a-missing.html index d5ccef2b8..b9ce42899 100644 --- a/tests/parity/golden/report-render/a-missing/a-missing.html +++ b/tests/parity/golden/report-render/a-missing/a-missing.html @@ -317,9 +317,9 @@

    Moved to class 3 by step 05's rules

    Mobile Element Insertions

    Step 50 · Complete · file date 2021-03-04 05:06 UTC · link to this section

    -

    Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not callable: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/<sample>_mei.tsv.

    +

    Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not assessed: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/<sample>_mei.tsv.

    Insertions called3 (ALU 2, L1 1)
    -
    GeneElementConditionInheritanceStatusDepthCall
    FKTNSVAFukuyamaARcallable30not seen
    TAF1SVAXDPXLnot callable2.
    +
    GeneElementConditionInheritanceStatusDepthCall
    FKTNSVAFukuyamaARcallable30not seen
    TAF1SVAXDPXLnot assessed2.
    @@ -479,7 +479,7 @@

    SMN1/SMN2 Copy Number (Parascopy)

    HP (haptoglobin) copies (from depth)2 (estimate 2.1). Reading: usual
    LCE3B/LCE3C copies (from depth)1 (estimate 1.0). Reading: one deleted
    CCL3L1/CCL3L3 copies (from depth)not assessed (low depth)
    -
    GenesCopies together (agCN)Reading
    GBA1, GBAP14 (2 region(s), quality 35.25 or more, filter PASS)agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy
    STRC, STRCP1unreadable: S_strc_copy_number.tsv lacks the copy-number columns.
    mytablenot assessed: no read over the locus.
    pms2chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual).
    +
    GenesCopies together (agCN)Reading
    GBA1, GBAP14 (2 region(s), quality 35.25 or more, filter PASS)agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy
    PMS2, PMS2CLchr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual).
    STRC, STRCP1unreadable: S_strc_copy_number.tsv lacks the copy-number columns.
    mytablenot assessed: no read over the locus.
    Copy-number intervals (ClinGen recurrent regions, carrier deletions, AZF; from depth)4 rows (3 called, 1 not assessed); 2 with a deletion or a duplication
    RegionRowPlaceCopiesChange
    AZFcAZFcchrY:23000001-260000000 of 1deletion
    dupX1chr1:2-23 of 2duplication
    @@ -795,7 +795,8 @@

    Genes and rsIDs in these results

  • MT-TK: Mitochondrial variants
  • MT-TL1: Mitochondrial variants
  • MT-TL2: Mitochondrial variants
  • -
  • PMS2: Paralog genes (Paraphase, PacBio HiFi)
  • +
  • PMS2: SMN1/SMN2 copy number (Parascopy, short reads), Paralog genes (Paraphase, PacBio HiFi)
  • +
  • PMS2CL: SMN1/SMN2 copy number (Parascopy, short reads)
  • RFC1: Repeat expansions (ExpansionHunter) (2)
  • SLC6A4: Repeat expansions (ExpansionHunter)
  • SMN1: Paralog genes (Paraphase, PacBio HiFi)
  • diff --git a/tests/parity/golden/report-render/a-missing/a-missing.txt b/tests/parity/golden/report-render/a-missing/a-missing.txt index 444cfeece..9594767dc 100644 --- a/tests/parity/golden/report-render/a-missing/a-missing.txt +++ b/tests/parity/golden/report-render/a-missing/a-missing.txt @@ -71,8 +71,8 @@ --- Insertions called: 3 (ALU 2, L1 1) FKTN SVA (Fukuyama; AR): callable (depth 30, not seen) - TAF1 SVA (XDP; XL): not callable (depth 2) - Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not callable: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. + TAF1 SVA (XDP; XL): not assessed (depth 2) + Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not assessed: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. ## Repeat Expansions (ExpansionHunter) --- @@ -206,9 +206,9 @@ LCE3B/LCE3C copies (from depth): 1 (estimate 1.0). Reading: one deleted CCL3L1/CCL3L3 copies (from depth): not assessed (low depth) GBA1, GBAP1 (agCN): 4 (2 region(s), quality 35.25 or more, filter PASS). Reading: agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy + PMS2, PMS2CL (agCN): chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual) STRC, STRCP1 (agCN): unreadable: S_strc_copy_number.tsv lacks the copy-number columns mytable (agCN): not assessed: no read over the locus - pms2 (agCN): chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual) Copy-number intervals (ClinGen recurrent regions, carrier deletions, AZF; from depth): 4 rows (3 called, 1 not assessed); 2 with a deletion or a duplication Deletion: AZFc (AZFc, chrY:23000001-26000000), 0 of 1 copies Duplication: dup (X1, chr1:2-2), 3 of 2 copies diff --git a/tests/parity/golden/report-render/a-no-painting/a-no-painting.html b/tests/parity/golden/report-render/a-no-painting/a-no-painting.html index 5dfc35123..6c9e9412c 100644 --- a/tests/parity/golden/report-render/a-no-painting/a-no-painting.html +++ b/tests/parity/golden/report-render/a-no-painting/a-no-painting.html @@ -325,9 +325,9 @@

    Moved to class 3 by step 05's rules

    Mobile Element Insertions

    Step 50 · Complete · file date 2021-03-04 05:06 UTC · link to this section

    -

    Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not callable: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/<sample>_mei.tsv.

    +

    Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not assessed: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/<sample>_mei.tsv.

    Insertions called3 (ALU 2, L1 1)
    -
    GeneElementConditionInheritanceStatusDepthCall
    FKTNSVAFukuyamaARcallable30not seen
    TAF1SVAXDPXLnot callable2.
    +
    GeneElementConditionInheritanceStatusDepthCall
    FKTNSVAFukuyamaARcallable30not seen
    TAF1SVAXDPXLnot assessed2.
    @@ -487,7 +487,7 @@

    SMN1/SMN2 Copy Number (Parascopy)

    HP (haptoglobin) copies (from depth)2 (estimate 2.1). Reading: usual
    LCE3B/LCE3C copies (from depth)1 (estimate 1.0). Reading: one deleted
    CCL3L1/CCL3L3 copies (from depth)not assessed (low depth)
    -
    GenesCopies together (agCN)Reading
    GBA1, GBAP14 (2 region(s), quality 35.25 or more, filter PASS)agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy
    STRC, STRCP1unreadable: S_strc_copy_number.tsv lacks the copy-number columns.
    mytablenot assessed: no read over the locus.
    pms2chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual).
    +
    GenesCopies together (agCN)Reading
    GBA1, GBAP14 (2 region(s), quality 35.25 or more, filter PASS)agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy
    PMS2, PMS2CLchr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual).
    STRC, STRCP1unreadable: S_strc_copy_number.tsv lacks the copy-number columns.
    mytablenot assessed: no read over the locus.
    Copy-number intervals (ClinGen recurrent regions, carrier deletions, AZF; from depth)4 rows (3 called, 1 not assessed); 2 with a deletion or a duplication
    RegionRowPlaceCopiesChange
    AZFcAZFcchrY:23000001-260000000 of 1deletion
    dupX1chr1:2-23 of 2duplication
    @@ -907,7 +907,8 @@

    Genes and rsIDs in these results

  • MT-TK: Mitochondrial variants
  • MT-TL1: Mitochondrial variants
  • MT-TL2: Mitochondrial variants
  • -
  • PMS2: Paralog genes (Paraphase, PacBio HiFi)
  • +
  • PMS2: SMN1/SMN2 copy number (Parascopy, short reads), Paralog genes (Paraphase, PacBio HiFi)
  • +
  • PMS2CL: SMN1/SMN2 copy number (Parascopy, short reads)
  • RFC1: Repeat expansions (ExpansionHunter) (2)
  • SLC6A4: Repeat expansions (ExpansionHunter)
  • SMN1: Paralog genes (Paraphase, PacBio HiFi)
  • diff --git a/tests/parity/golden/report-render/a-no-painting/a-no-painting.txt b/tests/parity/golden/report-render/a-no-painting/a-no-painting.txt index 9bc6ee1f7..fd2a86cc7 100644 --- a/tests/parity/golden/report-render/a-no-painting/a-no-painting.txt +++ b/tests/parity/golden/report-render/a-no-painting/a-no-painting.txt @@ -74,8 +74,8 @@ --- Insertions called: 3 (ALU 2, L1 1) FKTN SVA (Fukuyama; AR): callable (depth 30, not seen) - TAF1 SVA (XDP; XL): not callable (depth 2) - Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not callable: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. + TAF1 SVA (XDP; XL): not assessed (depth 2) + Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not assessed: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. ## Repeat Expansions (ExpansionHunter) --- @@ -209,9 +209,9 @@ LCE3B/LCE3C copies (from depth): 1 (estimate 1.0). Reading: one deleted CCL3L1/CCL3L3 copies (from depth): not assessed (low depth) GBA1, GBAP1 (agCN): 4 (2 region(s), quality 35.25 or more, filter PASS). Reading: agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy + PMS2, PMS2CL (agCN): chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual) STRC, STRCP1 (agCN): unreadable: S_strc_copy_number.tsv lacks the copy-number columns mytable (agCN): not assessed: no read over the locus - pms2 (agCN): chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual) Copy-number intervals (ClinGen recurrent regions, carrier deletions, AZF; from depth): 4 rows (3 called, 1 not assessed); 2 with a deletion or a duplication Deletion: AZFc (AZFc, chrY:23000001-26000000), 0 of 1 copies Duplication: dup (X1, chr1:2-2), 3 of 2 copies diff --git a/tests/parity/golden/report-render/a-numbers/a-numbers.txt b/tests/parity/golden/report-render/a-numbers/a-numbers.txt index a17442abd..58fec6431 100644 --- a/tests/parity/golden/report-render/a-numbers/a-numbers.txt +++ b/tests/parity/golden/report-render/a-numbers/a-numbers.txt @@ -74,8 +74,8 @@ --- Insertions called: 3 (ALU 2, L1 1) FKTN SVA (Fukuyama; AR): callable (depth 30, not seen) - TAF1 SVA (XDP; XL): not callable (depth 2) - Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not callable: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. + TAF1 SVA (XDP; XL): not assessed (depth 2) + Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not assessed: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. ## Repeat Expansions (ExpansionHunter) --- @@ -209,9 +209,9 @@ LCE3B/LCE3C copies (from depth): 1 (estimate 1.0). Reading: one deleted CCL3L1/CCL3L3 copies (from depth): not assessed (low depth) GBA1, GBAP1 (agCN): 4 (2 region(s), quality 35.25 or more, filter PASS). Reading: agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy + PMS2, PMS2CL (agCN): chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual) STRC, STRCP1 (agCN): unreadable: S_strc_copy_number.tsv lacks the copy-number columns mytable (agCN): not assessed: no read over the locus - pms2 (agCN): chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual) Copy-number intervals (ClinGen recurrent regions, carrier deletions, AZF; from depth): 4 rows (3 called, 1 not assessed); 2 with a deletion or a duplication Deletion: AZFc (AZFc, chrY:23000001-26000000), 0 of 1 copies Duplication: dup (X1, chr1:2-2), 3 of 2 copies diff --git a/tests/parity/golden/report-render/a-painting/a-painting.html b/tests/parity/golden/report-render/a-painting/a-painting.html index dde3f48f9..9fe465e3a 100644 --- a/tests/parity/golden/report-render/a-painting/a-painting.html +++ b/tests/parity/golden/report-render/a-painting/a-painting.html @@ -325,9 +325,9 @@

    Moved to class 3 by step 05's rules

    Mobile Element Insertions

    Step 50 · Complete · file date 2021-03-04 05:06 UTC · link to this section

    -

    Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not callable: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/<sample>_mei.tsv.

    +

    Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not assessed: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/<sample>_mei.tsv.

    Insertions called3 (ALU 2, L1 1)
    -
    GeneElementConditionInheritanceStatusDepthCall
    FKTNSVAFukuyamaARcallable30not seen
    TAF1SVAXDPXLnot callable2.
    +
    GeneElementConditionInheritanceStatusDepthCall
    FKTNSVAFukuyamaARcallable30not seen
    TAF1SVAXDPXLnot assessed2.
    @@ -487,7 +487,7 @@

    SMN1/SMN2 Copy Number (Parascopy)

    HP (haptoglobin) copies (from depth)2 (estimate 2.1). Reading: usual
    LCE3B/LCE3C copies (from depth)1 (estimate 1.0). Reading: one deleted
    CCL3L1/CCL3L3 copies (from depth)not assessed (low depth)
    -
    GenesCopies together (agCN)Reading
    GBA1, GBAP14 (2 region(s), quality 35.25 or more, filter PASS)agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy
    STRC, STRCP1unreadable: S_strc_copy_number.tsv lacks the copy-number columns.
    mytablenot assessed: no read over the locus.
    pms2chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual).
    +
    GenesCopies together (agCN)Reading
    GBA1, GBAP14 (2 region(s), quality 35.25 or more, filter PASS)agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy
    PMS2, PMS2CLchr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual).
    STRC, STRCP1unreadable: S_strc_copy_number.tsv lacks the copy-number columns.
    mytablenot assessed: no read over the locus.
    Copy-number intervals (ClinGen recurrent regions, carrier deletions, AZF; from depth)4 rows (3 called, 1 not assessed); 2 with a deletion or a duplication
    RegionRowPlaceCopiesChange
    AZFcAZFcchrY:23000001-260000000 of 1deletion
    dupX1chr1:2-23 of 2duplication
    @@ -911,7 +911,8 @@

    Genes and rsIDs in these results

  • MT-TK: Mitochondrial variants
  • MT-TL1: Mitochondrial variants
  • MT-TL2: Mitochondrial variants
  • -
  • PMS2: Paralog genes (Paraphase, PacBio HiFi)
  • +
  • PMS2: SMN1/SMN2 copy number (Parascopy, short reads), Paralog genes (Paraphase, PacBio HiFi)
  • +
  • PMS2CL: SMN1/SMN2 copy number (Parascopy, short reads)
  • RFC1: Repeat expansions (ExpansionHunter) (2)
  • SLC6A4: Repeat expansions (ExpansionHunter)
  • SMN1: Paralog genes (Paraphase, PacBio HiFi)
  • diff --git a/tests/parity/golden/report-render/a-painting/a-painting.txt b/tests/parity/golden/report-render/a-painting/a-painting.txt index dfe91ceef..5c296beee 100644 --- a/tests/parity/golden/report-render/a-painting/a-painting.txt +++ b/tests/parity/golden/report-render/a-painting/a-painting.txt @@ -74,8 +74,8 @@ --- Insertions called: 3 (ALU 2, L1 1) FKTN SVA (Fukuyama; AR): callable (depth 30, not seen) - TAF1 SVA (XDP; XL): not callable (depth 2) - Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not callable: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. + TAF1 SVA (XDP; XL): not assessed (depth 2) + Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not assessed: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. ## Repeat Expansions (ExpansionHunter) --- @@ -209,9 +209,9 @@ LCE3B/LCE3C copies (from depth): 1 (estimate 1.0). Reading: one deleted CCL3L1/CCL3L3 copies (from depth): not assessed (low depth) GBA1, GBAP1 (agCN): 4 (2 region(s), quality 35.25 or more, filter PASS). Reading: agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy + PMS2, PMS2CL (agCN): chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual) STRC, STRCP1 (agCN): unreadable: S_strc_copy_number.tsv lacks the copy-number columns mytable (agCN): not assessed: no read over the locus - pms2 (agCN): chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual) Copy-number intervals (ClinGen recurrent regions, carrier deletions, AZF; from depth): 4 rows (3 called, 1 not assessed); 2 with a deletion or a duplication Deletion: AZFc (AZFc, chrY:23000001-26000000), 0 of 1 copies Duplication: dup (X1, chr1:2-2), 3 of 2 copies diff --git a/tests/parity/golden/report-render/a-partial/a-partial.html b/tests/parity/golden/report-render/a-partial/a-partial.html index 8040cf1f3..19f990c18 100644 --- a/tests/parity/golden/report-render/a-partial/a-partial.html +++ b/tests/parity/golden/report-render/a-partial/a-partial.html @@ -321,9 +321,9 @@

    Moved to class 3 by step 05's rules

    Mobile Element Insertions

    Step 50 · Complete · file date 2021-03-04 05:06 UTC · link to this section

    -

    Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not callable: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/<sample>_mei.tsv.

    +

    Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not assessed: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/<sample>_mei.tsv.

    Insertions called3 (ALU 2, L1 1)
    -
    GeneElementConditionInheritanceStatusDepthCall
    FKTNSVAFukuyamaARcallable30not seen
    TAF1SVAXDPXLnot callable2.
    +
    GeneElementConditionInheritanceStatusDepthCall
    FKTNSVAFukuyamaARcallable30not seen
    TAF1SVAXDPXLnot assessed2.
    @@ -483,7 +483,7 @@

    SMN1/SMN2 Copy Number (Parascopy)

    HP (haptoglobin) copies (from depth)2 (estimate 2.1). Reading: usual
    LCE3B/LCE3C copies (from depth)1 (estimate 1.0). Reading: one deleted
    CCL3L1/CCL3L3 copies (from depth)not assessed (low depth)
    -
    GenesCopies together (agCN)Reading
    GBA1, GBAP14 (2 region(s), quality 35.25 or more, filter PASS)agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy
    STRC, STRCP1unreadable: S_strc_copy_number.tsv lacks the copy-number columns.
    mytablenot assessed: no read over the locus.
    pms2chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual).
    +
    GenesCopies together (agCN)Reading
    GBA1, GBAP14 (2 region(s), quality 35.25 or more, filter PASS)agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy
    PMS2, PMS2CLchr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual).
    STRC, STRCP1unreadable: S_strc_copy_number.tsv lacks the copy-number columns.
    mytablenot assessed: no read over the locus.
    Copy-number intervals (ClinGen recurrent regions, carrier deletions, AZF; from depth)4 rows (3 called, 1 not assessed); 2 with a deletion or a duplication
    RegionRowPlaceCopiesChange
    AZFcAZFcchrY:23000001-260000000 of 1deletion
    dupX1chr1:2-23 of 2duplication
    @@ -866,7 +866,8 @@

    Genes and rsIDs in these results

  • MT-TK: Mitochondrial variants
  • MT-TL1: Mitochondrial variants
  • MT-TL2: Mitochondrial variants
  • -
  • PMS2: Paralog genes (Paraphase, PacBio HiFi)
  • +
  • PMS2: SMN1/SMN2 copy number (Parascopy, short reads), Paralog genes (Paraphase, PacBio HiFi)
  • +
  • PMS2CL: SMN1/SMN2 copy number (Parascopy, short reads)
  • RFC1: Repeat expansions (ExpansionHunter) (2)
  • SLC6A4: Repeat expansions (ExpansionHunter)
  • SMN1: Paralog genes (Paraphase, PacBio HiFi)
  • diff --git a/tests/parity/golden/report-render/a-partial/a-partial.txt b/tests/parity/golden/report-render/a-partial/a-partial.txt index b98147e73..6b0fa177a 100644 --- a/tests/parity/golden/report-render/a-partial/a-partial.txt +++ b/tests/parity/golden/report-render/a-partial/a-partial.txt @@ -71,8 +71,8 @@ --- Insertions called: 3 (ALU 2, L1 1) FKTN SVA (Fukuyama; AR): callable (depth 30, not seen) - TAF1 SVA (XDP; XL): not callable (depth 2) - Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not callable: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. + TAF1 SVA (XDP; XL): not assessed (depth 2) + Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not assessed: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. ## Repeat Expansions (ExpansionHunter) --- @@ -206,9 +206,9 @@ LCE3B/LCE3C copies (from depth): 1 (estimate 1.0). Reading: one deleted CCL3L1/CCL3L3 copies (from depth): not assessed (low depth) GBA1, GBAP1 (agCN): 4 (2 region(s), quality 35.25 or more, filter PASS). Reading: agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy + PMS2, PMS2CL (agCN): chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual) STRC, STRCP1 (agCN): unreadable: S_strc_copy_number.tsv lacks the copy-number columns mytable (agCN): not assessed: no read over the locus - pms2 (agCN): chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual) Copy-number intervals (ClinGen recurrent regions, carrier deletions, AZF; from depth): 4 rows (3 called, 1 not assessed); 2 with a deletion or a duplication Deletion: AZFc (AZFc, chrY:23000001-26000000), 0 of 1 copies Duplication: dup (X1, chr1:2-2), 3 of 2 copies diff --git a/tests/parity/golden/report-render/a-prs-raw/a-prs-raw.html b/tests/parity/golden/report-render/a-prs-raw/a-prs-raw.html index 64e0d1c21..f9f94d2bb 100644 --- a/tests/parity/golden/report-render/a-prs-raw/a-prs-raw.html +++ b/tests/parity/golden/report-render/a-prs-raw/a-prs-raw.html @@ -325,9 +325,9 @@

    Moved to class 3 by step 05's rules

    Mobile Element Insertions

    Step 50 · Complete · file date 2021-03-04 05:06 UTC · link to this section

    -

    Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not callable: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/<sample>_mei.tsv.

    +

    Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not assessed: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/<sample>_mei.tsv.

    Insertions called3 (ALU 2, L1 1)
    -
    GeneElementConditionInheritanceStatusDepthCall
    FKTNSVAFukuyamaARcallable30not seen
    TAF1SVAXDPXLnot callable2.
    +
    GeneElementConditionInheritanceStatusDepthCall
    FKTNSVAFukuyamaARcallable30not seen
    TAF1SVAXDPXLnot assessed2.
    @@ -487,7 +487,7 @@

    SMN1/SMN2 Copy Number (Parascopy)

    HP (haptoglobin) copies (from depth)2 (estimate 2.1). Reading: usual
    LCE3B/LCE3C copies (from depth)1 (estimate 1.0). Reading: one deleted
    CCL3L1/CCL3L3 copies (from depth)not assessed (low depth)
    -
    GenesCopies together (agCN)Reading
    GBA1, GBAP14 (2 region(s), quality 35.25 or more, filter PASS)agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy
    STRC, STRCP1unreadable: S_strc_copy_number.tsv lacks the copy-number columns.
    mytablenot assessed: no read over the locus.
    pms2chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual).
    +
    GenesCopies together (agCN)Reading
    GBA1, GBAP14 (2 region(s), quality 35.25 or more, filter PASS)agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy
    PMS2, PMS2CLchr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual).
    STRC, STRCP1unreadable: S_strc_copy_number.tsv lacks the copy-number columns.
    mytablenot assessed: no read over the locus.
    Copy-number intervals (ClinGen recurrent regions, carrier deletions, AZF; from depth)4 rows (3 called, 1 not assessed); 2 with a deletion or a duplication
    RegionRowPlaceCopiesChange
    AZFcAZFcchrY:23000001-260000000 of 1deletion
    dupX1chr1:2-23 of 2duplication
    @@ -909,7 +909,8 @@

    Genes and rsIDs in these results

  • MT-TK: Mitochondrial variants
  • MT-TL1: Mitochondrial variants
  • MT-TL2: Mitochondrial variants
  • -
  • PMS2: Paralog genes (Paraphase, PacBio HiFi)
  • +
  • PMS2: SMN1/SMN2 copy number (Parascopy, short reads), Paralog genes (Paraphase, PacBio HiFi)
  • +
  • PMS2CL: SMN1/SMN2 copy number (Parascopy, short reads)
  • RFC1: Repeat expansions (ExpansionHunter) (2)
  • SLC6A4: Repeat expansions (ExpansionHunter)
  • SMN1: Paralog genes (Paraphase, PacBio HiFi)
  • diff --git a/tests/parity/golden/report-render/a-prs-raw/a-prs-raw.txt b/tests/parity/golden/report-render/a-prs-raw/a-prs-raw.txt index 358af1c84..abd560d4b 100644 --- a/tests/parity/golden/report-render/a-prs-raw/a-prs-raw.txt +++ b/tests/parity/golden/report-render/a-prs-raw/a-prs-raw.txt @@ -74,8 +74,8 @@ --- Insertions called: 3 (ALU 2, L1 1) FKTN SVA (Fukuyama; AR): callable (depth 30, not seen) - TAF1 SVA (XDP; XL): not callable (depth 2) - Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not callable: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. + TAF1 SVA (XDP; XL): not assessed (depth 2) + Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not assessed: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. ## Repeat Expansions (ExpansionHunter) --- @@ -209,9 +209,9 @@ LCE3B/LCE3C copies (from depth): 1 (estimate 1.0). Reading: one deleted CCL3L1/CCL3L3 copies (from depth): not assessed (low depth) GBA1, GBAP1 (agCN): 4 (2 region(s), quality 35.25 or more, filter PASS). Reading: agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy + PMS2, PMS2CL (agCN): chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual) STRC, STRCP1 (agCN): unreadable: S_strc_copy_number.tsv lacks the copy-number columns mytable (agCN): not assessed: no read over the locus - pms2 (agCN): chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual) Copy-number intervals (ClinGen recurrent regions, carrier deletions, AZF; from depth): 4 rows (3 called, 1 not assessed); 2 with a deletion or a duplication Deletion: AZFc (AZFc, chrY:23000001-26000000), 0 of 1 copies Duplication: dup (X1, chr1:2-2), 3 of 2 copies diff --git a/tests/parity/golden/report-render/a-prs-sex/a-prs-sex.html b/tests/parity/golden/report-render/a-prs-sex/a-prs-sex.html index 4ff0ca55a..b5f61dc05 100644 --- a/tests/parity/golden/report-render/a-prs-sex/a-prs-sex.html +++ b/tests/parity/golden/report-render/a-prs-sex/a-prs-sex.html @@ -325,9 +325,9 @@

    Moved to class 3 by step 05's rules

    Mobile Element Insertions

    Step 50 · Complete · file date 2021-03-04 05:06 UTC · link to this section

    -

    Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not callable: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/<sample>_mei.tsv.

    +

    Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not assessed: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/<sample>_mei.tsv.

    Insertions called3 (ALU 2, L1 1)
    -
    GeneElementConditionInheritanceStatusDepthCall
    FKTNSVAFukuyamaARcallable30not seen
    TAF1SVAXDPXLnot callable2.
    +
    GeneElementConditionInheritanceStatusDepthCall
    FKTNSVAFukuyamaARcallable30not seen
    TAF1SVAXDPXLnot assessed2.
    @@ -487,7 +487,7 @@

    SMN1/SMN2 Copy Number (Parascopy)

    HP (haptoglobin) copies (from depth)2 (estimate 2.1). Reading: usual
    LCE3B/LCE3C copies (from depth)1 (estimate 1.0). Reading: one deleted
    CCL3L1/CCL3L3 copies (from depth)not assessed (low depth)
    -
    GenesCopies together (agCN)Reading
    GBA1, GBAP14 (2 region(s), quality 35.25 or more, filter PASS)agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy
    STRC, STRCP1unreadable: S_strc_copy_number.tsv lacks the copy-number columns.
    mytablenot assessed: no read over the locus.
    pms2chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual).
    +
    GenesCopies together (agCN)Reading
    GBA1, GBAP14 (2 region(s), quality 35.25 or more, filter PASS)agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy
    PMS2, PMS2CLchr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual).
    STRC, STRCP1unreadable: S_strc_copy_number.tsv lacks the copy-number columns.
    mytablenot assessed: no read over the locus.
    Copy-number intervals (ClinGen recurrent regions, carrier deletions, AZF; from depth)4 rows (3 called, 1 not assessed); 2 with a deletion or a duplication
    RegionRowPlaceCopiesChange
    AZFcAZFcchrY:23000001-260000000 of 1deletion
    dupX1chr1:2-23 of 2duplication
    @@ -911,7 +911,8 @@

    Genes and rsIDs in these results

  • MT-TK: Mitochondrial variants
  • MT-TL1: Mitochondrial variants
  • MT-TL2: Mitochondrial variants
  • -
  • PMS2: Paralog genes (Paraphase, PacBio HiFi)
  • +
  • PMS2: SMN1/SMN2 copy number (Parascopy, short reads), Paralog genes (Paraphase, PacBio HiFi)
  • +
  • PMS2CL: SMN1/SMN2 copy number (Parascopy, short reads)
  • RFC1: Repeat expansions (ExpansionHunter) (2)
  • SLC6A4: Repeat expansions (ExpansionHunter)
  • SMN1: Paralog genes (Paraphase, PacBio HiFi)
  • diff --git a/tests/parity/golden/report-render/a-prs-sex/a-prs-sex.txt b/tests/parity/golden/report-render/a-prs-sex/a-prs-sex.txt index 41c5a6359..fd0ad63e0 100644 --- a/tests/parity/golden/report-render/a-prs-sex/a-prs-sex.txt +++ b/tests/parity/golden/report-render/a-prs-sex/a-prs-sex.txt @@ -74,8 +74,8 @@ --- Insertions called: 3 (ALU 2, L1 1) FKTN SVA (Fukuyama; AR): callable (depth 30, not seen) - TAF1 SVA (XDP; XL): not callable (depth 2) - Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not callable: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. + TAF1 SVA (XDP; XL): not assessed (depth 2) + Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not assessed: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. ## Repeat Expansions (ExpansionHunter) --- @@ -209,9 +209,9 @@ LCE3B/LCE3C copies (from depth): 1 (estimate 1.0). Reading: one deleted CCL3L1/CCL3L3 copies (from depth): not assessed (low depth) GBA1, GBAP1 (agCN): 4 (2 region(s), quality 35.25 or more, filter PASS). Reading: agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy + PMS2, PMS2CL (agCN): chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual) STRC, STRCP1 (agCN): unreadable: S_strc_copy_number.tsv lacks the copy-number columns mytable (agCN): not assessed: no read over the locus - pms2 (agCN): chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual) Copy-number intervals (ClinGen recurrent regions, carrier deletions, AZF; from depth): 4 rows (3 called, 1 not assessed); 2 with a deletion or a duplication Deletion: AZFc (AZFc, chrY:23000001-26000000), 0 of 1 copies Duplication: dup (X1, chr1:2-2), 3 of 2 copies diff --git a/tests/parity/golden/report-render/a-since/a-since.html b/tests/parity/golden/report-render/a-since/a-since.html index a8e865795..dab4007fb 100644 --- a/tests/parity/golden/report-render/a-since/a-since.html +++ b/tests/parity/golden/report-render/a-since/a-since.html @@ -325,9 +325,9 @@

    Moved to class 3 by step 05's rules

    Mobile Element Insertions

    Step 50 · Complete · file date 2021-03-04 05:06 UTC · link to this section

    -

    Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not callable: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/<sample>_mei.tsv.

    +

    Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not assessed: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/<sample>_mei.tsv.

    Insertions called3 (ALU 2, L1 1)
    -
    GeneElementConditionInheritanceStatusDepthCall
    FKTNSVAFukuyamaARcallable30not seen
    TAF1SVAXDPXLnot callable2.
    +
    GeneElementConditionInheritanceStatusDepthCall
    FKTNSVAFukuyamaARcallable30not seen
    TAF1SVAXDPXLnot assessed2.
    @@ -487,7 +487,7 @@

    SMN1/SMN2 Copy Number (Parascopy)

    HP (haptoglobin) copies (from depth)2 (estimate 2.1). Reading: usual
    LCE3B/LCE3C copies (from depth)1 (estimate 1.0). Reading: one deleted
    CCL3L1/CCL3L3 copies (from depth)not assessed (low depth)
    -
    GenesCopies together (agCN)Reading
    GBA1, GBAP14 (2 region(s), quality 35.25 or more, filter PASS)agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy
    STRC, STRCP1unreadable: S_strc_copy_number.tsv lacks the copy-number columns.
    mytablenot assessed: no read over the locus.
    pms2chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual).
    +
    GenesCopies together (agCN)Reading
    GBA1, GBAP14 (2 region(s), quality 35.25 or more, filter PASS)agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy
    PMS2, PMS2CLchr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual).
    STRC, STRCP1unreadable: S_strc_copy_number.tsv lacks the copy-number columns.
    mytablenot assessed: no read over the locus.
    Copy-number intervals (ClinGen recurrent regions, carrier deletions, AZF; from depth)4 rows (3 called, 1 not assessed); 2 with a deletion or a duplication
    RegionRowPlaceCopiesChange
    AZFcAZFcchrY:23000001-260000000 of 1deletion
    dupX1chr1:2-23 of 2duplication
    @@ -910,7 +910,8 @@

    Genes and rsIDs in these results

  • MT-TK: Mitochondrial variants
  • MT-TL1: Mitochondrial variants
  • MT-TL2: Mitochondrial variants
  • -
  • PMS2: Paralog genes (Paraphase, PacBio HiFi)
  • +
  • PMS2: SMN1/SMN2 copy number (Parascopy, short reads), Paralog genes (Paraphase, PacBio HiFi)
  • +
  • PMS2CL: SMN1/SMN2 copy number (Parascopy, short reads)
  • RFC1: Repeat expansions (ExpansionHunter) (2)
  • SLC6A4: Repeat expansions (ExpansionHunter)
  • SMN1: Paralog genes (Paraphase, PacBio HiFi)
  • diff --git a/tests/parity/golden/report-render/a-since/a-since.txt b/tests/parity/golden/report-render/a-since/a-since.txt index baba7fc5d..ab9edf89f 100644 --- a/tests/parity/golden/report-render/a-since/a-since.txt +++ b/tests/parity/golden/report-render/a-since/a-since.txt @@ -74,8 +74,8 @@ --- Insertions called: 3 (ALU 2, L1 1) FKTN SVA (Fukuyama; AR): callable (depth 30, not seen) - TAF1 SVA (XDP; XL): not callable (depth 2) - Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not callable: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. + TAF1 SVA (XDP; XL): not assessed (depth 2) + Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not assessed: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. ## Repeat Expansions (ExpansionHunter) --- @@ -209,9 +209,9 @@ LCE3B/LCE3C copies (from depth): 1 (estimate 1.0). Reading: one deleted CCL3L1/CCL3L3 copies (from depth): not assessed (low depth) GBA1, GBAP1 (agCN): 4 (2 region(s), quality 35.25 or more, filter PASS). Reading: agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy + PMS2, PMS2CL (agCN): chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual) STRC, STRCP1 (agCN): unreadable: S_strc_copy_number.tsv lacks the copy-number columns mytable (agCN): not assessed: no read over the locus - pms2 (agCN): chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual) Copy-number intervals (ClinGen recurrent regions, carrier deletions, AZF; from depth): 4 rows (3 called, 1 not assessed); 2 with a deletion or a duplication Deletion: AZFc (AZFc, chrY:23000001-26000000), 0 of 1 copies Duplication: dup (X1, chr1:2-2), 3 of 2 copies diff --git a/tests/parity/golden/report-render/a-stale/a-stale.html b/tests/parity/golden/report-render/a-stale/a-stale.html index cac88bdb5..c68d9b4f0 100644 --- a/tests/parity/golden/report-render/a-stale/a-stale.html +++ b/tests/parity/golden/report-render/a-stale/a-stale.html @@ -325,9 +325,9 @@

    Moved to class 3 by step 05's rules

    Mobile Element Insertions

    Step 50 · Complete · file date 2021-03-04 05:06 UTC · link to this section

    -

    Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not callable: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/<sample>_mei.tsv.

    +

    Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not assessed: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/<sample>_mei.tsv.

    Insertions called3 (ALU 2, L1 1)
    -
    GeneElementConditionInheritanceStatusDepthCall
    FKTNSVAFukuyamaARcallable30not seen
    TAF1SVAXDPXLnot callable2.
    +
    GeneElementConditionInheritanceStatusDepthCall
    FKTNSVAFukuyamaARcallable30not seen
    TAF1SVAXDPXLnot assessed2.
    @@ -487,7 +487,7 @@

    SMN1/SMN2 Copy Number (Parascopy)

    HP (haptoglobin) copies (from depth)2 (estimate 2.1). Reading: usual
    LCE3B/LCE3C copies (from depth)1 (estimate 1.0). Reading: one deleted
    CCL3L1/CCL3L3 copies (from depth)not assessed (low depth)
    -
    GenesCopies together (agCN)Reading
    GBA1, GBAP14 (2 region(s), quality 35.25 or more, filter PASS)agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy
    STRC, STRCP1unreadable: S_strc_copy_number.tsv lacks the copy-number columns.
    mytablenot assessed: no read over the locus.
    pms2chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual).
    +
    GenesCopies together (agCN)Reading
    GBA1, GBAP14 (2 region(s), quality 35.25 or more, filter PASS)agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy
    PMS2, PMS2CLchr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual).
    STRC, STRCP1unreadable: S_strc_copy_number.tsv lacks the copy-number columns.
    mytablenot assessed: no read over the locus.
    Copy-number intervals (ClinGen recurrent regions, carrier deletions, AZF; from depth)4 rows (3 called, 1 not assessed); 2 with a deletion or a duplication
    RegionRowPlaceCopiesChange
    AZFcAZFcchrY:23000001-260000000 of 1deletion
    dupX1chr1:2-23 of 2duplication
    @@ -918,7 +918,8 @@

    Genes and rsIDs in these results

  • MT-TK: Mitochondrial variants
  • MT-TL1: Mitochondrial variants
  • MT-TL2: Mitochondrial variants
  • -
  • PMS2: Paralog genes (Paraphase, PacBio HiFi)
  • +
  • PMS2: SMN1/SMN2 copy number (Parascopy, short reads), Paralog genes (Paraphase, PacBio HiFi)
  • +
  • PMS2CL: SMN1/SMN2 copy number (Parascopy, short reads)
  • RFC1: Repeat expansions (ExpansionHunter) (2)
  • SLC6A4: Repeat expansions (ExpansionHunter)
  • SMN1: Paralog genes (Paraphase, PacBio HiFi)
  • diff --git a/tests/parity/golden/report-render/a-stale/a-stale.txt b/tests/parity/golden/report-render/a-stale/a-stale.txt index caf2e5f50..1a1400de3 100644 --- a/tests/parity/golden/report-render/a-stale/a-stale.txt +++ b/tests/parity/golden/report-render/a-stale/a-stale.txt @@ -74,8 +74,8 @@ --- Insertions called: 3 (ALU 2, L1 1) FKTN SVA (Fukuyama; AR): callable (depth 30, not seen) - TAF1 SVA (XDP; XL): not callable (depth 2) - Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not callable: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. + TAF1 SVA (XDP; XL): not assessed (depth 2) + Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not assessed: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. ## Repeat Expansions (ExpansionHunter) --- @@ -209,9 +209,9 @@ LCE3B/LCE3C copies (from depth): 1 (estimate 1.0). Reading: one deleted CCL3L1/CCL3L3 copies (from depth): not assessed (low depth) GBA1, GBAP1 (agCN): 4 (2 region(s), quality 35.25 or more, filter PASS). Reading: agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy + PMS2, PMS2CL (agCN): chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual) STRC, STRCP1 (agCN): unreadable: S_strc_copy_number.tsv lacks the copy-number columns mytable (agCN): not assessed: no read over the locus - pms2 (agCN): chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual) Copy-number intervals (ClinGen recurrent regions, carrier deletions, AZF; from depth): 4 rows (3 called, 1 not assessed); 2 with a deletion or a duplication Deletion: AZFc (AZFc, chrY:23000001-26000000), 0 of 1 copies Duplication: dup (X1, chr1:2-2), 3 of 2 copies diff --git a/tests/parity/golden/report-render/a-unreadable/a-unreadable.html b/tests/parity/golden/report-render/a-unreadable/a-unreadable.html index 0104ed81d..e6db21a3e 100644 --- a/tests/parity/golden/report-render/a-unreadable/a-unreadable.html +++ b/tests/parity/golden/report-render/a-unreadable/a-unreadable.html @@ -321,9 +321,9 @@

    Moved to class 3 by step 05's rules

    Mobile Element Insertions

    Step 50 · Complete · file date 2021-03-04 05:06 UTC · link to this section

    -

    Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not callable: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/<sample>_mei.tsv.

    +

    Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not assessed: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/<sample>_mei.tsv.

    Insertions called3 (ALU 2, L1 1)
    -
    GeneElementConditionInheritanceStatusDepthCall
    FKTNSVAFukuyamaARcallable30not seen
    TAF1SVAXDPXLnot callable2.
    +
    GeneElementConditionInheritanceStatusDepthCall
    FKTNSVAFukuyamaARcallable30not seen
    TAF1SVAXDPXLnot assessed2.
    @@ -483,7 +483,7 @@

    SMN1/SMN2 Copy Number (Parascopy)

    HP (haptoglobin) copies (from depth)2 (estimate 2.1). Reading: usual
    LCE3B/LCE3C copies (from depth)1 (estimate 1.0). Reading: one deleted
    CCL3L1/CCL3L3 copies (from depth)not assessed (low depth)
    -
    GenesCopies together (agCN)Reading
    GBA1, GBAP14 (2 region(s), quality 35.25 or more, filter PASS)agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy
    STRC, STRCP1unreadable: S_strc_copy_number.tsv lacks the copy-number columns.
    mytablenot assessed: no read over the locus.
    pms2chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual).
    +
    GenesCopies together (agCN)Reading
    GBA1, GBAP14 (2 region(s), quality 35.25 or more, filter PASS)agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy
    PMS2, PMS2CLchr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual).
    STRC, STRCP1unreadable: S_strc_copy_number.tsv lacks the copy-number columns.
    mytablenot assessed: no read over the locus.
    Copy-number intervals (ClinGen recurrent regions, carrier deletions, AZF; from depth)4 rows (3 called, 1 not assessed); 2 with a deletion or a duplication
    RegionRowPlaceCopiesChange
    AZFcAZFcchrY:23000001-260000000 of 1deletion
    dupX1chr1:2-23 of 2duplication
    @@ -842,7 +842,8 @@

    Genes and rsIDs in these results

  • MT-TK: Mitochondrial variants
  • MT-TL1: Mitochondrial variants
  • MT-TL2: Mitochondrial variants
  • -
  • PMS2: Paralog genes (Paraphase, PacBio HiFi)
  • +
  • PMS2: SMN1/SMN2 copy number (Parascopy, short reads), Paralog genes (Paraphase, PacBio HiFi)
  • +
  • PMS2CL: SMN1/SMN2 copy number (Parascopy, short reads)
  • RFC1: Repeat expansions (ExpansionHunter) (2)
  • SLC6A4: Repeat expansions (ExpansionHunter)
  • SMN1: Paralog genes (Paraphase, PacBio HiFi)
  • diff --git a/tests/parity/golden/report-render/a-unreadable/a-unreadable.txt b/tests/parity/golden/report-render/a-unreadable/a-unreadable.txt index 82e5660b2..9fc5f353a 100644 --- a/tests/parity/golden/report-render/a-unreadable/a-unreadable.txt +++ b/tests/parity/golden/report-render/a-unreadable/a-unreadable.txt @@ -71,8 +71,8 @@ --- Insertions called: 3 (ALU 2, L1 1) FKTN SVA (Fukuyama; AR): callable (depth 30, not seen) - TAF1 SVA (XDP; XL): not callable (depth 2) - Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not callable: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. + TAF1 SVA (XDP; XL): not assessed (depth 2) + Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not assessed: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. ## Repeat Expansions (ExpansionHunter) --- @@ -206,9 +206,9 @@ LCE3B/LCE3C copies (from depth): 1 (estimate 1.0). Reading: one deleted CCL3L1/CCL3L3 copies (from depth): not assessed (low depth) GBA1, GBAP1 (agCN): 4 (2 region(s), quality 35.25 or more, filter PASS). Reading: agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy + PMS2, PMS2CL (agCN): chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual) STRC, STRCP1 (agCN): unreadable: S_strc_copy_number.tsv lacks the copy-number columns mytable (agCN): not assessed: no read over the locus - pms2 (agCN): chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual) Copy-number intervals (ClinGen recurrent regions, carrier deletions, AZF; from depth): 4 rows (3 called, 1 not assessed); 2 with a deletion or a duplication Deletion: AZFc (AZFc, chrY:23000001-26000000), 0 of 1 copies Duplication: dup (X1, chr1:2-2), 3 of 2 copies diff --git a/tests/parity/golden/report-render/a-y-calls/a-y-calls.html b/tests/parity/golden/report-render/a-y-calls/a-y-calls.html index 9a4993112..1104c7e15 100644 --- a/tests/parity/golden/report-render/a-y-calls/a-y-calls.html +++ b/tests/parity/golden/report-render/a-y-calls/a-y-calls.html @@ -325,9 +325,9 @@

    Moved to class 3 by step 05's rules

    Mobile Element Insertions

    Step 50 · Complete · file date 2021-03-04 05:06 UTC · link to this section

    -

    Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not callable: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/<sample>_mei.tsv.

    +

    Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not assessed: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/<sample>_mei.tsv.

    Insertions called3 (ALU 2, L1 1)
    -
    GeneElementConditionInheritanceStatusDepthCall
    FKTNSVAFukuyamaARcallable30not seen
    TAF1SVAXDPXLnot callable2.
    +
    GeneElementConditionInheritanceStatusDepthCall
    FKTNSVAFukuyamaARcallable30not seen
    TAF1SVAXDPXLnot assessed2.
    @@ -487,7 +487,7 @@

    SMN1/SMN2 Copy Number (Parascopy)

    HP (haptoglobin) copies (from depth)2 (estimate 2.1). Reading: usual
    LCE3B/LCE3C copies (from depth)1 (estimate 1.0). Reading: one deleted
    CCL3L1/CCL3L3 copies (from depth)not assessed (low depth)
    -
    GenesCopies together (agCN)Reading
    GBA1, GBAP14 (2 region(s), quality 35.25 or more, filter PASS)agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy
    STRC, STRCP1unreadable: S_strc_copy_number.tsv lacks the copy-number columns.
    mytablenot assessed: no read over the locus.
    pms2chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual).
    +
    GenesCopies together (agCN)Reading
    GBA1, GBAP14 (2 region(s), quality 35.25 or more, filter PASS)agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy
    PMS2, PMS2CLchr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual).
    STRC, STRCP1unreadable: S_strc_copy_number.tsv lacks the copy-number columns.
    mytablenot assessed: no read over the locus.
    Copy-number intervals (ClinGen recurrent regions, carrier deletions, AZF; from depth)4 rows (3 called, 1 not assessed); 2 with a deletion or a duplication
    RegionRowPlaceCopiesChange
    AZFcAZFcchrY:23000001-260000000 of 1deletion
    dupX1chr1:2-23 of 2duplication
    @@ -897,7 +897,8 @@

    Genes and rsIDs in these results

  • MT-TK: Mitochondrial variants
  • MT-TL1: Mitochondrial variants
  • MT-TL2: Mitochondrial variants
  • -
  • PMS2: Paralog genes (Paraphase, PacBio HiFi)
  • +
  • PMS2: SMN1/SMN2 copy number (Parascopy, short reads), Paralog genes (Paraphase, PacBio HiFi)
  • +
  • PMS2CL: SMN1/SMN2 copy number (Parascopy, short reads)
  • RFC1: Repeat expansions (ExpansionHunter) (2)
  • SLC6A4: Repeat expansions (ExpansionHunter)
  • SMN1: Paralog genes (Paraphase, PacBio HiFi)
  • diff --git a/tests/parity/golden/report-render/a-y-calls/a-y-calls.txt b/tests/parity/golden/report-render/a-y-calls/a-y-calls.txt index 0a0cd1816..27ae36f83 100644 --- a/tests/parity/golden/report-render/a-y-calls/a-y-calls.txt +++ b/tests/parity/golden/report-render/a-y-calls/a-y-calls.txt @@ -74,8 +74,8 @@ --- Insertions called: 3 (ALU 2, L1 1) FKTN SVA (Fukuyama; AR): callable (depth 30, not seen) - TAF1 SVA (XDP; XL): not callable (depth 2) - Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not callable: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. + TAF1 SVA (XDP; XL): not assessed (depth 2) + Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not assessed: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. ## Repeat Expansions (ExpansionHunter) --- @@ -209,9 +209,9 @@ LCE3B/LCE3C copies (from depth): 1 (estimate 1.0). Reading: one deleted CCL3L1/CCL3L3 copies (from depth): not assessed (low depth) GBA1, GBAP1 (agCN): 4 (2 region(s), quality 35.25 or more, filter PASS). Reading: agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy + PMS2, PMS2CL (agCN): chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual) STRC, STRCP1 (agCN): unreadable: S_strc_copy_number.tsv lacks the copy-number columns mytable (agCN): not assessed: no read over the locus - pms2 (agCN): chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual) Copy-number intervals (ClinGen recurrent regions, carrier deletions, AZF; from depth): 4 rows (3 called, 1 not assessed); 2 with a deletion or a duplication Deletion: AZFc (AZFc, chrY:23000001-26000000), 0 of 1 copies Duplication: dup (X1, chr1:2-2), 3 of 2 copies diff --git a/tests/parity/golden/report-render/all-history/all-history.txt b/tests/parity/golden/report-render/all-history/all-history.txt index 84ff6cc1d..45bb8211c 100644 --- a/tests/parity/golden/report-render/all-history/all-history.txt +++ b/tests/parity/golden/report-render/all-history/all-history.txt @@ -36,8 +36,8 @@ 217 of the 1572 hard-to-read genes of assets/callability_genes.tsv were read: 90% or more of their bases had 10 or more reads of mapping quality 20 or more. The share counts every base of a gene, introns included, so a gene can pass while a coding exon was not read: this run has no exon table from step 16b, so no exon was checked. Not read, and no other step calls them (1301): OR4F5 (16.7%), OR4F29 (33.3%), OR4F16 (50.0%), AGRN (66.7%), ATAD3B (0.0%), MMP23B (0.0%), CDK11B (16.7%), SLC35E2B (33.3%), CDK11A (50.0%), TTC34 (66.7%), RPL22 (83.3%), MASP2 (0.0%), NPPA (16.6%), KIAA2013 (33.3%), PRAMEF1 (50.0%), PRAMEF11 (66.7%), HNRNPCL1 (83.3%), PRAMEF4 (0.0%), PRAMEF10 (16.7%), PRAMEF7 (33.3%), PRAMEF6 (50.0%), PRAMEF27 (66.7%), HNRNPCL3 (83.3%), HNRNPCL2 (0.0%), PRAMEF26 (16.7%), HNRNPCL4 (33.3%), PRAMEF9 (50.0%), PRAMEF13 (66.7%), PRAMEF18 (83.3%), PRAMEF8 (0.0%), PRAMEF33 (16.7%), PRAMEF15 (33.3%), PRAMEF14 (50.0%), PRAMEF19 (66.6%), PRAMEF17 (83.3%), CELA2B (0.0%), CLCNKA (16.7%), CLCNKB (33.3%), NBPF1 (50.0%), CROCC (66.7%), AKR7L (83.3%), NBPF3 (0.0%), CELA3B (16.7%), CELA3A (33.3%), HMGCL (50.0%), CNR2 (66.7%), RSRP1 (83.3%), PIGV (16.7%), XKR8 (33.3%), BMP8A (50.0%), BMP8B (66.7%), OXCT2 (83.3%), CYP4Z1 (0.0%), CYP4A22 (16.7%), GBP1 (33.3%), SETSIP (49.9%), AGL (66.7%), EXTL2 (83.3%), AMY2A (0.0%), NBPF4 (66.7%), NBPF6 (83.3%), LRIG2 (16.7%), VANGL1 (33.3%), IGSF3 (50.0%), SEC22B (83.3%), NBPF26 (0.0%), NOTCH2NLR (16.7%), PPIAL4A (33.3%), FAM72B (50.0%), SRGAP2C (66.7%), H3-7 (83.3%), PPIAL4E (0.0%), NBPF15 (16.7%), PPIAL4F (33.3%), SRGAP2B (50.0%), FAM72D (66.7%), PPIAL4D (83.3%), GPR89A (0.0%), RBM8A (16.7%), NBPF10 (33.3%), NOTCH2NLA (50.0%), PPIAL4H (66.6%), NBPF12 (83.3%), NBPF11 (0.0%), PPIAL4G (16.6%), NBPF14 (33.3%), NOTCH2NLB (50.0%), NUDT4B (66.7%), PDE4DIP (83.3%), NOTCH2NLC (0.0%), NBPF19 (16.7%), PPIAL4C (33.3%), H2BC18 (66.7%), H3C13 (83.2%), H3C14 (0.0%), H2AC18 (16.5%), H2AC19 (33.3%), H3C15 (50.0%), H4C15 (66.7%), HRNR (83.3%), LCE3E (0.0%), LCE3D (16.6%), S100A8 (33.3%), S100A7A (50.0%), S100A7 (66.7%), FLAD1 (83.3%), MTX1 (0.0%), HCN3 (33.3%), FCRL5 (50.0%), HSPA6 (83.3%), FCGR2B (33.3%), HSD17B7 (50.0%), CD247 (66.7%), XCL2 (83.3%), PRG4 (0.0%), PTPRC (50.0%), PPP1R12B (66.7%), KISS1 (83.3%), SRGAP2 (0.0%), CR1 (16.7%), CR1L (33.3%), ZC3H11B (50.0%), LBR (66.7%), LEFTY2 (83.3%), OR2T33 (0.0%), OR2T7 (16.7%), OR2T2 (33.3%), OR2T3 (50.0%), OR2T5 (66.6%), OR2G6 (83.3%), OR2T34 (0.0%), OR2T11 (16.7%), OR2T35 (33.3%), OR2T27 (50.0%), SNTG2 (66.7%), TPO (83.3%), KLF11 (0.0%), CCDC121 (16.7%), ABCG8 (33.3%), PCBP1 (50.0%), NAT8 (66.6%), C2orf78 (83.3%), CD8B (0.0%), RGPD1 (16.7%), PLGLB1 (33.3%), PLGLB2 (50.0%), RGPD2 (66.7%), RPIA (83.3%), TEKT4 (0.0%), FAHD2A (16.7%), TRIM43B (33.3%), TRIM43 (50.0%), ANKRD36C (66.7%), GPAT2 (83.3%), ANKRD36 (0.0%), ANKRD36B (16.7%), RGPD3 (33.3%), RGPD4 (50.0%), RANBP2 (66.7%), RGPD5 (83.3%), MALL (0.0%), MTLN (16.7%), LIMS4 (33.3%), RGPD6 (50.0%), ANAPC1 (66.7%), RGPD8 (83.3%), FOXD4L1 (0.0%), RABL2A (16.7%), RAB6C (33.3%), POTEF (50.0%), CCDC74B (66.7%), SMPD4 (83.3%), TUBA3E (0.0%), POTEI (16.7%), CFC1B (33.3%), CFC1 (50.0%), POTEJ (66.7%), PLEKHB2 (83.3%), RAB6D (0.0%), MZT2A (16.7%), TUBA3D (33.3%), CCDC74A (50.0%), ANKRD30BL (66.7%), NOSTRIN (83.3%), IFT70B (0.0%), CASP10 (16.7%), ALPP (33.3%), ALPG (50.0%), UGT1A6 (66.7%), UGT1A5 (83.3%), UGT1A3 (0.0%), MLPH (16.7%), OR6B2 (33.3%), AQP12B (50.0%), AQP12A (66.7%), ANO7 (83.3%), CHL1 (0.0%), EMC3 (16.7%), FANCD2 (33.3%), DAZL (50.0%), ZNF35 (66.7%), LZTFL1 (83.3%), MST1 (0.0%), MST1R (16.7%), HYAL1 (33.3%), FRG2C (50.0%), ZNF717 (66.7%), OR5H6 (0.0%), ROPN1 (16.7%), ROPN1B (33.3%), RPN1 (50.0%), ALG1L2 (66.7%), BFSP2 (83.3%), PRR23B (0.0%), SOX2 (16.6%), EIF2B5 (33.3%), KNG1 (50.0%), TM4SF19 (66.7%), ZNF595 (83.3%), PDE6B (0.0%), GAK (16.7%), FGFRL1 (33.3%), RNF212 (50.0%), UVSSA (66.7%), DOK7 (83.3%), HMX1 (0.0%), FAM90A26 (16.7%), USP17L10 (33.3%), USP17L11 (50.0%), USP17L12 (66.7%), USP17L13 (83.3%), USP17L17 (0.0%), USP17L18 (16.6%), USP17L19 (33.3%), USP17L20 (50.0%), USP17L21 (66.7%), USP17L22 (83.3%), USP17L24 (0.0%), USP17L25 (16.6%), USP17L26 (33.3%), USP17L5 (50.0%), USP17L27 (66.7%), USP17L28 (83.3%), USP17L30 (0.0%), DEFB131A (16.7%), DRD5 (33.3%), UGT2B10 (83.3%), UGT2B28 (0.0%), UGT2A1 (16.7%), UGT2A2 (33.3%), HTN3 (50.0%), HTN1 (66.7%), AFP (83.3%), PIGY (0.0%), PYURF (16.7%), CISD2 (33.3%), SLC9B1 (50.0%), KLHL2 (0.0%), GK3 (16.7%), HPF1 (33.3%), PDLIM3 (50.0%), FAT1 (66.7%), FRG1 (83.3%), FRG2 (0.0%), DUX4 (16.7%), SDHA (33.3%), PDCD6 (50.0%), ZDHHC11B (66.7%), ZDHHC11 (83.3%), TERT (0.0%), SLC6A3 (16.7%), TAF11L2 (33.3%), TAF11L3 (49.9%), TAF11L4 (66.7%), TAF11L5 (83.2%), TAF11L7 (0.0%), TAF11L8 (16.6%), TAF11L9 (33.3%), TAF11L10 (49.9%), TAF11L11 (66.7%), TAF11L12 (83.3%), TAF11L14 (0.0%), EMB (16.7%), MARVELD2 (33.3%), SERF1B (66.7%), NAIP (16.7%), SKIC3 (50.0%), LIX1 (66.7%), SAR1B (83.3%), DND1 (0.0%), PCDHA10 (16.7%), PCDHB7 (33.3%), PCDHB8 (50.0%), PCDHB11 (66.7%), PCDHB12 (83.3%), PPP1R2B (0.0%), NPM1 (16.7%), THOC3 (33.3%), SIMC1 (50.0%), FAM153A (66.7%), FAM153CP (83.3%), FLT4 (0.0%), OR4F3 (16.6%), DUSP22 (33.3%), TUBB2A (50.0%), H2AC13 (66.7%), H2AC14 (83.2%), OR2J1 (0.0%), OR2J2 (16.7%), HLA-G (33.3%), HLA-A (50.0%), MICA (66.7%), MICB (83.3%), ZBTB12 (16.7%), PBX2 (83.3%), HLA-DRB1 (0.0%), GSTA2 (16.7%), GSTA1 (33.3%), GSTA5 (50.0%), PRIM2 (66.7%), FKBP1C (83.3%), SLC17A5 (0.0%), SEC63 (16.7%), OR2A4 (33.3%), CTAGE9 (50.0%), PCMT1 (66.7%), RAET1G (83.3%), ULBP1 (0.0%), RAET1L (16.7%), ULBP3 (33.3%), SLC22A1 (50.0%), SMOC2 (83.3%), RBAK-RBAKDN (0.0%), RBAK (16.7%), SLC29A4 (33.3%), FSCN1 (50.0%), OCM (66.7%), CCZ1 (83.3%), RSPH10B2 (16.7%), CCZ1B (33.3%), NOD1 (50.0%), FKBP9 (66.7%), DPY19L1 (83.3%), SEPTIN7 (0.0%), SPDYE1 (16.7%), PPIA (33.3%), CDC14C (50.0%), PSPH (66.7%), CCT6A (83.3%), ZNF716 (0.0%), ZNF727 (16.7%), ZNF735 (33.3%), ZNF736 (50.0%), GUSB (66.7%), RABGEF1 (83.3%), TYW1 (0.0%), SPDYE21 (16.7%), TYW1B (33.3%), POM121 (50.0%), TRIM74 (66.7%), SPDYE8 (83.3%), SPDYE9 (0.0%), SPDYE10 (16.7%), NSUN5 (33.3%), TRIM50 (50.0%), CLIP2 (66.7%), GTF2IRD2 (0.0%), SPDYE12 (16.7%), CASTOR2 (33.3%), GTF2IRD2B (50.0%), SPDYE13 (66.7%), SPDYE14 (83.3%), TRIM73 (0.0%), POM121C (16.7%), SPDYE5 (33.3%), DTX2 (50.0%), UPK3B (66.7%), SPDYE16 (83.3%), SPDYE17 (0.0%), SPDYE18 (16.7%), STEAP1 (33.3%), ASNS (50.0%), OCM2 (66.7%), CYP3A7-CYP3A51P (83.3%), CYP3A4 (0.0%), STAG3 (16.7%), PVRIG (33.3%), SPDYE3 (50.0%), SAP25 (66.7%), ZAN (83.3%), MUC12 (0.0%), SPDYE6 (16.7%), POLR2J (33.3%), RASA4B (50.0%), POLR2J3 (66.7%), UPK3BL2 (83.3%), RASA4 (0.0%), UPK3BL1 (16.7%), POLR2J3-UPK3BL2 (33.3%), SPDYE2B (50.0%), POLR2J2 (66.7%), LAMB1 (83.3%), METTL2B (0.0%), KLF14 (16.7%), AKR1B10 (33.3%), AKR1B15 (50.0%), BRAF (66.7%), TRBV9 (83.3%), PRSS2 (0.0%), CTAGE15 (16.7%), TCAF2 (33.3%), TCAF2C (50.0%), CTAGE6 (66.6%), OR2F2 (83.3%), CTAGE4 (0.0%), OR2A42 (16.7%), OR2A7 (33.3%), CTAGE8 (50.0%), OR2A1 (66.7%), ARHGEF5 (83.3%), ACTR3C (0.0%), KMT2C (16.7%), ACTR3B (33.3%), OR4F21 (50.0%), FBXO25 (66.7%), ARHGEF10 (83.3%), FAM90A15 (16.6%), FAM90A3 (33.3%), FAM90A13 (50.0%), FAM90A5 (66.7%), FAM90A20 (83.3%), USP17L1 (0.0%), USP17L4 (16.6%), ZNF705G (33.3%), DEFB108C (50.0%), DEFB4B (66.6%), DEFB103B (83.3%), DEFB104B (0.0%), DEFB106B (16.7%), DEFB105B (33.3%), DEFB107B (50.0%), PRR23D1 (66.6%), FAM90A7 (83.3%), FAM90A23 (0.0%), FAM90A14 (16.6%), FAM90A18 (33.3%), FAM90A16 (50.0%), FAM90A8 (66.6%), FAM90A17 (83.3%), FAM90A9 (0.0%), FAM90A10 (16.7%), PRR23D2 (33.3%), DEFB107A (50.0%), DEFB105A (66.7%), DEFB106A (83.3%), SPAG11A (0.0%), DEFB103A (16.7%), DEFB4A (33.3%), ZNF705B (50.0%), USP17L8 (66.7%), USP17L3 (83.3%), FAM90A11 (0.0%), FAM90A24 (16.6%), FAM90A12 (33.3%), SLC35G5 (50.0%), DEFB130B (66.7%), ZNF705D (83.3%), USP17L2 (0.0%), DEFB109D (16.7%), FAM86B1 (33.3%), DEFB130A (50.0%), FAM86B2 (66.7%), RBPMS (83.3%), IMPA1 (0.0%), SLC10A5 (16.7%), CDH17 (33.3%), CYP11B1 (50.0%), CYP11B2 (66.7%), GPIHBP1 (83.3%), WASHC1 (0.0%), FOXD4 (16.6%), ZNG1A (33.3%), KCNV2 (50.0%), RLN2 (66.7%), RLN1 (83.3%), IFNA21 (0.0%), IFNA4 (16.6%), IFNA7 (33.2%), IFNA10 (50.0%), IFNA16 (66.7%), IFNA17 (83.3%), IFNA13 (0.0%), IFNA1 (16.6%), ANKRD18B (33.3%), PRSS3 (50.0%), GALT (66.7%), SPATA31F1 (83.3%), CNTNAP3 (0.0%), SPATA31A1 (16.7%), FOXD4L6 (33.3%), ZNG1F (50.0%), CNTNAP3B (66.7%), SPATA31A6 (83.3%), SPATA31A7 (0.0%), CNTNAP3C (16.7%), FOXD4L5 (33.3%), ZNG1E (50.0%), FOXD4L4 (66.7%), ZNF658 (83.3%), ANKRD20A1 (0.0%), ZNG1C (16.7%), FOXD4L3 (33.3%), PGM5 (50.0%), FXN (66.7%), TJP2 (83.3%), SPATA31D4 (0.0%), SPATA31D3 (16.7%), SPATA31D1 (33.3%), KIF27 (50.0%), SPATA31C1 (66.7%), SPATA31C2 (83.3%), SLC71A2 (0.0%), NUTM2G (16.7%), CTSV (33.3%), OR13C5 (50.0%), OR13C2 (66.7%), OR13C9 (83.3%), POLE3 (0.0%), ORM1 (16.7%), ORM2 (33.3%), SLC27A4 (50.0%), PKN3 (66.7%), ABO (0.0%), LCN1 (16.7%), OBP2A (33.3%), SOHLH1 (50.0%), INPP5E (66.7%), AJM1 (83.3%), GRIN1 (0.0%), TUBB8 (16.7%), AKR1C1 (33.3%), AKR1C2 (50.0%), DCLRE1C (66.7%), MRC1 (83.3%), ANKRD30A (0.0%), ZNF33A (16.7%), ZNF37A (33.3%), PLD5P1 (50.0%), ZNF33B (66.7%), BMS1 (83.3%), AGAP4 (0.0%), TIMM23 (16.7%), ANTXRL (33.3%), ANXA8L1 (50.0%), NPY4R (66.7%), GPRIN2 (83.3%), PTPN20 (0.0%), ANXA8 (16.7%), FAM25G (33.3%), AGAP9 (50.0%), SYT15B (66.7%), NPY4R2 (83.3%), PARG (0.0%), TIMM23B (16.7%), TIMM23B-AGAP6 (33.3%), AGAP6 (50.0%), WASHC2A (66.7%), ASAH2B (83.3%), EIF5AL1 (0.0%), NUTM2B (16.7%), NUTM2E (33.3%), TMEM254 (50.0%), PLAC9 (66.7%), ADIRF (83.3%), NUTM2A (0.0%), NUTM2D (16.7%), PAPSS2 (33.3%), PTEN (50.0%), LIPN (66.7%), BTRC (83.3%), SFR1 (0.0%), DHX32 (16.7%), FANK1 (33.3%), ECHS1 (50.0%), SPRN (66.7%), FRG2B (83.3%), SCGB1C1 (0.0%), IFITM3 (16.7%), DRD4 (33.3%), DEAF1 (50.0%), KRTAP5-2 (83.3%), KRTAP5-4 (0.0%), MRPL23 (16.7%), H19 (33.3%), SSU72L5 (50.0%), SSU72L2 (66.6%), SSU72L4 (83.3%), SSU72L1 (0.0%), OR51A4 (16.7%), OR51A2 (33.3%), HBG1 (50.0%), OR10A5 (66.7%), MRGPRX4 (83.3%), MDK (0.0%), SPI1 (16.7%), OR4C3 (33.3%), OR4C5 (50.0%), OR4A47 (66.7%), TRIM51G (83.3%), TRIM64C (0.0%), FOLH1 (16.7%), OR4C13 (33.3%), OR4C12 (50.0%), OR4C45 (66.7%), OR4C46 (83.3%), OR4A5 (0.0%), TRIM48 (16.7%), OR4A15 (33.3%), TRIM51 (50.0%), OR5F1 (66.7%), OR8H2 (83.3%), OR5M8 (0.0%), OR9G1 (16.7%), OR1S2 (33.3%), OR1S1 (50.0%), GLYATL1B (66.7%), PGA3 (83.3%), B3GAT3 (0.0%), ESRRA (16.7%), SLC22A12 (33.3%), RBM4B (50.0%), TPCN2 (66.7%), FGF3 (83.3%), KRTAP5-8 (0.0%), KRTAP5-10 (16.6%), KRTAP5-11 (33.3%), XNDC1N-ZNF705EP-ALG1L9P (50.0%), DEFB108B (66.7%), XNDC1N (83.3%), INTS4 (0.0%), NOX4 (16.7%), TRIM77 (33.3%), TRIM49 (50.0%), TRIM64B (66.7%), TRIM49D1 (83.3%), TRIM64 (0.0%), TRIM49C (16.7%), UBTFL1 (33.3%), CARD16 (50.0%), HSPA8 (66.7%), OR8B2 (83.3%), TMEM45B (0.0%), CD4 (16.7%), PEX5 (33.3%), APOBEC1 (50.0%), GDF3 (66.7%), NANOG (83.3%), FAM90A1 (0.0%), PRH1 (33.3%), PRR4 (50.0%), PRH2 (66.7%), TAS2R14 (83.3%), TAS2R31 (0.0%), TAS2R46 (16.7%), TAS2R43 (33.3%), TAS2R30 (50.0%), PRB4 (66.7%), PRB1 (83.3%), DDX11 (0.0%), H3-5 (16.6%), ALG10 (33.3%), ALG10B (50.0%), TUBA1B (66.6%), COX14 (83.3%), NACA (50.0%), DPY19L2 (66.7%), HNF1A (83.3%), HPD (0.0%), HCAR2 (16.7%), HCAR3 (33.3%), P2RX2 (50.0%), PGAM5 (66.7%), GOLGA3 (83.3%), C1QTNF9B (0.0%), C1QTNF9 (16.7%), PARP4 (33.3%), PABPC3 (50.0%), MRPS31 (66.7%), HNRNPA1L2 (83.3%), PRR20C (0.0%), PRR20B (16.6%), PRR20D (33.3%), PRR20E (50.0%), F7 (66.7%), PROZ (83.3%), POTEM (0.0%), POTEG (16.7%), OR11H2 (33.3%), OR4N2 (50.0%), OR4Q3 (66.7%), OR4M1 (83.3%), RNASE3 (0.0%), RNASE2 (16.7%), OR10G2 (33.3%), DHRS4 (50.0%), DHRS4L2 (66.7%), ARF6 (83.3%), ACOT2 (0.0%), NDUFB1 (16.7%), JAG2 (33.3%), BTBD6 (50.0%), IGHV3-21 (66.7%), GOLGA6L6 (83.3%), POTEB3 (0.0%), LINC02203 (16.7%), OR4M2B (33.3%), OR4N4C (50.0%), POTEB (66.7%), OR4M2-OT1 (83.3%), OR4N4 (0.0%), GOLGA6L22 (16.7%), GOLGA6L1 (33.3%), GOLGA6L26 (50.0%), GOLGA8S (66.7%), GOLGA6L2 (83.3%), HERC2 (0.0%), GOLGA6L24 (16.7%), GOLGA8F (33.3%), GOLGA8G (50.0%), GOLGA6L25 (66.7%), GOLGA8M (83.3%), GOLGA8J (0.0%), GOLGA8T (16.7%), GOLGA8R (50.0%), GOLGA8Q (66.7%), GOLGA8H (83.3%), GOLGA8O (0.0%), GOLGA8N (16.7%), GOLGA8A (33.3%), GOLGA8B (50.0%), NANOGP8 (66.6%), NDUFAF1 (83.3%), CKMT1B (0.0%), CATSPER2 (33.3%), CKMT1A (50.0%), TERB2 (66.7%), LDHAL6B (0.0%), GOLGA6B (16.7%), GOLGA6A (33.3%), ISLR2 (50.0%), GOLGA6C (66.7%), GOLGA6D (83.3%), ADAMTS7 (0.0%), EFL1 (16.7%), SAXO2 (33.3%), GOLGA6L10 (50.0%), GOLGA6L9 (66.7%), WHAMM (83.3%), OR4F4 (0.0%), MPG (16.7%), HBM (33.3%), AXIN1 (83.3%), SSTR5 (0.0%), TPSD1 (50.0%), GNPTG (66.7%), UNKL (83.3%), PKD1 (0.0%), PDPK1 (16.7%), EEF2KMT (33.3%), NPIPA3 (50.0%), NPIPA2 (66.7%), NOMO1 (83.3%), PDXDC1 (0.0%), RRN3 (16.7%), NPIPA5 (33.3%), MPV17L (50.0%), NOMO3 (66.7%), NPIPA6 (83.3%), NPIPA8 (0.0%), NPIPA9 (16.7%), NOMO2 (33.3%), SMG1 (50.0%), IQCK (66.7%), ACSM5 (83.3%), ACSM2B (0.0%), NPIPB3 (16.7%), NPIPB4 (50.0%), NPIPB5 (66.7%), NPIPB6 (83.3%), NPIPB7 (0.0%), SULT1A2 (16.7%), NPIPB8 (50.0%), EIF3C (66.7%), NPIPB9 (83.3%), NPIPB11 (0.0%), BOLA2-SMG1P6 (16.7%), BOLA2 (33.3%), SLX1B (50.0%), SULT1A4 (66.7%), NPIPB12 (83.3%), SLX1A (0.0%), SULT1A3 (16.7%), NPIPB13 (33.3%), PHKG2 (50.0%), VKORC1 (66.7%), KRABD5 (83.3%), TP53TG3 (0.0%), TP53TG3C (16.6%), TP53TG3E (33.3%), TP53TG3B (50.0%), TP53TG3F (66.6%), CCNYL1B (83.3%), CES1 (0.0%), MT1M (16.6%), MATCAP1 (33.3%), HSD11B2 (50.0%), CLEC18A (66.7%), PDPR (83.3%), EXOSC6 (0.0%), HPR (50.0%), NPIPB15 (66.7%), CLEC18B (83.3%), CA5A (0.0%), ZNF469 (16.7%), CDH15 (33.3%), ANKRD11 (50.0%), MC1R (66.7%), PRDM7 (83.3%), ABR (0.0%), SERPINF2 (16.7%), SRR (33.3%), OR1D5 (50.0%), P2RX5 (66.7%), ALOX15 (83.3%), ENO3 (0.0%), USP6 (16.7%), SLC35G6 (33.3%), ALOXE3 (50.0%), HES7 (66.6%), CDRT15 (83.3%), FBXW10B (0.0%), TRIM16 (16.7%), ZNF286A-TBC1D26 (33.3%), ZNF286A (50.0%), TBC1D26 (66.7%), UBB (83.3%), ATPAF2 (0.0%), EVPLL (16.7%), LGALS9C (33.3%), TBC1D28 (50.0%), FOXO3B (66.7%), FBXW10 (83.3%), GRAP (0.0%), GRAPL (16.7%), LGALS9B (33.3%), CDRT15L2 (50.0%), MEIS3P2 (66.6%), MAP2K3 (83.3%), KCNJ18 (0.0%), LGALS9 (16.7%), FOXN1 (33.3%), SUZ12 (50.0%), LRRC37B (66.7%), SLC35G3 (83.3%), CCL4 (0.0%), TBC1D3B (16.7%), CCL4L2 (50.0%), TBC1D3I (66.7%), TBC1D3G (83.3%), TBC1D3F (0.0%), TBC1D3K (16.7%), TBC1D3L (33.3%), TBC1D3D (50.0%), TBC1D3C (66.7%), TBC1D3E (83.3%), MRPL45 (0.0%), KRTAP1-1 (16.6%), KRTAP4-7 (33.3%), KRTAP4-8 (50.0%), KRTAP4-16 (66.7%), KRTAP4-9 (83.3%), KRTAP4-12 (0.0%), KRTAP9-7 (16.7%), KRT14 (33.3%), KRT16 (50.0%), KRT17 (66.7%), HSD17B1 (83.3%), G6PC3 (0.0%), ARHGAP27 (16.7%), PLEKHM1 (33.3%), ARL17B (50.0%), LRRC37A (66.7%), ARL17A (83.3%), NSF (0.0%), NPEPPS (16.7%), HOXB8 (33.3%), GIP (50.0%), DHX40 (66.7%), RPS6KB1 (83.3%), METTL2A (0.0%), TLK2 (16.7%), CSH2 (33.3%), GH2 (50.0%), CSH1 (66.6%), CSHL1 (83.3%), LRRC37A3 (0.0%), C17orf58 (16.7%), AMZ2 (33.3%), TMC6 (50.0%), CANT1 (66.7%), RNF213 (83.3%), ARL16 (0.0%), TUBB8B (16.7%), TYMS (33.3%), SLC35G4 (50.0%), POTEC (66.7%), ANKRD30B (83.3%), SLC25A52 (0.0%), KATNAL2 (16.7%), SERPINB4 (33.3%), SERPINB3 (50.0%), GALR1 (66.7%), CTDP1 (83.3%), BSG (0.0%), HCN2 (16.7%), KISS1R (33.3%), STK11 (50.0%), TCF3 (66.7%), ABHD17A (83.3%), GIPC3 (0.0%), TBXA2R (16.7%), CREB3L3 (33.3%), RFX2 (50.0%), C3 (66.7%), MBD3L2B (83.3%), MBD3L4 (0.0%), MBD3L2 (16.7%), STXBP2 (33.3%), TYK2 (50.0%), ZNF799 (66.7%), ZNF443 (83.3%), CYP4F3 (0.0%), CYP4F12 (16.7%), OR10H2 (33.3%), CALR3 (50.0%), MYO9B (66.7%), INSL3 (83.3%), ZNF738 (0.0%), ZNF100 (16.7%), ZNF208 (33.3%), ZNF676 (50.0%), ZNF729 (66.7%), ZNF492 (83.3%), ZNF728 (0.0%), RHPN2 (16.7%), GPI (33.3%), ZNF302 (50.0%), ZNF181 (66.7%), FFAR3 (83.3%), COX6B1 (0.0%), LGALS7 (16.7%), LGALS7B (33.3%), IFNL3 (50.0%), IFNL4 (66.6%), IFNL2 (83.3%), CYP2A7 (16.7%), CYP2G1P (33.3%), CYP2A13 (66.7%), CYP2F1 (83.3%), PSG8 (0.0%), PSG1 (16.7%), PSG6 (33.3%), PSG7 (50.0%), PSG11 (66.7%), PSG2 (83.3%), PSG4 (0.0%), PSG9 (16.7%), ETHE1 (50.0%), ZNF285 (66.7%), APOC1 (83.3%), APOC4 (0.0%), BLOC1S3 (16.7%), DMPK (33.3%), FUT1 (50.0%), BAX (66.7%), LHB (83.3%), CGB3 (0.0%), CGB2 (16.6%), CGB1 (33.3%), CGB5 (50.0%), CGB8 (66.7%), CGB7 (83.3%), PNKP (0.0%), SIGLEC16 (16.7%), KLK4 (33.3%), ETFB (50.0%), ZNF808 (66.7%), ZNF600 (83.3%), ZNF468 (0.0%), VN1R4 (16.6%), FAM90A27P (33.3%), ZNF765 (50.0%), ZNF761 (66.7%), ZNF813 (83.3%), PRKCG (0.0%), MBOAT7 (16.7%), LILRA6 (33.3%), LILRB2 (50.0%), LAIR1 (66.7%), LAIR2 (83.3%), LILRB1 (0.0%), KIR3DL3 (16.7%), KIR2DL3 (33.3%), KIR2DL1 (50.0%), KIR2DL4 (66.7%), KIR3DL1 (83.3%), KIR3DL2 (0.0%), NLRP7 (16.7%), NLRP2 (33.3%), GP6 (50.0%), TNNT1 (66.7%), TNNI3 (83.3%), RFPL4A (0.0%), RFPL4AL1 (16.7%), ZNF419 (33.3%), ZNF773 (50.0%), ZNF587B (66.7%), ZNF814 (83.3%), ZNF417 (0.0%), SLC27A5 (16.7%), SIRPB1 (33.3%), CST4 (50.0%), CST1 (66.6%), CST2 (83.3%), PLAGL2 (0.0%), SEMG1 (16.7%), PLTP (33.3%), CHRNA4 (50.0%), EEF1A2 (66.7%), PTK6 (83.3%), MYT1 (0.0%), PCMTD2 (16.7%), TPTE (33.3%), POTED (50.0%), KRTAP21-1 (66.7%), SMIM11 (83.3%), SMIM34 (0.0%), KCNE1 (16.7%), CBR3 (33.3%), NDUFV3 (50.0%), CBS (66.7%), U2AF1 (83.3%), SIK1 (0.0%), HSF2BP (16.7%), H2BC12L (33.2%), TRAPPC10 (50.0%), PWP2 (66.7%), GATD3 (83.3%), DNMT3L (0.0%), KRTAP10-1 (16.6%), KRTAP10-2 (33.3%), KRTAP10-4 (50.0%), KRTAP10-5 (66.6%), KRTAP10-6 (83.3%), KRTAP10-8 (0.0%), KRTAP10-9 (16.6%), KRTAP10-10 (33.3%), KRTAP12-2 (49.9%), KRTAP12-1 (66.7%), COL18A1 (83.3%), OR11H1 (0.0%), POTEH (16.7%), CCT8L2 (33.3%), USP18 (50.0%), GGTLC3 (66.7%), TMEM191B (83.3%), FAM246B (0.0%), DGCR6 (16.7%), PRODH (33.3%), FAM246C (50.0%), CCDC188 (66.7%), RTN4R (83.3%), TUBA3FP (0.0%), LRRC74B (16.7%), FAM246A (33.3%), RIMBP3B (50.0%), HIC2 (66.7%), TMEM191C (83.3%), GGTLC2 (0.0%), IGLL1 (16.7%), DRICH1 (33.3%), GSTT2B (50.0%), DDTL (66.7%), GSTT2 (83.3%), RFPL1 (0.0%), C22orf42 (16.7%), RFPL3 (33.3%), APOBEC3D (83.3%), APOBEC3H (0.0%), ATF4 (16.7%), NDUFA6 (33.3%), CYP2D7 (66.7%), RRP7A (83.3%), CYB5R3 (0.0%), A4GALT (16.7%), TTLL1 (33.3%), MLC1 (50.0%), TUBGCP6 (66.7%), ACR (83.3%), XG (0.0%), GYG2 (16.7%), ARSD (33.3%), MXRA5 (50.0%), PRKX (66.7%), VCX3A (83.3%), VCX2 (0.0%), VCX3B (16.7%), FAM9A (33.3%), FAM9C (50.0%), SUPT20HL2 (66.7%), SUPT20HL1 (83.3%), MAGEB6 (0.0%), DCAF8L1 (16.7%), FAM47B (33.3%), H2AL1Q (49.9%), FAM47C (66.7%), H2AL3 (83.2%), SPACA5B (0.0%), SSX5 (16.7%), SSX1 (33.3%), SSX3 (50.0%), SSX4 (66.7%), SSX4B (83.3%), GAGE12J (0.0%), GAGE13 (16.7%), GAGE2E (33.3%), GAGE12B (49.6%), GAGE12C (66.7%), GAGE12D (83.3%), GAGE12F (0.0%), GAGE12G (16.7%), GAGE12H (33.3%), GAGE2A (50.0%), GAGE1 (66.7%), CENPVL3 (83.3%), CENPVL1 (0.0%), MAGED4B (16.7%), MAGED4 (33.3%), XAGE1A (50.0%), XAGE1B (66.7%), SSX7 (83.3%), SSX2B (0.0%), SPANXN5 (16.7%), XAGE5 (33.3%), XAGE3 (50.0%), FAM156B (66.7%), FAM156A (83.3%), SPIN2B (0.0%), SPIN2A (16.7%), ZXDA (33.3%), CXorf49 (50.0%), CXorf49B (66.7%), DMRTC1B (83.3%), FAM236D (0.0%), DMRTC1 (16.7%), FAM236C (33.3%), FAM236A (50.0%), PABPC1L2B (66.7%), PABPC1L2A (83.3%), TGIF2LX (0.0%), PCDH11X (16.7%), TCEAL6 (33.3%), TCP11X1 (50.0%), NXF2 (66.7%), NXF2B (83.3%), RAB40AL (0.0%), TMSB15B (16.7%), H2BW1 (33.3%), H2BW2 (50.0%), TMSB15C (66.7%), PSMD10 (83.3%), CT47C1 (0.0%), RHOXF2B (16.7%), RHOXF2 (33.3%), CT47B1 (50.0%), CT47A12 (66.7%), CT47A11 (83.3%), CT47A9 (0.0%), CT47A8 (16.6%), CT47A7 (33.3%), CT47A6 (50.0%), CT47A5 (66.7%), CT47A4 (83.3%), CT47A2 (0.0%), CT47A1 (16.7%), RTL8B (33.3%), RTL8C (50.0%), RTL8A (66.6%), SMIM10L2B (83.3%), CT55 (0.0%), ETDA (16.6%), SMIM10L2A (33.3%), CT45A1 (50.0%), CT45A3 (66.7%), CT45A5 (83.3%), CT45A2 (0.0%), CT45A7 (16.7%), CT45A8 (33.3%), CT45A9 (50.0%), CT45A10 (66.7%), SAGE1 (83.3%), SPANXC (0.0%), SPANXA1 (16.6%), SPANXA2 (33.3%), SPANXD (50.0%), MAGEC1 (66.7%), SPANXN3 (83.3%), UBE2NL (0.0%), SPANXN1 (16.7%), CXorf51B (33.2%), CXorf51A (49.9%), EOLA1 (66.7%), HSFX3 (83.3%), HSFX2 (0.0%), HSFX1 (16.6%), MAGEA9 (33.3%), EOLA2 (50.0%), HSFX4 (66.6%), MAGEA3 (83.3%), MAGEA2B (0.0%), CSAG1 (16.7%), MAGEA12 (33.3%), MAGEA2 (50.0%), CSAG3 (66.7%), MAGEA6 (83.3%), PWWP4 (0.0%), SLC6A8 (16.7%), BCAP31 (33.3%), OPN1LW (50.0%), OPN1MW (66.7%), OPN1MW2 (83.3%), TEX28 (0.0%), CTAG1A (16.6%), CTAG1B (33.3%), CTAG2 (50.0%), H2AB1 (66.6%), F8A1 (83.3%), F8A2 (0.0%), F8A3 (16.6%), H2AB3 (33.3%), IL9R (50.0%), WASH6P (66.6%), TGIF2LY (not on this reference), PCDH11Y (not on this reference), TSPY2 (not on this reference), TSPY4 (not on this reference), TSPY8 (not on this reference), TSPY3 (not on this reference), TSPY1 (not on this reference), TSPY9 (not on this reference), TSPY10 (not on this reference), VCY (not on this reference), VCY1B (not on this reference), CDY2B (not on this reference), CDY2A (not on this reference), HSFY1 (not on this reference), HSFY2 (not on this reference), RBMY1B (not on this reference), RBMY1A1 (not on this reference), RBMY1D (not on this reference), RBMY1E (not on this reference), RBMY1F (not on this reference), RBMY1J (not on this reference), BPY2 (not on this reference), DAZ1 (not on this reference), DAZ2 (not on this reference), CDY1B (not on this reference), BPY2B (not on this reference), DAZ3 (not on this reference), DAZ4 (not on this reference), BPY2C (not on this reference), CDY1 (not on this reference), C4B_2 (not on this reference), GSTT1 (not on this reference), GSTTP2 (not on this reference), GTF2H2C_2 (not on this reference), HLA-DRB3 (not on this reference), HLA-DRB4 (not on this reference), KIR2DL2 (not on this reference), KIR2DL5A (not on this reference), KIR2DL5B (not on this reference), KIR2DS1 (not on this reference), KIR2DS2 (not on this reference), KIR2DS3 (not on this reference), KIR2DS5 (not on this reference), KIR3DS1 (not on this reference), LILRA3 (not on this reference), OR8U8 (not on this reference), OR8U9 (not on this reference), OR9G9 (not on this reference), TAS2R45 (not on this reference) - Not read here, and the step that calls them gave no result in this run (37): RHCE (0.0%) by parascopy, owner step 35 not run, AMY1A (16.7%) by parascopy, owner step 35 not run, AMY1B (33.3%) by parascopy, owner step 35 not run, AMY1C (50.0%) by parascopy, owner step 35 not run, NOTCH2 (66.7%) by parascopy, owner step 35 not run, FCGR1A (50.0%) by parascopy, owner step 35 not run, FCGR2A (66.7%) by parascopy, owner step 35 not run, FCGR2C (0.0%) by parascopy, owner step 35 not run, FCGR3B (16.7%) by parascopy, owner step 35 not run, CFHR3 (16.7%) by parascopy, owner step 35 not run, CFHR1 (33.3%) by parascopy, owner step 35 not run, PROS1 (83.3%) by parascopy, owner step 35 not run, GYPE (66.7%) by parascopy, owner step 35 not run, GYPB (83.3%) by parascopy, owner step 35 not run, GTF2H2C (50.0%) by parascopy, owner step 35 not run, GTF2H2 (33.3%) by parascopy, owner step 35 not run, HSPA1B (0.0%) by parascopy, owner step 35 not run, C4A (33.3%) by parascopy, owner step 35 not run, C4B (50.0%) by parascopy, owner step 35 not run, PMS2 (0.0%) by parascopy, owner step 35 not run, GTF2I (83.3%) by parascopy, owner step 35 not run, DEFA1B (0.0%) by parascopy, owner step 35 not run, CEL (83.3%) by parascopy, owner step 35 not run, MUC5B (66.7%) by parascopy, owner step 35 not run, KLRC2 (16.7%) by parascopy, owner step 35 not run, KRT6B (0.0%) by parascopy, owner step 35 not run, KRT6C (16.7%) by parascopy, owner step 35 not run, KRT6A (33.3%) by parascopy, owner step 35 not run, CHRFAM7A (33.3%) by parascopy, owner step 35 not run, SORD (83.3%) by parascopy, owner step 35 not run, TPSB2 (16.7%) by parascopy, owner step 35 not run, TPSAB1 (33.3%) by parascopy, owner step 35 not run, OTOA (33.3%) by parascopy, owner step 35 not run, HYDIN (16.7%) by parascopy, owner step 35 not run, CD177 (33.3%) by parascopy, owner step 35 not run, APOBEC3A (50.0%) by parascopy, owner step 35 not run, APOBEC3B (66.7%) by parascopy, owner step 35 not run - Not read here, called by a step of their own (17): GSTM1 (0.0%) by pypgx, GBA1 (16.7%) by parascopy, UGT2B17 (50.0%) by pypgx, UGT2B15 (66.7%) by pypgx, SMN2 (83.3%) by parascopy, SMN1 (0.0%) by parascopy, CYP21A2 (66.7%) by cn_loci:CYP21A2, LPA (66.7%) by cn_loci:LPA_KIV2, STRC (16.7%) by parascopy, HBA2 (50.0%) by cn_loci:HBA, HBA1 (66.6%) by cn_loci:HBA, SULT1A1 (33.3%) by pypgx, HP (33.3%) by cn_loci:HP, CCL3L3 (33.3%) by cn_loci:CCL3L1, CYP2A6 (0.0%) by pypgx, CYP2B6 (50.0%) by pypgx, CYP2D6 (50.0%) by pypgx + Not read here, and the step that calls them gave no result in this run (36): RHCE (0.0%) by parascopy, owner step 35 not run, AMY1A (16.7%) by parascopy, owner step 35 not run, AMY1B (33.3%) by parascopy, owner step 35 not run, AMY1C (50.0%) by parascopy, owner step 35 not run, NOTCH2 (66.7%) by parascopy, owner step 35 not run, FCGR1A (50.0%) by parascopy, owner step 35 not run, FCGR2A (66.7%) by parascopy, owner step 35 not run, FCGR2C (0.0%) by parascopy, owner step 35 not run, FCGR3B (16.7%) by parascopy, owner step 35 not run, CFHR3 (16.7%) by parascopy, owner step 35 not run, CFHR1 (33.3%) by parascopy, owner step 35 not run, PROS1 (83.3%) by parascopy, owner step 35 not run, GYPE (66.7%) by parascopy, owner step 35 not run, GYPB (83.3%) by parascopy, owner step 35 not run, GTF2H2C (50.0%) by parascopy, owner step 35 not run, GTF2H2 (33.3%) by parascopy, owner step 35 not run, HSPA1B (0.0%) by parascopy, owner step 35 not run, C4A (33.3%) by parascopy, owner step 35 not run, C4B (50.0%) by parascopy, owner step 35 not run, GTF2I (83.3%) by parascopy, owner step 35 not run, DEFA1B (0.0%) by parascopy, owner step 35 not run, CEL (83.3%) by parascopy, owner step 35 not run, MUC5B (66.7%) by parascopy, owner step 35 not run, KLRC2 (16.7%) by parascopy, owner step 35 not run, KRT6B (0.0%) by parascopy, owner step 35 not run, KRT6C (16.7%) by parascopy, owner step 35 not run, KRT6A (33.3%) by parascopy, owner step 35 not run, CHRFAM7A (33.3%) by parascopy, owner step 35 not run, SORD (83.3%) by parascopy, owner step 35 not run, TPSB2 (16.7%) by parascopy, owner step 35 not run, TPSAB1 (33.3%) by parascopy, owner step 35 not run, OTOA (33.3%) by parascopy, owner step 35 not run, HYDIN (16.7%) by parascopy, owner step 35 not run, CD177 (33.3%) by parascopy, owner step 35 not run, APOBEC3A (50.0%) by parascopy, owner step 35 not run, APOBEC3B (66.7%) by parascopy, owner step 35 not run + Not read here, called by a step of their own (18): GSTM1 (0.0%) by pypgx, GBA1 (16.7%) by parascopy, UGT2B17 (50.0%) by pypgx, UGT2B15 (66.7%) by pypgx, SMN2 (83.3%) by parascopy, SMN1 (0.0%) by parascopy, CYP21A2 (66.7%) by cn_loci:CYP21A2, LPA (66.7%) by cn_loci:LPA_KIV2, PMS2 (0.0%) by parascopy, STRC (16.7%) by parascopy, HBA2 (50.0%) by cn_loci:HBA, HBA1 (66.6%) by cn_loci:HBA, SULT1A1 (33.3%) by pypgx, HP (33.3%) by cn_loci:HP, CCL3L3 (33.3%) by cn_loci:CCL3L1, CYP2A6 (0.0%) by pypgx, CYP2B6 (50.0%) by pypgx, CYP2D6 (50.0%) by pypgx A gene listed as not read could not be read reliably: too few of its reads were placed on it with confidence, so a 'no finding' in it says nothing. A gene with a caller of its own is left to that caller's section. ## Variant Calling (DeepVariant) @@ -227,8 +227,8 @@ --- Insertions called: 3 (ALU 2, L1 1) FKTN SVA (Fukuyama; AR): callable (depth 30, not seen) - TAF1 SVA (XDP; XL): not callable (depth 2) - Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not callable: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. + TAF1 SVA (XDP; XL): not assessed (depth 2) + Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not assessed: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. ## Repeat Expansions (ExpansionHunter) --- @@ -395,9 +395,9 @@ LCE3B/LCE3C copies (from depth): 1 (estimate 1.0). Reading: one deleted CCL3L1/CCL3L3 copies (from depth): not assessed (low depth) GBA1, GBAP1 (agCN): 4 (2 region(s), quality 35.25 or more, filter PASS). Reading: agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy + PMS2, PMS2CL (agCN): chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual) STRC, STRCP1 (agCN): unreadable: S_strc_copy_number.tsv lacks the copy-number columns mytable (agCN): not assessed: no read over the locus - pms2 (agCN): chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual) Copy-number intervals (ClinGen recurrent regions, carrier deletions, AZF; from depth): 4 rows (3 called, 1 not assessed); 2 with a deletion or a duplication Deletion: AZFc (AZFc, chrY:23000001-26000000), 0 of 1 copies Duplication: dup (X1, chr1:2-2), 3 of 2 copies diff --git a/tests/parity/golden/report-render/all-nf/all-nf.html b/tests/parity/golden/report-render/all-nf/all-nf.html index 00b50ada3..38c1f5661 100644 --- a/tests/parity/golden/report-render/all-nf/all-nf.html +++ b/tests/parity/golden/report-render/all-nf/all-nf.html @@ -394,7 +394,7 @@

    Structural Variants, Class 4 and 5 (AnnotSV)

    Mobile Element Insertions

    Step 50 · Complete · file date 2021-03-04 05:06 UTC · link to this section

    -

    Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not callable: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/<sample>_mei.tsv.

    +

    Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not assessed: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/<sample>_mei.tsv.

    Insertions called0 (none)
    GeneElementConditionInheritanceStatusDepthCall
    FKTNSVAFARcallable30seen
    diff --git a/tests/parity/golden/report-render/all-nf/all-nf.txt b/tests/parity/golden/report-render/all-nf/all-nf.txt index 085abe18d..0d72f1f82 100644 --- a/tests/parity/golden/report-render/all-nf/all-nf.txt +++ b/tests/parity/golden/report-render/all-nf/all-nf.txt @@ -152,7 +152,7 @@ --- Insertions called: 0 (none) FKTN SVA (F; AR): callable (depth 30, seen) - Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not callable: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. + Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not assessed: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. ## Repeat Expansions (ExpansionHunter) --- diff --git a/tests/parity/golden/report-render/all/all.txt b/tests/parity/golden/report-render/all/all.txt index 484ff0d84..5fe05ef0e 100644 --- a/tests/parity/golden/report-render/all/all.txt +++ b/tests/parity/golden/report-render/all/all.txt @@ -33,8 +33,8 @@ 217 of the 1572 hard-to-read genes of assets/callability_genes.tsv were read: 90% or more of their bases had 10 or more reads of mapping quality 20 or more. The share counts every base of a gene, introns included, so a gene can pass while a coding exon was not read: this run has no exon table from step 16b, so no exon was checked. Not read, and no other step calls them (1301): OR4F5 (16.7%), OR4F29 (33.3%), OR4F16 (50.0%), AGRN (66.7%), ATAD3B (0.0%), MMP23B (0.0%), CDK11B (16.7%), SLC35E2B (33.3%), CDK11A (50.0%), TTC34 (66.7%), RPL22 (83.3%), MASP2 (0.0%), NPPA (16.6%), KIAA2013 (33.3%), PRAMEF1 (50.0%), PRAMEF11 (66.7%), HNRNPCL1 (83.3%), PRAMEF4 (0.0%), PRAMEF10 (16.7%), PRAMEF7 (33.3%), PRAMEF6 (50.0%), PRAMEF27 (66.7%), HNRNPCL3 (83.3%), HNRNPCL2 (0.0%), PRAMEF26 (16.7%), HNRNPCL4 (33.3%), PRAMEF9 (50.0%), PRAMEF13 (66.7%), PRAMEF18 (83.3%), PRAMEF8 (0.0%), PRAMEF33 (16.7%), PRAMEF15 (33.3%), PRAMEF14 (50.0%), PRAMEF19 (66.6%), PRAMEF17 (83.3%), CELA2B (0.0%), CLCNKA (16.7%), CLCNKB (33.3%), NBPF1 (50.0%), CROCC (66.7%), AKR7L (83.3%), NBPF3 (0.0%), CELA3B (16.7%), CELA3A (33.3%), HMGCL (50.0%), CNR2 (66.7%), RSRP1 (83.3%), PIGV (16.7%), XKR8 (33.3%), BMP8A (50.0%), BMP8B (66.7%), OXCT2 (83.3%), CYP4Z1 (0.0%), CYP4A22 (16.7%), GBP1 (33.3%), SETSIP (49.9%), AGL (66.7%), EXTL2 (83.3%), AMY2A (0.0%), NBPF4 (66.7%), NBPF6 (83.3%), LRIG2 (16.7%), VANGL1 (33.3%), IGSF3 (50.0%), SEC22B (83.3%), NBPF26 (0.0%), NOTCH2NLR (16.7%), PPIAL4A (33.3%), FAM72B (50.0%), SRGAP2C (66.7%), H3-7 (83.3%), PPIAL4E (0.0%), NBPF15 (16.7%), PPIAL4F (33.3%), SRGAP2B (50.0%), FAM72D (66.7%), PPIAL4D (83.3%), GPR89A (0.0%), RBM8A (16.7%), NBPF10 (33.3%), NOTCH2NLA (50.0%), PPIAL4H (66.6%), NBPF12 (83.3%), NBPF11 (0.0%), PPIAL4G (16.6%), NBPF14 (33.3%), NOTCH2NLB (50.0%), NUDT4B (66.7%), PDE4DIP (83.3%), NOTCH2NLC (0.0%), NBPF19 (16.7%), PPIAL4C (33.3%), H2BC18 (66.7%), H3C13 (83.2%), H3C14 (0.0%), H2AC18 (16.5%), H2AC19 (33.3%), H3C15 (50.0%), H4C15 (66.7%), HRNR (83.3%), LCE3E (0.0%), LCE3D (16.6%), S100A8 (33.3%), S100A7A (50.0%), S100A7 (66.7%), FLAD1 (83.3%), MTX1 (0.0%), HCN3 (33.3%), FCRL5 (50.0%), HSPA6 (83.3%), FCGR2B (33.3%), HSD17B7 (50.0%), CD247 (66.7%), XCL2 (83.3%), PRG4 (0.0%), PTPRC (50.0%), PPP1R12B (66.7%), KISS1 (83.3%), SRGAP2 (0.0%), CR1 (16.7%), CR1L (33.3%), ZC3H11B (50.0%), LBR (66.7%), LEFTY2 (83.3%), OR2T33 (0.0%), OR2T7 (16.7%), OR2T2 (33.3%), OR2T3 (50.0%), OR2T5 (66.6%), OR2G6 (83.3%), OR2T34 (0.0%), OR2T11 (16.7%), OR2T35 (33.3%), OR2T27 (50.0%), SNTG2 (66.7%), TPO (83.3%), KLF11 (0.0%), CCDC121 (16.7%), ABCG8 (33.3%), PCBP1 (50.0%), NAT8 (66.6%), C2orf78 (83.3%), CD8B (0.0%), RGPD1 (16.7%), PLGLB1 (33.3%), PLGLB2 (50.0%), RGPD2 (66.7%), RPIA (83.3%), TEKT4 (0.0%), FAHD2A (16.7%), TRIM43B (33.3%), TRIM43 (50.0%), ANKRD36C (66.7%), GPAT2 (83.3%), ANKRD36 (0.0%), ANKRD36B (16.7%), RGPD3 (33.3%), RGPD4 (50.0%), RANBP2 (66.7%), RGPD5 (83.3%), MALL (0.0%), MTLN (16.7%), LIMS4 (33.3%), RGPD6 (50.0%), ANAPC1 (66.7%), RGPD8 (83.3%), FOXD4L1 (0.0%), RABL2A (16.7%), RAB6C (33.3%), POTEF (50.0%), CCDC74B (66.7%), SMPD4 (83.3%), TUBA3E (0.0%), POTEI (16.7%), CFC1B (33.3%), CFC1 (50.0%), POTEJ (66.7%), PLEKHB2 (83.3%), RAB6D (0.0%), MZT2A (16.7%), TUBA3D (33.3%), CCDC74A (50.0%), ANKRD30BL (66.7%), NOSTRIN (83.3%), IFT70B (0.0%), CASP10 (16.7%), ALPP (33.3%), ALPG (50.0%), UGT1A6 (66.7%), UGT1A5 (83.3%), UGT1A3 (0.0%), MLPH (16.7%), OR6B2 (33.3%), AQP12B (50.0%), AQP12A (66.7%), ANO7 (83.3%), CHL1 (0.0%), EMC3 (16.7%), FANCD2 (33.3%), DAZL (50.0%), ZNF35 (66.7%), LZTFL1 (83.3%), MST1 (0.0%), MST1R (16.7%), HYAL1 (33.3%), FRG2C (50.0%), ZNF717 (66.7%), OR5H6 (0.0%), ROPN1 (16.7%), ROPN1B (33.3%), RPN1 (50.0%), ALG1L2 (66.7%), BFSP2 (83.3%), PRR23B (0.0%), SOX2 (16.6%), EIF2B5 (33.3%), KNG1 (50.0%), TM4SF19 (66.7%), ZNF595 (83.3%), PDE6B (0.0%), GAK (16.7%), FGFRL1 (33.3%), RNF212 (50.0%), UVSSA (66.7%), DOK7 (83.3%), HMX1 (0.0%), FAM90A26 (16.7%), USP17L10 (33.3%), USP17L11 (50.0%), USP17L12 (66.7%), USP17L13 (83.3%), USP17L17 (0.0%), USP17L18 (16.6%), USP17L19 (33.3%), USP17L20 (50.0%), USP17L21 (66.7%), USP17L22 (83.3%), USP17L24 (0.0%), USP17L25 (16.6%), USP17L26 (33.3%), USP17L5 (50.0%), USP17L27 (66.7%), USP17L28 (83.3%), USP17L30 (0.0%), DEFB131A (16.7%), DRD5 (33.3%), UGT2B10 (83.3%), UGT2B28 (0.0%), UGT2A1 (16.7%), UGT2A2 (33.3%), HTN3 (50.0%), HTN1 (66.7%), AFP (83.3%), PIGY (0.0%), PYURF (16.7%), CISD2 (33.3%), SLC9B1 (50.0%), KLHL2 (0.0%), GK3 (16.7%), HPF1 (33.3%), PDLIM3 (50.0%), FAT1 (66.7%), FRG1 (83.3%), FRG2 (0.0%), DUX4 (16.7%), SDHA (33.3%), PDCD6 (50.0%), ZDHHC11B (66.7%), ZDHHC11 (83.3%), TERT (0.0%), SLC6A3 (16.7%), TAF11L2 (33.3%), TAF11L3 (49.9%), TAF11L4 (66.7%), TAF11L5 (83.2%), TAF11L7 (0.0%), TAF11L8 (16.6%), TAF11L9 (33.3%), TAF11L10 (49.9%), TAF11L11 (66.7%), TAF11L12 (83.3%), TAF11L14 (0.0%), EMB (16.7%), MARVELD2 (33.3%), SERF1B (66.7%), NAIP (16.7%), SKIC3 (50.0%), LIX1 (66.7%), SAR1B (83.3%), DND1 (0.0%), PCDHA10 (16.7%), PCDHB7 (33.3%), PCDHB8 (50.0%), PCDHB11 (66.7%), PCDHB12 (83.3%), PPP1R2B (0.0%), NPM1 (16.7%), THOC3 (33.3%), SIMC1 (50.0%), FAM153A (66.7%), FAM153CP (83.3%), FLT4 (0.0%), OR4F3 (16.6%), DUSP22 (33.3%), TUBB2A (50.0%), H2AC13 (66.7%), H2AC14 (83.2%), OR2J1 (0.0%), OR2J2 (16.7%), HLA-G (33.3%), HLA-A (50.0%), MICA (66.7%), MICB (83.3%), ZBTB12 (16.7%), PBX2 (83.3%), HLA-DRB1 (0.0%), GSTA2 (16.7%), GSTA1 (33.3%), GSTA5 (50.0%), PRIM2 (66.7%), FKBP1C (83.3%), SLC17A5 (0.0%), SEC63 (16.7%), OR2A4 (33.3%), CTAGE9 (50.0%), PCMT1 (66.7%), RAET1G (83.3%), ULBP1 (0.0%), RAET1L (16.7%), ULBP3 (33.3%), SLC22A1 (50.0%), SMOC2 (83.3%), RBAK-RBAKDN (0.0%), RBAK (16.7%), SLC29A4 (33.3%), FSCN1 (50.0%), OCM (66.7%), CCZ1 (83.3%), RSPH10B2 (16.7%), CCZ1B (33.3%), NOD1 (50.0%), FKBP9 (66.7%), DPY19L1 (83.3%), SEPTIN7 (0.0%), SPDYE1 (16.7%), PPIA (33.3%), CDC14C (50.0%), PSPH (66.7%), CCT6A (83.3%), ZNF716 (0.0%), ZNF727 (16.7%), ZNF735 (33.3%), ZNF736 (50.0%), GUSB (66.7%), RABGEF1 (83.3%), TYW1 (0.0%), SPDYE21 (16.7%), TYW1B (33.3%), POM121 (50.0%), TRIM74 (66.7%), SPDYE8 (83.3%), SPDYE9 (0.0%), SPDYE10 (16.7%), NSUN5 (33.3%), TRIM50 (50.0%), CLIP2 (66.7%), GTF2IRD2 (0.0%), SPDYE12 (16.7%), CASTOR2 (33.3%), GTF2IRD2B (50.0%), SPDYE13 (66.7%), SPDYE14 (83.3%), TRIM73 (0.0%), POM121C (16.7%), SPDYE5 (33.3%), DTX2 (50.0%), UPK3B (66.7%), SPDYE16 (83.3%), SPDYE17 (0.0%), SPDYE18 (16.7%), STEAP1 (33.3%), ASNS (50.0%), OCM2 (66.7%), CYP3A7-CYP3A51P (83.3%), CYP3A4 (0.0%), STAG3 (16.7%), PVRIG (33.3%), SPDYE3 (50.0%), SAP25 (66.7%), ZAN (83.3%), MUC12 (0.0%), SPDYE6 (16.7%), POLR2J (33.3%), RASA4B (50.0%), POLR2J3 (66.7%), UPK3BL2 (83.3%), RASA4 (0.0%), UPK3BL1 (16.7%), POLR2J3-UPK3BL2 (33.3%), SPDYE2B (50.0%), POLR2J2 (66.7%), LAMB1 (83.3%), METTL2B (0.0%), KLF14 (16.7%), AKR1B10 (33.3%), AKR1B15 (50.0%), BRAF (66.7%), TRBV9 (83.3%), PRSS2 (0.0%), CTAGE15 (16.7%), TCAF2 (33.3%), TCAF2C (50.0%), CTAGE6 (66.6%), OR2F2 (83.3%), CTAGE4 (0.0%), OR2A42 (16.7%), OR2A7 (33.3%), CTAGE8 (50.0%), OR2A1 (66.7%), ARHGEF5 (83.3%), ACTR3C (0.0%), KMT2C (16.7%), ACTR3B (33.3%), OR4F21 (50.0%), FBXO25 (66.7%), ARHGEF10 (83.3%), FAM90A15 (16.6%), FAM90A3 (33.3%), FAM90A13 (50.0%), FAM90A5 (66.7%), FAM90A20 (83.3%), USP17L1 (0.0%), USP17L4 (16.6%), ZNF705G (33.3%), DEFB108C (50.0%), DEFB4B (66.6%), DEFB103B (83.3%), DEFB104B (0.0%), DEFB106B (16.7%), DEFB105B (33.3%), DEFB107B (50.0%), PRR23D1 (66.6%), FAM90A7 (83.3%), FAM90A23 (0.0%), FAM90A14 (16.6%), FAM90A18 (33.3%), FAM90A16 (50.0%), FAM90A8 (66.6%), FAM90A17 (83.3%), FAM90A9 (0.0%), FAM90A10 (16.7%), PRR23D2 (33.3%), DEFB107A (50.0%), DEFB105A (66.7%), DEFB106A (83.3%), SPAG11A (0.0%), DEFB103A (16.7%), DEFB4A (33.3%), ZNF705B (50.0%), USP17L8 (66.7%), USP17L3 (83.3%), FAM90A11 (0.0%), FAM90A24 (16.6%), FAM90A12 (33.3%), SLC35G5 (50.0%), DEFB130B (66.7%), ZNF705D (83.3%), USP17L2 (0.0%), DEFB109D (16.7%), FAM86B1 (33.3%), DEFB130A (50.0%), FAM86B2 (66.7%), RBPMS (83.3%), IMPA1 (0.0%), SLC10A5 (16.7%), CDH17 (33.3%), CYP11B1 (50.0%), CYP11B2 (66.7%), GPIHBP1 (83.3%), WASHC1 (0.0%), FOXD4 (16.6%), ZNG1A (33.3%), KCNV2 (50.0%), RLN2 (66.7%), RLN1 (83.3%), IFNA21 (0.0%), IFNA4 (16.6%), IFNA7 (33.2%), IFNA10 (50.0%), IFNA16 (66.7%), IFNA17 (83.3%), IFNA13 (0.0%), IFNA1 (16.6%), ANKRD18B (33.3%), PRSS3 (50.0%), GALT (66.7%), SPATA31F1 (83.3%), CNTNAP3 (0.0%), SPATA31A1 (16.7%), FOXD4L6 (33.3%), ZNG1F (50.0%), CNTNAP3B (66.7%), SPATA31A6 (83.3%), SPATA31A7 (0.0%), CNTNAP3C (16.7%), FOXD4L5 (33.3%), ZNG1E (50.0%), FOXD4L4 (66.7%), ZNF658 (83.3%), ANKRD20A1 (0.0%), ZNG1C (16.7%), FOXD4L3 (33.3%), PGM5 (50.0%), FXN (66.7%), TJP2 (83.3%), SPATA31D4 (0.0%), SPATA31D3 (16.7%), SPATA31D1 (33.3%), KIF27 (50.0%), SPATA31C1 (66.7%), SPATA31C2 (83.3%), SLC71A2 (0.0%), NUTM2G (16.7%), CTSV (33.3%), OR13C5 (50.0%), OR13C2 (66.7%), OR13C9 (83.3%), POLE3 (0.0%), ORM1 (16.7%), ORM2 (33.3%), SLC27A4 (50.0%), PKN3 (66.7%), ABO (0.0%), LCN1 (16.7%), OBP2A (33.3%), SOHLH1 (50.0%), INPP5E (66.7%), AJM1 (83.3%), GRIN1 (0.0%), TUBB8 (16.7%), AKR1C1 (33.3%), AKR1C2 (50.0%), DCLRE1C (66.7%), MRC1 (83.3%), ANKRD30A (0.0%), ZNF33A (16.7%), ZNF37A (33.3%), PLD5P1 (50.0%), ZNF33B (66.7%), BMS1 (83.3%), AGAP4 (0.0%), TIMM23 (16.7%), ANTXRL (33.3%), ANXA8L1 (50.0%), NPY4R (66.7%), GPRIN2 (83.3%), PTPN20 (0.0%), ANXA8 (16.7%), FAM25G (33.3%), AGAP9 (50.0%), SYT15B (66.7%), NPY4R2 (83.3%), PARG (0.0%), TIMM23B (16.7%), TIMM23B-AGAP6 (33.3%), AGAP6 (50.0%), WASHC2A (66.7%), ASAH2B (83.3%), EIF5AL1 (0.0%), NUTM2B (16.7%), NUTM2E (33.3%), TMEM254 (50.0%), PLAC9 (66.7%), ADIRF (83.3%), NUTM2A (0.0%), NUTM2D (16.7%), PAPSS2 (33.3%), PTEN (50.0%), LIPN (66.7%), BTRC (83.3%), SFR1 (0.0%), DHX32 (16.7%), FANK1 (33.3%), ECHS1 (50.0%), SPRN (66.7%), FRG2B (83.3%), SCGB1C1 (0.0%), IFITM3 (16.7%), DRD4 (33.3%), DEAF1 (50.0%), KRTAP5-2 (83.3%), KRTAP5-4 (0.0%), MRPL23 (16.7%), H19 (33.3%), SSU72L5 (50.0%), SSU72L2 (66.6%), SSU72L4 (83.3%), SSU72L1 (0.0%), OR51A4 (16.7%), OR51A2 (33.3%), HBG1 (50.0%), OR10A5 (66.7%), MRGPRX4 (83.3%), MDK (0.0%), SPI1 (16.7%), OR4C3 (33.3%), OR4C5 (50.0%), OR4A47 (66.7%), TRIM51G (83.3%), TRIM64C (0.0%), FOLH1 (16.7%), OR4C13 (33.3%), OR4C12 (50.0%), OR4C45 (66.7%), OR4C46 (83.3%), OR4A5 (0.0%), TRIM48 (16.7%), OR4A15 (33.3%), TRIM51 (50.0%), OR5F1 (66.7%), OR8H2 (83.3%), OR5M8 (0.0%), OR9G1 (16.7%), OR1S2 (33.3%), OR1S1 (50.0%), GLYATL1B (66.7%), PGA3 (83.3%), B3GAT3 (0.0%), ESRRA (16.7%), SLC22A12 (33.3%), RBM4B (50.0%), TPCN2 (66.7%), FGF3 (83.3%), KRTAP5-8 (0.0%), KRTAP5-10 (16.6%), KRTAP5-11 (33.3%), XNDC1N-ZNF705EP-ALG1L9P (50.0%), DEFB108B (66.7%), XNDC1N (83.3%), INTS4 (0.0%), NOX4 (16.7%), TRIM77 (33.3%), TRIM49 (50.0%), TRIM64B (66.7%), TRIM49D1 (83.3%), TRIM64 (0.0%), TRIM49C (16.7%), UBTFL1 (33.3%), CARD16 (50.0%), HSPA8 (66.7%), OR8B2 (83.3%), TMEM45B (0.0%), CD4 (16.7%), PEX5 (33.3%), APOBEC1 (50.0%), GDF3 (66.7%), NANOG (83.3%), FAM90A1 (0.0%), PRH1 (33.3%), PRR4 (50.0%), PRH2 (66.7%), TAS2R14 (83.3%), TAS2R31 (0.0%), TAS2R46 (16.7%), TAS2R43 (33.3%), TAS2R30 (50.0%), PRB4 (66.7%), PRB1 (83.3%), DDX11 (0.0%), H3-5 (16.6%), ALG10 (33.3%), ALG10B (50.0%), TUBA1B (66.6%), COX14 (83.3%), NACA (50.0%), DPY19L2 (66.7%), HNF1A (83.3%), HPD (0.0%), HCAR2 (16.7%), HCAR3 (33.3%), P2RX2 (50.0%), PGAM5 (66.7%), GOLGA3 (83.3%), C1QTNF9B (0.0%), C1QTNF9 (16.7%), PARP4 (33.3%), PABPC3 (50.0%), MRPS31 (66.7%), HNRNPA1L2 (83.3%), PRR20C (0.0%), PRR20B (16.6%), PRR20D (33.3%), PRR20E (50.0%), F7 (66.7%), PROZ (83.3%), POTEM (0.0%), POTEG (16.7%), OR11H2 (33.3%), OR4N2 (50.0%), OR4Q3 (66.7%), OR4M1 (83.3%), RNASE3 (0.0%), RNASE2 (16.7%), OR10G2 (33.3%), DHRS4 (50.0%), DHRS4L2 (66.7%), ARF6 (83.3%), ACOT2 (0.0%), NDUFB1 (16.7%), JAG2 (33.3%), BTBD6 (50.0%), IGHV3-21 (66.7%), GOLGA6L6 (83.3%), POTEB3 (0.0%), LINC02203 (16.7%), OR4M2B (33.3%), OR4N4C (50.0%), POTEB (66.7%), OR4M2-OT1 (83.3%), OR4N4 (0.0%), GOLGA6L22 (16.7%), GOLGA6L1 (33.3%), GOLGA6L26 (50.0%), GOLGA8S (66.7%), GOLGA6L2 (83.3%), HERC2 (0.0%), GOLGA6L24 (16.7%), GOLGA8F (33.3%), GOLGA8G (50.0%), GOLGA6L25 (66.7%), GOLGA8M (83.3%), GOLGA8J (0.0%), GOLGA8T (16.7%), GOLGA8R (50.0%), GOLGA8Q (66.7%), GOLGA8H (83.3%), GOLGA8O (0.0%), GOLGA8N (16.7%), GOLGA8A (33.3%), GOLGA8B (50.0%), NANOGP8 (66.6%), NDUFAF1 (83.3%), CKMT1B (0.0%), CATSPER2 (33.3%), CKMT1A (50.0%), TERB2 (66.7%), LDHAL6B (0.0%), GOLGA6B (16.7%), GOLGA6A (33.3%), ISLR2 (50.0%), GOLGA6C (66.7%), GOLGA6D (83.3%), ADAMTS7 (0.0%), EFL1 (16.7%), SAXO2 (33.3%), GOLGA6L10 (50.0%), GOLGA6L9 (66.7%), WHAMM (83.3%), OR4F4 (0.0%), MPG (16.7%), HBM (33.3%), AXIN1 (83.3%), SSTR5 (0.0%), TPSD1 (50.0%), GNPTG (66.7%), UNKL (83.3%), PKD1 (0.0%), PDPK1 (16.7%), EEF2KMT (33.3%), NPIPA3 (50.0%), NPIPA2 (66.7%), NOMO1 (83.3%), PDXDC1 (0.0%), RRN3 (16.7%), NPIPA5 (33.3%), MPV17L (50.0%), NOMO3 (66.7%), NPIPA6 (83.3%), NPIPA8 (0.0%), NPIPA9 (16.7%), NOMO2 (33.3%), SMG1 (50.0%), IQCK (66.7%), ACSM5 (83.3%), ACSM2B (0.0%), NPIPB3 (16.7%), NPIPB4 (50.0%), NPIPB5 (66.7%), NPIPB6 (83.3%), NPIPB7 (0.0%), SULT1A2 (16.7%), NPIPB8 (50.0%), EIF3C (66.7%), NPIPB9 (83.3%), NPIPB11 (0.0%), BOLA2-SMG1P6 (16.7%), BOLA2 (33.3%), SLX1B (50.0%), SULT1A4 (66.7%), NPIPB12 (83.3%), SLX1A (0.0%), SULT1A3 (16.7%), NPIPB13 (33.3%), PHKG2 (50.0%), VKORC1 (66.7%), KRABD5 (83.3%), TP53TG3 (0.0%), TP53TG3C (16.6%), TP53TG3E (33.3%), TP53TG3B (50.0%), TP53TG3F (66.6%), CCNYL1B (83.3%), CES1 (0.0%), MT1M (16.6%), MATCAP1 (33.3%), HSD11B2 (50.0%), CLEC18A (66.7%), PDPR (83.3%), EXOSC6 (0.0%), HPR (50.0%), NPIPB15 (66.7%), CLEC18B (83.3%), CA5A (0.0%), ZNF469 (16.7%), CDH15 (33.3%), ANKRD11 (50.0%), MC1R (66.7%), PRDM7 (83.3%), ABR (0.0%), SERPINF2 (16.7%), SRR (33.3%), OR1D5 (50.0%), P2RX5 (66.7%), ALOX15 (83.3%), ENO3 (0.0%), USP6 (16.7%), SLC35G6 (33.3%), ALOXE3 (50.0%), HES7 (66.6%), CDRT15 (83.3%), FBXW10B (0.0%), TRIM16 (16.7%), ZNF286A-TBC1D26 (33.3%), ZNF286A (50.0%), TBC1D26 (66.7%), UBB (83.3%), ATPAF2 (0.0%), EVPLL (16.7%), LGALS9C (33.3%), TBC1D28 (50.0%), FOXO3B (66.7%), FBXW10 (83.3%), GRAP (0.0%), GRAPL (16.7%), LGALS9B (33.3%), CDRT15L2 (50.0%), MEIS3P2 (66.6%), MAP2K3 (83.3%), KCNJ18 (0.0%), LGALS9 (16.7%), FOXN1 (33.3%), SUZ12 (50.0%), LRRC37B (66.7%), SLC35G3 (83.3%), CCL4 (0.0%), TBC1D3B (16.7%), CCL4L2 (50.0%), TBC1D3I (66.7%), TBC1D3G (83.3%), TBC1D3F (0.0%), TBC1D3K (16.7%), TBC1D3L (33.3%), TBC1D3D (50.0%), TBC1D3C (66.7%), TBC1D3E (83.3%), MRPL45 (0.0%), KRTAP1-1 (16.6%), KRTAP4-7 (33.3%), KRTAP4-8 (50.0%), KRTAP4-16 (66.7%), KRTAP4-9 (83.3%), KRTAP4-12 (0.0%), KRTAP9-7 (16.7%), KRT14 (33.3%), KRT16 (50.0%), KRT17 (66.7%), HSD17B1 (83.3%), G6PC3 (0.0%), ARHGAP27 (16.7%), PLEKHM1 (33.3%), ARL17B (50.0%), LRRC37A (66.7%), ARL17A (83.3%), NSF (0.0%), NPEPPS (16.7%), HOXB8 (33.3%), GIP (50.0%), DHX40 (66.7%), RPS6KB1 (83.3%), METTL2A (0.0%), TLK2 (16.7%), CSH2 (33.3%), GH2 (50.0%), CSH1 (66.6%), CSHL1 (83.3%), LRRC37A3 (0.0%), C17orf58 (16.7%), AMZ2 (33.3%), TMC6 (50.0%), CANT1 (66.7%), RNF213 (83.3%), ARL16 (0.0%), TUBB8B (16.7%), TYMS (33.3%), SLC35G4 (50.0%), POTEC (66.7%), ANKRD30B (83.3%), SLC25A52 (0.0%), KATNAL2 (16.7%), SERPINB4 (33.3%), SERPINB3 (50.0%), GALR1 (66.7%), CTDP1 (83.3%), BSG (0.0%), HCN2 (16.7%), KISS1R (33.3%), STK11 (50.0%), TCF3 (66.7%), ABHD17A (83.3%), GIPC3 (0.0%), TBXA2R (16.7%), CREB3L3 (33.3%), RFX2 (50.0%), C3 (66.7%), MBD3L2B (83.3%), MBD3L4 (0.0%), MBD3L2 (16.7%), STXBP2 (33.3%), TYK2 (50.0%), ZNF799 (66.7%), ZNF443 (83.3%), CYP4F3 (0.0%), CYP4F12 (16.7%), OR10H2 (33.3%), CALR3 (50.0%), MYO9B (66.7%), INSL3 (83.3%), ZNF738 (0.0%), ZNF100 (16.7%), ZNF208 (33.3%), ZNF676 (50.0%), ZNF729 (66.7%), ZNF492 (83.3%), ZNF728 (0.0%), RHPN2 (16.7%), GPI (33.3%), ZNF302 (50.0%), ZNF181 (66.7%), FFAR3 (83.3%), COX6B1 (0.0%), LGALS7 (16.7%), LGALS7B (33.3%), IFNL3 (50.0%), IFNL4 (66.6%), IFNL2 (83.3%), CYP2A7 (16.7%), CYP2G1P (33.3%), CYP2A13 (66.7%), CYP2F1 (83.3%), PSG8 (0.0%), PSG1 (16.7%), PSG6 (33.3%), PSG7 (50.0%), PSG11 (66.7%), PSG2 (83.3%), PSG4 (0.0%), PSG9 (16.7%), ETHE1 (50.0%), ZNF285 (66.7%), APOC1 (83.3%), APOC4 (0.0%), BLOC1S3 (16.7%), DMPK (33.3%), FUT1 (50.0%), BAX (66.7%), LHB (83.3%), CGB3 (0.0%), CGB2 (16.6%), CGB1 (33.3%), CGB5 (50.0%), CGB8 (66.7%), CGB7 (83.3%), PNKP (0.0%), SIGLEC16 (16.7%), KLK4 (33.3%), ETFB (50.0%), ZNF808 (66.7%), ZNF600 (83.3%), ZNF468 (0.0%), VN1R4 (16.6%), FAM90A27P (33.3%), ZNF765 (50.0%), ZNF761 (66.7%), ZNF813 (83.3%), PRKCG (0.0%), MBOAT7 (16.7%), LILRA6 (33.3%), LILRB2 (50.0%), LAIR1 (66.7%), LAIR2 (83.3%), LILRB1 (0.0%), KIR3DL3 (16.7%), KIR2DL3 (33.3%), KIR2DL1 (50.0%), KIR2DL4 (66.7%), KIR3DL1 (83.3%), KIR3DL2 (0.0%), NLRP7 (16.7%), NLRP2 (33.3%), GP6 (50.0%), TNNT1 (66.7%), TNNI3 (83.3%), RFPL4A (0.0%), RFPL4AL1 (16.7%), ZNF419 (33.3%), ZNF773 (50.0%), ZNF587B (66.7%), ZNF814 (83.3%), ZNF417 (0.0%), SLC27A5 (16.7%), SIRPB1 (33.3%), CST4 (50.0%), CST1 (66.6%), CST2 (83.3%), PLAGL2 (0.0%), SEMG1 (16.7%), PLTP (33.3%), CHRNA4 (50.0%), EEF1A2 (66.7%), PTK6 (83.3%), MYT1 (0.0%), PCMTD2 (16.7%), TPTE (33.3%), POTED (50.0%), KRTAP21-1 (66.7%), SMIM11 (83.3%), SMIM34 (0.0%), KCNE1 (16.7%), CBR3 (33.3%), NDUFV3 (50.0%), CBS (66.7%), U2AF1 (83.3%), SIK1 (0.0%), HSF2BP (16.7%), H2BC12L (33.2%), TRAPPC10 (50.0%), PWP2 (66.7%), GATD3 (83.3%), DNMT3L (0.0%), KRTAP10-1 (16.6%), KRTAP10-2 (33.3%), KRTAP10-4 (50.0%), KRTAP10-5 (66.6%), KRTAP10-6 (83.3%), KRTAP10-8 (0.0%), KRTAP10-9 (16.6%), KRTAP10-10 (33.3%), KRTAP12-2 (49.9%), KRTAP12-1 (66.7%), COL18A1 (83.3%), OR11H1 (0.0%), POTEH (16.7%), CCT8L2 (33.3%), USP18 (50.0%), GGTLC3 (66.7%), TMEM191B (83.3%), FAM246B (0.0%), DGCR6 (16.7%), PRODH (33.3%), FAM246C (50.0%), CCDC188 (66.7%), RTN4R (83.3%), TUBA3FP (0.0%), LRRC74B (16.7%), FAM246A (33.3%), RIMBP3B (50.0%), HIC2 (66.7%), TMEM191C (83.3%), GGTLC2 (0.0%), IGLL1 (16.7%), DRICH1 (33.3%), GSTT2B (50.0%), DDTL (66.7%), GSTT2 (83.3%), RFPL1 (0.0%), C22orf42 (16.7%), RFPL3 (33.3%), APOBEC3D (83.3%), APOBEC3H (0.0%), ATF4 (16.7%), NDUFA6 (33.3%), CYP2D7 (66.7%), RRP7A (83.3%), CYB5R3 (0.0%), A4GALT (16.7%), TTLL1 (33.3%), MLC1 (50.0%), TUBGCP6 (66.7%), ACR (83.3%), XG (0.0%), GYG2 (16.7%), ARSD (33.3%), MXRA5 (50.0%), PRKX (66.7%), VCX3A (83.3%), VCX2 (0.0%), VCX3B (16.7%), FAM9A (33.3%), FAM9C (50.0%), SUPT20HL2 (66.7%), SUPT20HL1 (83.3%), MAGEB6 (0.0%), DCAF8L1 (16.7%), FAM47B (33.3%), H2AL1Q (49.9%), FAM47C (66.7%), H2AL3 (83.2%), SPACA5B (0.0%), SSX5 (16.7%), SSX1 (33.3%), SSX3 (50.0%), SSX4 (66.7%), SSX4B (83.3%), GAGE12J (0.0%), GAGE13 (16.7%), GAGE2E (33.3%), GAGE12B (49.6%), GAGE12C (66.7%), GAGE12D (83.3%), GAGE12F (0.0%), GAGE12G (16.7%), GAGE12H (33.3%), GAGE2A (50.0%), GAGE1 (66.7%), CENPVL3 (83.3%), CENPVL1 (0.0%), MAGED4B (16.7%), MAGED4 (33.3%), XAGE1A (50.0%), XAGE1B (66.7%), SSX7 (83.3%), SSX2B (0.0%), SPANXN5 (16.7%), XAGE5 (33.3%), XAGE3 (50.0%), FAM156B (66.7%), FAM156A (83.3%), SPIN2B (0.0%), SPIN2A (16.7%), ZXDA (33.3%), CXorf49 (50.0%), CXorf49B (66.7%), DMRTC1B (83.3%), FAM236D (0.0%), DMRTC1 (16.7%), FAM236C (33.3%), FAM236A (50.0%), PABPC1L2B (66.7%), PABPC1L2A (83.3%), TGIF2LX (0.0%), PCDH11X (16.7%), TCEAL6 (33.3%), TCP11X1 (50.0%), NXF2 (66.7%), NXF2B (83.3%), RAB40AL (0.0%), TMSB15B (16.7%), H2BW1 (33.3%), H2BW2 (50.0%), TMSB15C (66.7%), PSMD10 (83.3%), CT47C1 (0.0%), RHOXF2B (16.7%), RHOXF2 (33.3%), CT47B1 (50.0%), CT47A12 (66.7%), CT47A11 (83.3%), CT47A9 (0.0%), CT47A8 (16.6%), CT47A7 (33.3%), CT47A6 (50.0%), CT47A5 (66.7%), CT47A4 (83.3%), CT47A2 (0.0%), CT47A1 (16.7%), RTL8B (33.3%), RTL8C (50.0%), RTL8A (66.6%), SMIM10L2B (83.3%), CT55 (0.0%), ETDA (16.6%), SMIM10L2A (33.3%), CT45A1 (50.0%), CT45A3 (66.7%), CT45A5 (83.3%), CT45A2 (0.0%), CT45A7 (16.7%), CT45A8 (33.3%), CT45A9 (50.0%), CT45A10 (66.7%), SAGE1 (83.3%), SPANXC (0.0%), SPANXA1 (16.6%), SPANXA2 (33.3%), SPANXD (50.0%), MAGEC1 (66.7%), SPANXN3 (83.3%), UBE2NL (0.0%), SPANXN1 (16.7%), CXorf51B (33.2%), CXorf51A (49.9%), EOLA1 (66.7%), HSFX3 (83.3%), HSFX2 (0.0%), HSFX1 (16.6%), MAGEA9 (33.3%), EOLA2 (50.0%), HSFX4 (66.6%), MAGEA3 (83.3%), MAGEA2B (0.0%), CSAG1 (16.7%), MAGEA12 (33.3%), MAGEA2 (50.0%), CSAG3 (66.7%), MAGEA6 (83.3%), PWWP4 (0.0%), SLC6A8 (16.7%), BCAP31 (33.3%), OPN1LW (50.0%), OPN1MW (66.7%), OPN1MW2 (83.3%), TEX28 (0.0%), CTAG1A (16.6%), CTAG1B (33.3%), CTAG2 (50.0%), H2AB1 (66.6%), F8A1 (83.3%), F8A2 (0.0%), F8A3 (16.6%), H2AB3 (33.3%), IL9R (50.0%), WASH6P (66.6%), TGIF2LY (not on this reference), PCDH11Y (not on this reference), TSPY2 (not on this reference), TSPY4 (not on this reference), TSPY8 (not on this reference), TSPY3 (not on this reference), TSPY1 (not on this reference), TSPY9 (not on this reference), TSPY10 (not on this reference), VCY (not on this reference), VCY1B (not on this reference), CDY2B (not on this reference), CDY2A (not on this reference), HSFY1 (not on this reference), HSFY2 (not on this reference), RBMY1B (not on this reference), RBMY1A1 (not on this reference), RBMY1D (not on this reference), RBMY1E (not on this reference), RBMY1F (not on this reference), RBMY1J (not on this reference), BPY2 (not on this reference), DAZ1 (not on this reference), DAZ2 (not on this reference), CDY1B (not on this reference), BPY2B (not on this reference), DAZ3 (not on this reference), DAZ4 (not on this reference), BPY2C (not on this reference), CDY1 (not on this reference), C4B_2 (not on this reference), GSTT1 (not on this reference), GSTTP2 (not on this reference), GTF2H2C_2 (not on this reference), HLA-DRB3 (not on this reference), HLA-DRB4 (not on this reference), KIR2DL2 (not on this reference), KIR2DL5A (not on this reference), KIR2DL5B (not on this reference), KIR2DS1 (not on this reference), KIR2DS2 (not on this reference), KIR2DS3 (not on this reference), KIR2DS5 (not on this reference), KIR3DS1 (not on this reference), LILRA3 (not on this reference), OR8U8 (not on this reference), OR8U9 (not on this reference), OR9G9 (not on this reference), TAS2R45 (not on this reference) - Not read here, and the step that calls them gave no result in this run (37): RHCE (0.0%) by parascopy, owner step 35 not run, AMY1A (16.7%) by parascopy, owner step 35 not run, AMY1B (33.3%) by parascopy, owner step 35 not run, AMY1C (50.0%) by parascopy, owner step 35 not run, NOTCH2 (66.7%) by parascopy, owner step 35 not run, FCGR1A (50.0%) by parascopy, owner step 35 not run, FCGR2A (66.7%) by parascopy, owner step 35 not run, FCGR2C (0.0%) by parascopy, owner step 35 not run, FCGR3B (16.7%) by parascopy, owner step 35 not run, CFHR3 (16.7%) by parascopy, owner step 35 not run, CFHR1 (33.3%) by parascopy, owner step 35 not run, PROS1 (83.3%) by parascopy, owner step 35 not run, GYPE (66.7%) by parascopy, owner step 35 not run, GYPB (83.3%) by parascopy, owner step 35 not run, GTF2H2C (50.0%) by parascopy, owner step 35 not run, GTF2H2 (33.3%) by parascopy, owner step 35 not run, HSPA1B (0.0%) by parascopy, owner step 35 not run, C4A (33.3%) by parascopy, owner step 35 not run, C4B (50.0%) by parascopy, owner step 35 not run, PMS2 (0.0%) by parascopy, owner step 35 not run, GTF2I (83.3%) by parascopy, owner step 35 not run, DEFA1B (0.0%) by parascopy, owner step 35 not run, CEL (83.3%) by parascopy, owner step 35 not run, MUC5B (66.7%) by parascopy, owner step 35 not run, KLRC2 (16.7%) by parascopy, owner step 35 not run, KRT6B (0.0%) by parascopy, owner step 35 not run, KRT6C (16.7%) by parascopy, owner step 35 not run, KRT6A (33.3%) by parascopy, owner step 35 not run, CHRFAM7A (33.3%) by parascopy, owner step 35 not run, SORD (83.3%) by parascopy, owner step 35 not run, TPSB2 (16.7%) by parascopy, owner step 35 not run, TPSAB1 (33.3%) by parascopy, owner step 35 not run, OTOA (33.3%) by parascopy, owner step 35 not run, HYDIN (16.7%) by parascopy, owner step 35 not run, CD177 (33.3%) by parascopy, owner step 35 not run, APOBEC3A (50.0%) by parascopy, owner step 35 not run, APOBEC3B (66.7%) by parascopy, owner step 35 not run - Not read here, called by a step of their own (17): GSTM1 (0.0%) by pypgx, GBA1 (16.7%) by parascopy, UGT2B17 (50.0%) by pypgx, UGT2B15 (66.7%) by pypgx, SMN2 (83.3%) by parascopy, SMN1 (0.0%) by parascopy, CYP21A2 (66.7%) by cn_loci:CYP21A2, LPA (66.7%) by cn_loci:LPA_KIV2, STRC (16.7%) by parascopy, HBA2 (50.0%) by cn_loci:HBA, HBA1 (66.6%) by cn_loci:HBA, SULT1A1 (33.3%) by pypgx, HP (33.3%) by cn_loci:HP, CCL3L3 (33.3%) by cn_loci:CCL3L1, CYP2A6 (0.0%) by pypgx, CYP2B6 (50.0%) by pypgx, CYP2D6 (50.0%) by pypgx + Not read here, and the step that calls them gave no result in this run (36): RHCE (0.0%) by parascopy, owner step 35 not run, AMY1A (16.7%) by parascopy, owner step 35 not run, AMY1B (33.3%) by parascopy, owner step 35 not run, AMY1C (50.0%) by parascopy, owner step 35 not run, NOTCH2 (66.7%) by parascopy, owner step 35 not run, FCGR1A (50.0%) by parascopy, owner step 35 not run, FCGR2A (66.7%) by parascopy, owner step 35 not run, FCGR2C (0.0%) by parascopy, owner step 35 not run, FCGR3B (16.7%) by parascopy, owner step 35 not run, CFHR3 (16.7%) by parascopy, owner step 35 not run, CFHR1 (33.3%) by parascopy, owner step 35 not run, PROS1 (83.3%) by parascopy, owner step 35 not run, GYPE (66.7%) by parascopy, owner step 35 not run, GYPB (83.3%) by parascopy, owner step 35 not run, GTF2H2C (50.0%) by parascopy, owner step 35 not run, GTF2H2 (33.3%) by parascopy, owner step 35 not run, HSPA1B (0.0%) by parascopy, owner step 35 not run, C4A (33.3%) by parascopy, owner step 35 not run, C4B (50.0%) by parascopy, owner step 35 not run, GTF2I (83.3%) by parascopy, owner step 35 not run, DEFA1B (0.0%) by parascopy, owner step 35 not run, CEL (83.3%) by parascopy, owner step 35 not run, MUC5B (66.7%) by parascopy, owner step 35 not run, KLRC2 (16.7%) by parascopy, owner step 35 not run, KRT6B (0.0%) by parascopy, owner step 35 not run, KRT6C (16.7%) by parascopy, owner step 35 not run, KRT6A (33.3%) by parascopy, owner step 35 not run, CHRFAM7A (33.3%) by parascopy, owner step 35 not run, SORD (83.3%) by parascopy, owner step 35 not run, TPSB2 (16.7%) by parascopy, owner step 35 not run, TPSAB1 (33.3%) by parascopy, owner step 35 not run, OTOA (33.3%) by parascopy, owner step 35 not run, HYDIN (16.7%) by parascopy, owner step 35 not run, CD177 (33.3%) by parascopy, owner step 35 not run, APOBEC3A (50.0%) by parascopy, owner step 35 not run, APOBEC3B (66.7%) by parascopy, owner step 35 not run + Not read here, called by a step of their own (18): GSTM1 (0.0%) by pypgx, GBA1 (16.7%) by parascopy, UGT2B17 (50.0%) by pypgx, UGT2B15 (66.7%) by pypgx, SMN2 (83.3%) by parascopy, SMN1 (0.0%) by parascopy, CYP21A2 (66.7%) by cn_loci:CYP21A2, LPA (66.7%) by cn_loci:LPA_KIV2, PMS2 (0.0%) by parascopy, STRC (16.7%) by parascopy, HBA2 (50.0%) by cn_loci:HBA, HBA1 (66.6%) by cn_loci:HBA, SULT1A1 (33.3%) by pypgx, HP (33.3%) by cn_loci:HP, CCL3L3 (33.3%) by cn_loci:CCL3L1, CYP2A6 (0.0%) by pypgx, CYP2B6 (50.0%) by pypgx, CYP2D6 (50.0%) by pypgx A gene listed as not read could not be read reliably: too few of its reads were placed on it with confidence, so a 'no finding' in it says nothing. A gene with a caller of its own is left to that caller's section. ## Variant Calling (DeepVariant) @@ -213,8 +213,8 @@ --- Insertions called: 3 (ALU 2, L1 1) FKTN SVA (Fukuyama; AR): callable (depth 30, not seen) - TAF1 SVA (XDP; XL): not callable (depth 2) - Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not callable: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. + TAF1 SVA (XDP; XL): not assessed (depth 2) + Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not assessed: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. ## Repeat Expansions (ExpansionHunter) --- @@ -370,9 +370,9 @@ LCE3B/LCE3C copies (from depth): 1 (estimate 1.0). Reading: one deleted CCL3L1/CCL3L3 copies (from depth): not assessed (low depth) GBA1, GBAP1 (agCN): 4 (2 region(s), quality 35.25 or more, filter PASS). Reading: agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy + PMS2, PMS2CL (agCN): chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual) STRC, STRCP1 (agCN): unreadable: S_strc_copy_number.tsv lacks the copy-number columns mytable (agCN): not assessed: no read over the locus - pms2 (agCN): chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual) Copy-number intervals (ClinGen recurrent regions, carrier deletions, AZF; from depth): 4 rows (3 called, 1 not assessed); 2 with a deletion or a duplication Deletion: AZFc (AZFc, chrY:23000001-26000000), 0 of 1 copies Duplication: dup (X1, chr1:2-2), 3 of 2 copies diff --git a/tests/parity/golden/report-render/c-float--inf/c-float--inf.txt b/tests/parity/golden/report-render/c-float--inf/c-float--inf.txt index 43b33c9d6..5286903af 100644 --- a/tests/parity/golden/report-render/c-float--inf/c-float--inf.txt +++ b/tests/parity/golden/report-render/c-float--inf/c-float--inf.txt @@ -73,8 +73,8 @@ --- Insertions called: 3 (ALU 2, L1 1) FKTN SVA (Fukuyama; AR): callable (depth 30, not seen) - TAF1 SVA (XDP; XL): not callable (depth 2) - Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not callable: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. + TAF1 SVA (XDP; XL): not assessed (depth 2) + Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not assessed: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. ## Repeat Expansions (ExpansionHunter) --- @@ -200,9 +200,9 @@ LCE3B/LCE3C copies (from depth): 1 (estimate 1.0). Reading: one deleted CCL3L1/CCL3L3 copies (from depth): not assessed (low depth) GBA1, GBAP1 (agCN): 4 (2 region(s), quality 35.25 or more, filter PASS). Reading: agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy + PMS2, PMS2CL (agCN): chr7:5970001-5980000 4 (quality -inf, filter PASS); chr7:5980001-5990000 3 (quality -inf, filter LowQual): no region with a whole copy number, filter PASS and quality 20 or more STRC, STRCP1 (agCN): unreadable: S_strc_copy_number.tsv lacks the copy-number columns mytable (agCN): not assessed: no read over the locus - pms2 (agCN): chr7:5970001-5980000 4 (quality -inf, filter PASS); chr7:5980001-5990000 3 (quality -inf, filter LowQual): no region with a whole copy number, filter PASS and quality 20 or more Copy-number intervals (ClinGen recurrent regions, carrier deletions, AZF; from depth): 4 rows (3 called, 1 not assessed); 2 with a deletion or a duplication Deletion: AZFc (AZFc, chrY:23000001-26000000), 0 of 1 copies Duplication: dup (X1, chr1:2-2), 3 of 2 copies diff --git a/tests/parity/golden/report-render/c-float-inf/c-float-inf.txt b/tests/parity/golden/report-render/c-float-inf/c-float-inf.txt index 672576cec..36898927c 100644 --- a/tests/parity/golden/report-render/c-float-inf/c-float-inf.txt +++ b/tests/parity/golden/report-render/c-float-inf/c-float-inf.txt @@ -73,8 +73,8 @@ --- Insertions called: 3 (ALU 2, L1 1) FKTN SVA (Fukuyama; AR): callable (depth 30, not seen) - TAF1 SVA (XDP; XL): not callable (depth 2) - Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not callable: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. + TAF1 SVA (XDP; XL): not assessed (depth 2) + Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not assessed: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. ## Repeat Expansions (ExpansionHunter) --- @@ -202,9 +202,9 @@ LCE3B/LCE3C copies (from depth): 1 (estimate 1.0). Reading: one deleted CCL3L1/CCL3L3 copies (from depth): not assessed (low depth) GBA1, GBAP1 (agCN): 4 (2 region(s), quality 35.25 or more, filter PASS). Reading: agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy + PMS2, PMS2CL (agCN): chr7:5970001-5980000 4 (quality inf, filter PASS); chr7:5980001-5990000 3 (quality inf, filter LowQual) STRC, STRCP1 (agCN): unreadable: S_strc_copy_number.tsv lacks the copy-number columns mytable (agCN): not assessed: no read over the locus - pms2 (agCN): chr7:5970001-5980000 4 (quality inf, filter PASS); chr7:5980001-5990000 3 (quality inf, filter LowQual) Copy-number intervals (ClinGen recurrent regions, carrier deletions, AZF; from depth): 4 rows (3 called, 1 not assessed); 2 with a deletion or a duplication Deletion: AZFc (AZFc, chrY:23000001-26000000), 0 of 1 copies Duplication: dup (X1, chr1:2-2), 3 of 2 copies diff --git a/tests/parity/golden/report-render/c-float-nan/c-float-nan.txt b/tests/parity/golden/report-render/c-float-nan/c-float-nan.txt index 217f4bcee..b5edbe341 100644 --- a/tests/parity/golden/report-render/c-float-nan/c-float-nan.txt +++ b/tests/parity/golden/report-render/c-float-nan/c-float-nan.txt @@ -73,8 +73,8 @@ --- Insertions called: 3 (ALU 2, L1 1) FKTN SVA (Fukuyama; AR): callable (depth 30, not seen) - TAF1 SVA (XDP; XL): not callable (depth 2) - Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not callable: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. + TAF1 SVA (XDP; XL): not assessed (depth 2) + Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not assessed: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. ## Repeat Expansions (ExpansionHunter) --- @@ -196,9 +196,9 @@ LCE3B/LCE3C copies (from depth): 1 (estimate 1.0). Reading: one deleted CCL3L1/CCL3L3 copies (from depth): not assessed (low depth) GBA1, GBAP1 (agCN): 4 (2 region(s), quality 35.25 or more, filter PASS). Reading: agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy + PMS2, PMS2CL (agCN): chr7:5970001-5980000 4 (quality nan, filter PASS); chr7:5980001-5990000 3 (quality nan, filter LowQual): no region with a whole copy number, filter PASS and quality 20 or more STRC, STRCP1 (agCN): unreadable: S_strc_copy_number.tsv lacks the copy-number columns mytable (agCN): not assessed: no read over the locus - pms2 (agCN): chr7:5970001-5980000 4 (quality nan, filter PASS); chr7:5980001-5990000 3 (quality nan, filter LowQual): no region with a whole copy number, filter PASS and quality 20 or more Copy-number intervals (ClinGen recurrent regions, carrier deletions, AZF; from depth): 4 rows (3 called, 1 not assessed); 2 with a deletion or a duplication Deletion: AZFc (AZFc, chrY:23000001-26000000), 0 of 1 copies Duplication: dup (X1, chr1:2-2), 3 of 2 copies diff --git a/tests/parity/golden/report-render/c-full/c-full.txt b/tests/parity/golden/report-render/c-full/c-full.txt index 409b05702..54ef778f9 100644 --- a/tests/parity/golden/report-render/c-full/c-full.txt +++ b/tests/parity/golden/report-render/c-full/c-full.txt @@ -74,8 +74,8 @@ --- Insertions called: 3 (ALU 2, L1 1) FKTN SVA (Fukuyama; AR): callable (depth 30, not seen) - TAF1 SVA (XDP; XL): not callable (depth 2) - Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not callable: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. + TAF1 SVA (XDP; XL): not assessed (depth 2) + Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not assessed: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. ## Repeat Expansions (ExpansionHunter) --- @@ -209,9 +209,9 @@ LCE3B/LCE3C copies (from depth): 1 (estimate 1.0). Reading: one deleted CCL3L1/CCL3L3 copies (from depth): not assessed (low depth) GBA1, GBAP1 (agCN): 4 (2 region(s), quality 35.25 or more, filter PASS). Reading: agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy + PMS2, PMS2CL (agCN): chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual) STRC, STRCP1 (agCN): unreadable: S_strc_copy_number.tsv lacks the copy-number columns mytable (agCN): not assessed: no read over the locus - pms2 (agCN): chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual) Copy-number intervals (ClinGen recurrent regions, carrier deletions, AZF; from depth): 4 rows (3 called, 1 not assessed); 2 with a deletion or a duplication Deletion: AZFc (AZFc, chrY:23000001-26000000), 0 of 1 copies Duplication: dup (X1, chr1:2-2), 3 of 2 copies diff --git a/tests/parity/golden/report-render/c-nf/c-nf.html b/tests/parity/golden/report-render/c-nf/c-nf.html index d4fe89022..bfd75f7df 100644 --- a/tests/parity/golden/report-render/c-nf/c-nf.html +++ b/tests/parity/golden/report-render/c-nf/c-nf.html @@ -301,7 +301,7 @@

    Structural Variants, Class 4 and 5 (AnnotSV)

    Mobile Element Insertions

    Step 50 · Complete · file date 2021-03-04 05:06 UTC · link to this section

    -

    Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not callable: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/<sample>_mei.tsv.

    +

    Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not assessed: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/<sample>_mei.tsv.

    Insertions called0 (none)
    GeneElementConditionInheritanceStatusDepthCall
    FKTNSVAFARcallable30seen
    diff --git a/tests/parity/golden/report-render/c-nf/c-nf.txt b/tests/parity/golden/report-render/c-nf/c-nf.txt index 6c595352a..424b3a0ee 100644 --- a/tests/parity/golden/report-render/c-nf/c-nf.txt +++ b/tests/parity/golden/report-render/c-nf/c-nf.txt @@ -43,7 +43,7 @@ --- Insertions called: 0 (none) FKTN SVA (F; AR): callable (depth 30, seen) - Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not callable: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. + Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not assessed: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. ## Repeat Expansions (ExpansionHunter) --- diff --git a/tests/parity/golden/report-render/m-optin-empty/m-optin-empty.html b/tests/parity/golden/report-render/m-optin-empty/m-optin-empty.html index 6606f4315..b1719a631 100644 --- a/tests/parity/golden/report-render/m-optin-empty/m-optin-empty.html +++ b/tests/parity/golden/report-render/m-optin-empty/m-optin-empty.html @@ -294,7 +294,7 @@

    Structural Variants

    Mobile Element Insertions

    Step 50 · Complete · link to this section

    -

    Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not callable: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/<sample>_mei.tsv.

    +

    Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not assessed: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/<sample>_mei.tsv.

    Insertions called0 (none)
    GeneElementConditionInheritanceStatusDepthCall
    diff --git a/tests/parity/golden/report-render/m-optin-empty/m-optin-empty.txt b/tests/parity/golden/report-render/m-optin-empty/m-optin-empty.txt index e2cbbabf0..2d945d7a6 100644 --- a/tests/parity/golden/report-render/m-optin-empty/m-optin-empty.txt +++ b/tests/parity/golden/report-render/m-optin-empty/m-optin-empty.txt @@ -41,7 +41,7 @@ ## Mobile Element Insertions (step 50) --- Insertions called: 0 (none) - Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not callable: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. + Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not assessed: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. ## MUC1 VNTR Frameshifts (ADTKD-MUC1, VNtyper) --- diff --git a/tests/parity/golden/report-render/m-optin-odd/m-optin-odd.html b/tests/parity/golden/report-render/m-optin-odd/m-optin-odd.html index 101523745..03ecc54fe 100644 --- a/tests/parity/golden/report-render/m-optin-odd/m-optin-odd.html +++ b/tests/parity/golden/report-render/m-optin-odd/m-optin-odd.html @@ -289,9 +289,9 @@

    Structural Variants

    Mobile Element Insertions

    Step 50 · Not run · link to this section

    -

    Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not callable: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/<sample>_mei.tsv.

    +

    Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not assessed: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/<sample>_mei.tsv.

    Insertions called2 (Alu 1, SVA 1)
    -
    GeneElementConditionInheritanceStatusDepthCall
    FKTNSVAFukuyama congenital muscular dystrophyautosomal recessiveseen30.0chr9:105639660 SVA_F 1 copy PASS
    TAF1SVAX-linked dystonia-parkinsonismX-linkednot callable..
    +
    GeneElementConditionInheritanceStatusDepthCall
    FKTNSVAFukuyama congenital muscular dystrophyautosomal recessiveseen30.0chr9:105639660 SVA_F 1 copy PASS
    TAF1SVAX-linked dystonia-parkinsonismX-linkednot assessed..
    diff --git a/tests/parity/golden/report-render/m-optin-ok/m-optin-ok.html.sha256 b/tests/parity/golden/report-render/m-optin-ok/m-optin-ok.html.sha256 index b9ba6de6a..6ba07716f 100644 --- a/tests/parity/golden/report-render/m-optin-ok/m-optin-ok.html.sha256 +++ b/tests/parity/golden/report-render/m-optin-ok/m-optin-ok.html.sha256 @@ -1 +1 @@ -edccef93e0042b64bed19696091e004512adf8b6caa6e5255836a9198c5176bc +b4162938f4a43a268f0f824636a9f20f1d1fdc417fedeb9f0ed9e6f4885cfdd2 diff --git a/tests/parity/golden/report-render/m-optin-ok/m-optin-ok.txt b/tests/parity/golden/report-render/m-optin-ok/m-optin-ok.txt index 6f223e0b1..6dc0b22ab 100644 --- a/tests/parity/golden/report-render/m-optin-ok/m-optin-ok.txt +++ b/tests/parity/golden/report-render/m-optin-ok/m-optin-ok.txt @@ -48,8 +48,8 @@ --- Insertions called: 2 (Alu 1, SVA 1) FKTN SVA (Fukuyama congenital muscular dystrophy; autosomal recessive): seen (depth 30.0, chr9:105639660 SVA_F 1 copy PASS) - TAF1 SVA (X-linked dystonia-parkinsonism; X-linked): not callable (depth .) - Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not callable: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. + TAF1 SVA (X-linked dystonia-parkinsonism; X-linked): not assessed (depth .) + Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not assessed: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. ## MUC1 VNTR Frameshifts (ADTKD-MUC1, VNtyper) --- diff --git a/tests/parity/golden/report-render/m-optin-partial/m-optin-partial.html.sha256 b/tests/parity/golden/report-render/m-optin-partial/m-optin-partial.html.sha256 index a00c40a03..c94e152c8 100644 --- a/tests/parity/golden/report-render/m-optin-partial/m-optin-partial.html.sha256 +++ b/tests/parity/golden/report-render/m-optin-partial/m-optin-partial.html.sha256 @@ -1 +1 @@ -e16e3d6152254e677097b903bb1e0e07437cfebb65812bf1d3685954dc3b078b +35749390fe21139046ebd8f371b2c01aeb1daca4269d3344b505c4ca7ae6ba5e diff --git a/tests/parity/golden/report-render/m-optin-partial/m-optin-partial.txt b/tests/parity/golden/report-render/m-optin-partial/m-optin-partial.txt index 107da61cc..37b5f1688 100644 --- a/tests/parity/golden/report-render/m-optin-partial/m-optin-partial.txt +++ b/tests/parity/golden/report-render/m-optin-partial/m-optin-partial.txt @@ -48,8 +48,8 @@ --- Insertions called: 2 (Alu 1, SVA 1) FKTN SVA (Fukuyama congenital muscular dystrophy; autosomal recessive): seen (depth 30.0, chr9:105639660 SVA_F 1 copy PASS) - TAF1 SVA (X-linked dystonia-parkinsonism; X-linked): not callable (depth .) - Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not callable: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. + TAF1 SVA (X-linked dystonia-parkinsonism; X-linked): not assessed (depth .) + Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not assessed: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. ## MUC1 VNTR Frameshifts (ADTKD-MUC1, VNtyper) --- diff --git a/tests/parity/golden/report-render/m-optin-since/m-optin-since.html.sha256 b/tests/parity/golden/report-render/m-optin-since/m-optin-since.html.sha256 index 105f5eba9..ee592ebb0 100644 --- a/tests/parity/golden/report-render/m-optin-since/m-optin-since.html.sha256 +++ b/tests/parity/golden/report-render/m-optin-since/m-optin-since.html.sha256 @@ -1 +1 @@ -3a2c9a2a68223046d7b20960c46e4e6dd3917a72d7516c853a623a7ac36ba0c0 +67554812ef34a1f2689c5d1183ba8066ced804ecd2ac1b68a259703eff817d40 diff --git a/tests/parity/golden/report-render/m-optin-since/m-optin-since.txt b/tests/parity/golden/report-render/m-optin-since/m-optin-since.txt index 79fed3134..b4f14d7e4 100644 --- a/tests/parity/golden/report-render/m-optin-since/m-optin-since.txt +++ b/tests/parity/golden/report-render/m-optin-since/m-optin-since.txt @@ -48,8 +48,8 @@ --- Insertions called: 2 (Alu 1, SVA 1) FKTN SVA (Fukuyama congenital muscular dystrophy; autosomal recessive): seen (depth 30.0, chr9:105639660 SVA_F 1 copy PASS) - TAF1 SVA (X-linked dystonia-parkinsonism; X-linked): not callable (depth .) - Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not callable: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. + TAF1 SVA (X-linked dystonia-parkinsonism; X-linked): not assessed (depth .) + Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not assessed: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. ## MUC1 VNTR Frameshifts (ADTKD-MUC1, VNtyper) --- diff --git a/tests/parity/golden/report-render/m-optin-stale/m-optin-stale.html.sha256 b/tests/parity/golden/report-render/m-optin-stale/m-optin-stale.html.sha256 index 35b9bff61..c520d38a5 100644 --- a/tests/parity/golden/report-render/m-optin-stale/m-optin-stale.html.sha256 +++ b/tests/parity/golden/report-render/m-optin-stale/m-optin-stale.html.sha256 @@ -1 +1 @@ -37c8c17569da4013e2f35933c2a635e200f1b8ba5b342e6c41120fa03e7cba6e +1797804557df5f732fdd5eda2e873c17dd5131a25083e1eb66f34d0fddf4a2e8 diff --git a/tests/parity/golden/report-render/m-optin-stale/m-optin-stale.txt b/tests/parity/golden/report-render/m-optin-stale/m-optin-stale.txt index 7474c5e81..d152f4dcc 100644 --- a/tests/parity/golden/report-render/m-optin-stale/m-optin-stale.txt +++ b/tests/parity/golden/report-render/m-optin-stale/m-optin-stale.txt @@ -50,8 +50,8 @@ [STALE: why ] Insertions called: 2 (Alu 1, SVA 1) FKTN SVA (Fukuyama congenital muscular dystrophy; autosomal recessive): seen (depth 30.0, chr9:105639660 SVA_F 1 copy PASS) - TAF1 SVA (X-linked dystonia-parkinsonism; X-linked): not callable (depth .) - Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not callable: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. + TAF1 SVA (X-linked dystonia-parkinsonism; X-linked): not assessed (depth .) + Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not assessed: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. ## MUC1 VNTR Frameshifts (ADTKD-MUC1, VNtyper) --- diff --git a/tests/parity/golden/report-render/s-consumer-reasons/s-consumer-reasons.html b/tests/parity/golden/report-render/s-consumer-reasons/s-consumer-reasons.html index ab0bbbf1b..2778a4645 100644 --- a/tests/parity/golden/report-render/s-consumer-reasons/s-consumer-reasons.html +++ b/tests/parity/golden/report-render/s-consumer-reasons/s-consumer-reasons.html @@ -325,9 +325,9 @@

    Moved to class 3 by step 05's rules

    Mobile Element Insertions

    Step 50 · Complete · file date 2021-03-04 05:06 UTC · link to this section

    -

    Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not callable: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/<sample>_mei.tsv.

    +

    Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not assessed: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/<sample>_mei.tsv.

    Insertions called3 (ALU 2, L1 1)
    -
    GeneElementConditionInheritanceStatusDepthCall
    FKTNSVAFukuyamaARcallable30not seen
    TAF1SVAXDPXLnot callable2.
    +
    GeneElementConditionInheritanceStatusDepthCall
    FKTNSVAFukuyamaARcallable30not seen
    TAF1SVAXDPXLnot assessed2.
    @@ -487,7 +487,7 @@

    SMN1/SMN2 Copy Number (Parascopy)

    HP (haptoglobin) copies (from depth)2 (estimate 2.1). Reading: usual
    LCE3B/LCE3C copies (from depth)1 (estimate 1.0). Reading: one deleted
    CCL3L1/CCL3L3 copies (from depth)not assessed (low depth)
    -
    GenesCopies together (agCN)Reading
    GBA1, GBAP14 (2 region(s), quality 35.25 or more, filter PASS)agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy
    STRC, STRCP1unreadable: S_strc_copy_number.tsv lacks the copy-number columns.
    mytablenot assessed: no read over the locus.
    pms2chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual).
    +
    GenesCopies together (agCN)Reading
    GBA1, GBAP14 (2 region(s), quality 35.25 or more, filter PASS)agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy
    PMS2, PMS2CLchr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual).
    STRC, STRCP1unreadable: S_strc_copy_number.tsv lacks the copy-number columns.
    mytablenot assessed: no read over the locus.
    Copy-number intervals (ClinGen recurrent regions, carrier deletions, AZF; from depth)4 rows (3 called, 1 not assessed); 2 with a deletion or a duplication
    RegionRowPlaceCopiesChange
    AZFcAZFcchrY:23000001-260000000 of 1deletion
    dupX1chr1:2-23 of 2duplication
    @@ -910,7 +910,8 @@

    Genes and rsIDs in these results

  • MT-TK: Mitochondrial variants
  • MT-TL1: Mitochondrial variants
  • MT-TL2: Mitochondrial variants
  • -
  • PMS2: Paralog genes (Paraphase, PacBio HiFi)
  • +
  • PMS2: SMN1/SMN2 copy number (Parascopy, short reads), Paralog genes (Paraphase, PacBio HiFi)
  • +
  • PMS2CL: SMN1/SMN2 copy number (Parascopy, short reads)
  • RFC1: Repeat expansions (ExpansionHunter) (2)
  • SLC6A4: Repeat expansions (ExpansionHunter)
  • SMN1: Paralog genes (Paraphase, PacBio HiFi)
  • diff --git a/tests/parity/golden/report-render/s-consumer-reasons/s-consumer-reasons.txt b/tests/parity/golden/report-render/s-consumer-reasons/s-consumer-reasons.txt index 6dab856cf..b50144207 100644 --- a/tests/parity/golden/report-render/s-consumer-reasons/s-consumer-reasons.txt +++ b/tests/parity/golden/report-render/s-consumer-reasons/s-consumer-reasons.txt @@ -74,8 +74,8 @@ --- Insertions called: 3 (ALU 2, L1 1) FKTN SVA (Fukuyama; AR): callable (depth 30, not seen) - TAF1 SVA (XDP; XL): not callable (depth 2) - Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not callable: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. + TAF1 SVA (XDP; XL): not assessed (depth 2) + Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not assessed: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. ## Repeat Expansions (ExpansionHunter) --- @@ -209,9 +209,9 @@ LCE3B/LCE3C copies (from depth): 1 (estimate 1.0). Reading: one deleted CCL3L1/CCL3L3 copies (from depth): not assessed (low depth) GBA1, GBAP1 (agCN): 4 (2 region(s), quality 35.25 or more, filter PASS). Reading: agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy + PMS2, PMS2CL (agCN): chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual) STRC, STRCP1 (agCN): unreadable: S_strc_copy_number.tsv lacks the copy-number columns mytable (agCN): not assessed: no read over the locus - pms2 (agCN): chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual) Copy-number intervals (ClinGen recurrent regions, carrier deletions, AZF; from depth): 4 rows (3 called, 1 not assessed); 2 with a deletion or a duplication Deletion: AZFc (AZFc, chrY:23000001-26000000), 0 of 1 copies Duplication: dup (X1, chr1:2-2), 3 of 2 copies diff --git a/tests/parity/golden/report-render/s-consumer-stale/s-consumer-stale.html b/tests/parity/golden/report-render/s-consumer-stale/s-consumer-stale.html index ed9c62bf9..c041a8648 100644 --- a/tests/parity/golden/report-render/s-consumer-stale/s-consumer-stale.html +++ b/tests/parity/golden/report-render/s-consumer-stale/s-consumer-stale.html @@ -325,9 +325,9 @@

    Moved to class 3 by step 05's rules

    Mobile Element Insertions

    Step 50 · Complete · file date 2021-03-04 05:06 UTC · link to this section

    -

    Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not callable: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/<sample>_mei.tsv.

    +

    Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not assessed: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/<sample>_mei.tsv.

    Insertions called3 (ALU 2, L1 1)
    -
    GeneElementConditionInheritanceStatusDepthCall
    FKTNSVAFukuyamaARcallable30not seen
    TAF1SVAXDPXLnot callable2.
    +
    GeneElementConditionInheritanceStatusDepthCall
    FKTNSVAFukuyamaARcallable30not seen
    TAF1SVAXDPXLnot assessed2.
    @@ -487,7 +487,7 @@

    SMN1/SMN2 Copy Number (Parascopy)

    HP (haptoglobin) copies (from depth)2 (estimate 2.1). Reading: usual
    LCE3B/LCE3C copies (from depth)1 (estimate 1.0). Reading: one deleted
    CCL3L1/CCL3L3 copies (from depth)not assessed (low depth)
    -
    GenesCopies together (agCN)Reading
    GBA1, GBAP14 (2 region(s), quality 35.25 or more, filter PASS)agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy
    STRC, STRCP1unreadable: S_strc_copy_number.tsv lacks the copy-number columns.
    mytablenot assessed: no read over the locus.
    pms2chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual).
    +
    GenesCopies together (agCN)Reading
    GBA1, GBAP14 (2 region(s), quality 35.25 or more, filter PASS)agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy
    PMS2, PMS2CLchr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual).
    STRC, STRCP1unreadable: S_strc_copy_number.tsv lacks the copy-number columns.
    mytablenot assessed: no read over the locus.
    Copy-number intervals (ClinGen recurrent regions, carrier deletions, AZF; from depth)4 rows (3 called, 1 not assessed); 2 with a deletion or a duplication
    RegionRowPlaceCopiesChange
    AZFcAZFcchrY:23000001-260000000 of 1deletion
    dupX1chr1:2-23 of 2duplication
    @@ -910,7 +910,8 @@

    Genes and rsIDs in these results

  • MT-TK: Mitochondrial variants
  • MT-TL1: Mitochondrial variants
  • MT-TL2: Mitochondrial variants
  • -
  • PMS2: Paralog genes (Paraphase, PacBio HiFi)
  • +
  • PMS2: SMN1/SMN2 copy number (Parascopy, short reads), Paralog genes (Paraphase, PacBio HiFi)
  • +
  • PMS2CL: SMN1/SMN2 copy number (Parascopy, short reads)
  • RFC1: Repeat expansions (ExpansionHunter) (2)
  • SLC6A4: Repeat expansions (ExpansionHunter)
  • SMN1: Paralog genes (Paraphase, PacBio HiFi)
  • diff --git a/tests/parity/golden/report-render/s-consumer-stale/s-consumer-stale.txt b/tests/parity/golden/report-render/s-consumer-stale/s-consumer-stale.txt index a250ec873..392146806 100644 --- a/tests/parity/golden/report-render/s-consumer-stale/s-consumer-stale.txt +++ b/tests/parity/golden/report-render/s-consumer-stale/s-consumer-stale.txt @@ -74,8 +74,8 @@ --- Insertions called: 3 (ALU 2, L1 1) FKTN SVA (Fukuyama; AR): callable (depth 30, not seen) - TAF1 SVA (XDP; XL): not callable (depth 2) - Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not callable: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. + TAF1 SVA (XDP; XL): not assessed (depth 2) + Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not assessed: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. ## Repeat Expansions (ExpansionHunter) --- @@ -209,9 +209,9 @@ LCE3B/LCE3C copies (from depth): 1 (estimate 1.0). Reading: one deleted CCL3L1/CCL3L3 copies (from depth): not assessed (low depth) GBA1, GBAP1 (agCN): 4 (2 region(s), quality 35.25 or more, filter PASS). Reading: agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy + PMS2, PMS2CL (agCN): chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual) STRC, STRCP1 (agCN): unreadable: S_strc_copy_number.tsv lacks the copy-number columns mytable (agCN): not assessed: no read over the locus - pms2 (agCN): chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual) Copy-number intervals (ClinGen recurrent regions, carrier deletions, AZF; from depth): 4 rows (3 called, 1 not assessed); 2 with a deletion or a duplication Deletion: AZFc (AZFc, chrY:23000001-26000000), 0 of 1 copies Duplication: dup (X1, chr1:2-2), 3 of 2 copies diff --git a/tests/parity/golden/report-render/s-sexloss-chrx/s-sexloss-chrx.html b/tests/parity/golden/report-render/s-sexloss-chrx/s-sexloss-chrx.html index ae6034e62..acd71afb2 100644 --- a/tests/parity/golden/report-render/s-sexloss-chrx/s-sexloss-chrx.html +++ b/tests/parity/golden/report-render/s-sexloss-chrx/s-sexloss-chrx.html @@ -325,9 +325,9 @@

    Moved to class 3 by step 05's rules

    Mobile Element Insertions

    Step 50 · Complete · file date 2021-03-04 05:06 UTC · link to this section

    -

    Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not callable: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/<sample>_mei.tsv.

    +

    Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not assessed: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/<sample>_mei.tsv.

    Insertions called3 (ALU 2, L1 1)
    -
    GeneElementConditionInheritanceStatusDepthCall
    FKTNSVAFukuyamaARcallable30not seen
    TAF1SVAXDPXLnot callable2.
    +
    GeneElementConditionInheritanceStatusDepthCall
    FKTNSVAFukuyamaARcallable30not seen
    TAF1SVAXDPXLnot assessed2.
    @@ -490,7 +490,7 @@

    SMN1/SMN2 Copy Number (Parascopy)

    HP (haptoglobin) copies (from depth)2 (estimate 2.1). Reading: usual
    LCE3B/LCE3C copies (from depth)1 (estimate 1.0). Reading: one deleted
    CCL3L1/CCL3L3 copies (from depth)not assessed (low depth)
    -
    GenesCopies together (agCN)Reading
    GBA1, GBAP14 (2 region(s), quality 35.25 or more, filter PASS)agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy
    STRC, STRCP1unreadable: S_strc_copy_number.tsv lacks the copy-number columns.
    mytablenot assessed: no read over the locus.
    pms2chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual).
    +
    GenesCopies together (agCN)Reading
    GBA1, GBAP14 (2 region(s), quality 35.25 or more, filter PASS)agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy
    PMS2, PMS2CLchr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual).
    STRC, STRCP1unreadable: S_strc_copy_number.tsv lacks the copy-number columns.
    mytablenot assessed: no read over the locus.
    Copy-number intervals (ClinGen recurrent regions, carrier deletions, AZF; from depth)4 rows (3 called, 1 not assessed); 2 with a deletion or a duplication
    RegionRowPlaceCopiesChange
    AZFcAZFcchrY:23000001-260000000 of 1deletion
    dupX1chr1:2-23 of 2duplication
    @@ -913,7 +913,8 @@

    Genes and rsIDs in these results

  • MT-TK: Mitochondrial variants
  • MT-TL1: Mitochondrial variants
  • MT-TL2: Mitochondrial variants
  • -
  • PMS2: Paralog genes (Paraphase, PacBio HiFi)
  • +
  • PMS2: SMN1/SMN2 copy number (Parascopy, short reads), Paralog genes (Paraphase, PacBio HiFi)
  • +
  • PMS2CL: SMN1/SMN2 copy number (Parascopy, short reads)
  • RFC1: Repeat expansions (ExpansionHunter) (2)
  • SLC6A4: Repeat expansions (ExpansionHunter)
  • SMN1: Paralog genes (Paraphase, PacBio HiFi)
  • diff --git a/tests/parity/golden/report-render/s-sexloss-chrx/s-sexloss-chrx.txt b/tests/parity/golden/report-render/s-sexloss-chrx/s-sexloss-chrx.txt index c8c7f381d..2b764688a 100644 --- a/tests/parity/golden/report-render/s-sexloss-chrx/s-sexloss-chrx.txt +++ b/tests/parity/golden/report-render/s-sexloss-chrx/s-sexloss-chrx.txt @@ -74,8 +74,8 @@ --- Insertions called: 3 (ALU 2, L1 1) FKTN SVA (Fukuyama; AR): callable (depth 30, not seen) - TAF1 SVA (XDP; XL): not callable (depth 2) - Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not callable: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. + TAF1 SVA (XDP; XL): not assessed (depth 2) + Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not assessed: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. ## Repeat Expansions (ExpansionHunter) --- @@ -215,9 +215,9 @@ LCE3B/LCE3C copies (from depth): 1 (estimate 1.0). Reading: one deleted CCL3L1/CCL3L3 copies (from depth): not assessed (low depth) GBA1, GBAP1 (agCN): 4 (2 region(s), quality 35.25 or more, filter PASS). Reading: agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy + PMS2, PMS2CL (agCN): chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual) STRC, STRCP1 (agCN): unreadable: S_strc_copy_number.tsv lacks the copy-number columns mytable (agCN): not assessed: no read over the locus - pms2 (agCN): chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual) Copy-number intervals (ClinGen recurrent regions, carrier deletions, AZF; from depth): 4 rows (3 called, 1 not assessed); 2 with a deletion or a duplication Deletion: AZFc (AZFc, chrY:23000001-26000000), 0 of 1 copies Duplication: dup (X1, chr1:2-2), 3 of 2 copies diff --git a/tests/parity/golden/report-render/s-sexloss-detected/s-sexloss-detected.html b/tests/parity/golden/report-render/s-sexloss-detected/s-sexloss-detected.html index 9d0251f72..5f6fca5fb 100644 --- a/tests/parity/golden/report-render/s-sexloss-detected/s-sexloss-detected.html +++ b/tests/parity/golden/report-render/s-sexloss-detected/s-sexloss-detected.html @@ -325,9 +325,9 @@

    Moved to class 3 by step 05's rules

    Mobile Element Insertions

    Step 50 · Complete · file date 2021-03-04 05:06 UTC · link to this section

    -

    Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not callable: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/<sample>_mei.tsv.

    +

    Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not assessed: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/<sample>_mei.tsv.

    Insertions called3 (ALU 2, L1 1)
    -
    GeneElementConditionInheritanceStatusDepthCall
    FKTNSVAFukuyamaARcallable30not seen
    TAF1SVAXDPXLnot callable2.
    +
    GeneElementConditionInheritanceStatusDepthCall
    FKTNSVAFukuyamaARcallable30not seen
    TAF1SVAXDPXLnot assessed2.
    @@ -490,7 +490,7 @@

    SMN1/SMN2 Copy Number (Parascopy)

    HP (haptoglobin) copies (from depth)2 (estimate 2.1). Reading: usual
    LCE3B/LCE3C copies (from depth)1 (estimate 1.0). Reading: one deleted
    CCL3L1/CCL3L3 copies (from depth)not assessed (low depth)
    -
    GenesCopies together (agCN)Reading
    GBA1, GBAP14 (2 region(s), quality 35.25 or more, filter PASS)agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy
    STRC, STRCP1unreadable: S_strc_copy_number.tsv lacks the copy-number columns.
    mytablenot assessed: no read over the locus.
    pms2chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual).
    +
    GenesCopies together (agCN)Reading
    GBA1, GBAP14 (2 region(s), quality 35.25 or more, filter PASS)agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy
    PMS2, PMS2CLchr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual).
    STRC, STRCP1unreadable: S_strc_copy_number.tsv lacks the copy-number columns.
    mytablenot assessed: no read over the locus.
    Copy-number intervals (ClinGen recurrent regions, carrier deletions, AZF; from depth)4 rows (3 called, 1 not assessed); 2 with a deletion or a duplication
    RegionRowPlaceCopiesChange
    AZFcAZFcchrY:23000001-260000000 of 1deletion
    dupX1chr1:2-23 of 2duplication
    @@ -913,7 +913,8 @@

    Genes and rsIDs in these results

  • MT-TK: Mitochondrial variants
  • MT-TL1: Mitochondrial variants
  • MT-TL2: Mitochondrial variants
  • -
  • PMS2: Paralog genes (Paraphase, PacBio HiFi)
  • +
  • PMS2: SMN1/SMN2 copy number (Parascopy, short reads), Paralog genes (Paraphase, PacBio HiFi)
  • +
  • PMS2CL: SMN1/SMN2 copy number (Parascopy, short reads)
  • RFC1: Repeat expansions (ExpansionHunter) (2)
  • SLC6A4: Repeat expansions (ExpansionHunter)
  • SMN1: Paralog genes (Paraphase, PacBio HiFi)
  • diff --git a/tests/parity/golden/report-render/s-sexloss-detected/s-sexloss-detected.txt b/tests/parity/golden/report-render/s-sexloss-detected/s-sexloss-detected.txt index 6751794e9..382d3a61d 100644 --- a/tests/parity/golden/report-render/s-sexloss-detected/s-sexloss-detected.txt +++ b/tests/parity/golden/report-render/s-sexloss-detected/s-sexloss-detected.txt @@ -74,8 +74,8 @@ --- Insertions called: 3 (ALU 2, L1 1) FKTN SVA (Fukuyama; AR): callable (depth 30, not seen) - TAF1 SVA (XDP; XL): not callable (depth 2) - Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not callable: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. + TAF1 SVA (XDP; XL): not assessed (depth 2) + Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not assessed: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. ## Repeat Expansions (ExpansionHunter) --- @@ -215,9 +215,9 @@ LCE3B/LCE3C copies (from depth): 1 (estimate 1.0). Reading: one deleted CCL3L1/CCL3L3 copies (from depth): not assessed (low depth) GBA1, GBAP1 (agCN): 4 (2 region(s), quality 35.25 or more, filter PASS). Reading: agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy + PMS2, PMS2CL (agCN): chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual) STRC, STRCP1 (agCN): unreadable: S_strc_copy_number.tsv lacks the copy-number columns mytable (agCN): not assessed: no read over the locus - pms2 (agCN): chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual) Copy-number intervals (ClinGen recurrent regions, carrier deletions, AZF; from depth): 4 rows (3 called, 1 not assessed); 2 with a deletion or a duplication Deletion: AZFc (AZFc, chrY:23000001-26000000), 0 of 1 copies Duplication: dup (X1, chr1:2-2), 3 of 2 copies diff --git a/tests/parity/golden/report-render/s-sexloss-failed/s-sexloss-failed.html b/tests/parity/golden/report-render/s-sexloss-failed/s-sexloss-failed.html index 9fc3599a0..111e3d010 100644 --- a/tests/parity/golden/report-render/s-sexloss-failed/s-sexloss-failed.html +++ b/tests/parity/golden/report-render/s-sexloss-failed/s-sexloss-failed.html @@ -325,9 +325,9 @@

    Moved to class 3 by step 05's rules

    Mobile Element Insertions

    Step 50 · Complete · file date 2021-03-04 05:06 UTC · link to this section

    -

    Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not callable: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/<sample>_mei.tsv.

    +

    Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not assessed: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/<sample>_mei.tsv.

    Insertions called3 (ALU 2, L1 1)
    -
    GeneElementConditionInheritanceStatusDepthCall
    FKTNSVAFukuyamaARcallable30not seen
    TAF1SVAXDPXLnot callable2.
    +
    GeneElementConditionInheritanceStatusDepthCall
    FKTNSVAFukuyamaARcallable30not seen
    TAF1SVAXDPXLnot assessed2.
    @@ -488,7 +488,7 @@

    SMN1/SMN2 Copy Number (Parascopy)

    HP (haptoglobin) copies (from depth)2 (estimate 2.1). Reading: usual
    LCE3B/LCE3C copies (from depth)1 (estimate 1.0). Reading: one deleted
    CCL3L1/CCL3L3 copies (from depth)not assessed (low depth)
    -
    GenesCopies together (agCN)Reading
    GBA1, GBAP14 (2 region(s), quality 35.25 or more, filter PASS)agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy
    STRC, STRCP1unreadable: S_strc_copy_number.tsv lacks the copy-number columns.
    mytablenot assessed: no read over the locus.
    pms2chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual).
    +
    GenesCopies together (agCN)Reading
    GBA1, GBAP14 (2 region(s), quality 35.25 or more, filter PASS)agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy
    PMS2, PMS2CLchr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual).
    STRC, STRCP1unreadable: S_strc_copy_number.tsv lacks the copy-number columns.
    mytablenot assessed: no read over the locus.
    Copy-number intervals (ClinGen recurrent regions, carrier deletions, AZF; from depth)4 rows (3 called, 1 not assessed); 2 with a deletion or a duplication
    RegionRowPlaceCopiesChange
    AZFcAZFcchrY:23000001-260000000 of 1deletion
    dupX1chr1:2-23 of 2duplication
    @@ -911,7 +911,8 @@

    Genes and rsIDs in these results

  • MT-TK: Mitochondrial variants
  • MT-TL1: Mitochondrial variants
  • MT-TL2: Mitochondrial variants
  • -
  • PMS2: Paralog genes (Paraphase, PacBio HiFi)
  • +
  • PMS2: SMN1/SMN2 copy number (Parascopy, short reads), Paralog genes (Paraphase, PacBio HiFi)
  • +
  • PMS2CL: SMN1/SMN2 copy number (Parascopy, short reads)
  • RFC1: Repeat expansions (ExpansionHunter) (2)
  • SLC6A4: Repeat expansions (ExpansionHunter)
  • SMN1: Paralog genes (Paraphase, PacBio HiFi)
  • diff --git a/tests/parity/golden/report-render/s-sexloss-failed/s-sexloss-failed.txt b/tests/parity/golden/report-render/s-sexloss-failed/s-sexloss-failed.txt index 7664539ed..b87c7fa1c 100644 --- a/tests/parity/golden/report-render/s-sexloss-failed/s-sexloss-failed.txt +++ b/tests/parity/golden/report-render/s-sexloss-failed/s-sexloss-failed.txt @@ -74,8 +74,8 @@ --- Insertions called: 3 (ALU 2, L1 1) FKTN SVA (Fukuyama; AR): callable (depth 30, not seen) - TAF1 SVA (XDP; XL): not callable (depth 2) - Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not callable: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. + TAF1 SVA (XDP; XL): not assessed (depth 2) + Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not assessed: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. ## Repeat Expansions (ExpansionHunter) --- @@ -213,9 +213,9 @@ LCE3B/LCE3C copies (from depth): 1 (estimate 1.0). Reading: one deleted CCL3L1/CCL3L3 copies (from depth): not assessed (low depth) GBA1, GBAP1 (agCN): 4 (2 region(s), quality 35.25 or more, filter PASS). Reading: agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy + PMS2, PMS2CL (agCN): chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual) STRC, STRCP1 (agCN): unreadable: S_strc_copy_number.tsv lacks the copy-number columns mytable (agCN): not assessed: no read over the locus - pms2 (agCN): chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual) Copy-number intervals (ClinGen recurrent regions, carrier deletions, AZF; from depth): 4 rows (3 called, 1 not assessed); 2 with a deletion or a duplication Deletion: AZFc (AZFc, chrY:23000001-26000000), 0 of 1 copies Duplication: dup (X1, chr1:2-2), 3 of 2 copies diff --git a/tests/parity/golden/report-render/s-sexloss-gain-stale/s-sexloss-gain-stale.html b/tests/parity/golden/report-render/s-sexloss-gain-stale/s-sexloss-gain-stale.html index 60b9c0650..14af72369 100644 --- a/tests/parity/golden/report-render/s-sexloss-gain-stale/s-sexloss-gain-stale.html +++ b/tests/parity/golden/report-render/s-sexloss-gain-stale/s-sexloss-gain-stale.html @@ -325,9 +325,9 @@

    Moved to class 3 by step 05's rules

    Mobile Element Insertions

    Step 50 · Complete · file date 2021-03-04 05:06 UTC · link to this section

    -

    Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not callable: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/<sample>_mei.tsv.

    +

    Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not assessed: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/<sample>_mei.tsv.

    Insertions called3 (ALU 2, L1 1)
    -
    GeneElementConditionInheritanceStatusDepthCall
    FKTNSVAFukuyamaARcallable30not seen
    TAF1SVAXDPXLnot callable2.
    +
    GeneElementConditionInheritanceStatusDepthCall
    FKTNSVAFukuyamaARcallable30not seen
    TAF1SVAXDPXLnot assessed2.
    @@ -490,7 +490,7 @@

    SMN1/SMN2 Copy Number (Parascopy)

    HP (haptoglobin) copies (from depth)2 (estimate 2.1). Reading: usual
    LCE3B/LCE3C copies (from depth)1 (estimate 1.0). Reading: one deleted
    CCL3L1/CCL3L3 copies (from depth)not assessed (low depth)
    -
    GenesCopies together (agCN)Reading
    GBA1, GBAP14 (2 region(s), quality 35.25 or more, filter PASS)agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy
    STRC, STRCP1unreadable: S_strc_copy_number.tsv lacks the copy-number columns.
    mytablenot assessed: no read over the locus.
    pms2chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual).
    +
    GenesCopies together (agCN)Reading
    GBA1, GBAP14 (2 region(s), quality 35.25 or more, filter PASS)agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy
    PMS2, PMS2CLchr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual).
    STRC, STRCP1unreadable: S_strc_copy_number.tsv lacks the copy-number columns.
    mytablenot assessed: no read over the locus.
    Copy-number intervals (ClinGen recurrent regions, carrier deletions, AZF; from depth)4 rows (3 called, 1 not assessed); 2 with a deletion or a duplication
    RegionRowPlaceCopiesChange
    AZFcAZFcchrY:23000001-260000000 of 1deletion
    dupX1chr1:2-23 of 2duplication
    @@ -913,7 +913,8 @@

    Genes and rsIDs in these results

  • MT-TK: Mitochondrial variants
  • MT-TL1: Mitochondrial variants
  • MT-TL2: Mitochondrial variants
  • -
  • PMS2: Paralog genes (Paraphase, PacBio HiFi)
  • +
  • PMS2: SMN1/SMN2 copy number (Parascopy, short reads), Paralog genes (Paraphase, PacBio HiFi)
  • +
  • PMS2CL: SMN1/SMN2 copy number (Parascopy, short reads)
  • RFC1: Repeat expansions (ExpansionHunter) (2)
  • SLC6A4: Repeat expansions (ExpansionHunter)
  • SMN1: Paralog genes (Paraphase, PacBio HiFi)
  • diff --git a/tests/parity/golden/report-render/s-sexloss-gain-stale/s-sexloss-gain-stale.txt b/tests/parity/golden/report-render/s-sexloss-gain-stale/s-sexloss-gain-stale.txt index 48de9cd82..a056f59b9 100644 --- a/tests/parity/golden/report-render/s-sexloss-gain-stale/s-sexloss-gain-stale.txt +++ b/tests/parity/golden/report-render/s-sexloss-gain-stale/s-sexloss-gain-stale.txt @@ -74,8 +74,8 @@ --- Insertions called: 3 (ALU 2, L1 1) FKTN SVA (Fukuyama; AR): callable (depth 30, not seen) - TAF1 SVA (XDP; XL): not callable (depth 2) - Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not callable: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. + TAF1 SVA (XDP; XL): not assessed (depth 2) + Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not assessed: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. ## Repeat Expansions (ExpansionHunter) --- @@ -215,9 +215,9 @@ LCE3B/LCE3C copies (from depth): 1 (estimate 1.0). Reading: one deleted CCL3L1/CCL3L3 copies (from depth): not assessed (low depth) GBA1, GBAP1 (agCN): 4 (2 region(s), quality 35.25 or more, filter PASS). Reading: agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy + PMS2, PMS2CL (agCN): chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual) STRC, STRCP1 (agCN): unreadable: S_strc_copy_number.tsv lacks the copy-number columns mytable (agCN): not assessed: no read over the locus - pms2 (agCN): chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual) Copy-number intervals (ClinGen recurrent regions, carrier deletions, AZF; from depth): 4 rows (3 called, 1 not assessed); 2 with a deletion or a duplication Deletion: AZFc (AZFc, chrY:23000001-26000000), 0 of 1 copies Duplication: dup (X1, chr1:2-2), 3 of 2 copies diff --git a/tests/parity/golden/report-render/s-sexloss-not-estimated/s-sexloss-not-estimated.html b/tests/parity/golden/report-render/s-sexloss-not-estimated/s-sexloss-not-estimated.html index c66719d51..1ccc9d0c2 100644 --- a/tests/parity/golden/report-render/s-sexloss-not-estimated/s-sexloss-not-estimated.html +++ b/tests/parity/golden/report-render/s-sexloss-not-estimated/s-sexloss-not-estimated.html @@ -325,9 +325,9 @@

    Moved to class 3 by step 05's rules

    Mobile Element Insertions

    Step 50 · Complete · file date 2021-03-04 05:06 UTC · link to this section

    -

    Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not callable: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/<sample>_mei.tsv.

    +

    Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not assessed: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/<sample>_mei.tsv.

    Insertions called3 (ALU 2, L1 1)
    -
    GeneElementConditionInheritanceStatusDepthCall
    FKTNSVAFukuyamaARcallable30not seen
    TAF1SVAXDPXLnot callable2.
    +
    GeneElementConditionInheritanceStatusDepthCall
    FKTNSVAFukuyamaARcallable30not seen
    TAF1SVAXDPXLnot assessed2.
    @@ -489,7 +489,7 @@

    SMN1/SMN2 Copy Number (Parascopy)

    HP (haptoglobin) copies (from depth)2 (estimate 2.1). Reading: usual
    LCE3B/LCE3C copies (from depth)1 (estimate 1.0). Reading: one deleted
    CCL3L1/CCL3L3 copies (from depth)not assessed (low depth)
    -
    GenesCopies together (agCN)Reading
    GBA1, GBAP14 (2 region(s), quality 35.25 or more, filter PASS)agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy
    STRC, STRCP1unreadable: S_strc_copy_number.tsv lacks the copy-number columns.
    mytablenot assessed: no read over the locus.
    pms2chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual).
    +
    GenesCopies together (agCN)Reading
    GBA1, GBAP14 (2 region(s), quality 35.25 or more, filter PASS)agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy
    PMS2, PMS2CLchr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual).
    STRC, STRCP1unreadable: S_strc_copy_number.tsv lacks the copy-number columns.
    mytablenot assessed: no read over the locus.
    Copy-number intervals (ClinGen recurrent regions, carrier deletions, AZF; from depth)4 rows (3 called, 1 not assessed); 2 with a deletion or a duplication
    RegionRowPlaceCopiesChange
    AZFcAZFcchrY:23000001-260000000 of 1deletion
    dupX1chr1:2-23 of 2duplication
    @@ -912,7 +912,8 @@

    Genes and rsIDs in these results

  • MT-TK: Mitochondrial variants
  • MT-TL1: Mitochondrial variants
  • MT-TL2: Mitochondrial variants
  • -
  • PMS2: Paralog genes (Paraphase, PacBio HiFi)
  • +
  • PMS2: SMN1/SMN2 copy number (Parascopy, short reads), Paralog genes (Paraphase, PacBio HiFi)
  • +
  • PMS2CL: SMN1/SMN2 copy number (Parascopy, short reads)
  • RFC1: Repeat expansions (ExpansionHunter) (2)
  • SLC6A4: Repeat expansions (ExpansionHunter)
  • SMN1: Paralog genes (Paraphase, PacBio HiFi)
  • diff --git a/tests/parity/golden/report-render/s-sexloss-not-estimated/s-sexloss-not-estimated.txt b/tests/parity/golden/report-render/s-sexloss-not-estimated/s-sexloss-not-estimated.txt index 830e74de4..53316582a 100644 --- a/tests/parity/golden/report-render/s-sexloss-not-estimated/s-sexloss-not-estimated.txt +++ b/tests/parity/golden/report-render/s-sexloss-not-estimated/s-sexloss-not-estimated.txt @@ -74,8 +74,8 @@ --- Insertions called: 3 (ALU 2, L1 1) FKTN SVA (Fukuyama; AR): callable (depth 30, not seen) - TAF1 SVA (XDP; XL): not callable (depth 2) - Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not callable: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. + TAF1 SVA (XDP; XL): not assessed (depth 2) + Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not assessed: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. ## Repeat Expansions (ExpansionHunter) --- @@ -214,9 +214,9 @@ LCE3B/LCE3C copies (from depth): 1 (estimate 1.0). Reading: one deleted CCL3L1/CCL3L3 copies (from depth): not assessed (low depth) GBA1, GBAP1 (agCN): 4 (2 region(s), quality 35.25 or more, filter PASS). Reading: agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy + PMS2, PMS2CL (agCN): chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual) STRC, STRCP1 (agCN): unreadable: S_strc_copy_number.tsv lacks the copy-number columns mytable (agCN): not assessed: no read over the locus - pms2 (agCN): chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual) Copy-number intervals (ClinGen recurrent regions, carrier deletions, AZF; from depth): 4 rows (3 called, 1 not assessed); 2 with a deletion or a duplication Deletion: AZFc (AZFc, chrY:23000001-26000000), 0 of 1 copies Duplication: dup (X1, chr1:2-2), 3 of 2 copies diff --git a/tests/parity/golden/report-render/s-sexloss-odd/s-sexloss-odd.html b/tests/parity/golden/report-render/s-sexloss-odd/s-sexloss-odd.html index 6c75bd5d3..b98b34d8f 100644 --- a/tests/parity/golden/report-render/s-sexloss-odd/s-sexloss-odd.html +++ b/tests/parity/golden/report-render/s-sexloss-odd/s-sexloss-odd.html @@ -325,9 +325,9 @@

    Moved to class 3 by step 05's rules

    Mobile Element Insertions

    Step 50 · Complete · file date 2021-03-04 05:06 UTC · link to this section

    -

    Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not callable: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/<sample>_mei.tsv.

    +

    Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not assessed: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/<sample>_mei.tsv.

    Insertions called3 (ALU 2, L1 1)
    -
    GeneElementConditionInheritanceStatusDepthCall
    FKTNSVAFukuyamaARcallable30not seen
    TAF1SVAXDPXLnot callable2.
    +
    GeneElementConditionInheritanceStatusDepthCall
    FKTNSVAFukuyamaARcallable30not seen
    TAF1SVAXDPXLnot assessed2.
    @@ -490,7 +490,7 @@

    SMN1/SMN2 Copy Number (Parascopy)

    HP (haptoglobin) copies (from depth)2 (estimate 2.1). Reading: usual
    LCE3B/LCE3C copies (from depth)1 (estimate 1.0). Reading: one deleted
    CCL3L1/CCL3L3 copies (from depth)not assessed (low depth)
    -
    GenesCopies together (agCN)Reading
    GBA1, GBAP14 (2 region(s), quality 35.25 or more, filter PASS)agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy
    STRC, STRCP1unreadable: S_strc_copy_number.tsv lacks the copy-number columns.
    mytablenot assessed: no read over the locus.
    pms2chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual).
    +
    GenesCopies together (agCN)Reading
    GBA1, GBAP14 (2 region(s), quality 35.25 or more, filter PASS)agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy
    PMS2, PMS2CLchr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual).
    STRC, STRCP1unreadable: S_strc_copy_number.tsv lacks the copy-number columns.
    mytablenot assessed: no read over the locus.
    Copy-number intervals (ClinGen recurrent regions, carrier deletions, AZF; from depth)4 rows (3 called, 1 not assessed); 2 with a deletion or a duplication
    RegionRowPlaceCopiesChange
    AZFcAZFcchrY:23000001-260000000 of 1deletion
    dupX1chr1:2-23 of 2duplication
    @@ -913,7 +913,8 @@

    Genes and rsIDs in these results

  • MT-TK: Mitochondrial variants
  • MT-TL1: Mitochondrial variants
  • MT-TL2: Mitochondrial variants
  • -
  • PMS2: Paralog genes (Paraphase, PacBio HiFi)
  • +
  • PMS2: SMN1/SMN2 copy number (Parascopy, short reads), Paralog genes (Paraphase, PacBio HiFi)
  • +
  • PMS2CL: SMN1/SMN2 copy number (Parascopy, short reads)
  • RFC1: Repeat expansions (ExpansionHunter) (2)
  • SLC6A4: Repeat expansions (ExpansionHunter)
  • SMN1: Paralog genes (Paraphase, PacBio HiFi)
  • diff --git a/tests/parity/golden/report-render/s-sexloss-odd/s-sexloss-odd.txt b/tests/parity/golden/report-render/s-sexloss-odd/s-sexloss-odd.txt index d00113a51..3ed3b4fd3 100644 --- a/tests/parity/golden/report-render/s-sexloss-odd/s-sexloss-odd.txt +++ b/tests/parity/golden/report-render/s-sexloss-odd/s-sexloss-odd.txt @@ -74,8 +74,8 @@ --- Insertions called: 3 (ALU 2, L1 1) FKTN SVA (Fukuyama; AR): callable (depth 30, not seen) - TAF1 SVA (XDP; XL): not callable (depth 2) - Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not callable: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. + TAF1 SVA (XDP; XL): not assessed (depth 2) + Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not assessed: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. ## Repeat Expansions (ExpansionHunter) --- @@ -215,9 +215,9 @@ LCE3B/LCE3C copies (from depth): 1 (estimate 1.0). Reading: one deleted CCL3L1/CCL3L3 copies (from depth): not assessed (low depth) GBA1, GBAP1 (agCN): 4 (2 region(s), quality 35.25 or more, filter PASS). Reading: agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy + PMS2, PMS2CL (agCN): chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual) STRC, STRCP1 (agCN): unreadable: S_strc_copy_number.tsv lacks the copy-number columns mytable (agCN): not assessed: no read over the locus - pms2 (agCN): chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual) Copy-number intervals (ClinGen recurrent regions, carrier deletions, AZF; from depth): 4 rows (3 called, 1 not assessed); 2 with a deletion or a duplication Deletion: AZFc (AZFc, chrY:23000001-26000000), 0 of 1 copies Duplication: dup (X1, chr1:2-2), 3 of 2 copies diff --git a/tests/parity/golden/report-render/s-sv-mixed/s-sv-mixed.html b/tests/parity/golden/report-render/s-sv-mixed/s-sv-mixed.html index 7a2435926..499361d61 100644 --- a/tests/parity/golden/report-render/s-sv-mixed/s-sv-mixed.html +++ b/tests/parity/golden/report-render/s-sv-mixed/s-sv-mixed.html @@ -320,9 +320,9 @@

    Structural Variants, Class 4 and 5 (AnnotSV)

    Mobile Element Insertions

    Step 50 · Complete · file date 2021-03-04 05:06 UTC · link to this section

    -

    Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not callable: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/<sample>_mei.tsv.

    +

    Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not assessed: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/<sample>_mei.tsv.

    Insertions called3 (ALU 2, L1 1)
    -
    GeneElementConditionInheritanceStatusDepthCall
    FKTNSVAFukuyamaARcallable30not seen
    TAF1SVAXDPXLnot callable2.
    +
    GeneElementConditionInheritanceStatusDepthCall
    FKTNSVAFukuyamaARcallable30not seen
    TAF1SVAXDPXLnot assessed2.
    @@ -482,7 +482,7 @@

    SMN1/SMN2 Copy Number (Parascopy)

    HP (haptoglobin) copies (from depth)2 (estimate 2.1). Reading: usual
    LCE3B/LCE3C copies (from depth)1 (estimate 1.0). Reading: one deleted
    CCL3L1/CCL3L3 copies (from depth)not assessed (low depth)
    -
    GenesCopies together (agCN)Reading
    GBA1, GBAP14 (2 region(s), quality 35.25 or more, filter PASS)agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy
    STRC, STRCP1unreadable: S_strc_copy_number.tsv lacks the copy-number columns.
    mytablenot assessed: no read over the locus.
    pms2chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual).
    +
    GenesCopies together (agCN)Reading
    GBA1, GBAP14 (2 region(s), quality 35.25 or more, filter PASS)agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy
    PMS2, PMS2CLchr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual).
    STRC, STRCP1unreadable: S_strc_copy_number.tsv lacks the copy-number columns.
    mytablenot assessed: no read over the locus.
    Copy-number intervals (ClinGen recurrent regions, carrier deletions, AZF; from depth)4 rows (3 called, 1 not assessed); 2 with a deletion or a duplication
    RegionRowPlaceCopiesChange
    AZFcAZFcchrY:23000001-260000000 of 1deletion
    dupX1chr1:2-23 of 2duplication
    @@ -903,7 +903,8 @@

    Genes and rsIDs in these results

  • MT-TK: Mitochondrial variants
  • MT-TL1: Mitochondrial variants
  • MT-TL2: Mitochondrial variants
  • -
  • PMS2: Paralog genes (Paraphase, PacBio HiFi)
  • +
  • PMS2: SMN1/SMN2 copy number (Parascopy, short reads), Paralog genes (Paraphase, PacBio HiFi)
  • +
  • PMS2CL: SMN1/SMN2 copy number (Parascopy, short reads)
  • RFC1: Repeat expansions (ExpansionHunter) (2)
  • SLC6A4: Repeat expansions (ExpansionHunter)
  • SMN1: Paralog genes (Paraphase, PacBio HiFi)
  • diff --git a/tests/parity/golden/report-render/s-sv-mixed/s-sv-mixed.txt b/tests/parity/golden/report-render/s-sv-mixed/s-sv-mixed.txt index eb63e27e6..75559f7f8 100644 --- a/tests/parity/golden/report-render/s-sv-mixed/s-sv-mixed.txt +++ b/tests/parity/golden/report-render/s-sv-mixed/s-sv-mixed.txt @@ -59,8 +59,8 @@ --- Insertions called: 3 (ALU 2, L1 1) FKTN SVA (Fukuyama; AR): callable (depth 30, not seen) - TAF1 SVA (XDP; XL): not callable (depth 2) - Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not callable: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. + TAF1 SVA (XDP; XL): not assessed (depth 2) + Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not assessed: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. ## Repeat Expansions (ExpansionHunter) --- @@ -194,9 +194,9 @@ LCE3B/LCE3C copies (from depth): 1 (estimate 1.0). Reading: one deleted CCL3L1/CCL3L3 copies (from depth): not assessed (low depth) GBA1, GBAP1 (agCN): 4 (2 region(s), quality 35.25 or more, filter PASS). Reading: agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy + PMS2, PMS2CL (agCN): chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual) STRC, STRCP1 (agCN): unreadable: S_strc_copy_number.tsv lacks the copy-number columns mytable (agCN): not assessed: no read over the locus - pms2 (agCN): chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual) Copy-number intervals (ClinGen recurrent regions, carrier deletions, AZF; from depth): 4 rows (3 called, 1 not assessed); 2 with a deletion or a duplication Deletion: AZFc (AZFc, chrY:23000001-26000000), 0 of 1 copies Duplication: dup (X1, chr1:2-2), 3 of 2 copies diff --git a/tests/parity/golden/report-render/s-sv-stale/s-sv-stale.html b/tests/parity/golden/report-render/s-sv-stale/s-sv-stale.html index 892521f9d..6b82238ff 100644 --- a/tests/parity/golden/report-render/s-sv-stale/s-sv-stale.html +++ b/tests/parity/golden/report-render/s-sv-stale/s-sv-stale.html @@ -329,9 +329,9 @@

    Moved to class 3 by step 05's rules

    Mobile Element Insertions

    Step 50 · Complete · file date 2021-03-04 05:06 UTC · link to this section

    -

    Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not callable: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/<sample>_mei.tsv.

    +

    Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not assessed: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/<sample>_mei.tsv.

    Insertions called3 (ALU 2, L1 1)
    -
    GeneElementConditionInheritanceStatusDepthCall
    FKTNSVAFukuyamaARcallable30not seen
    TAF1SVAXDPXLnot callable2.
    +
    GeneElementConditionInheritanceStatusDepthCall
    FKTNSVAFukuyamaARcallable30not seen
    TAF1SVAXDPXLnot assessed2.
    @@ -491,7 +491,7 @@

    SMN1/SMN2 Copy Number (Parascopy)

    HP (haptoglobin) copies (from depth)2 (estimate 2.1). Reading: usual
    LCE3B/LCE3C copies (from depth)1 (estimate 1.0). Reading: one deleted
    CCL3L1/CCL3L3 copies (from depth)not assessed (low depth)
    -
    GenesCopies together (agCN)Reading
    GBA1, GBAP14 (2 region(s), quality 35.25 or more, filter PASS)agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy
    STRC, STRCP1unreadable: S_strc_copy_number.tsv lacks the copy-number columns.
    mytablenot assessed: no read over the locus.
    pms2chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual).
    +
    GenesCopies together (agCN)Reading
    GBA1, GBAP14 (2 region(s), quality 35.25 or more, filter PASS)agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy
    PMS2, PMS2CLchr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual).
    STRC, STRCP1unreadable: S_strc_copy_number.tsv lacks the copy-number columns.
    mytablenot assessed: no read over the locus.
    Copy-number intervals (ClinGen recurrent regions, carrier deletions, AZF; from depth)4 rows (3 called, 1 not assessed); 2 with a deletion or a duplication
    RegionRowPlaceCopiesChange
    AZFcAZFcchrY:23000001-260000000 of 1deletion
    dupX1chr1:2-23 of 2duplication
    @@ -914,7 +914,8 @@

    Genes and rsIDs in these results

  • MT-TK: Mitochondrial variants
  • MT-TL1: Mitochondrial variants
  • MT-TL2: Mitochondrial variants
  • -
  • PMS2: Paralog genes (Paraphase, PacBio HiFi)
  • +
  • PMS2: SMN1/SMN2 copy number (Parascopy, short reads), Paralog genes (Paraphase, PacBio HiFi)
  • +
  • PMS2CL: SMN1/SMN2 copy number (Parascopy, short reads)
  • RFC1: Repeat expansions (ExpansionHunter) (2)
  • SLC6A4: Repeat expansions (ExpansionHunter)
  • SMN1: Paralog genes (Paraphase, PacBio HiFi)
  • diff --git a/tests/parity/golden/report-render/s-sv-stale/s-sv-stale.txt b/tests/parity/golden/report-render/s-sv-stale/s-sv-stale.txt index 1c323ae13..6ae6b328c 100644 --- a/tests/parity/golden/report-render/s-sv-stale/s-sv-stale.txt +++ b/tests/parity/golden/report-render/s-sv-stale/s-sv-stale.txt @@ -78,8 +78,8 @@ --- Insertions called: 3 (ALU 2, L1 1) FKTN SVA (Fukuyama; AR): callable (depth 30, not seen) - TAF1 SVA (XDP; XL): not callable (depth 2) - Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not callable: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. + TAF1 SVA (XDP; XL): not assessed (depth 2) + Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not assessed: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Call filtered out: MEGAnE called an insertion there but flagged it (LC is low confidence), so it is not a finding, and not proof of absence either. Every call: mei/_mei.tsv. ## Repeat Expansions (ExpansionHunter) --- @@ -213,9 +213,9 @@ LCE3B/LCE3C copies (from depth): 1 (estimate 1.0). Reading: one deleted CCL3L1/CCL3L3 copies (from depth): not assessed (low depth) GBA1, GBAP1 (agCN): 4 (2 region(s), quality 35.25 or more, filter PASS). Reading: agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy + PMS2, PMS2CL (agCN): chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual) STRC, STRCP1 (agCN): unreadable: S_strc_copy_number.tsv lacks the copy-number columns mytable (agCN): not assessed: no read over the locus - pms2 (agCN): chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual) Copy-number intervals (ClinGen recurrent regions, carrier deletions, AZF; from depth): 4 rows (3 called, 1 not assessed); 2 with a deletion or a duplication Deletion: AZFc (AZFc, chrY:23000001-26000000), 0 of 1 copies Duplication: dup (X1, chr1:2-2), 3 of 2 copies diff --git a/tests/parity/golden/summary-collect/all-history/all-history.json b/tests/parity/golden/summary-collect/all-history/all-history.json index e953a1fcc..310411e7b 100644 --- a/tests/parity/golden/summary-collect/all-history/all-history.json +++ b/tests/parity/golden/summary-collect/all-history/all-history.json @@ -12041,7 +12041,7 @@ "gene": "PMS2", "owner": "parascopy", "owner_step": "35", - "owner_status": "not run", + "owner_status": "ran", "share": 0.0, "status": "not read" }, @@ -13297,6 +13297,15 @@ "cn": 4, "text": "4 (2 region(s), quality 35.25 or more, filter PASS)" }, + { + "table": "pms2_pms2cl", + "genes": "PMS2,PMS2CL", + "tag": "SF", + "reading": ".", + "status": "called", + "cn": null, + "text": "chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual)" + }, { "table": "strc", "genes": "STRC,STRCP1", @@ -13314,15 +13323,6 @@ "status": "not assessed", "cn": null, "text": "not assessed: no read over the locus" - }, - { - "table": "pms2", - "genes": "pms2", - "tag": ".", - "reading": ".", - "status": "called", - "cn": null, - "text": "chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual)" } ] } @@ -15343,7 +15343,7 @@ "element": "SVA", "condition": "XDP", "inheritance": "XL", - "status": "not callable", + "status": "not assessed", "mean_depth": "2", "call": "." } diff --git a/tests/parity/golden/summary-collect/all/all.json b/tests/parity/golden/summary-collect/all/all.json index e3efc56ab..4bada63de 100644 --- a/tests/parity/golden/summary-collect/all/all.json +++ b/tests/parity/golden/summary-collect/all/all.json @@ -12046,7 +12046,7 @@ "gene": "PMS2", "owner": "parascopy", "owner_step": "35", - "owner_status": "not run", + "owner_status": "ran", "share": 0.0, "status": "not read" }, @@ -13302,6 +13302,15 @@ "cn": 4, "text": "4 (2 region(s), quality 35.25 or more, filter PASS)" }, + { + "table": "pms2_pms2cl", + "genes": "PMS2,PMS2CL", + "tag": "SF", + "reading": ".", + "status": "called", + "cn": null, + "text": "chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual)" + }, { "table": "strc", "genes": "STRC,STRCP1", @@ -13319,15 +13328,6 @@ "status": "not assessed", "cn": null, "text": "not assessed: no read over the locus" - }, - { - "table": "pms2", - "genes": "pms2", - "tag": ".", - "reading": ".", - "status": "called", - "cn": null, - "text": "chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual)" } ] } @@ -15348,7 +15348,7 @@ "element": "SVA", "condition": "XDP", "inheritance": "XL", - "status": "not callable", + "status": "not assessed", "mean_depth": "2", "call": "." } diff --git a/tests/parity/golden/summary-collect/c-float--inf/float--inf.json b/tests/parity/golden/summary-collect/c-float--inf/float--inf.json index 0379028c6..3a2b92f42 100644 --- a/tests/parity/golden/summary-collect/c-float--inf/float--inf.json +++ b/tests/parity/golden/summary-collect/c-float--inf/float--inf.json @@ -156,6 +156,15 @@ "cn": 4, "text": "4 (2 region(s), quality 35.25 or more, filter PASS)" }, + { + "table": "pms2_pms2cl", + "genes": "PMS2,PMS2CL", + "tag": "SF", + "reading": ".", + "status": "not resolved", + "cn": null, + "text": "chr7:5970001-5980000 4 (quality -inf, filter PASS); chr7:5980001-5990000 3 (quality -inf, filter LowQual): no region with a whole copy number, filter PASS and quality 20 or more" + }, { "table": "strc", "genes": "STRC,STRCP1", @@ -173,15 +182,6 @@ "status": "not assessed", "cn": null, "text": "not assessed: no read over the locus" - }, - { - "table": "pms2", - "genes": "pms2", - "tag": ".", - "reading": ".", - "status": "not resolved", - "cn": null, - "text": "chr7:5970001-5980000 4 (quality -inf, filter PASS); chr7:5980001-5990000 3 (quality -inf, filter LowQual): no region with a whole copy number, filter PASS and quality 20 or more" } ] } @@ -1950,7 +1950,7 @@ "element": "SVA", "condition": "XDP", "inheritance": "XL", - "status": "not callable", + "status": "not assessed", "mean_depth": "2", "call": "." } diff --git a/tests/parity/golden/summary-collect/c-float-inf/float-inf.json b/tests/parity/golden/summary-collect/c-float-inf/float-inf.json index e4c59ac1a..d0e0b6099 100644 --- a/tests/parity/golden/summary-collect/c-float-inf/float-inf.json +++ b/tests/parity/golden/summary-collect/c-float-inf/float-inf.json @@ -156,6 +156,15 @@ "cn": 4, "text": "4 (2 region(s), quality 35.25 or more, filter PASS)" }, + { + "table": "pms2_pms2cl", + "genes": "PMS2,PMS2CL", + "tag": "SF", + "reading": ".", + "status": "called", + "cn": null, + "text": "chr7:5970001-5980000 4 (quality inf, filter PASS); chr7:5980001-5990000 3 (quality inf, filter LowQual)" + }, { "table": "strc", "genes": "STRC,STRCP1", @@ -173,15 +182,6 @@ "status": "not assessed", "cn": null, "text": "not assessed: no read over the locus" - }, - { - "table": "pms2", - "genes": "pms2", - "tag": ".", - "reading": ".", - "status": "called", - "cn": null, - "text": "chr7:5970001-5980000 4 (quality inf, filter PASS); chr7:5980001-5990000 3 (quality inf, filter LowQual)" } ] } @@ -1962,7 +1962,7 @@ "element": "SVA", "condition": "XDP", "inheritance": "XL", - "status": "not callable", + "status": "not assessed", "mean_depth": "2", "call": "." } diff --git a/tests/parity/golden/summary-collect/c-float-nan/float-nan.json b/tests/parity/golden/summary-collect/c-float-nan/float-nan.json index 59dd4d7ea..5d5291830 100644 --- a/tests/parity/golden/summary-collect/c-float-nan/float-nan.json +++ b/tests/parity/golden/summary-collect/c-float-nan/float-nan.json @@ -156,6 +156,15 @@ "cn": 4, "text": "4 (2 region(s), quality 35.25 or more, filter PASS)" }, + { + "table": "pms2_pms2cl", + "genes": "PMS2,PMS2CL", + "tag": "SF", + "reading": ".", + "status": "not resolved", + "cn": null, + "text": "chr7:5970001-5980000 4 (quality nan, filter PASS); chr7:5980001-5990000 3 (quality nan, filter LowQual): no region with a whole copy number, filter PASS and quality 20 or more" + }, { "table": "strc", "genes": "STRC,STRCP1", @@ -173,15 +182,6 @@ "status": "not assessed", "cn": null, "text": "not assessed: no read over the locus" - }, - { - "table": "pms2", - "genes": "pms2", - "tag": ".", - "reading": ".", - "status": "not resolved", - "cn": null, - "text": "chr7:5970001-5980000 4 (quality nan, filter PASS); chr7:5980001-5990000 3 (quality nan, filter LowQual): no region with a whole copy number, filter PASS and quality 20 or more" } ] } @@ -1914,7 +1914,7 @@ "element": "SVA", "condition": "XDP", "inheritance": "XL", - "status": "not callable", + "status": "not assessed", "mean_depth": "2", "call": "." } diff --git a/tests/parity/golden/summary-collect/c-full/full.json b/tests/parity/golden/summary-collect/c-full/full.json index 169b71826..fe10d99e0 100644 --- a/tests/parity/golden/summary-collect/c-full/full.json +++ b/tests/parity/golden/summary-collect/c-full/full.json @@ -156,6 +156,15 @@ "cn": 4, "text": "4 (2 region(s), quality 35.25 or more, filter PASS)" }, + { + "table": "pms2_pms2cl", + "genes": "PMS2,PMS2CL", + "tag": "SF", + "reading": ".", + "status": "called", + "cn": null, + "text": "chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual)" + }, { "table": "strc", "genes": "STRC,STRCP1", @@ -173,15 +182,6 @@ "status": "not assessed", "cn": null, "text": "not assessed: no read over the locus" - }, - { - "table": "pms2", - "genes": "pms2", - "tag": ".", - "reading": ".", - "status": "called", - "cn": null, - "text": "chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual)" } ] } @@ -2197,7 +2197,7 @@ "element": "SVA", "condition": "XDP", "inheritance": "XL", - "status": "not callable", + "status": "not assessed", "mean_depth": "2", "call": "." } diff --git a/tests/parity/golden/summary-collect/c-pms2-legacy/exit b/tests/parity/golden/summary-collect/c-pms2-legacy/exit new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/tests/parity/golden/summary-collect/c-pms2-legacy/exit @@ -0,0 +1 @@ +0 diff --git a/tests/parity/golden/summary-collect/c-pms2-legacy/pms2-legacy.json b/tests/parity/golden/summary-collect/c-pms2-legacy/pms2-legacy.json new file mode 100644 index 000000000..914135838 --- /dev/null +++ b/tests/parity/golden/summary-collect/c-pms2-legacy/pms2-legacy.json @@ -0,0 +1,348 @@ +{ + "schema_version": 2, + "sample": "S", + "generated_utc": "2026-11-29 12:28 UTC", + "run": { + "status_file": false, + "started_utc": null, + "declared_sex": null + }, + "databases": { + "clinvar_release": null, + "cpsr_clinvar_release": null, + "hla_database": null + }, + "manifest": [], + "sections": { + "couple": { + "title": "Couple carrier screen", + "step": "39", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "parascopy": { + "title": "SMN1/SMN2 copy number (Parascopy, short reads)", + "step": "35", + "state": "ok", + "source": "paralogs/S_pms2_copy_number.tsv", + "file_date": "2021-03-04 05:06 UTC", + "note": null, + "data": { + "smn1": { + "cn": null, + "text": "no SMN1 table (step 35 wrote no SMN copy-number table)", + "agcn": ".", + "agcn_qual": ".", + "agcn_filter": "." + }, + "smn2": { + "cn": null, + "text": "no SMN1 table (step 35 wrote no SMN copy-number table)" + }, + "agcn": ".", + "agcn_qual": ".", + "agcn_filter": ".", + "smn1_marker": { + "marker": "SMN1 g.27134T>G", + "rsid": "rs143838139", + "status": "not assessed", + "alt_reads": ".", + "depth": ".", + "fraction": ".", + "copies": ".", + "message": "SMN1 g.27134T>G: not assessed, step 35 wrote no S_smn1_marker.tsv (a run from before this reader, or the check did not run)." + }, + "rows": 0, + "hba": null, + "cn_intervals": null, + "cyp21a2": null, + "dosage": null, + "reading": "no SMN1 table (step 35 wrote no SMN copy-number table): no carrier reading", + "loci": [ + { + "table": "pms2", + "genes": "pms2", + "tag": ".", + "reading": ".", + "status": "called", + "cn": null, + "text": "chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual)" + } + ] + } + }, + "paralogs": { + "title": "Paralog genes (Paraphase, PacBio HiFi)", + "step": "35b", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "hla": { + "title": "HLA typing (T1K)", + "step": "08", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "prs": { + "title": "Polygenic risk scores", + "step": "25", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "ancestry_fine": { + "title": "Fine-grained ancestry", + "step": "26b", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "manta": { + "title": "Structural variants (Manta)", + "step": "04", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "delly": { + "title": "Structural variants (Delly)", + "step": "19", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "cnvpytor": { + "title": "Copy number (CNVpytor)", + "step": "18", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "sv_consensus": { + "title": "SV consensus merge", + "step": "22", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "annotsv": { + "title": "Structural variants, class 4 and 5 (AnnotSV)", + "step": "05", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "expansions": { + "title": "Repeat expansions (ExpansionHunter)", + "step": "09", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "telomere": { + "title": "Telomere content (TelomereHunter)", + "step": "10", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "roh": { + "title": "Runs of homozygosity", + "step": "11", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "haplogroup": { + "title": "Mitochondrial haplogroup", + "step": "12", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "y_haplogroup": { + "title": "Y-chromosome haplogroup (Yleaf)", + "step": "37", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "y_tree": { + "title": "Y placement on the current public tree", + "step": "37", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "y_str": { + "title": "Y-STR markers (HipSTR)", + "step": "45", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "consumer_export": { + "title": "Raw-data export (23andMe v5 layout)", + "step": "40", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "bloodtype": { + "title": "Blood groups (predicted)", + "step": "41", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "lpa": { + "title": "Lp(a): LPA KIV-2 repeat count", + "step": "46", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "vntyper": { + "title": "MUC1 VNTR frameshifts (VNtyper)", + "step": "52", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "locityper": { + "title": "Locityper second opinion at hard loci", + "step": "53", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "mito": { + "title": "Mitochondrial variants", + "step": "20", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "traits": { + "title": "Traits panel", + "step": "42", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "archaic": { + "title": "Archaic ancestry (IBDmix)", + "step": "43", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "ancient": { + "title": "Ancient populations (AADR PCA)", + "step": "44", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "viral": { + "title": "Viral DNA in the unmapped reads", + "step": "47", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "exomiser": { + "title": "Symptom-driven ranking (Exomiser)", + "step": "48", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "chip": { + "title": "Clonal haematopoiesis (CHIP)", + "step": "49", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "mei": { + "title": "Mobile element insertions (MEGAnE)", + "step": "50", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "mosaic": { + "title": "Mosaic chromosomal alterations (MoChA)", + "step": "51", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + } + } +} diff --git a/tests/parity/golden/summary-collect/c-pms2-legacy/stderr b/tests/parity/golden/summary-collect/c-pms2-legacy/stderr new file mode 100644 index 000000000..e69de29bb diff --git a/tests/parity/golden/summary-collect/c-pms2-legacy/stdout b/tests/parity/golden/summary-collect/c-pms2-legacy/stdout new file mode 100644 index 000000000..cfcc2ef73 --- /dev/null +++ b/tests/parity/golden/summary-collect/c-pms2-legacy/stdout @@ -0,0 +1 @@ +Summary written: pms2-legacy.json diff --git a/tests/parity/inputs/pgx-cyp2d6-check/shallow_flanks.q0.bed b/tests/parity/inputs/pgx-cyp2d6-check/shallow_flanks.q0.bed new file mode 100644 index 000000000..003e820b0 --- /dev/null +++ b/tests/parity/inputs/pgx-cyp2d6-check/shallow_flanks.q0.bed @@ -0,0 +1,3 @@ +chr22 42050000 42100000 flank 10.0 +chr22 42123192 42132032 CYP2D6 8.0 +chr22 42200000 42250000 flank 10.0 diff --git a/tests/parity/inputs/pgx-cyp2d6-check/shallow_flanks.q1.bed b/tests/parity/inputs/pgx-cyp2d6-check/shallow_flanks.q1.bed new file mode 100644 index 000000000..3210c6663 --- /dev/null +++ b/tests/parity/inputs/pgx-cyp2d6-check/shallow_flanks.q1.bed @@ -0,0 +1,3 @@ +chr22 42050000 42100000 flank 9.9 +chr22 42123192 42132032 CYP2D6 7.9 +chr22 42200000 42250000 flank 9.9 diff --git a/tests/parity/known.tsv b/tests/parity/known.tsv index db280aa82..a6f4d7c3c 100644 --- a/tests/parity/known.tsv +++ b/tests/parity/known.tsv @@ -150,3 +150,84 @@ consumer export-old-table stderr og consumer export refuses a site table without consumer export-old-table out/S_23andme_v5.zip og consumer export refuses a site table without the '## table_format: 2' line (built before the strand came from the liftover chain) with exit 2 and the rebuild command, where the oracle exported it consumer export-old-table out/S_ancestrydna_layout.zip og consumer export refuses a site table without the '## table_format: 2' line (built before the strand came from the liftover chain) with exit 2 and the rebuild command, where the oracle exported it consumer export-old-table out/S_consumer_export.tsv og consumer export refuses a site table without the '## table_format: 2' line (built before the strand came from the liftover chain) with exit 2 and the rebuild command, where the oracle exported it + +# MEI wording and the step 35 PMS2 fixture. +mei-report catalog s.tsv step 50 uses not assessed for sites with too few reads +mei-report empty-depth s.tsv step 50 uses not assessed for sites with too few reads +mei-report thin-no-call s.tsv step 50 uses not assessed for sites with too few reads +mei-report thin s.tsv step 50 uses not assessed for sites with too few reads +mei-report two-windows s.tsv step 50 uses not assessed for sites with too few reads +summary-collect all-history all-history.json use the catalogued step 35 PMS2 table and the not assessed MEI status +summary-collect all all.json use the catalogued step 35 PMS2 table and the not assessed MEI status +summary-collect c-float--inf float--inf.json use the catalogued step 35 PMS2 table and the not assessed MEI status +summary-collect c-float-inf float-inf.json use the catalogued step 35 PMS2 table and the not assessed MEI status +summary-collect c-float-nan float-nan.json use the catalogued step 35 PMS2 table and the not assessed MEI status +summary-collect c-full full.json use the catalogued step 35 PMS2 table and the not assessed MEI status +report-render a-escape a-escape.html report unassessed MEI sites and use the catalogued step 35 PMS2 table +report-render a-escape a-escape.txt report unassessed MEI sites and use the catalogued step 35 PMS2 table +report-render a-failed a-failed.html report unassessed MEI sites and use the catalogued step 35 PMS2 table +report-render a-failed a-failed.txt report unassessed MEI sites and use the catalogued step 35 PMS2 table +report-render a-full a-full.html report unassessed MEI sites and use the catalogued step 35 PMS2 table +report-render a-full a-full.txt report unassessed MEI sites and use the catalogued step 35 PMS2 table +report-render a-missing a-missing.html report unassessed MEI sites and use the catalogued step 35 PMS2 table +report-render a-missing a-missing.txt report unassessed MEI sites and use the catalogued step 35 PMS2 table +report-render a-no-painting a-no-painting.html report unassessed MEI sites and use the catalogued step 35 PMS2 table +report-render a-no-painting a-no-painting.txt report unassessed MEI sites and use the catalogued step 35 PMS2 table +report-render a-numbers a-numbers.txt report unassessed MEI sites and use the catalogued step 35 PMS2 table +report-render a-painting a-painting.html report unassessed MEI sites and use the catalogued step 35 PMS2 table +report-render a-painting a-painting.txt report unassessed MEI sites and use the catalogued step 35 PMS2 table +report-render a-partial a-partial.html report unassessed MEI sites and use the catalogued step 35 PMS2 table +report-render a-partial a-partial.txt report unassessed MEI sites and use the catalogued step 35 PMS2 table +report-render a-prs-raw a-prs-raw.html report unassessed MEI sites and use the catalogued step 35 PMS2 table +report-render a-prs-raw a-prs-raw.txt report unassessed MEI sites and use the catalogued step 35 PMS2 table +report-render a-prs-sex a-prs-sex.html report unassessed MEI sites and use the catalogued step 35 PMS2 table +report-render a-prs-sex a-prs-sex.txt report unassessed MEI sites and use the catalogued step 35 PMS2 table +report-render a-since a-since.html report unassessed MEI sites and use the catalogued step 35 PMS2 table +report-render a-since a-since.txt report unassessed MEI sites and use the catalogued step 35 PMS2 table +report-render a-stale a-stale.html report unassessed MEI sites and use the catalogued step 35 PMS2 table +report-render a-stale a-stale.txt report unassessed MEI sites and use the catalogued step 35 PMS2 table +report-render a-unreadable a-unreadable.html report unassessed MEI sites and use the catalogued step 35 PMS2 table +report-render a-unreadable a-unreadable.txt report unassessed MEI sites and use the catalogued step 35 PMS2 table +report-render a-y-calls a-y-calls.html report unassessed MEI sites and use the catalogued step 35 PMS2 table +report-render a-y-calls a-y-calls.txt report unassessed MEI sites and use the catalogued step 35 PMS2 table +report-render all-history all-history.txt report unassessed MEI sites and use the catalogued step 35 PMS2 table +report-render all-nf all-nf.html report MEI sites with too few reads as not assessed +report-render all-nf all-nf.txt report MEI sites with too few reads as not assessed +report-render all all.txt report unassessed MEI sites and use the catalogued step 35 PMS2 table +report-render c-float--inf c-float--inf.txt report unassessed MEI sites and use the catalogued step 35 PMS2 table +report-render c-float-inf c-float-inf.txt report unassessed MEI sites and use the catalogued step 35 PMS2 table +report-render c-float-nan c-float-nan.txt report unassessed MEI sites and use the catalogued step 35 PMS2 table +report-render c-full c-full.txt report unassessed MEI sites and use the catalogued step 35 PMS2 table +report-render c-nf c-nf.html report MEI sites with too few reads as not assessed +report-render c-nf c-nf.txt report MEI sites with too few reads as not assessed +report-render m-optin-empty m-optin-empty.html report MEI sites with too few reads as not assessed +report-render m-optin-empty m-optin-empty.txt report MEI sites with too few reads as not assessed +report-render m-optin-odd m-optin-odd.html report MEI sites with too few reads as not assessed +report-render m-optin-ok m-optin-ok.html report MEI sites with too few reads as not assessed +report-render m-optin-ok m-optin-ok.txt report MEI sites with too few reads as not assessed +report-render m-optin-partial m-optin-partial.html report MEI sites with too few reads as not assessed +report-render m-optin-partial m-optin-partial.txt report MEI sites with too few reads as not assessed +report-render m-optin-since m-optin-since.html report MEI sites with too few reads as not assessed +report-render m-optin-since m-optin-since.txt report MEI sites with too few reads as not assessed +report-render m-optin-stale m-optin-stale.html report MEI sites with too few reads as not assessed +report-render m-optin-stale m-optin-stale.txt report MEI sites with too few reads as not assessed +report-render s-consumer-reasons s-consumer-reasons.html report unassessed MEI sites and use the catalogued step 35 PMS2 table +report-render s-consumer-reasons s-consumer-reasons.txt report unassessed MEI sites and use the catalogued step 35 PMS2 table +report-render s-consumer-stale s-consumer-stale.html report unassessed MEI sites and use the catalogued step 35 PMS2 table +report-render s-consumer-stale s-consumer-stale.txt report unassessed MEI sites and use the catalogued step 35 PMS2 table +report-render s-sexloss-chrx s-sexloss-chrx.html report unassessed MEI sites and use the catalogued step 35 PMS2 table +report-render s-sexloss-chrx s-sexloss-chrx.txt report unassessed MEI sites and use the catalogued step 35 PMS2 table +report-render s-sexloss-detected s-sexloss-detected.html report unassessed MEI sites and use the catalogued step 35 PMS2 table +report-render s-sexloss-detected s-sexloss-detected.txt report unassessed MEI sites and use the catalogued step 35 PMS2 table +report-render s-sexloss-failed s-sexloss-failed.html report unassessed MEI sites and use the catalogued step 35 PMS2 table +report-render s-sexloss-failed s-sexloss-failed.txt report unassessed MEI sites and use the catalogued step 35 PMS2 table +report-render s-sexloss-gain-stale s-sexloss-gain-stale.html report unassessed MEI sites and use the catalogued step 35 PMS2 table +report-render s-sexloss-gain-stale s-sexloss-gain-stale.txt report unassessed MEI sites and use the catalogued step 35 PMS2 table +report-render s-sexloss-not-estimated s-sexloss-not-estimated.html report unassessed MEI sites and use the catalogued step 35 PMS2 table +report-render s-sexloss-not-estimated s-sexloss-not-estimated.txt report unassessed MEI sites and use the catalogued step 35 PMS2 table +report-render s-sexloss-odd s-sexloss-odd.html report unassessed MEI sites and use the catalogued step 35 PMS2 table +report-render s-sexloss-odd s-sexloss-odd.txt report unassessed MEI sites and use the catalogued step 35 PMS2 table +report-render s-sv-mixed s-sv-mixed.html report unassessed MEI sites and use the catalogued step 35 PMS2 table +report-render s-sv-mixed s-sv-mixed.txt report unassessed MEI sites and use the catalogued step 35 PMS2 table +report-render s-sv-stale s-sv-stale.html report unassessed MEI sites and use the catalogued step 35 PMS2 table +report-render s-sv-stale s-sv-stale.txt report unassessed MEI sites and use the catalogued step 35 PMS2 table diff --git a/workflows/reporting.nf b/workflows/reporting.nf index 470a3e5c3..20155d974 100644 --- a/workflows/reporting.nf +++ b/workflows/reporting.nf @@ -27,6 +27,7 @@ workflow REPORTING { main: ch_versions = Channel.empty() ch_html_reports = Channel.empty() + ch_report_bundles = Channel.empty() ch_multiqc_html = Channel.empty() // @@ -34,7 +35,8 @@ workflow REPORTING { // if (params.tools && params.tools.split(',').collect{ it.trim() }.contains('html_report')) { HTML_REPORT(ch_report_inputs) - ch_html_reports = HTML_REPORT.out.html_report + ch_report_bundles = HTML_REPORT.out.bundle + ch_html_reports = ch_report_bundles.map { meta, report, summary, search, charts -> [meta, report] } ch_versions = ch_versions.mix(HTML_REPORT.out.versions) } @@ -79,6 +81,7 @@ workflow REPORTING { } emit: + report_bundles = ch_report_bundles html_reports = ch_html_reports // channel: [meta, html] multiqc_html = ch_multiqc_html // channel: [meta, html], one per sample versions = ch_versions // channel: path(versions.yml)