Repository navigation
Conversation
FilterMutectCalls in step 49 ran without a contamination table, so another person's DNA in the sample, whose alleles sit at a low VAF, could pass as a small clone. With step 29's common-sites VCF installed, the step and the Nextflow CHIP_MUTECT2 now run GetPileupSummaries inside the CHIP exons and CalculateContamination, and pass --contamination-table and --tumor-segmentation to FilterMutectCalls. New optional parameter --chip_common_sites; run-all.sh passes it when the VCF and its .tbi are installed. Without the VCF the log says there is no estimate. Bead: trait-62
…ntamination table The fake-docker case runs step 49 without the common-sites VCF, with it, and with it but no .tbi; renders CHIP_MUTECT2's script block with a fake gatk with and without --chip_common_sites; and checks that run-all.sh passes the VCF to the pipeline only with its .tbi. Bead: trait-62
…e CHIP exons The CHIP coding exons hold 8 of the 59,295 sites of the common-sites VCF, too few for CalculateContamination to estimate anything. Contamination is a property of the sample, so GetPileupSummaries now reads every common site of the VCF in both the step and CHIP_MUTECT2. The fake-docker case checks the table first, so main fails it on the --contamination-table check. Bead: trait-62
…carrier row The carrier list parsed each hit with the default call floor (GQ 30, DP 10) and dropped the floor the hits file states, and it wrote no call quality at all, so a weak call read like a sure one. Each row now has zygosity, gq, dp and low_confidence, judged against the file's own ##PGP_CALL_FLOOR, as the ClinVar section judges the same hit. A homozygous or hemizygous P/LP row has no unchanged copy, so it moves from carriers to a new list, hom_or_hemizygous. Two different heterozygous hits in one recessive gene get pair and phase from the haplotype rule of the secondary-findings card (two hits, possible two hits, or one copy in cis). A pair resting on a low-confidence call, and a deletion plus a low-confidence call (two_hits), is at most possible. The schema describes the carrier section; the summary-collect goldens change only in the carrier section. og-render's hemizygous tests read the row from its new list. Bead: clin-15 Bead: clin-19
… carrier Bead: clin-15 Bead: clin-19
…or not at all FilterMutectCalls weighs each allele by its population frequency, which Mutect2 takes from gnomAD's germline resource. On public data (HG002 with HG005's reads mixed in) the estimate removed 31 of 35 PASS calls with gnomAD and none without it. The step now warns in that case, and main.nf warns on the console without --chip_common_sites and with it but without --chip_germline_resource, since a task's stderr is not shown. The docs say the estimate needs gnomAD too and give the measurement. Bead: trait-62
Check the positional binding of the common-sites VCF and index. List the optional VCF in the Nextflow guide. Bead: trait-62
…s and on the live page
Moving homozygous and hemizygous P/LP rows from `carriers` to
`hom_or_hemizygous` left every consumer reading only `carriers`. The live
page lost its act finding for such a row ("two changed copies", "the only
copy changed"), and a gene left with a homozygous row fell to a plain
ClinVar review finding. Both reports dropped the row from the carrier
block.
The live page (finding rows, the carrier panel and its headline) now
reads both lists. Both report renderers (og-render and render_report.py,
still step 24's) print each such row on its own line in the carrier
block, "two changed copies" or "the only copy changed", "not the pattern
of a carrier", and the block's first line counts it apart from the
carriers. The report-render parity cases whose summary holds such rows
get goldens for the new lines.
The two CFTR pair tests now assert their row count, so they cannot pass
with no row.
Bead: clin-15
Bead: clin-19
…ort goldens The report-render goldens of the all and all-history cases print the LPA section of the synthetic corpus summary, whose two risk-allele lines read as an rsID with a genotype. They are invented test data: allow those two lines in those goldens only. Bead: clin-15
…on every run A collected summary carries the minute og summary collect ran (generated_utc), and both reports print it. The report-render goldens of the cases with a row in hom_or_hemizygous therefore failed on the next day's run. report-corpus.sh now writes one fixed time into every collected summary (sed on that one line, so a summary that holds NaN or Infinity on purpose stays as it is), and the goldens are written again from og run inside the checkout, as CI runs it: the all and all-nf summaries now read their repeat tables, as on CI. The pinned oracle matches the old og on every other output (299 of 301; the other 2 are the committed viral golden), and no new golden is stale. The all and all-history text goldens also print the corpus's invented repeat sizes: allow those two lines too. Bead: clin-15
…idence # Conflicts: # CHANGELOG.md
# Conflicts: # CHANGELOG.md
… call The SF card called two_hits(), so a class 4/5 deletion plus a P/LP call below step 06's call floor read 'biallelic' there, while the carrier list of the same report read it as possibly biallelic (low-confidence call). Two phased hets of which one is a low-confidence call also read 'biallelic' with no mark. Each counted allele now carries its low_confidence mark. The deletion rule goes through two_hits_with, and a pair whose proof needs a low-confidence call reads 'possibly biallelic (low-confidence call)'. A confident homozygous call or a confident pair stays 'biallelic'. Bead: clin-19
…zygous rows The Python server flags a sample whose carrier list holds only homozygous or hemizygous rows (a man with only a GLA row). og live serve read only 'carriers', so it gave such a sample no attention flag. Bead: clin-15
The report-render cases now compare whole reports. The 24 cases whose summary holds a homozygous or hemizygous carrier row get whole-report goldens; each differs from the oracle only in the carrier block. The docs and the changelog say what the SF card now does with a pair on a low-confidence call. Bead: clin-15, clin-19
…ssense scores written as text Bead: nf-vcfanno-ops
… a weak call The two cards capped different pairs when a gene held a low-confidence call. The carrier list capped a pair whenever any of its hets was weak, so a confident phased pair beside a weak third het read "possible two hits (low-confidence call)". The secondary-findings card capped only a pair whose proof needed the weak call. Commit 6059508 also said a confident pair stays biallelic beside a low-confidence call. That was false for a confident deletion pair: the card gave it the low-confidence word, while the same row's two-hit line said biallelic. And a combined allele lost its confidence when any one of its calls was weak. Both cards now count a gene's hits twice, with every call and with the confident calls alone: - A pair the confident calls prove is "two hits" on the list and "biallelic" on the card, whatever weak call sits beside it. - On the card, a confident deletion pair that is biallelic or possibly biallelic is used before the low-confidence cap. - A pair that only a weak call proves gets the low-confidence word. - Hits of unknown phase are "possible two hits" and "possibly biallelic" when two of them are confident. Two confident unphased hets plus a weak homozygous call now read "possibly biallelic" on the card, as the carrier list already said. - An allele counts the copies its confident calls give (a count, not a flag), so a combined allele that one confident call proves stays firm. The carrier list counts a combined allele the same way. No reported or not-reported decision moves; only `pair` and `phase` change. A new test runs MUTYH, which is on both lists, through both cards over 25 shapes of hits and requires the same answer from both. Bead: clin-19
…port With step 22's consensus set and an SV whose support is null, both reports must say the consensus cannot tell, never that it did not run, in the AnnotSV rows and in the secondary-findings SV rows, and the AnnotSV count line must count the unknown rows. Without the consensus the old text stays. Red on the code before the fix: the header lacks "not known: 1" and the row says "no step 22 consensus". Bead: sv-01
…ll an SV's support og summary collect writes an SV's support as null when step 22's consensus ran but cannot tell (an SV_VCF run's rows, a row with no ID, an ID in two events, a vote with no readable ID). Both renderers still said "not known (no step 22 consensus)" for every null, and the AnnotSV count line read "single caller: 0". The AnnotSV section's consensus flag now picks the reason in the AnnotSV rows and the secondary-findings SV rows, and the count line adds ", not known: M" when the consensus ran. bin/render_report.py and bin/live_results.py change the same lines for the live site. The pinned Python oracle prints the old reason, so the 50 report-render cases that show it get whole-report goldens. report-corpus.sh pins each collected summary's generated_utc so those goldens stay stable (the same hunk as the carrier-confidence lane). Bead: sv-01
…der goldens The whole-report goldens of the c-full, all and a-/s- report-render cases print the made-up lipoprotein(a) genotypes and repeat sizes of the summary-collect corpus. The scan read them as personal data. Allow those four lines under tests/parity/golden/report-render only. Bead: sv-01
…t the 9 GB GATK one GATK_IMAGE is pulled lazily, so the shard that ran this case pulled about 9 GB to bgzip five small tables. The bcftools image is cached and ships bgzip and tabix.
The new count line read each row's support with d["support"] (Python)
and at("support") (og-render). A live-site summary whose rows have no
support key then raised, and the live site dropped the structural card:
tests/test_owngenome_live_family.py counted 0 flagged cards where it
expects 1. Both now count a missing key as not known, the same as null.
Bead: sv-01
Two confident hets of unknown phase beside a weak het in trans with one of them read "possible two hits (low-confidence call)" on the carrier list but "possibly biallelic" on the secondary-findings card. The card checked two confident copies of unknown phase before the low cap; the list capped first. The list now takes the same step in the same order. A combined allele that is confident only through a folded part kept the GT and phase set of its own weak call, so both cards could call a pair biallelic that the confident calls do not prove. Each allele is now counted with the GT and phase set of the confident call that makes it confident, on both cards. On the card's deletion path a weak combined allele with a confident part is no longer marked low when the confident calls give its copies, and it pairs with the deletion by that confident call's phase. New shapes in the agreement test: R1, R1b, R1c (the list now says possible two hits), R2 and R3d (the card now says possibly biallelic, with its two-hit line), R3 (both now say possibly), and R6 and R7, which keep the low word on both cards. Bead: clin-19
The docs and the changelog said a gene on both lists gets the same answer. That holds for a recessive gene the SF card counts by two copies, and only at the gene level: on the carrier list the answer is the best of `pair`, the `two_hits` verdict and the homozygous rows, and `pair` counts heterozygous hits only. Say so, and name the new rule for two confident copies of unknown phase. Bead: clin-19
… reason too bin/live_results.py called sf_rows without the AnnotSV consensus in the clinical-filter table and in the findings list, so those rows still said "no step 22 consensus" after step 22 ran, next to AnnotSV rows that said it cannot tell. Both now pass the consensus, as the AnnotSV rows do. The parity README names the new golden cases and the generated_utc pin, and the two repeat-size allow lines cover only the text goldens. Bead: sv-01
A HIGH-impact record of the clinical VCF for the same variant made a weak call count as confident on the secondary-findings card, because the card read only step 06's low_confidence mark. With the record's phase set it proved a pair biallelic from a weak phase alone, and beside a deletion it cleared the low-confidence word. The card now also treats a call whose HIGH-impact record has weak_call as low confidence. The carrier list paired a weak combined allele with a deletion by the weak row's own GT and phase set, while the card used its confident part. The list now pairs it the same way: by the first confident row of the same allele with as many copies. The card dropped the phase of a combined allele whose confident call gives fewer copies than the weak one, although that phase came from the confident call. Every small allele now counts with the copies, GT and phase set of its confident call. The agreement test gains eight shapes (H1, H2, H3p, H5, X4, X4b, X9b, X10); each fails on the previous head. Part of GeiserX#411 (clin-19).
A HIGH-impact record is weak on a skewed allele balance too, not only below the clinical call floor. Such a call is now low confidence on the secondary-findings card and confident on the carrier list, even when both files state the same floor. The changelog and the results page said the two lists agree whenever the floors match; they now name this case. Part of GeiserX#411 (clin-19).
…balance The docs said a HIGH-impact call weak on allele balance is low confidence on the card only. It never lowers a hit whose ClinVar row is confident, so that split does not exist. The real one is the HIGH-impact call of a part of a combined allele, which makes the allele confident on the card while the list marks it low confidence. Bead: clin-19
…part The carrier list rescued a weak part by its confident combined allele in every case. The card counts a part through its combined allele only when that allele is unphased and the part is its first part present, so a phased combined allele inside a deletion made its weak part just outside it read biallelic on the list. The SF card's deletion pair on a weak HIGH-impact call also blamed the call floor; it now names both kinds of low-confidence call. Bead: clin-19
…idence # Conflicts: # CHANGELOG.md
…t text
Main now prints the SV caller support as main's code words it ("caller
support not known (no step 22 consensus)" and the like), so the 38 report
goldens this PR adds no longer matched og. Each file is og's own output
from the merged tree; oracle-diff summary-collect report-render agrees on
all 1097 items, and no summary-collect golden moved.
Bead: clin-19
# Conflicts: # CHANGELOG.md # tests/parity/golden/report-render/all-history/all-history.txt # tests/parity/golden/report-render/all/all.txt # tests/parity/golden/report-render/cb-full/cb-full.html # tests/parity/golden/report-render/cb-full/cb-full.txt # tests/parity/golden/report-render/cb-quoted-dosage/cb-quoted-dosage.html # tests/parity/golden/report-render/cb-quoted-dosage/cb-quoted-dosage.txt # tests/parity/golden/report-render/cb-quoted-interval/cb-quoted-interval.html # tests/parity/golden/report-render/cb-quoted-interval/cb-quoted-interval.txt # tests/parity/golden/report-render/cb-quoted-smn/cb-quoted-smn.html # tests/parity/golden/report-render/cb-quoted-smn/cb-quoted-smn.txt # tests/parity/golden/report-render/cb-unicode-contig/cb-unicode-contig.html # tests/parity/golden/report-render/cb-unicode-contig/cb-unicode-contig.txt # tests/parity/golden/report-render/m-clinical-escape/m-clinical-escape.html # tests/parity/golden/report-render/m-clinical-escape/m-clinical-escape.txt # tests/parity/golden/report-render/m-clinical-stale/m-clinical-stale.html # tests/parity/golden/report-render/m-clinical-stale/m-clinical-stale.txt # tests/parity/golden/report-render/m-clinvar-freq-note/m-clinvar-freq-note.html # tests/parity/golden/report-render/m-clinvar-freq-note/m-clinvar-freq-note.txt # tests/parity/golden/report-render/m-clinvar-many/m-clinvar-many.html # tests/parity/golden/report-render/m-clinvar-many/m-clinvar-many.txt # tests/parity/golden/report-render/m-clinvar-none/m-clinvar-none.html # tests/parity/golden/report-render/m-clinvar-none/m-clinvar-none.txt # tests/parity/golden/report-render/m-couple-empty/m-couple-empty.html # tests/parity/golden/report-render/m-couple-empty/m-couple-empty.txt # tests/parity/golden/report-render/m-couple/m-couple.html # tests/parity/golden/report-render/m-couple/m-couple.txt # tests/parity/golden/report-render/m-cpsr-none/m-cpsr-none.html # tests/parity/golden/report-render/m-cpsr-none/m-cpsr-none.txt # tests/parity/golden/report-render/m-cpsr-noown/m-cpsr-noown.html # tests/parity/golden/report-render/m-cpsr-noown/m-cpsr-noown.txt # tests/parity/golden/report-render/m-sf-notes/m-sf-notes.html # tests/parity/golden/report-render/m-sf-notes/m-sf-notes.txt # tests/parity/golden/report-render/m-since-clinical/m-since-clinical.html # tests/parity/golden/report-render/m-since-clinical/m-since-clinical.txt # tests/parity/golden/report-render/m-slivar-phase/m-slivar-phase.html # tests/parity/golden/report-render/m-slivar-phase/m-slivar-phase.txt # tests/parity/golden/report-render/m-slivar-unphased/m-slivar-unphased.html # tests/parity/golden/report-render/m-slivar-unphased/m-slivar-unphased.txt
# Conflicts: # CHANGELOG.md
…t traced A traced run skips the panel measure (measure_on in its file, GeiserX#572), so its shard should not be planned around 2900 seconds of work that never runs.
…eiserX#571 GeiserX#559 (carrier confidence) and GeiserX#571 (SV support reason) each added the same 38 report-render goldens, each written by its own og. On the merged tree og prints both changes, so the 38 files are og's output on this tip: every line of each comes from one of the two sides, and oracle-diff now agrees on all 1097 summary-collect and report-render items (38 differed before).
Four kinds replace the Python heredocs of the clinical, consumer-export and HLA cases: vep-af (the VEP files with a gnomAD AF per ClinVar hit, with or without filler records), consumer-expected and consumer-roundtrip (the two independent reads of the consumer export) and hla-spike (read pairs tiled from hla.dat). Each takes the arguments its heredoc took and writes the same bytes. Bead: D1
…nline Python The clinical, report, PGx and HLA cases made inputs and read summaries with Python heredocs and python3 -c lines, and three still rendered with bin/render_report.py. They now use og dev fixture, og summary collect, og report render, jq and awk. Each case keeps its name, its [PASS] lines and what it asserts. The red controls that edited render_report.py now render the same summary with the block removed (jq del of the OptiType or KIR data). The ACMG control renders with an empty assets folder instead of the Python image without the assets mount. Bead: D1
The edited cases no longer run bin/render_report.py, bin/collect_summary.py, bin/results_index.py or bin/run_state.py, so their rows stop naming them. The cases that source tests/e2e/vendor-vcf-intake.inc now list it, so a change to it runs them. Two ShellCheck baseline lines for the old html_esc go: the finding is gone. Bead: D1
|
Important Review skippedToo many files! This PR contains 179 files, which is 79 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. CodeRabbit couldn't verify your organization's usage billing state, so no usage-priced review was started. Retry after the billing service recovers.
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #571 (batch T15) until T15 lands on main. After that, this branch gets a merge of main.
The problem
Twenty-five clinical, report, PGx and HLA e2e cases still ran Python in the test itself. They used heredocs and
python3 -clines to make inputs (VEP files, planted reads, a spiked HLA read set, a consumer-export hole) and to read summary.json and PharmCAT's JSON. Three of them also rendered reports withbin/render_report.py. The red controls of the HLA and KIR cases editedrender_report.pywith sed. So the cases tested Python glue that 1.0.0 removes, and they did not test the Rust tools that ship.The fix
Four new kinds of
og dev fixture(rust/crates/og-dev/src/fixture/clinical/) replace the heredocs that make inputs:vep-af: the VEP file with a gnomAD AF on each ClinVar hit, with filler records (--filler --want) or with rsIDs (--rsids);consumer-expectedandconsumer-roundtrip: the two independent reads of the consumer export;hla-spike: read pairs tiled from the longest hla.dat entry of each allele.Each kind takes the arguments its heredoc took and writes the same bytes.
The case that made RFC1 reads from
tests/test_rfc1_motif.pynow usesog dev fixture rfc1 pathogenic.Small deterministic inputs are now built with shell and awk: the planted 1/2 record, the planted and spliced reads, the consumer-export hole, the ClinVar_CLNSIG rewrite and the report-followups tables.
Every summary and JSON read is jq, and the process-table read of step 17 is awk. A read that the case compares with Python-printed text prints it the same way, for example
[(0.03, True)]and{'Pathogenic': 1, 'Benign': 1}.og report renderreplacesrender_report.pyin all of these cases, includingfollowups-clinvar-traits-1-rules-html,pgx-5-kirandprs-2-ancestry.The red controls that sed'ed
render_report.pynow render the same summary with the block removed (jq 'del(.sections.hla.data.optitype)', andkirthe same way). A check first shows that the control summary lacks the block. The ACMG control renders with an empty assets folder, where before it used the Python image without the assets mount.Each case keeps its name, its [PASS] lines and what it asserts. Two PASS texts changed only where they named a Python file: step 17 is now "assets/steps.tsv maps them to step 17".
There are no Python heredocs and no
python3 -clines left in the edited cases. Two lines still say "python".pharmcat-indel-refblocks-1runs PharmCAT's own preprocessor inside the PharmCAT image.pgx-inhibitor-rows-1says step 27 runs in the python image. Neither is repository Python.Three files outside the package list:
rust/crates/og-dev/src/fixture.rs: about ten lines that hook the new module intoog dev fixtureand its--help, as the lineage kinds are hooked.tests/shellcheck-baseline.txt: two lines dropped. They were for the old one-line Pythonhtml_esc, and that finding is gone.scripts/ci/e2e-case-paths.tsv(on the list): the edited rows stop namingbin/render_report.py,bin/collect_summary.py,bin/results_index.pyandbin/run_state.py. The six cases that sourcetests/e2e/vendor-vcf-intake.incnow list it.How it was checked
Byte parity, old against new, on made-up inputs. Each old Python block was taken from the base commit and run beside its replacement, and the outputs were compared with cmp:
All matched. The awk drivers also matched under mawk 1.3.4 in a Debian container, and GNU touch gives the 60 s older mtime.
Red controls. One planted mistake per new snippet turned its parity driver red: 10 of 10. These were the reference reads, the CIGAR span, the junction clip, the step-17 columns, the insertion point, an ALT size, the hole bound, a SAMD12 count, the cache CLNSIG and the empty-call rule. One mutation per Rust kind failed its
cargo test: 4 of 4. The ACMG check returned 1 with the 84-gene rule changed. Mutations in mt, match_table and json_calls changed their output.Gates.
cargo fmt --check: clean.cargo clippy -p og-dev --all-targets -D warnings: clean.cargo test -p og-dev: 335 passed. Threebuild::fetch_testsfailed under the full parallel run on a loaded test machine, and all of them passed when run alone. They are in code this PR does not touch.bash -n: clean.scripts/ci/e2e-scope.sh check: passes.scripts/ci/check-personal-data.shon every changed file: passes. Its control, the REPCN key and the counts on one line, is caught.E2E. Not run on this PR. The batch tip E2E must run the 25 edited cases and the cases that source the changed include:
The rust/ change selects all of them through bin/og.
Bead: D1