diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index f47531a3d..f2f2e2b38 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,7 +1,10 @@ -# Require owner review for infrastructure and automation changes +# Routing only: GitHub asks the owner to review a pull request that touches +# these paths. main takes changes through a pull request whose required +# checks pass; it needs no approving review, so nothing here blocks a merge. .github/ @GeiserX versions.env @GeiserX scripts/setup.sh @GeiserX scripts/run-all.sh @GeiserX scripts/validate-setup.sh @GeiserX .coderabbit.yaml @GeiserX +assets/output_contract.tsv @GeiserX diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 30ea27a4d..6ef1df5dd 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -58,6 +58,7 @@ on: - 'bin/**' - 'conf/**' - 'assets/**' + - 'rust/**' - 'tests/e2e/**' - 'tests/fixtures/VERSION' - 'main.nf' @@ -65,8 +66,6 @@ on: - 'nextflow_schema.json' - 'versions.env' - '.github/workflows/e2e.yml' - - 'rust/crates/og-dev/src/fixture.rs' - - 'rust/crates/og-dev/src/traits_sources.rs' - '.github/actions/**' - 'tests/fixtures/annotsv/class45.sh' - 'tests/fixtures/consumer_export/sites.tsv.gz' @@ -1137,12 +1136,15 @@ jobs: # green only when the plan and every leg succeeded, every picked case # reported exactly one pass (one table of every case goes to the summary) # and each parity check whose cases ran passed once. Red when e2e-scope - # did not succeed. A leg that was skipped, cancelled or - # cut by its time limit leaves cases without a result, which is red too. + # did not succeed. A leg that was skipped, failed or cut by its time limit + # leaves cases without a result, which is red too. When the run itself is + # cancelled (a newer push to the pull request, or by hand), this job is + # cancelled with it and reads cancelled, not failed: nothing ran to fail. + # A cancelled check blocks a merge as a red one does. e2e: needs: [e2e-scope, e2e-plan, e2e-base, e2e-shards] if: >- - ${{ always() && ( + ${{ !cancelled() && ( github.event_name == 'pull_request' || github.event_name == 'push' || github.event_name == 'schedule' || @@ -1192,7 +1194,9 @@ jobs: export E2E_SELECT="${RUNNER_TEMP}/select.txt" fi if [ "$PLAN" != success ] || [ "$BASE" != success ] || [ "$LEGS" != success ]; then - echo "::error::The plan job ended ${PLAN:-unknown}, the base leg ${BASE:-unknown} and the shard legs ${LEGS:-unknown}; e2e needs all three to succeed." + # The run was not cancelled (then this job would not run), so a + # job that ended cancelled was cut by its time limit. + echo "::error::The plan job ended ${PLAN:-unknown}, the base leg ${BASE:-unknown} and the shard legs ${LEGS:-unknown}; e2e needs all three to succeed. A job that ended cancelled in a run that was not cancelled hit its time limit." rc=1 fi dir="${RUNNER_TEMP}/reports" diff --git a/.github/workflows/freshness.yml b/.github/workflows/freshness.yml index 8dd883f2f..435058219 100644 --- a/.github/workflows/freshness.yml +++ b/.github/workflows/freshness.yml @@ -5,7 +5,15 @@ name: Freshness # behind upstream or stopped answering. Renovate bumps image tags; this covers # what it cannot see (the Ensembl cache release, the PCGR bundle date, the # pypgx-bundle tag, the Nextflow line, the ClinVar file date) and lists the -# major updates Renovate does not open on its own. +# major updates Renovate does not open on its own. It also compares the +# curated PGx tables with their sources: each row of +# assets/pgx_contraindications.tsv with its CPIC pair (level, provisional) and +# its DailyMed label, assets/pgx_inhibitors.tsv with the FDA table of CYP +# inhibitors (fda.gov refuses GitHub's runners, so the newest Wayback +# Machine capture of it, at most 92 days old, stands in), and +# assets/pgx_genes.tsv with the gene table of the newest pypgx. A row that no +# longer agrees shows as `drift` in the issue: a warning to fix the table, not +# a failed run. # # The issue is found by a marker in its body, not by the label alone, so an # issue another workflow files under the same label is never overwritten. A @@ -79,7 +87,8 @@ concurrency: jobs: # Every pull request starts this workflow, so main can require its checks. # This job says whether a pull request touches scripts/, docs/, - # versions.env, assets/pgs_scores.tsv, rust/crates/og-fresh/ or this file; + # versions.env, assets/pgs_scores.tsv, the curated PGx tables, + # rust/crates/og-fresh/ or this file; # when it does not, self-tests and pull-request are skipped, which GitHub # counts as passed. # Outside a pull request the answer is always run=true. A failed or missing @@ -109,7 +118,7 @@ jobs: if [ "$EVENT" != "pull_request" ]; then echo "run=true" >> "$GITHUB_OUTPUT"; exit 0; fi git diff --name-only "${BASE}...${HEAD_SHA}" > "${RUNNER_TEMP}/changed.txt" cat "${RUNNER_TEMP}/changed.txt" - if grep -qE '^(scripts|docs|rust/crates/og-fresh)/|^(versions\.env|assets/pgs_scores\.tsv|\.github/workflows/freshness\.yml)$' "${RUNNER_TEMP}/changed.txt"; then + if grep -qE '^(scripts|docs|rust/crates/og-fresh)/|^(versions\.env|assets/pgs_scores\.tsv|assets/pgx_(contraindications|inhibitors|genes)\.tsv|\.github/workflows/freshness\.yml)$' "${RUNNER_TEMP}/changed.txt"; then echo "run=true" >> "$GITHUB_OUTPUT" else echo "Nothing the freshness checks read changed: they are skipped." @@ -144,7 +153,7 @@ jobs: working-directory: rust run: cargo build --release --locked -p og --no-default-features - - name: og dev freshness self-test (a bogus image, a missing tag and a bogus URL must exit non-zero) + - name: og dev freshness self-test (a bogus image, a missing tag and a bogus URL must exit non-zero; a planted PGx table row whose CPIC level moved must show as drift) run: rust/target/release/og dev freshness --self-test # check-links.sh and check-pgs-labels.sh read with og dev versions @@ -186,7 +195,7 @@ jobs: has() { grep -qxE "$1" "${RUNNER_TEMP}/changed.txt" && echo true || echo false; } { echo "prs=$(has 'scripts/25-prs\.sh|assets/pgs_scores\.tsv|scripts/ci/check-pgs-labels\.sh|\.github/workflows/freshness\.yml')" - echo "report=$(has 'rust/crates/og-fresh/.*|versions\.env|\.github/workflows/freshness\.yml')" + echo "report=$(has 'rust/crates/og-fresh/.*|versions\.env|assets/pgx_(contraindications|inhibitors|genes)\.tsv|\.github/workflows/freshness\.yml')" } >> "$GITHUB_OUTPUT" # og dev freshness (rust/crates/og-fresh) writes the report, and the diff --git a/.github/workflows/guard.yml b/.github/workflows/guard.yml index 069b4b080..e73de0946 100644 --- a/.github/workflows/guard.yml +++ b/.github/workflows/guard.yml @@ -558,6 +558,41 @@ jobs: - name: cargo test run: cargo test --workspace --locked --no-fail-fast + # The output contract keeps every stable row of the newest 1.x release + # (docs/output-contract.md, "How CI holds it"). Release tags live on the + # upstream repository, so a run on a fork reads them there too. Before + # the first 1.x tag there is nothing to compare with; after it, a tag + # that cannot be listed, fetched or read fails the step. The control + # runs first: a baseline with a stable row this contract lacks must fail. + - name: The contract keeps every stable row of the newest 1.x release + env: + RELEASES: https://github.com/GeiserX/OwnGenome.git + MAJOR: '1' # the release line this branch keeps; the 2.0 change sets 2 + run: | + contract=../assets/output_contract.tsv + planted="${RUNNER_TEMP}/contract-planted.tsv" + log="${RUNNER_TEMP}/contract-baseline-red.log" + { cat "$contract"; printf 'file\t{sample}/gone/{sample}_gone.tsv\t-\t-\tbash\ttsv\tstable\t-\t-\n'; } > "$planted" + if cargo run --locked -q -p og -- dev contract --contract "$contract" --baseline "$planted" > "$log" 2>&1; then + cat "$log" + echo "ERROR: a stable row that is gone since the baseline passed" + exit 1 + fi + cat "$log" + grep -F 'FAIL BREAKING: the stable file {sample}/gone/{sample}_gone.tsv' "$log" + echo "Control: a stable row that is gone since the baseline failed." + refs=$(git ls-remote --tags --refs "$RELEASES") || { echo "ERROR: could not list the tags of ${RELEASES}"; exit 1; } + tag=$(printf '%s\n' "$refs" | sed -n "s|^[0-9a-f]*[[:space:]]*refs/tags/\(v${MAJOR}\.[0-9][0-9]*\.[0-9][0-9]*\)$|\1|p" | sort -V | tail -n 1) + if [ -z "$tag" ]; then + echo "No ${MAJOR}.x release tag on ${RELEASES} yet: no release contract to compare with." + exit 0 + fi + git fetch --no-tags --depth=1 "$RELEASES" "refs/tags/${tag}" + base="${RUNNER_TEMP}/contract-${tag}.tsv" + git show "FETCH_HEAD:assets/output_contract.tsv" > "$base" + echo "Baseline: the contract of ${tag}" + cargo run --locked -q -p og -- dev contract --contract "$contract" --baseline "$base" + # The browser checks of og-browser (tests/browser/README.md) ran in # cargo test above, in the runner's Chrome. Two controls: a page error # planted in the clean page must fail its test, and with no Chrome the diff --git a/CHANGELOG.md b/CHANGELOG.md index eb7a130e7..dda3da6ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ Each release's notes. From 1.0.0 on, a major or minor release has hand-written n ## Unreleased +- Step 25 and the Nextflow `PRS_SUMMARY` withhold a score's percentile when the genotypes pgsc_calc scored list variants only. Every site such a VCF leaves out adds nothing to the sum, so the sum leans away from the panel's sums, which come from complete genotypes, and the percentile was not comparable. Each score keeps its raw sum. Its `Percentile` is `NA`, its `Effect` is empty, and a new column before `Input`, `Percentile_Note`, says `percentile withheld: the input lists variants only`. The decision reads the genotypes, not the kind of input: at least one genotyped position in five must be a reference call (0/0), the rule step 26b applies to the panel's sites. Genotypes from a gVCF and chip VCFs from `scripts/chip-to-vcf.sh`, which list their reference calls, keep their percentiles. `og prs table` takes the genotypes with a new option, `--target VCF`, and prints the NOTE that step 25 printed before; the NOTE now follows the genotypes too, so a gVCF without reference blocks at the score positions gets it. `og summary collect` passes the note on as `percentile_note`. When every percentile was withheld, both reports say "Percentile withheld: the input lists variants only" and why, and the summary's `not_assessed` list says the percentiles were withheld, in place of the lines for a run without the panel, which told the user to install a panel the run had used. The output gains one column; no column, option or file name changes. - A third-party outage no longer fails the Freshness check of a pull request. Since 2026-11-18 rest.ensembl.org has not answered, and the pull-request job's dry run of `og dev freshness` failed on every pull request that touched `versions.env` or `og-fresh`. `og dev freshness --unreachable-warns` now lists a lookup whose upstream did not answer (no connection, a timeout, HTTP 5xx or 429 after the retries, or HTTP 403) under "Upstreams that did not answer" as a warning, and its database row reads `NO ANSWER`; it does not change the exit. The 403 counts because rest.ensembl.org came back on 2026-11-19 answering 403 to GitHub's runners and 200 elsewhere, which still failed the pull-request job. A 404, an empty answer or an answer in an odd shape still exits 1. `freshness.yml` passes the flag only in the pull-request dry run. Without the flag the report and the exit are as before, and the monthly report on main still counts an outage as an error in the issue. - Three statements in the docs were wrong. Troubleshooting said exit code 137 confirms a kill for memory, and checked it with `docker ps -a --latest`. 137 is any SIGKILL, and the step scripts run their containers with `--rm`, so that command shows an older, unrelated container. The page now says how to confirm a kill for memory: `docker events --filter event=oom`, the kernel log, or `.State.OOMKilled` for a container kept without `--rm`. The run-state and troubleshooting pages said `bin/og` does not run on a Mac and told Mac users to build `og` with cargo or run it in a container. `bin/og` runs the native macOS build that `scripts/setup.sh --og` installs, and the pages now say so; on a Mac, `og run headroom` reports the machine's memory as unknown. Troubleshooting, the FAQ and the lessons-learned page said the step scripts run their containers as root, and lessons-learned gave `:latest` images and `chmod 777` as current fixes. The step scripts run their containers as you; those entries are now marked as past fixes and name what the pipeline does today. Documentation only: no option, output or behaviour changes. - Lint's ShellCheck job now checks every tracked shell script, not only `scripts/`: the e2e cases and their library, the fake-docker and parity tests, `tests/*.sh`, `bin/og` and the fake tools, 482 files in all, at every ShellCheck level. The 265 findings these files hold today are listed in `tests/shellcheck-baseline.txt` and still pass; any other finding fails lint. A listed finding is matched by its file, its code and the text of its line, so it keeps matching when lines above it move, and a new line with the same mistake still fails. Each run plants an unquoted `$1` in a new test script and on a new line of a listed script, and fails if either passes or if the file search misses the new script or `bin/og`. The `scripts/` check at warning level stays as it was. Part of #411 (plat-10). @@ -29,6 +30,39 @@ Each release's notes. From 1.0.0 on, a major or minor release has hand-written n - The run manifest stays whole when two scripts write it at once. `bin/write_manifest.sh` built every manifest in one shared file, `run_manifest.tsv.tmp`. When a run and a report script wrote one sample's manifest at the same time, each emptied and appended to the other's file, and the manifest that landed had rows missing or repeated. Each writer now builds its manifest in a temporary file of its own beside `run_manifest.tsv` and renames it into place, so the manifest is always one writer's whole manifest. A writer that stops early removes its temporary file. `tests/test_write_manifest.sh` runs three writers at once; its control copy with the shared name breaks the manifest. The manifest's rows and format do not change. - The delta report words each reason it gives for a changed result as a guess. The "why" of a change read `changed inputs: VEP_CACHE_RELEASE 115 -> 116`, which reads as the cause. The delta only knows which inputs changed and which inputs feed the section, so it now reads `likely from changed inputs: VEP_CACHE_RELEASE 115 -> 116`, in `_delta.json`, `.txt` and `.html`. The line for a result whose tracked inputs did not change names no cause and stays as it was. No file, field or column changes; only the text of `why`. - Step 46's LPA KIV-2 message now says what its interval covers and what the count adds up. It read `about N KIV-2 repeats in total (95% interval LOW to HIGH)`, which looked like a calibrated range for one chromosome. The interval comes only from how the depth varies between exons, read as independent, so it covers read sampling and leaves out any aligner or library bias; the count is the total over both copies of chromosome 6. The message is now `about N KIV-2 repeats in total over both copies (95% interval for read sampling, LOW to HIGH; aligner or library bias not included)`, then the class reading as before. Only the `message` value of `lpa/_lpa_kiv2.tsv` and the step's stdout line change; the columns `kiv2_copies`, `ci95_low` and `ci95_high` keep their names and values. +- A pull request that changes only Rust code now runs the e2e cases that run `og`. Before, `rust/` was outside the e2e scope, but for two files of `og-dev`, so such a pull request ran no case, and a merge of it started no run on main: a change in what `og` writes reached main with no real-tool run. A change under `rust/` now picks every case whose row in `scripts/ci/e2e-case-paths.tsv` has a glob that matches `bin/og`, as a change to `bin/og` does, and main runs every case after such a merge. 20 case rows that run `og` through a step, helper or module now list `bin/og`. `tests/test_e2e_scope.sh` checks the pick. +- The required `e2e` check reads cancelled, not failed, when its run was cancelled, by a newer push or by hand. Before, it ran anyway and failed, which read as a broken case when the cases had only been stopped. A cancelled check still blocks a merge. +- The testing guide says what a green `container-ok` means on a pull request that changes no image: no smoke row ran. It also says why the AnnotSV row with its 5.3 GB of full data stays monthly and on dispatch: no image pull request waits on that download. +- `summary.json` says what part of the genome a run covered. A run on part of the genome (`--intervals`, or a VCF cut down to chr20 and chr22) gave callability, polygenic score, ancestry, telomere, ROH and archaic results that read as whole-genome results. `og summary collect` now reads the chromosomes of the sample VCF's records and writes a new top-level `scope` object: `autosomes_covered`, `autosomes`, `chrx`, `intervals` (a `run intervals` row of `run_manifest.tsv`, else `null`), `partial` and `mark`. No step writes the `run intervals` row yet, so today `intervals` is `null`, and a run limited with `--intervals` is caught only by the chromosomes its calls are on. When fewer than 22 autosomes have calls, or the run was limited to intervals, each of those six sections that has a result of this run gets a new `partial` field, such as `partial: covers 2 of 22 autosomes`. A stale one of the six, a result from an earlier run whose scope was not recorded, gets `partial: not known, from an earlier run` whatever this run covered. Without a readable sample VCF there is no `scope` and nothing is marked. These are new keys; no key, file or format changes or goes away. The reports and the live site do not show the mark yet. `docs/results/quality.md` describes it, and `tests/schema/summary.schema.json` has both fields. +- Gene callability (step 16b and the Nextflow `MOSDEPTH` process) no longer counts a fragment twice. The gene pass ran mosdepth with `--fast-mode`, which counts every base from a read's start to its end: where the two mates of a pair overlap, a base counted two reads, and the bases of a deletion in a read counted as read. A gene that fewer than 10 fragments covered could reach 10x and read as read. The gene pass now runs without `--fast-mode`; the genome-wide 500 bp pass keeps it. The file name and columns of `_callability.bed.gz` do not change; its `10X` counts can be lower, so a gene near 90% can move to "not read". Step 16b skips a sample it already ran, so a sample from before this change keeps its old counts: delete `/mosdepth/_callability.bed.gz` and run step 16b again, and only the gene pass runs. On public HG002 30x, 4 of 1,553 genes moved (DHX40, SPATA31C2, GOLGA6L10 and UGT2B17), and the pass takes about 37% more CPU time, 3.5-4 min on a 10-core Mac mini. The step doc and `docs/lessons-learned.md` said `--fast-mode` drops the per-base output; `--no-per-base` does that, and they now say so. A new e2e case, `i411-callability-overlap-1-mates`, runs both paths on a small BAM with overlapping pairs and a deletion. +- The output contract check now compares the contract with the last release, so a stable output cannot disappear between releases. Before, `og dev contract --static` compared the code with the contract of the same checkout only: a change that renamed a stable output in the code and in its row, removed a stable param with its row, or made a stable row experimental passed. `og dev contract --baseline FILE` checks every stable row of a release's contract against this one: still listed, still stable, the same format, every leg that wrote the file and every required field. New rows and changes to experimental and internal rows pass. Guard's `rust` job runs it against the contract of the newest `v1.x.y` tag; until 1.0.0 is tagged there is none, and the step says so. The HG002 e2e case now also checks 31 stable files the base run writes whose `e2e` cell was `-` (the clinical summary, the slivar, mitochondrial and pypgx tables, the ClinVar cDNA and deep-intronic tables, the gVCF, the read count, the charts and search index, the PharmCAT JSON and HTML, the coverage beds, the sex check, indexcov, the Stranger VCF of ExpansionHunter, the indexes of the clinical, slivar and mitochondrial VCFs, and the Mutect2 stats of chrM). `run_manifest.tsv`, those three indexes and the Mutect2 stats are now listed on both legs, since the step scripts write them too. No output changes. `.github/CODEOWNERS` now says it routes review requests: main requires its status checks, not an approving review. +- Step 50 marks a known disease insertion (the FKTN, TAF1 and BBS1 SVAs of `assets/mei_sites.tsv`) seen only when MEGAnE's call there passed its own filters (FILTER `PASS`). Before, a call MEGAnE had flagged, such as `LC` for low confidence, also made the site read seen, so a call MEGAnE did not trust could read as carrier status. Now a site whose only calls are flagged reads `call filtered out (LC)` (with the call's flags) in the `status` column of `mei/_mei_sites.tsv`, and `call` names the flagged call. A `PASS` call in the same window still makes the site seen. That status value is new; the columns and the other values (seen, not seen, not callable) do not change. A window with zero depth and no call reads not callable, never not seen, as before; a new test now holds that. The calls table `mei/_mei.tsv` does not change: it lists flagged calls with their `filter`, as before. Tests: `rust/crates/og-reports/tests/i411_mei_seen_pass.rs`. Part of #411. +- Step 53 (Locityper) no longer shows a pass at CYP2D6 and FCGR. The authors set their quality filter (no warning, a weighted distance of 30 or less, few unexplained reads) on HLA and KIR genes only, but `og locityper report` applied it as pass or fail at every locus, so a CYP2D6 or FCGR call could read as a green pass that nobody had measured. The `filter` column now reads `pass` or `fail` only at a locus whose name starts with `HLA-` or `KIR`; at any other locus it reads `uncalibrated`, and `reason` says what the rule alone gives there (`... by its rule alone it passes`, or `... it fails:` with the reasons). Both reports show `uncalibrated` in grey and count only `pass` rows as passing. The step's last line adds the count of uncalibrated loci. `docs/53-locityper.md` also says that the cut of 30 comes from Locityper 0.17.3, whose weighted distance was a minimizer Jaccard distance, while the 1.7.14 the step runs gives an edit distance. No column or file name changes; the `filter` column has one new value. A cargo test, `rust/crates/og-reports/tests/i411_locityper_uncalibrated.rs`, checks all five shipped loci; 12 parity goldens of `locityper-report` record the new rows. The docs demo sample (`og dev demo-sample`) now writes its step 53 table with `og locityper report` too, so the demo report shows CYP2D6 and FCGR as `uncalibrated` like a real run; `rust/og/tests/port_demo_sample.rs` checks it. +- Step 45's Y-STR counts are on FamilyTreeDNA's scale at the 24 markers with a published counting rule. The marker set's regions did not always cover the repeat blocks a lab counts, so DYS19 read 16 where FamilyTreeDNA reads 15 on the same DNA, DYS449 read 36 for 29 and Y-GATA-H4 31 for 11. `assets/ystr_panel.tsv` now carries each marker's offset, from the GRCh38 sequence counted by NIST STRBase's repeat structure, and `og y str-report` adds it. A called marker with no published rule says in its note that its count is on the reference's scale. + - `high` confidence now also needs at least 70% of the reads that span the repeat to show the called length (HipSTR's `MALLREADS`). Before, it meant read quality only: a call could be high while most reads showed another length. A record without `MALLREADS` is not high. + - The panel's header says that FamilyTreeDNA's order, names and panels are reproduced only for comparison, that no FamilyTreeDNA text is copied, and that FamilyTreeDNA is a trademark of Gene by Gene. + The columns of `y_str/_y_str.tsv` and `.csv` do not change; the `count` values and the `note` text do. + +- Step 4b (GRIDSS) now writes the calls GRIDSS rates high confidence to `sv_gridss/_gridss.high.vcf.gz`, with its index: `QUAL >= 1000` with assembly support on both sides of the breakpoint (`INFO/AS > 0` and `INFO/RAS > 0`), filtered with the pinned bcftools. The step printed that rule as advice and never applied it. The raw `_gridss.vcf.gz` stays as GRIDSS wrote it. When the raw VCF already exists, the step skips GRIDSS and writes the new file from it. The file is a new stable output in the output contract; no existing output changes. The step also said that step 22 "converts and integrates" GRIDSS's calls. Step 22 leaves them out of the SV consensus, and the step now says so. The reason given for leaving them out was wrong too: SURVIVOR 1.0.7 lets a breakend match another caller's inversion or translocation, so GRIDSS's breakends would count as votes for events it never typed. The SV docs now call the consensus caller agreement, not validation, since Manta and Delly read the same split and paired reads, and say never to run AnnotSV on the consensus VCF: AnnotSV annotates the callers' own calls, and the reports join the consensus support onto them. `tests/fake-docker/bash-step-sv.sh` checks the message and the bcftools filter. +- Step 33's table (`qc/_sample_qc.tsv`) now says when identity or contamination rests on too little evidence. Before, a run with one sample and a FREEMIX from a few hundred markers read like a clean, confirmed sample. Five rows follow `same_person_as`; no row was renamed or removed: + - `verifybamid2_markers`: the markers VerifyBamID2's marker check kept, read from its log. The rerun without the check does not log it, so the count comes from the first run. + - `contamination_confidence` and its reason: `uncertain` when the marker check was skipped, kept fewer than 5,000 markers, or neither the check nor the count is known; `ok` when it kept 5,000 or more, or passed with no count in its log; empty when VerifyBamID2 did not run. `contamination` (`ok` or `warn`) is unchanged. + - `identity` and its reason: `uncertain` below 1,000 genotyped somalier sites, or when no other sample is known to share 1,000 or more with this one; from 1,000 sites on, `not_checked` when no other sample was in the somalier run (every bash run), and `checked` when another sample was compared on 1,000 or more shared sites. + - `og qc sample` takes `--verifybamid2-markers N`. In Nextflow, `.marker_check` holds the count on a second line. +- Every bundled data table now names its source and its terms in its header. `assets/chip_genes_grch38.bed` had no header; it now names GENCODE 50. `assets/sv_rule_regions.tsv` names TRExplorer (MIT, Broad Institute), GENCODE, HGNC and NCBI. `assets/callability_genes.tsv` names GIAB (NIST), GENCODE, HGNC and NCBI. The builders of the SV rule table and the callability catalog (`og dev build sv-rule-regions` and `og dev build callability`) write these lines, so a rebuild keeps them, and a builder test fails when one is missing. The CHIP gene BED has no builder in the repository, so its header is kept by hand. `assets/parascopy_models_v1.7.txt` and `assets/locityper_loci.bed` credit Timofey Prodanov's Zenodo data under CC BY 4.0 and say what changed. `assets/bloodtype_markers.tsv` names RBCeq2's MIT licence and cites the ISBT database for the names only. The upstream notices ship in `assets/licences/`: RBCeq2, TRExplorer, 23andme2vcf and NIST's notice for the GIAB data. The docs of steps 05, 35, 41 and 53, the consumer site fixture and `docs/resources.md` name the same terms, with the terms of the cohort panels and of the AnnotSV bundle. The notes of the test-data release `e2e-data-1` now name the source and terms of each file. No data row changes, and every reader of these files already skips `#` lines, so no output changes. +- PharmCAT (step 07 and the Nextflow `PHARMCAT_PREPROCESS` process) no longer reads a low-quality reference call as a confident match with the reference. With a gVCF, every base of a reference block reached PharmCAT as 0/0 whatever its GQ: a GQ 5 block at CYP2C19 rs4244285, the \*2 position, read as "not \*2". The GQ 20 floor held only for the positions longer than one base that `og pgx refblock-fill` writes itself. Now that filter leaves out every reference call (a block or a DeepVariant `RefCall`) with GQ below 20, or with no GQ, so PharmCAT reads the position as missing and lists it in `missing_pgx_var.vcf`. A variant call passes whatever its GQ. `--min-gq` sets both floors. The step log gets one more line when a call is left out, with the count and the PharmCAT positions among them. No option, output file or column changes; a gene can now come out with fewer alleles ruled out where its positions were poorly covered. +- An HTT count of 36 to 39 CAG no longer reads only as plain `full_mutation` in `summary.json`. That range is reduced penetrance: it can cause Huntington disease, but not in everyone who carries it. Stranger grades HTT with one pathogenic minimum (36 on the STRchive catalog), so it could not say so. `og summary collect` now adds three keys to a locus with a sized allele in such a range, and to its entry in the flagged list: `penetrance` (`36-39`), `penetrance_label` and `penetrance_citation` (GeneReviews). The ranges live in a new table, `assets/str_penetrance_ranges.tsv`, which holds HTT only. Stranger's status and every other key stay as they were. The reports do not print the new keys yet, and only step 24 (`run-all.sh`) writes them: the Nextflow report does not stage the new table yet, so a Nextflow run's `summary.json` has no such keys. A second fix: an allele that ExpansionHunter supports with in-repeat reads only (`ADSP` and `ADFL` 0, `ADIR` above 0) is now `in_repeat`, so it is listed as not sized and shown as at least the lower end of its interval. Before, such an allele read as sized when its `SO` was empty, and as `flanking_only` when its `SO` said `FLANKING`. `rust/crates/og-summary/tests/i411_str_htt_penetrance.rs` checks both. +- Step 49 (CHIP) now applies the 2% VAF that defines CHIP, says that a call is a possible finding and not a diagnosis, notes the calls whose reads also fit an inherited variant, and counts ASXL1 truncating changes only in its last two exons. Before, a passing call under 2% read `chip` although the step and its doc said CHIP starts at 2%. A call such as 10 of 30 reads, under the 35% cut, read `chip` with nothing to say that an inherited heterozygous variant fits those reads as well. ASXL1 counted a truncating change in any exon, where the CHIP studies count the ones in its last exons. What changes in `chip/_chip.tsv` (no column is added, renamed or removed): + - A new `status` value, `low_vaf`: a call that passed the filters with 3 reads or more and a VAF under 2%. It is not counted. + - The `note` of a `chip` row starts with `possible clonal haematopoiesis (not a diagnosis): `, then the class rule as before. When the call's reads fit an inherited heterozygous variant (a binomial count at 50%: 1 in 100 or more such variants show as few reads with the change), the note ends with `; 10 of 30 reads also fit an inherited heterozygous variant`. The call stays `chip` and counted: a real clone of 25% to 35% looks the same. + - The `note` of a `likely_germline` row says that the 35% cut cannot tell an inherited variant from a large clone without a matched normal sample. + - `assets/chip_genes.tsv` counts ASXL1 truncating changes in exons 12 and 13 of its MANE Select transcript (11 and 12 in the older numbering of the CHIP studies). One in an earlier exon is `other_change`. + - The step's first log line says `possible clonal haematopoiesis, not a diagnosis` and counts the calls that also fit an inherited variant apart. The report cards read the same table, so their call lines carry the new notes; their titles do not change here. +- Step 03e picks the Clair3 model for ONT reads from their basecaller. Before, it used the Dorado v5.0.0 SUP model for every ONT sample unless `CLAIR3_MODEL` was set, so reads from another basecaller got the wrong model: Clair3 still wrote a VCF, with less accurate calls and no warning. Now step 02b writes the basecaller model into the aligned BAM's read group (`DS:basecall_model=...`), from the new `BASECALL_MODEL` or from the `basecall_model=` Dorado writes into an unaligned BAM. Step 03e runs `og longread clair3-model` inside the Clair3 image, which maps the name to the model directory (R10.4.1 400 bps SUP and HAC by version, R9.4.1 SUP and HAC) and checks that the directory is in the image. `CLAIR3_MODEL` still wins and is checked too. With no basecaller model known, read groups that name different models or only some that name one, a basecaller Clair3 has no model for (fast basecalls), or a model the image lacks, the step stops with exit 1 and lists the image's models. So an ONT run that worked before without a basecaller model in its BAM now stops until `BASECALL_MODEL` or `CLAIR3_MODEL` is set. HiFi does not change. The aligned BAM of an ONT run gains a `DS` field in its `@RG` line; no output file name changes. `docs/long-read-guide.md` has the mapping. + +- Step 42 now says when a genotype rule's reading assumes which variants share a copy. Heterozygous at both HFE sites read as C282Y/H63D, one change on each copy, with no word that the two changes could sit on one copy. The same held for SERPINA1 PiSZ and GC Gc1S/Gc2, and the other way round for APOL1 G0/G1, CAD9p21 "one risk copy" and MAPT H1/H2, which assume both sites sit on one copy. Such a reading now ends with "Phase unknown: this reading assumes ...". `og traits phase-sites` also sends those sites to WhatsHap. When one phase block holds them, a confirmed pair reads without the note (`phase` read_backed), and a pair with a copy the rule does not describe reads `other_haplotype`, not read: C282Y and H63D on one copy say that one copy is changed and the other is not. The columns of `_genotype_rules.tsv` stay the same; only the `reading`, `phase` and `status` values of these double heterozygotes change. APOE is unchanged: its line already names both pairs. Part of #411 (trait-02, trait-03, trait-05, trait-06, trait-25). +- og-admix has our own local-ancestry painting engine, `og_admix::paint`, written from the published equations of the copying model FLARE uses; no FLARE or RFMix source was read. Each hidden state is an ancestry and a reference haplotype of it. Ancestry events come at T per Morgan and draw the new ancestry from mu; inside an ancestry the copied haplotype jumps at rho_a per Morgan; the copied allele differs from the target's with chance epsilon. Each forward and backward step costs O(H) through per-group totals, the forward values are kept every sqrt(M) sites, and the reference haplotypes are bit-packed. Up to 5 EM rounds over the whole genome fit mu, T, epsilon and rho_a, starting from mu of the continental projection, T 10, epsilon 0.01 and rho_a 4Ne/n_a; `write_params` writes them as `paint/params.tsv`. Chromosomes and haplotypes run on a set number of threads and give the same bytes on any number. No step calls the engine yet, so nothing a run writes changes; step 26b still paints with RFMix. The cargo test `tests/anc_paint_engine.rs` paints a simulated two-group chromosome of 2,000 sites with one breakpoint (bp accuracy 0.9995, the breakpoint 0.002 cM off) and fails it with an emission of 0.5; checks forward-backward against a brute-force model within 1e-9 and the checkpoints against full storage within 1e-12; and measures a 22-chromosome painting under 1 GB. +- The monthly freshness issue now says when a curated drug table no longer matches its source. Three rows join its database table. Each row of `assets/pgx_contraindications.tsv` is compared with its CPIC pair (the pair exists, its level, still provisional) and with its DailyMed label (still published). `assets/pgx_inhibitors.tsv` is compared with the FDA table of CYP inhibitors: each row's class, and any strong or moderate CYP2D6, CYP2C19, CYP2C9 or CYP2B6 inhibitor, or strong CYP3A inhibitor, that has no row. fda.gov refuses GitHub's runners, so when it does not answer, the newest Wayback Machine capture of the page is read instead, the row names the capture date, and a capture older than 92 days is an error. `assets/pgx_genes.tsv` is compared with the gene table of the newest pypgx release. A row that differs shows as `drift` with the row named; it is a warning to fix the table, and the run stays green. A source that does not answer, or answers empty, is an error as for every other lookup. The freshness checks now also run on a pull request that changes one of the three tables. `og dev freshness --self-test` plants a row whose CPIC level moved from A to B and fails unless it shows as drift. No pipeline output changes. - Each `run-all.sh` run now ends with `bin/og facts`, which writes `facts/_genome_facts.json` in the format `ownhealth.genome-facts/v1`, readable by its owner only (mode 600). [OwnHealth](https://github.com/GeiserX/OwnHealth) imports this file, with the sample's VCF, to show the genome next to the rest of a person's record: `docs/ownhealth.md` says how. The file is a stable output under the 1.0 promise and is listed in the output contract. It is skipped when the HTML report fails, and an earlier run's file is removed before a run starts. A plain `nextflow run main.nf` does not write it yet; `bin/og facts` writes it by hand. - `og report index build --summary summary.json [--sample-dir DIR] -o _search_index.json` writes the run's search index in Rust. `og report index query --index FILE QUERY` answers one query with the rule of the live site's search box (`assets/live/plugins/search.js`); a cargo test runs that script under node against the Rust rule. The file is the one `bin/results_index.py` writes: the same terms, sections, anchors, counts and mentions, and the same answer to each query. No step calls the verb yet: step 24 and the Nextflow report still write the index with `bin/results_index.py`. One field is not written yet: `veil`, which tags an item that names a result a child's page keeps closed. It needs the live site's findings, which are not ported yet. - Step 37 and the Nextflow `Y_HAPLOGROUP` process run Yleaf through its own command line. `bin/yleaf_run.py`, our Python launcher that patched Yleaf at run time (its data folder, its reference, its samtools calls and its process pools), is gone. Yleaf 4.1.7 has the options the launcher stood in for: `-rp` reads the pileup the step makes beside the chrY BAM, `--ref-fasta` names the reference so it downloads none, and `--no-update-check` keeps it offline. Yleaf now predicts with the marker table and tree its image ships; the image test checks they are the files of the archive `setup.sh --yleaf-data` installs, whose positions the pileup is made at, and that Yleaf still has those options, that pileup file and the samtools flags the pileup uses. When no read falls on any marker, Yleaf stops before it predicts, so `og y yleaf-no-reads` writes the row it gives for too few markers (`Hg` NA, the BAM's mapped reads), as the launcher did. On the fixture's chrY slice the prediction table and every file Yleaf writes are the same, byte for byte, as with the launcher, and so is the empty-pileup row. No option, output file or column changes. Step 37 now stops with a clear message when `REF_FASTA` does not end in `.fa`, `.fasta` or `.fna` (a compressed FASTA, say): Yleaf's `--ref-fasta` takes no other name, and the Nextflow `--reference` already asks for a plain FASTA. `setup.sh` installs `.fasta`. @@ -38,7 +72,7 @@ Each release's notes. From 1.0.0 on, a major or minor release has hand-written n - The privacy page now says what the CPSR (step 17) and MultiQC (step 28) reports contact when you open them: nothing. Both keep their stylesheets, scripts and images inside the HTML file, and their external addresses are plain links. The page said before that these two reports were not checked. Docs only; no output changes. - Guard's new `mito-workdir` job fails when the Nextflow `MITO_HAPLOGROUP` process has a `cd` or a `readlink -f`: haplogrep3 must run in the task directory. There the pinned build uses the config and trees beside its jar, and Nextflow collects the report. The check reads only that process, so the `readlink -f` of the reference in `MITO_EXTRACT_CHRM` stays allowed. Its self-test plants a `cd`, a `readlink -f` and a renamed process, which must each fail, and a `cd` in `MITO_EXTRACT_CHRM`, which must not. No output changes. - The 1.0.0 release notes said steps 21, 32 and 9b still run Python for the CYP2D6 depth check and the RFC1 motif count. They run `og`, and the Python files are gone; the notes now say so. `docs/00-reference-setup.md` lists the GIAB tandem-repeat map `setup.sh` installs for step 04c, with its source, its checksum and what the step does without it. -- A change to `rust/crates/og-dev/src/traits_sources.rs`, the source of `og dev traits-sources`, now runs the `traits-panel-1` e2e case, which calls that command. Before, the file was in no case row and not in the e2e scope, so a change to it ran no e2e case. The path is in the case row, in `SCOPE_FILES` of `scripts/ci/e2e-scope.sh` and in the push paths of `e2e.yml`. +- A change to `rust/crates/og-dev/src/traits_sources.rs`, the source of `og dev traits-sources`, now runs the `traits-panel-1` e2e case, which calls that command. Before, the file was in no case row and not in the e2e scope, so a change to it ran no e2e case. The path is in the case row, and the e2e scope covers it with the rest of `rust/`. - The docs demo sample, DEMO-001, is written by the Rust `og` binary: `og dev demo-sample --genome-dir DIR` writes it and `og dev demo-sample check --genome-dir DIR` stops when a report section is not ok. The picture retake script (`tests/demo/retake-screenshots.sh`), the live-site demo (`tests/demo/build_live_demo.py`) and the report and live-results tests run it in place of `tests/demo/make_demo_sample.py`, which stays only for the older tests that still import or run it (`test_live_journal.py`, `test_lpa_kiv2.py`, `test_report_charts.py`, `test_vcf_precheck_samples.sh`) until they move. Every table a step writes with og is written by that og verb, so the demo shows what the product writes. Every fixed table is byte for byte the Python's (the PharmCAT report, the CPIC tables, blood groups, traits, the ClinVar, AnnotSV and Exomiser rows with the son's planted results), and step 24 reads every section of DEMO-001 as ok. The random values come from a new seeded generator, so the made-up counts, depths and scores of the demo differ from before; the planted findings keep their genes and positions. The retake script now runs `bin/og` on the host instead of `python3`, and its mount probe looks for `bin/og`. Pipeline outputs do not change. - The live family page keeps a child's closed results out of the de novo and compound-het tables of that child's own children. A person whom one family lists as a child, with a result to act on still unopened, can be a parent in a family with three generations. Their children's trio rows hold their calls: the parent each variant came from, and their genotype at each de novo candidate. The page left out the gated person's own rows but drew those of their children, so the grandparents' family page showed them. Now both tables of a child stay out of the family view while the child or either parent is gated, and chapter IV says so in one fixed line that does not depend on which rows there are. The tables come back once that parent's results are opened on the page. `family.json` does not change; only what the page draws from it. A node test (`tests/test_live_family_hide_closed.sh`) runs `core.js` and `family-page.js` on an invented family, with controls that cut the rule out. - The live-site docs answer two things a reader looked for and did not find. "Start it" says that Ctrl+C in the site's terminal stops it, and the systemd unit says how to save, start and stop it. "Behind a reverse proxy" says the site needs a host name of its own, served at its root: the pages ask for root paths such as `/login` and `/runs.json`, and there is no flag for a path prefix. Docs only; nothing the site does changes. diff --git a/ROADMAP.md b/ROADMAP.md index 08ee20f4a..4bac3dd4c 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -25,7 +25,7 @@ Upgrade pinned tools, add pre-alignment QC ([#14](https://github.com/GeiserX/Own - [x] **PharmCAT upgrade to 3.2.0** — preprocessor renamed (no `.py`), explicit reporter flags (`-reporterJson -reporterHtml`), `wildtypeAllele` → `referenceAllele` in JSON, NAT2 calling added. Step 7 and step 27 updated together - [x] **PCGR/CPSR upgrade to 2.2.5** — upgraded from 1.4.1 to 2.2.5 with new ref data bundle (`20250314`), separate VEP cache mount, and completely rewritten CLI - [x] **Octopus variant caller** (`scripts/03d-octopus.sh` → `vcf_octopus/`) — haplotype-aware Bayesian caller as a 5th benchmarking alternative. Auto-discovered by `benchmark-variants.sh` -- [x] **GRIDSS structural variant caller** (`scripts/04b-gridss.sh` → `sv_gridss/`) — assembly-based SV caller for complex rearrangements; strengthens SV consensus alongside Manta/Delly. Requires BWA index and 32GB RAM +- [x] **GRIDSS structural variant caller** (`scripts/04b-gridss.sh` → `sv_gridss/`) — assembly-based SV caller for complex rearrangements; left out of the SV consensus (step 22), since its breakend pairs are not turned into DEL, DUP or INV. Writes its high-confidence calls (QUAL >= 1000, AS > 0, RAS > 0) to `sv_gridss/_gridss.high.vcf.gz`. Requires BWA index and 32GB RAM - [x] **CYP2D6 star allele calling** — evaluated Aldy v4.8.3 (best CYP2D6 SV caller per Twesigomwe 2020), StellarPGx (broken Docker), and BCyrius (no public repo). Aldy documented as recommended optional replacement for Cyrius in `docs/21-cyrius.md`. Note: Aldy uses an academic-only license (IURTC) incompatible with GPL-3.0, so it cannot be a required dependency. pypgx (step 32) is the GPL-compatible alternative included in the pipeline - [x] **Long-read support** (`scripts/02b-alignment-longread.sh`, `scripts/03e-clair3.sh`, `scripts/04c-sniffles2.sh`) — ONT and PacBio HiFi alignment (minimap2 `map-ont`/`map-hifi`), Clair3 variant calling, Sniffles2 SV calling. Comprehensive guide in `docs/long-read-guide.md` - [x] **Whole exome sequencing (WES) guide** — `docs/wes-guide.md` covers per-step compatibility, capture BED files, coverage QC metrics and limitations. WES data runs step by step; no script has a WES mode. Thanks to [@madmolecularman](https://github.com/madmolecularman) for domain expertise here diff --git a/assets/bloodtype_markers.tsv b/assets/bloodtype_markers.tsv index c29af72f2..6653bb764 100644 --- a/assets/bloodtype_markers.tsv +++ b/assets/bloodtype_markers.tsv @@ -2,6 +2,13 @@ # processes) reads, GRCh38 (NCBI no-ALT analysis set), as a BED with extra columns: start is # 0-based, end 1-based, so samtools bedcov reads this file as it is (comment and header lines removed). # +# Licence: what this table takes from RBCeq2 is used under RBCeq2's MIT licence, Copyright 2025 +# Australian Red Cross Lifeblood; its full notice is assets/licences/RBCeq2-LICENSE.txt. The +# system, antigen and allele names follow the ISBT nomenclature: International Society of Blood +# Transfusion (ISBT) Blood Group Database, https://blooddatabase.isbtweb.org. No row was read +# from that database or its API. Positions and rsids from dbSNP and Ensembl are open data with +# no restriction on use. +# # kind site: one variant that defines a blood group antigen. ref and alt are the VCF alleles # (left-aligned, + strand); ref_means and alt_means are what each allele gives. The variants # and their antigens are the ones the ISBT allele tables define, as packaged by RBCeq2 2.4.4 diff --git a/assets/callability_genes.tsv b/assets/callability_genes.tsv index 6fedd9c07..28eb04e83 100644 --- a/assets/callability_genes.tsv +++ b/assets/callability_genes.tsv @@ -3,6 +3,9 @@ # report lists the ones it could not read. Written by scripts/ci/build-callability.sh, which says how the # rows and the owners are chosen; rebuild it there, do not edit it by hand. start is 0-based and end # 1-based, as in a BED file; an ALT-only gene has its ALT scaffold as chrom and '.' as start and end. +# Sources and terms: GIAB CMRG v1.00 and genome stratifications v3.6, from NIST, not subject to +# US copyright (notice and changes: assets/licences/NIST-GIAB-NOTICE.txt); GENCODE 50, open +# access; HGNC ids and the NCBI GRCh38 assembly report, no restriction on use. # Genes: 1572 (CMRG 273, segdup 1276, false_duplication 22, collapsed 50, ALT-only 19); with an owner: 61. gene hgnc_id chrom start end reasons owner OR4F5 HGNC:14825 chr1 65418 71585 segdup . diff --git a/assets/chip_genes.tsv b/assets/chip_genes.tsv index 04e7fa31a..acc504dc9 100644 --- a/assets/chip_genes.tsv +++ b/assets/chip_genes.tsv @@ -12,7 +12,7 @@ gene truncating missense note pmids DNMT3A all R882 The most common CHIP gene. R882 is the hotspot of DNMT3A in acute myeloid leukaemia; other missense changes are listed, not counted. 25426837;21067377 TET2 all none Second most common CHIP gene. Truncating changes only; missense changes are listed, not counted. 25426837;19474426 -ASXL1 all none Third most common CHIP gene. Truncating changes only. 25426837;19388938 +ASXL1 exons:12-13 none Third most common CHIP gene. Truncating changes in the last two exons (12 and 13 here, 11 and 12 in the older transcript numbering), where the CHIP studies count them; earlier ones are listed, not counted. 25426837;19388938 JAK2 none V617F V617F only, the change behind most myeloproliferative neoplasms. 25426837;15858187 TP53 all 102-292 Missense changes count in the DNA-binding core domain, residues 102 to 292. 25426837;8023157 PPM1D exons:6-6 none Truncating changes in the last exon (6), where the mosaic and clonal ones cluster. 23242139;29954749 diff --git a/assets/chip_genes_grch38.bed b/assets/chip_genes_grch38.bed index f300cd222..6aabf063d 100644 --- a/assets/chip_genes_grch38.bed +++ b/assets/chip_genes_grch38.bed @@ -1,3 +1,9 @@ +# assets/chip_genes_grch38.bed: the clonal hematopoiesis (CHIP) driver genes step 29 +# (scripts/29-mutect2-somatic.sh) calls with Mutect2 by default (INTERVALS=chip), GRCh38, BED +# (0-based start). Columns: chrom, start, end, gene. Each row is the gene's record in GENCODE 50's +# basic annotation, 100 bp either side. +# Source: GENCODE release 50 (https://www.gencodegenes.org/human/release_50.html), open access data +# with no restriction on use (EMBL-EBI terms of use, https://www.ebi.ac.uk/about/terms-of-use/). chr1 1785184 1892392 GNB1 chr1 43337707 43354566 MPL chr1 114704367 114716875 NRAS diff --git a/assets/genotype_rules.tsv b/assets/genotype_rules.tsv index c4dd1b1e1..8110a12ab 100644 --- a/assets/genotype_rules.tsv +++ b/assets/genotype_rules.tsv @@ -15,7 +15,10 @@ # genotypes allow several diplotypes, all of them in that order, joined by |. # needs_phase yes: with two or more heterozygous sites the result needs to know which alleles sit # on the same copy (WhatsHap, from the reads); without that the rule is unphased, not read. -# needs_phase no: the combination line is the one of every diplotype the genotypes allow. +# needs_phase no: the combination line is the one of every diplotype the genotypes allow. When +# that is one diplotype from two or more heterozygous sites, it assumes which alleles share a copy: +# the reading ends with that assumption, and read-backed phase, when one block holds the sites, +# confirms it or reads the pair as other_haplotype. # ancestry: yes when the reading depends on ancestry (the note says how). rule APOE APOE APOE alleles (e2, e3, e4) no yes Odds ratios from a meta-analysis of people of European descent (Farrer 1997); the e4 effect was weaker in African American and Hispanic people and stronger in Japanese people. Step 25's Alzheimer's score (PGS000334) includes the same two sites; docs/42-traits.md says why step 06 does not list APOE. 8346443,9343467 site APOE rs429358 chr19 44908684 T C @@ -62,7 +65,7 @@ combination SERPINA1 M/Z PiMZ One Z copy: a carrier, with an intermediate alpha- combination SERPINA1 S/S PiSS Two S copies: a mildly lowered level, not usually a deficiency that raises the risk of disease. combination SERPINA1 S/Z PiSZ One S and one Z copy: a moderate deficiency, with a raised risk of emphysema, above all in smokers. Worth a serum level and a talk with a doctor. combination SERPINA1 Z/Z PiZZ Two Z copies: severe alpha-1 antitrypsin deficiency, with a raised risk of early emphysema and of liver disease. Worth a serum level and a talk with a doctor. -rule HFE HFE HFE haemochromatosis genotype (C282Y, H63D) no yes The two HFE missense changes of Feder 1996: C282Y (rs1800562), found homozygous in 83% of 178 patients with hereditary haemochromatosis, and H63D (rs1799945). The two sites are about 2 kb apart and read without phase: heterozygous at both reads as C282Y/H63D, one change on each copy. Many people with a risk genotype never build up iron; ferritin and transferrin saturation tell. The secondary-findings list reports C282Y homozygotes too (assets/acmg_sf.tsv); this line is the reading of every genotype. C282Y is most common in people of northern European descent. 8696333 +rule HFE HFE HFE haemochromatosis genotype (C282Y, H63D) no yes The two HFE missense changes of Feder 1996: C282Y (rs1800562), found homozygous in 83% of 178 patients with hereditary haemochromatosis, and H63D (rs1799945). The two sites are about 2 kb apart, too far for most read pairs to phase: heterozygous at both reads as C282Y/H63D, one change on each copy, and the reading says it assumes that. Many people with a risk genotype never build up iron; ferritin and transferrin saturation tell. The secondary-findings list reports C282Y homozygotes too (assets/acmg_sf.tsv); this line is the reading of every genotype. C282Y is most common in people of northern European descent. 8696333 site HFE rs1800562 chr6 26092913 G A site HFE rs1799945 chr6 26090951 C G haplotype HFE wt G,C @@ -86,7 +89,7 @@ combination GC Gc1F/Gc2 Gc1F/Gc2 One Gc1F and one Gc2 copy: Powe 2013 gave prote combination GC Gc1S/Gc1S Gc1S/Gc1S Two Gc1S copies: in Powe 2013 this group had the highest vitamin D-binding protein level (mean 468 micrograms per millilitre). combination GC Gc1S/Gc2 Gc1S/Gc2 One Gc1S and one Gc2 copy: Powe 2013 gave protein levels for the homozygous groups and Gc1F/Gc1S only. combination GC Gc2/Gc2 Gc2/Gc2 Two Gc2 copies: in Powe 2013 this group had an intermediate protein level (mean 190 micrograms per millilitre). -rule CAD9p21 CDKN2B-AS1 Chromosome 9p21 heart disease risk haplotype no yes Two tags of the 9p21 risk haplotype near CDKN2A and CDKN2B: rs10757278 (G, Helgadottir 2007, myocardial infarction) and rs1333049 (C, the strongest coronary artery disease signal of the WTCCC 2007 scan). McPherson 2007 found the same interval, with no link to cholesterol, blood pressure or diabetes. The two are read together without phase; a copy with only one of the two risk alleles is not read. The studies were of people of European descent. 17478679,17554300,17478681 +rule CAD9p21 CDKN2B-AS1 Chromosome 9p21 heart disease risk haplotype no yes Two tags of the 9p21 risk haplotype near CDKN2A and CDKN2B: rs10757278 (G, Helgadottir 2007, myocardial infarction) and rs1333049 (C, the strongest coronary artery disease signal of the WTCCC 2007 scan). McPherson 2007 found the same interval, with no link to cholesterol, blood pressure or diabetes. The two are read together as tags of one haplotype; heterozygous at both reads as one risk copy, and the reading says it assumes both risk alleles sit on that copy. A copy with only one of the two risk alleles is not read. The studies were of people of European descent. 17478679,17554300,17478681 site CAD9p21 rs10757278 chr9 22124478 A G site CAD9p21 rs1333049 chr9 22125504 G C haplotype CAD9p21 nonrisk A,G diff --git a/assets/licences/23andme2vcf-LICENSE.txt b/assets/licences/23andme2vcf-LICENSE.txt new file mode 100644 index 000000000..40b933fcb --- /dev/null +++ b/assets/licences/23andme2vcf-LICENSE.txt @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 Rob Long + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + diff --git a/assets/licences/NIST-GIAB-NOTICE.txt b/assets/licences/NIST-GIAB-NOTICE.txt new file mode 100644 index 000000000..3747f3f20 --- /dev/null +++ b/assets/licences/NIST-GIAB-NOTICE.txt @@ -0,0 +1,36 @@ +assets/callability_genes.tsv is built from Genome in a Bottle (GIAB) data of the +National Institute of Standards and Technology (NIST): the CMRG v1.00 benchmark gene +coordinates and the GRCh38 genome stratifications v3.6 (segmental duplications, false +duplications, collapsed duplications). Changed: the genes those regions cover are +selected and each is tagged with its reason (scripts/ci/build-callability.sh); the date +of each change is the git commit date of assets/callability_genes.tsv. The notice NIST +asks distributions of its data to carry (https://www.nist.gov/open/license): + +This data/work was created by employees of the National Institute of Standards and +Technology (NIST), an agency of the Federal Government. Pursuant to title 17 United +States Code Section 105, works of NIST employees are not subject to copyright protection +in the United States. This data/work may be subject to foreign copyright. The data/work +is provided by NIST as a public service and is expressly provided "AS IS." NIST MAKES NO +WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR STATUTORY, INCLUDING, WITHOUT LIMITATION, THE +IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT +AND DATA ACCURACY. NIST does not warrant or make any representations regarding the use +of the data or the results thereof, including but not limited to the correctness, +accuracy, reliability or usefulness of the data. NIST SHALL NOT BE LIABLE AND YOU HEREBY +RELEASE NIST FROM LIABILITY FOR ANY INDIRECT, CONSEQUENTIAL, SPECIAL, OR INCIDENTAL +DAMAGES (INCLUDING DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF +BUSINESS INFORMATION, AND THE LIKE), WHETHER ARISING IN TORT, CONTRACT, OR OTHERWISE, +ARISING FROM OR RELATING TO THE DATA (OR THE USE OF OR INABILITY TO USE THIS DATA), EVEN +IF NIST HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +To the extent that NIST may hold copyright in countries other than the United States, +you are hereby granted the non-exclusive irrevocable and unconditional right to print, +publish, prepare derivative works and distribute the NIST data, in any medium, or +authorize others to do so on your behalf, on a royalty-free basis throughout the world. +You may improve, modify, and create derivative works of the data or any portion of the +data, and you may copy and distribute such modifications or works. Modified works should +carry a notice stating that you changed the data and should note the date and nature of +any such change. Please explicitly acknowledge the National Institute of Standards and +Technology as the source of the data: Data citation recommendations are provided at +https://www.nist.gov/open/license . Permission to use this data is contingent upon your +acceptance of the terms of this agreement and upon your providing appropriate +acknowledgments of NIST's creation of the data/work. diff --git a/assets/licences/RBCeq2-LICENSE.txt b/assets/licences/RBCeq2-LICENSE.txt new file mode 100644 index 000000000..e621675d7 --- /dev/null +++ b/assets/licences/RBCeq2-LICENSE.txt @@ -0,0 +1,7 @@ +Copyright 2025 Australian Red Cross Lifeblood + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/assets/licences/TRExplorer-LICENSE.txt b/assets/licences/TRExplorer-LICENSE.txt new file mode 100644 index 000000000..18009f750 --- /dev/null +++ b/assets/licences/TRExplorer-LICENSE.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Broad Institute + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/assets/locityper_loci.bed b/assets/locityper_loci.bed index 24b648573..107e1f4f5 100644 --- a/assets/locityper_loci.bed +++ b/assets/locityper_loci.bed @@ -4,6 +4,10 @@ # their FCGR3A and FCGR2B loci joined because they overlap. setup.sh --locityper-data builds the # database of these rows from the HPRC v2.1 pangenome VCF (LOCITYPER_PANEL_URL) and reads that VCF # 250 kb either side of each row, the room Locityper's locus extension needs (up to 200 kb). +# Source: Timofey Prodanov, Locityper loci database, https://doi.org/10.5281/zenodo.15879519, +# licensed CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Changed: six of its 326 loci +# kept, FCGR3A and FCGR2B joined as FCGR (five rows). The HPRC panel is public domain +# (https://humanpangenome.org/data-use/); no part of it is in this file. chr1 161506761 161681047 FCGR chr6 32484347 32593538 HLA-DRB1 chr6 32652603 32669077 HLA-DQB1 diff --git a/assets/output_contract.tsv b/assets/output_contract.tsv index 736705877..3e5af4be3 100644 --- a/assets/output_contract.tsv +++ b/assets/output_contract.tsv @@ -1,7 +1,8 @@ # assets/output_contract.tsv: what OwnGenome 1.0 keeps stable (docs/output-contract.md). # og dev contract reads it (rust/crates/og-dev/src/contract.rs): --static in Guard's rust job (rust/crates/og-dev/tests/repo.rs) -# checks every row against the code, and the e2e case output-contract-1-hg002 checks the files the -# HG002 run wrote. Columns, tab-separated: +# checks every row against the code, --baseline in the same job checks that every stable row of the +# newest 1.x release is still here and still stable, and the e2e case output-contract-1-hg002 checks +# the files the HG002 run wrote. Columns, tab-separated: # kind file, param (a nextflow_schema.json param), tool (a --tools name in main.nf) or # switch (a run-all.sh switch, its SWITCHES list) # name file: its path under the results folder (GENOME_DIR for the bash steps and run-all.sh, @@ -82,11 +83,11 @@ file {sample}/chip/{sample}_chip.tsv 49 CHIP_REPORT both tsv experimental - - file {sample}/chip/{sample}_chip_depth.tsv 49 CHIP_REPORT both tsv experimental - - file {sample}/chip/{sample}_chip_filtered.vcf.gz 49 CHIP_MUTECT2 both vcf experimental - - file {sample}/clinical/{sample}_clinical.vcf.gz 23 CLINICAL_FILTER both vcf stable bash - -file {sample}/clinical/{sample}_clinical.vcf.gz.tbi 23 CLINICAL_FILTER nextflow index stable - - -file {sample}/clinical/{sample}_clinical_summary.tsv 23 CLINICAL_FILTER both tsv stable - - -file {sample}/clinvar/{sample}_clinvar_cdna_check.tsv 06 CLINVAR_CDNA_CHECK both tsv stable - - -file {sample}/clinvar/{sample}_clinvar_cdna_scan.tsv 06 CLINVAR_CDNA_CHECK both tsv stable - - -file {sample}/clinvar/{sample}_clinvar_deep_intronic.tsv 06 CLINVAR_SCREEN both tsv stable - - +file {sample}/clinical/{sample}_clinical.vcf.gz.tbi 23 CLINICAL_FILTER both index stable bash - +file {sample}/clinical/{sample}_clinical_summary.tsv 23 CLINICAL_FILTER both tsv stable bash - +file {sample}/clinvar/{sample}_clinvar_cdna_check.tsv 06 CLINVAR_CDNA_CHECK both tsv stable both - +file {sample}/clinvar/{sample}_clinvar_cdna_scan.tsv 06 CLINVAR_CDNA_CHECK both tsv stable both - +file {sample}/clinvar/{sample}_clinvar_deep_intronic.tsv 06 CLINVAR_SCREEN both tsv stable both - file {sample}/clinvar/{sample}_clinvar_hits.tsv 06 CLINVAR_SCREEN both tsv stable both chrom,pos,ref,alt,genotype,clinvar_id,geneinfo,clnsig,clnrevstat file {sample}/clinvar/{sample}_clinvar_hits.vcf 06 CLINVAR_SCREEN both vcf stable both INFO/GENEINFO,INFO/CLNSIG,INFO/CLNREVSTAT file {sample}/clinvar/{sample}_pass.vcf.gz 06 CLINVAR_SCREEN both vcf stable both FORMAT/GT @@ -99,11 +100,11 @@ file {sample}/consumer_export/{sample}_23andme_v5.zip 40 CONSUMER_EXPORT both zi file {sample}/consumer_export/{sample}_ancestrydna_layout.zip 40 CONSUMER_EXPORT both zip experimental - - file {sample}/consumer_export/{sample}_consumer_export.tsv 40 CONSUMER_EXPORT both tsv experimental - - file {sample}/couple/{sample}_couple_carrier.tsv 39 COUPLE_CARRIER both tsv experimental - - -file {sample}/coverage/{sample}.mosdepth.global.dist.txt 16b MOSDEPTH nextflow text stable - - +file {sample}/coverage/{sample}.mosdepth.global.dist.txt 16b MOSDEPTH nextflow text stable nextflow - file {sample}/coverage/{sample}.mosdepth.summary.txt 16b MOSDEPTH nextflow tsv stable nextflow chrom,length,bases,mean,min,max -file {sample}/coverage/{sample}.regions.bed.gz 16b MOSDEPTH nextflow bed stable - - -file {sample}/coverage/{sample}.thresholds.bed.gz 16b MOSDEPTH nextflow bed stable - - -file {sample}/coverage/{sample}_callability.bed.gz 16b MOSDEPTH nextflow bed stable - - +file {sample}/coverage/{sample}.regions.bed.gz 16b MOSDEPTH nextflow bed stable nextflow - +file {sample}/coverage/{sample}.thresholds.bed.gz 16b MOSDEPTH nextflow bed stable nextflow - +file {sample}/coverage/{sample}_callability.bed.gz 16b MOSDEPTH nextflow bed stable nextflow - file {sample}/cpic/{sample}_cpic_recommendations.txt 27 CPIC_LOOKUP both text stable both - file {sample}/cpic/{sample}_phenotypes.tsv 27 CPIC_LOOKUP both tsv stable both - file {sample}/cpsr/{sample}.cpsr.grch38.classification.tsv.gz 17 CPSR both tsv stable - - @@ -119,7 +120,7 @@ file {sample}/exomiser/{sample}_exomiser_terms.tsv 48 EXOMISER_REPORT both tsv e file {sample}/exomiser/{sample}_exomiser_top.tsv 48 EXOMISER_REPORT both tsv experimental - - file {sample}/expansion_hunter/{sample}.json 09 EXPANSION_HUNTER nextflow json stable - - file {sample}/expansion_hunter/{sample}.vcf 09 EXPANSION_HUNTER nextflow vcf stable - - -file {sample}/expansion_hunter/{sample}_eh_stranger.vcf 09b STRANGER both vcf stable - - +file {sample}/expansion_hunter/{sample}_eh_stranger.vcf 09b STRANGER both vcf stable bash - file {sample}/expansion_hunter/{sample}_realigned.bam 09 EXPANSION_HUNTER nextflow bam stable - - file {sample}/expansion_hunter/{sample}_rfc1_motif.tsv 09b STRANGER_RFC1 both tsv stable - - file {sample}/expansion_hunter/{sample}_str_motifs.tsv 09b STRANGER_RFC1 both tsv stable - - @@ -132,7 +133,7 @@ file {sample}/hla/{sample}_hla_genotype.tsv 08 HLA_TYPING nextflow tsv stable - file {sample}/hla_optitype/{sample}_hla_concordance.tsv 08 HLA_QC both tsv experimental - - file {sample}/hla_optitype/{sample}_optitype_result.tsv 08 HLA_QC both tsv experimental - - file {sample}/hla_t1k/{sample}_hla_genotype.tsv 08 - bash tsv stable bash - -file {sample}/indexcov 16 INDEXCOV both dir stable - - +file {sample}/indexcov 16 INDEXCOV both dir stable both - file {sample}/indexcov/indexcov-indexcov.ped 16 - bash tsv stable bash - file {sample}/kir/database_release.txt 08 KIR_TYPING nextflow text experimental - - file {sample}/kir/{sample}_kir_genotype.tsv 08 KIR_TYPING both tsv experimental - - @@ -154,17 +155,17 @@ file {sample}/mei/{sample}_mei_annotsv.tsv 50 MEI_REPORT both tsv experimental - file {sample}/mei/{sample}_mei_depth.tsv 50 MEI_DEPTH both tsv experimental - - file {sample}/mei/{sample}_mei_mainchr.txt 50 MEI_DEPTH nextflow text internal - - file {sample}/mei/{sample}_mei_sites.tsv 50 MEI_REPORT both tsv experimental - - -file {sample}/mito/{sample}_chrM.fasta 12 MITO_EXTRACT_CHRM both fasta stable - - +file {sample}/mito/{sample}_chrM.fasta 12 MITO_EXTRACT_CHRM both fasta stable bash - file {sample}/mito/{sample}_chrM.vcf.gz 12 MITO_EXTRACT_CHRM nextflow vcf internal - - file {sample}/mito/{sample}_chrM.vcf.gz.tbi 12 MITO_EXTRACT_CHRM nextflow index internal - - -file {sample}/mito/{sample}_chrM_annotated.tsv 20 MITO_VARIANTS_ANNOTATE both tsv stable - - -file {sample}/mito/{sample}_chrM_deletions.tsv 20 MITO_DELETIONS both tsv stable - - +file {sample}/mito/{sample}_chrM_annotated.tsv 20 MITO_VARIANTS_ANNOTATE both tsv stable bash - +file {sample}/mito/{sample}_chrM_deletions.tsv 20 MITO_DELETIONS both tsv stable bash - file {sample}/mito/{sample}_chrM_filtered.vcf.gz 20 MITO_VARIANTS both vcf stable bash - -file {sample}/mito/{sample}_chrM_filtered.vcf.gz.tbi 20 MITO_VARIANTS nextflow index stable - - -file {sample}/mito/{sample}_chrM_mutect2.vcf.gz.stats 20 MITO_VARIANTS nextflow bin stable - - +file {sample}/mito/{sample}_chrM_filtered.vcf.gz.tbi 20 MITO_VARIANTS both index stable bash - +file {sample}/mito/{sample}_chrM_mutect2.vcf.gz.stats 20 MITO_VARIANTS both bin stable bash - file {sample}/mito/{sample}_haplocheck.txt 12 HAPLOCHECK both text stable - - file {sample}/mito/{sample}_haplogroup.txt 12 MITO_HAPLOGROUP both text stable bash - -file {sample}/mito/{sample}_mtdna_copies.tsv 20 MITO_DELETIONS both tsv stable - - +file {sample}/mito/{sample}_mtdna_copies.tsv 20 MITO_DELETIONS both tsv stable bash - file {sample}/mosaic/{sample}_mocha.log 51 MOCHA_CALL both text experimental - - file {sample}/mosaic/{sample}_mocha.tsv 51 MOCHA_REPORT both tsv experimental - - file {sample}/mosaic/{sample}_mocha_calls_raw.tsv 51 MOCHA_CALL both tsv experimental - - @@ -188,15 +189,15 @@ file {sample}/paralogs/{sample}_smn1_marker.tsv 35 PARASCOPY both tsv experiment file {sample}/paralogs/{sample}_smn_copy_number.tsv 35 PARASCOPY both tsv experimental - - file {sample}/pgx_consensus/{sample}_outside_calls.tsv 36 PGX_CONSENSUS both tsv stable - - file {sample}/pgx_consensus/{sample}_pgx_consensus.tsv 36 PGX_CONSENSUS both tsv stable - - -file {sample}/pharmcat/{sample}.match.json 07 PHARMCAT nextflow json stable - - -file {sample}/pharmcat/{sample}.phenotype.json 07 PHARMCAT nextflow json stable - - -file {sample}/pharmcat/{sample}.report.html 07 PHARMCAT nextflow html stable - - +file {sample}/pharmcat/{sample}.match.json 07 PHARMCAT nextflow json stable nextflow - +file {sample}/pharmcat/{sample}.phenotype.json 07 PHARMCAT nextflow json stable nextflow - +file {sample}/pharmcat/{sample}.report.html 07 PHARMCAT nextflow html stable nextflow - file {sample}/pharmcat/{sample}.report.json 07 PHARMCAT nextflow json stable nextflow - file {sample}/prs/pgsc_calc 25 PRS both dir stable - - file {sample}/prs/{sample}_prs_summary.*.tsv 25 PRS_SUMMARY nextflow tsv stable - - file {sample}/prs/{sample}_prs_summary.tsv 25 PRS_SUMMARY both tsv stable - - -file {sample}/pypgx/{sample}_cyp2d6_depth_check.tsv 32 PYPGX both tsv stable - - -file {sample}/pypgx/{sample}_pharmcat_comparison.tsv 27 CPIC_LOOKUP both tsv stable - - +file {sample}/pypgx/{sample}_cyp2d6_depth_check.tsv 32 PYPGX both tsv stable bash - +file {sample}/pypgx/{sample}_pharmcat_comparison.tsv 27 CPIC_LOOKUP both tsv stable bash - file {sample}/pypgx/{sample}_pypgx_results 32 PYPGX nextflow dir stable - - file {sample}/pypgx/{sample}_pypgx_summary.tsv 32 PYPGX both tsv stable bash - file {sample}/qc/somalier/{sample}.somalier 33 SOMALIER nextflow bin experimental - - @@ -205,30 +206,32 @@ file {sample}/qc/verifybamid2/{sample}.Ancestry 33 VERIFYBAMID2 nextflow bin exp file {sample}/qc/verifybamid2/{sample}.log 33 VERIFYBAMID2 both text experimental - - file {sample}/qc/verifybamid2/{sample}.marker_check 33 VERIFYBAMID2 nextflow bin internal - - file {sample}/qc/verifybamid2/{sample}.selfSM 33 VERIFYBAMID2 both bin experimental - - -file {sample}/qc/{sample}_read_count.tsv 02 ALIGN_MINIMAP2 both tsv stable - - +file {sample}/qc/{sample}_read_count.tsv 02 ALIGN_MINIMAP2 both tsv stable bash - file {sample}/qc/{sample}_sample_qc.tsv 33 SAMPLE_QC both tsv experimental - - file {sample}/roh/{sample}_roh.txt 11 ROH nextflow text stable nextflow - file {sample}/roh/{sample}_roh_summary.txt 11 ROH nextflow tsv stable nextflow chrom,start,end,length_bp,length_mb -file {sample}/run_manifest.tsv - - nextflow tsv stable - - +file {sample}/run_manifest.tsv - - both tsv stable bash - file {sample}/slivar/{sample}.ped 31 SLIVAR_PRIORITIZE nextflow tsv internal - - -file {sample}/slivar/{sample}_compound_het_pairs.tsv 31 COMPHET_PHASE both tsv stable - - +file {sample}/slivar/{sample}_compound_het_pairs.tsv 31 COMPHET_PHASE both tsv stable bash - file {sample}/slivar/{sample}_compound_hets.vcf.gz 31 SLIVAR both vcf stable bash - file {sample}/slivar/{sample}_prioritized.vcf.gz 31 SLIVAR_PRIORITIZE both vcf stable bash - -file {sample}/slivar/{sample}_prioritized.vcf.gz.tbi 31 SLIVAR_PRIORITIZE nextflow index stable - - -file {sample}/slivar/{sample}_slivar_summary.tsv 31 SLIVAR_PRIORITIZE both tsv stable - - +file {sample}/slivar/{sample}_prioritized.vcf.gz.tbi 31 SLIVAR_PRIORITIZE both index stable bash - +file {sample}/slivar/{sample}_slivar_summary.tsv 31 SLIVAR_PRIORITIZE both tsv stable bash - file {sample}/summary.json 24 HTML_REPORT both json stable bash schema_version,sample,generated_utc,run,databases,manifest,sections,cyp2d6,not_run,not_assessed file {sample}/sv_duphold/{sample}_sv_duphold.vcf 15 DUPHOLD nextflow vcf stable - - file {sample}/sv_filtered/{sample}_sv_filtered.log 15 DUPHOLD_FILTER nextflow text stable - - file {sample}/sv_filtered/{sample}_sv_filtered.vcf.gz 15 DUPHOLD_FILTER nextflow vcf stable - - file {sample}/sv_filtered/{sample}_sv_filtered.vcf.gz.tbi 15 DUPHOLD_FILTER nextflow index stable - - +file {sample}/sv_gridss/{sample}_gridss.high.vcf.gz 04b - bash vcf stable - - +file {sample}/sv_gridss/{sample}_gridss.high.vcf.gz.tbi 04b - bash index stable - - file {sample}/sv_merged/{sample}_sv_consensus.vcf.gz 22 SURVIVOR_SORT both vcf stable - - file {sample}/sv_merged/{sample}_sv_consensus.vcf.gz.tbi 22 SURVIVOR_SORT both index stable - - file {sample}/telomere/{sample} 10 TELOMERE_HUNTER both dir stable - - file {sample}/traits/{sample}_genotype_rules.tsv 42 TRAITS both tsv stable - - file {sample}/traits/{sample}_traits.tsv 42 TRAITS both tsv stable - - file {sample}/traits/{sample}_traits_genotypes.tsv 42 TRAITS_SITES both tsv stable - - -file {sample}/vcf/{sample}.g.vcf.gz 03 DEEPVARIANT both vcf stable - - -file {sample}/vcf/{sample}.g.vcf.gz.tbi 03 DEEPVARIANT both index stable - - +file {sample}/vcf/{sample}.g.vcf.gz 03 DEEPVARIANT both vcf stable bash - +file {sample}/vcf/{sample}.g.vcf.gz.tbi 03 DEEPVARIANT both index stable bash - file {sample}/vcf/{sample}.report.html 07 - bash html stable bash - file {sample}/vcf/{sample}.report.json 07 - bash json stable bash - file {sample}/vcf/{sample}.vcf.gz 03 DEEPVARIANT both vcf stable bash FORMAT/GT,FORMAT/GQ,FORMAT/DP @@ -237,7 +240,7 @@ file {sample}/vcf/{sample}_roh.txt 11 - bash text stable bash - file {sample}/vcf/{sample}_roh_summary.txt 11 - bash tsv stable bash chrom,start,end,length_bp,length_mb file {sample}/vcf_gatk/{sample}.vcf.gz 03a - bash vcf stable bash FORMAT/GT file {sample}/vep/{sample}_annotated.vcf.gz 30 VCFANNO_INDEX both vcf stable both INFO/REVEL -file {sample}/vep/{sample}_annotated.vcf.gz.tbi 30 VCFANNO_INDEX both index stable nextflow - +file {sample}/vep/{sample}_annotated.vcf.gz.tbi 30 VCFANNO_INDEX both index stable both - file {sample}/vep/{sample}_vep.vcf.gz 13 VEP both vcf stable - - file {sample}/vep/{sample}_vep.vcf.gz.tbi 13 VEP both index stable - - file {sample}/vep/{sample}_vep.vcf_summary.html 13 VEP nextflow html stable - - @@ -265,11 +268,11 @@ file {sample}/y_str/{sample}_y_str.csv 45 Y_STR both csv experimental - - file {sample}/y_str/{sample}_y_str.log 45 Y_STR both text experimental - - file {sample}/y_str/{sample}_y_str.tsv 45 Y_STR both tsv experimental - - file {sample}/y_str/{sample}_y_str.vcf.gz 45 Y_STR both vcf experimental - - -file {sample}/{sample}_charts.json 24 HTML_REPORT both json stable - - +file {sample}/{sample}_charts.json 24 HTML_REPORT both json stable bash - file {sample}/{sample}_report.html 24 HTML_REPORT both html stable bash - file {sample}/{sample}_report.txt 24 - both text stable bash - -file {sample}/{sample}_search_index.json 24 HTML_REPORT both json stable - - -file {sample}/{sample}_sex_check.tsv 16 INDEXCOV nextflow tsv stable - - +file {sample}/{sample}_search_index.json 24 HTML_REPORT both json stable bash - +file {sample}/{sample}_sex_check.tsv 16 INDEXCOV nextflow tsv stable nextflow - param input - - - - stable - - param outdir - - - - stable - - param allow_unfiltered - - - - stable - - diff --git a/assets/parascopy_models_v1.7.txt b/assets/parascopy_models_v1.7.txt index 4328d6d0a..4578145c6 100644 --- a/assets/parascopy_models_v1.7.txt +++ b/assets/parascopy_models_v1.7.txt @@ -6,8 +6,12 @@ # From models_GRCh38_1KGP_v1.7.tar.gz of Zenodo record 15019940 (md5 244110d8fa883cf11334527ec2383498, # the archive setup.sh --parascopy-data installs), folder EUR; AFR, AMR, EAS and SAS hold the same # 167 models with the same regions (checked 2026-10-27). -# tests/test_copy_number.py reads it: a row of bin/cn_loci.tsv whose targets or controls overlap one -# of these regions fails, unless the test's short list of exemptions names that row and model. +# Source: Timofey Prodanov, Parascopy precomputed data, https://doi.org/10.5281/zenodo.15019940, +# licensed CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Changed: only the model +# regions are kept, reformatted one per line, and overlapping copy regions are merged. +# rust/crates/og-cn/tests/genome_cn.rs reads it: a row of bin/cn_loci.tsv whose targets or controls +# overlap one of these regions fails, unless the test's short list of exemptions names that row and +# model. rust/crates/og-steps/tests/paralog_loci.rs reads the model list. ABCC6 chr16:16198410-16228707 main ABCC6 chr16:14816373-14829810 copy ABCC6 chr16:14829826-14836719 copy diff --git a/assets/str_penetrance_ranges.tsv b/assets/str_penetrance_ranges.tsv new file mode 100644 index 000000000..93827ff95 --- /dev/null +++ b/assets/str_penetrance_ranges.tsv @@ -0,0 +1,14 @@ +# assets/str_penetrance_ranges.tsv: the repeat ranges of reduced penetrance that og summary collect names (step 09). +# A count in such a range can cause the disease, but not in everyone who carries it. Stranger grades a count only +# against the catalog's normal maximum and pathogenic minimum, so it reads such a count as plain full_mutation or +# pre_mutation. og summary collect reads this file from its --assets folder at run time and marks a sized allele in +# a range with the keys penetrance (min-max), penetrance_label and penetrance_citation of its locus in summary.json. +# It is not embedded in the binary: an assets folder without this file labels nothing and says no error, and a +# broken table (a bad row, no row, or a min above its max) makes the expansions section unreadable. +# Step 24 mounts the whole assets/ folder. The Nextflow HTML_REPORT stages only the tables main.nf lists, and this +# file is not one of them yet, so a Nextflow run labels nothing. +# The intermediate ranges (between normal and disease-causing) are a separate table, bin/str_intermediate_ranges.tsv. +# locus: the ExpansionHunter locus id (REPID). min, max: the range, in repeat units, both ends included. +# label: what the summary says beside a count in the range. citation: the GeneReviews chapter that defines the range. +locus min max label citation +HTT 36 39 reduced penetrance (may or may not cause Huntington disease; full penetrance from 40) GeneReviews: Huntington Disease, https://www.ncbi.nlm.nih.gov/books/NBK1305/ diff --git a/assets/sv_rule_regions.tsv b/assets/sv_rule_regions.tsv index a442cc13f..86bc4fb9a 100644 --- a/assets/sv_rule_regions.tsv +++ b/assets/sv_rule_regions.tsv @@ -1,6 +1,9 @@ # assets/sv_rule_regions.tsv: the GRCh38 regions where og sv postfilter overrides AnnotSV's class 4 # or 5. Written by scripts/ci/build-sv-rule-regions.sh, which says how each rule's rows are chosen; # rebuild it there, do not edit it by hand. start is 0-based and end 1-based, as in a BED file. +# Sources and terms: the TRExplorer catalog, Copyright (c) 2024 Broad Institute, MIT licence +# (assets/licences/TRExplorer-LICENSE.txt); GENCODE, open access; HGNC and the NCBI assembly +# regions, no restriction on use. # Rows: gene_alias 10, ig_tr_locus 6, mhc 1, tandem_repeat 2409. #chrom start end rule action name source chr1 939398 939508 tandem_repeat class_3 SAMD11:48bp motif TRExplorer v2.1; GENCODE 50 MANE Select CDS diff --git a/assets/ystr_panel.tsv b/assets/ystr_panel.tsv index f3afaca3a..aad198342 100644 --- a/assets/ystr_panel.tsv +++ b/assets/ystr_panel.tsv @@ -1,4 +1,7 @@ # Y-STR panel of step 45: the 111 markers of FamilyTreeDNA's Y-111 test, in FamilyTreeDNA's order. +# The order, the names and the panels are reproduced only so that counts line up with FamilyTreeDNA +# results and surname-project tables. No FamilyTreeDNA text is copied. FamilyTreeDNA is a trademark +# of Gene by Gene, Ltd., which does not endorse this table. # Sources, read 2026-10-25: # order, names and panels: FamilyTreeDNA Help Center, "Y-STR Results Guide", # https://help.familytreedna.com/hc/en-us/articles/4408063356303-Y-STR-Results-Guide @@ -11,6 +14,10 @@ # sha256 d5b91757c7de756ada8a940cb5588e6f51aa79513ae6ce8cb4f1b9df63df9e61; the Y-STR marker set of # Willems et al. 2016 (PMID 27126583) and HipSTR (Willems et al. 2017, PMID 28436466) # motif: NIST STRBase repeat structure, https://strbase.nist.gov/api/loci (seqPattern) +# offset, read 2026-11-19: the GRCh38 chrY sequence of each marker with a motif (and DYS389I, the +# first block of DYS389II's motif) counted by that repeat structure, the convention FamilyTreeDNA +# follows for these markers; ISOGG's FamilyTreeDNA-NIST conversion, https://isogg.org/wiki/Y-STR +# (Y-GATA-H4: FamilyTreeDNA's count is NIST's minus one) # Columns: # order position in FamilyTreeDNA's list (1-111) # panel the smallest FamilyTreeDNA test that has the marker (Y-12, Y-25, Y-37, Y-67, Y-111) @@ -25,47 +32,49 @@ # absent no region for it in the HipSTR marker set, so it is not called # regions chrom:start-end/motif length/reference copies/HipSTR name, ';' between parts; '.' when none # motif STRBase repeat structure, '.' when STRBase has none -# offset whole repeats to add to reach FamilyTreeDNA's count; '.' when no published value was found -# (none was, for any marker, on 2026-10-25: see docs/45-y-str.md) +# offset whole repeats to add to reach FamilyTreeDNA's count: the reference's count on FamilyTreeDNA's +# scale minus the region's reference copies (each part rounded, halves up, summed); '.' when +# no published counting rule was found, and the count stays on the reference's scale +# (see docs/45-y-str.md) # note what the count covers, '.' for nothing to add order panel marker kind regions motif offset note -1 Y-12 DYS393 single chrY:3263111-3263158/4/12/DYS393 [AGAT]n . . -2 Y-12 DYS390 single chrY:15163067-15163162/4/24/DYS390 [TAGA]n CAGA [TAGA]n [CAGA]n . . -3 Y-12 DYS19 single chrY:9684380-9684443/4/16/DYS19/DYS394 [TCTA]n ccta [TCTA]n . . -4 Y-12 DYS391 single chrY:11982089-11982132/4/11/DYS391 [TCTA]n . . +1 Y-12 DYS393 single chrY:3263111-3263158/4/12/DYS393 [AGAT]n 0 . +2 Y-12 DYS390 single chrY:15163067-15163162/4/24/DYS390 [TAGA]n CAGA [TAGA]n [CAGA]n 0 . +3 Y-12 DYS19 single chrY:9684380-9684443/4/16/DYS19/DYS394 [TCTA]n ccta [TCTA]n -1 . +4 Y-12 DYS391 single chrY:11982089-11982132/4/11/DYS391 [TCTA]n 0 . 5 Y-12 DYS385a multicopy . [TTTC]n . . 6 Y-12 DYS385b multicopy . [TTTC]n . . 7 Y-12 DYS426 single chrY:17022970-17023005/3/12/DYS426 . . . 8 Y-12 DYS388 single chrY:12635604-12635639/3/12/DYS388 . . . 9 Y-12 DYS439 absent . [GATA]n . . -10 Y-12 DYS389I single chrY:12500448-12500495/4/12/DYS389I . . . -11 Y-12 DYS392 single chrY:20471987-20472025/3/13/DYS392 [ATA]n . . -12 Y-12 DYS389II span chrY:12500448-12500516/4/17.25/DYS389II.1;chrY:12500564-12500611/4/12/DYS389II.2 [TAGA]n [CAGA]n N48 [TAGA]n [CAGA]n . FamilyTreeDNA reports DYS389II as the sum total of DYS389I and DYS389II; the span starts where DYS389I starts, so this count covers DYS389I too -13 Y-25 DYS458 single chrY:7999839-7999902/4/16/DYS458 [GAAA]n . . +10 Y-12 DYS389I single chrY:12500448-12500495/4/12/DYS389I . 0 . +11 Y-12 DYS392 single chrY:20471987-20472025/3/13/DYS392 [ATA]n 0 . +12 Y-12 DYS389II span chrY:12500448-12500516/4/17.25/DYS389II.1;chrY:12500564-12500611/4/12/DYS389II.2 [TAGA]n [CAGA]n N48 [TAGA]n [CAGA]n 1 FamilyTreeDNA reports DYS389II as the sum total of DYS389I and DYS389II; the span starts where DYS389I starts, so this count covers DYS389I too +13 Y-25 DYS458 single chrY:7999839-7999902/4/16/DYS458 [GAAA]n 0 . 14 Y-25 DYS459a multicopy . . . . 15 Y-25 DYS459b multicopy . . . . 16 Y-25 DYS455 single chrY:7043528-7043571/4/11/DYS455 . . . 17 Y-25 DYS454 single chrY:8356115-8356158/4/11/DYS454 . . . 18 Y-25 DYS447 absent . . . . 19 Y-25 DYS437 absent . [TCTA]n [TCTG]n [TCTA]n . . -20 Y-25 DYS448 span chrY:22218923-22218996/6/12.3333/DYS448.1;chrY:22219031-22219078/6/8/DYS448.2 [AGAGAT]n [atagag]2 [agatag]3 [atag]2 agaa [AGAGAT]n . . -21 Y-25 DYS449 parts chrY:8349973-8350033/4/15.25/DYS449.1;chrY:8350056-8350139/4/21/DYS449.2 [TTCT]n N22 [TTCT]n N12 [TTCT]n . . +20 Y-25 DYS448 span chrY:22218923-22218996/6/12.3333/DYS448.1;chrY:22219031-22219078/6/8/DYS448.2 [AGAGAT]n [atagag]2 [agatag]3 [atag]2 agaa [AGAGAT]n -1 . +21 Y-25 DYS449 parts chrY:8349973-8350033/4/15.25/DYS449.1;chrY:8350056-8350139/4/21/DYS449.2 [TTCT]n N22 [TTCT]n N12 [TTCT]n -7 . 22 Y-25 DYS464a multicopy . . . . 23 Y-25 DYS464b multicopy . . . . 24 Y-25 DYS464c multicopy . . . . 25 Y-25 DYS464d multicopy . . . . -26 Y-37 DYS460 single chrY:18888954-18888993/4/10/DYS460 [CTAT]n . . -27 Y-37 Y-GATA-H4 single chrY:16631635-16631756/4/30.5/Y-GATA-H4 [TCTA]n . . +26 Y-37 DYS460 single chrY:18888954-18888993/4/10/DYS460 [CTAT]n 0 . +27 Y-37 Y-GATA-H4 single chrY:16631635-16631756/4/30.5/Y-GATA-H4 [TCTA]n -20 . 28 Y-37 YCAIIa multicopy . . . . 29 Y-37 YCAIIb multicopy . . . . -30 Y-37 DYS456 single chrY:4402919-4402978/4/15/DYS456 [AGAT]n . . +30 Y-37 DYS456 single chrY:4402919-4402978/4/15/DYS456 [AGAT]n 0 . 31 Y-37 DYS607 single chrY:16302502-16302577/4/19/DYS607 . . . -32 Y-37 DYS576 single chrY:7185318-7185385/4/17/DYS576 [AAAG]n . . -33 Y-37 DYS570 single chrY:6993190-6993257/4/17/DYS570 [TTTC]n . . +32 Y-37 DYS576 single chrY:7185318-7185385/4/17/DYS576 [AAAG]n 0 . +33 Y-37 DYS570 single chrY:6993190-6993257/4/17/DYS570 [TTTC]n 0 . 34 Y-37 CDYa multicopy . . . . 35 Y-37 CDYb multicopy . . . . 36 Y-37 DYS442 single chrY:12649170-12649229/4/15/DYS442 . . . -37 Y-37 DYS438 single chrY:12825899-12825948/5/10/DYS438 [TTTTC]n . . +37 Y-37 DYS438 single chrY:12825899-12825948/5/10/DYS438 [TTTTC]n 2 . 38 Y-67 DYS531 single chrY:8598154-8598197/4/11/DYS531 . . . 39 Y-67 DYS578 single chrY:20400678-20400713/4/9/DYS578 . . . 40 Y-67 DYF395S1a multicopy . . . . @@ -86,7 +95,7 @@ order panel marker kind regions motif offset note 55 Y-67 DYS534 single chrY:16281076-16281155/4/20/DYS534 . . . 56 Y-67 DYS450 span chrY:8258259-8258303/5/9/DYS450.1;chrY:8258317-8258341/5/5/DYS450.2 . . . 57 Y-67 DYS444 single chrY:17114310-17114365/4/14/DYS444 . . . -58 Y-67 DYS481 single chrY:8558337-8558402/3/22/DYS481 [CTT]n . . +58 Y-67 DYS481 single chrY:8558337-8558402/3/22/DYS481 [CTT]n 0 . 59 Y-67 DYS520 single chrY:7862390-7862473/4/21/DYS520 . . . 60 Y-67 DYS446 single chrY:3263417-3263486/5/14/DYS446 . . . 61 Y-67 DYS617 single chrY:16969638-16969673/3/12/DYS617 . . . @@ -104,13 +113,13 @@ order panel marker kind regions motif offset note 73 Y-111 DYS714 single chrY:19985849-19985978/5/26/DYS714 . . . 74 Y-111 DYS716 absent . . . . 75 Y-111 DYS717 single chrY:15201365-15201444/5/16/DYS717 . . . -76 Y-111 DYS505 single chrY:3772790-3772837/4/12/DYS505 [TCCT]n . . +76 Y-111 DYS505 single chrY:3772790-3772837/4/12/DYS505 [TCCT]n 0 . 77 Y-111 DYS556 single chrY:20439570-20439613/4/11/DYS556 . . . -78 Y-111 DYS549 single chrY:19358338-19358389/4/13/DYS549 [GATA]n . . +78 Y-111 DYS549 single chrY:19358338-19358389/4/13/DYS549 [GATA]n 0 . 79 Y-111 DYS589 single chrY:22339546-22339610/5/13/DYS589 . . . -80 Y-111 DYS522 single chrY:7547584-7547623/4/10/DYS522 [ATAG]n . . +80 Y-111 DYS522 single chrY:7547584-7547623/4/10/DYS522 [ATAG]n 0 . 81 Y-111 DYS494 single chrY:19224282-19224311/3/10/DYS494 . . . -82 Y-111 DYS533 single chrY:16281349-16281396/4/12/DYS533 [TATC]n . . +82 Y-111 DYS533 single chrY:16281349-16281396/4/12/DYS533 [TATC]n 0 . 83 Y-111 DYS636 single chrY:20472971-20473014/4/11/DYS636 . . . 84 Y-111 DYS575 single chrY:7568216-7568255/4/10/DYS575 . . . 85 Y-111 DYS638 single chrY:15533611-15533654/4/11/DYS638 . . . @@ -132,11 +141,11 @@ order panel marker kind regions motif offset note 101 Y-111 DYS561 single chrY:14452471-14452528/4/14.5/DYS561 . . . 102 Y-111 DYS552 parts chrY:11981554-11981613/4/15/DYS552.1;chrY:11981654-11981689/4/9/DYS552.2 . . . 103 Y-111 DYS726 absent . . . . -104 Y-111 DYS635 single chrY:12258860-12258951/4/23/DYS635 [TAGA]n [TACA]n [TAGA]n [TACA]n [TAGA]n [TACA]n [TAGA]n . . +104 Y-111 DYS635 single chrY:12258860-12258951/4/23/DYS635 [TAGA]n [TACA]n [TAGA]n [TACA]n [TAGA]n [TACA]n [TAGA]n 0 . 105 Y-111 DYS587 single chrY:15916828-15916912/5/17/DYS587 . . . -106 Y-111 DYS643 single chrY:15314132-15314186/5/11/DYS643 [CTTTT]n . . +106 Y-111 DYS643 single chrY:15314132-15314186/5/11/DYS643 [CTTTT]n 0 . 107 Y-111 DYS497 single chrY:16053588-16053629/3/14/DYS497 . . . 108 Y-111 DYS510 span chrY:15188021-15188088/4/17/DYS510.1;chrY:15188102-15188119/4/4.5/DYS510.2;chrY:15188127-15188138/4/3/DYS510.3 . . . 109 Y-111 DYS434 single chrY:12345804-12345839/4/9/DYS434 . . . -110 Y-111 DYS461 single chrY:18888808-18888851/4/11/DYS461 [TCTG]n [TCTA]n . . +110 Y-111 DYS461 single chrY:18888808-18888851/4/11/DYS461 [TCTG]n [TCTA]n 1 . 111 Y-111 DYS435 single chrY:12384503-12384538/4/9/DYS435 . . . diff --git a/bin/render_report.py b/bin/render_report.py index 9f73b1b41..c53f2324d 100755 --- a/bin/render_report.py +++ b/bin/render_report.py @@ -571,6 +571,16 @@ def prs_sex_note(d): "Give the sex to mark a score of the other sex not applicable (docs/25-prs.md).") +# The start of the line under the scores when every percentile was withheld +# for an input that lists variants only (the scores' percentile_note): the +# panel ran, so the no-panel line would be false. +PRS_WITHHELD_TEXT = ("Percentile withheld: the input lists variants only, so each scoring site it leaves out adds " + "nothing to the sum, and the raw sum cannot be compared with the reference panel's samples, " + "whose genotypes are complete. Genotypes with a reference call (0/0) at one genotyped " + "position in five or more keep the percentile; a gVCF from step 3 or a chip VCF usually has " + "them.") + + def prs_note(d): """The line under the PRS scores, in both reports: what the numbers can be compared with.""" x = prs_chrx_note(d) + prs_sex_note(d) @@ -583,6 +593,8 @@ def prs_note(d): return (f"Percentile: where the score falls among the {group or 'most similar'} samples{panel}, " f"the group whose genetic ancestry is most similar to this sample's (pgsc_calc).{low} " f"A percentile is not a risk.{eff} {PRS_ANCESTRY_NOTE} See docs/25-prs.md." + x) + if any(r.get("percentile_note") for r in d.get("scores", [])): + return f"{PRS_WITHHELD_TEXT} {PRS_ANCESTRY_NOTE} See docs/25-prs.md." + x return ("Raw score only: no ancestry reference panel was installed, so there is no percentile and the sum " f"cannot be compared with anyone (scripts/setup.sh --ancestry-panel adds it). {PRS_ANCESTRY_NOTE} " "See docs/25-prs.md." + x) diff --git a/docs/04b-gridss.md b/docs/04b-gridss.md index 0191fac6e..4a4133017 100644 --- a/docs/04b-gridss.md +++ b/docs/04b-gridss.md @@ -13,7 +13,7 @@ Assembly-based structural variant caller that identifies breakpoints through loc ## Why -GRIDSS complements Manta and Delly in the SV consensus pipeline (step 22): +GRIDSS adds to Manta and Delly. Its calls stay out of the SV consensus of step 22 (see Notes), so you read them here: - **Complex rearrangements** — GRIDSS assembles across breakpoints rather than relying on read pair signals alone - **Small SVs (50-300bp)** — too small for discordant read pair detection but too large for standard SNP callers - **Breakpoint precision** — assembly provides single-nucleotide resolution at breakpoints @@ -28,9 +28,9 @@ GRIDSS complements Manta and Delly in the SV consensus pipeline (step 22): ## Docker Image -- `GRIDSS_IMAGE` +- `GRIDSS_IMAGE` (GRIDSS), `BCFTOOLS_IMAGE` (the high-confidence filter) -Pinned in `versions.env`; [Image versions](versions.md) lists the current tag. +Pinned in `versions.env`; [Image versions](versions.md) lists the current tags. Image size: ~1.5 GB (includes Java 11, R, bwa, samtools, all dependencies). @@ -69,7 +69,8 @@ This takes about an hour (an estimate, not measured here) and produces 5 index f | File | Description | |---|---| -| `sv_gridss/_gridss.vcf.gz` | SV calls in BND notation | +| `sv_gridss/_gridss.vcf.gz` | Every GRIDSS call, in BND notation, as GRIDSS wrote it | +| `sv_gridss/_gridss.high.vcf.gz` | The high-confidence calls (see Quality filtering), and its `.tbi` index | | `sv_gridss/_assembly.bam` | Assembly contigs (intermediate, can be deleted) | | `sv_gridss/work/` | GRIDSS's working directory (`--workingdir`), about 50 GB during the run; removed once the VCF is written, kept when GRIDSS fails so you can look at it | @@ -84,6 +85,8 @@ GRIDSS reports all variants as **BND** (breakend) records, not DEL/DUP/INV/INS. | High | `QUAL >= 1000` and `AS > 0` and `RAS > 0` | | Medium | `QUAL >= 500` and (`AS > 0` or `RAS > 0`) | +The step writes the high tier, the threshold GRIDSS's authors give for high-confidence calls, to `_gridss.high.vcf.gz` with `bcftools view -i 'QUAL>=1000 && INFO/AS>0 && INFO/RAS>0'`. `AS` counts the assemblies that support the breakend and `RAS` those from its partner breakend, so the rule asks for assembly support on both sides. Both records of a breakend pair carry the same `QUAL`, and one record's `AS` is the other's `RAS`, so the filter keeps or drops a pair together. The raw VCF stays as GRIDSS wrote it. When the raw VCF is already there, the step skips GRIDSS and writes the high-confidence file again from it, which takes seconds. For the medium tier, filter the raw VCF yourself. + Note: GRIDSS QUAL scores are uncorrected for multiple testing and tend to be overestimated. ## Resource Requirements @@ -115,7 +118,7 @@ Not measured here; the end test does not run GRIDSS. These are estimates: ## Notes -- GRIDSS output is not part of the SV consensus (step 22): GRIDSS reports every event as a pair of breakends (`SVTYPE=BND`), which never match the DEL, DUP and INV records of the other callers +- GRIDSS output is left out of the SV consensus (step 22). GRIDSS reports every event as a pair of breakends (`SVTYPE=BND`), and nothing in the pipeline turns a pair into one DEL, DUP or INV. SURVIVOR 1.0.7 counts BND as the same type as INV and TRA, so a GRIDSS breakend would pair with another caller's inversion or translocation and count as a vote for an event GRIDSS never typed - The assembly BAM (`_assembly.bam`) can be deleted after the VCF is generated to save disk space - Supports `ALIGN_DIR` variable: `ALIGN_DIR=aligned_bwamem2 ./scripts/04b-gridss.sh sample` - GRIDSS does not have ARM64 support — runs under emulation on Apple Silicon (very slow) diff --git a/docs/05-annotsv.md b/docs/05-annotsv.md index e59f45025..664e61cd1 100644 --- a/docs/05-annotsv.md +++ b/docs/05-annotsv.md @@ -26,6 +26,8 @@ tar -xzf ${GENOME_DIR}/Annotations_Human_3.5.tar.gz -C ${GENOME_DIR}/annotsv_ann The script checks for `${GENOME_DIR}/annotsv_annotations/Annotations_Human/Genes/GRCh38` and stops with a pointer to `setup.sh` when it is missing. `run-all.sh` reports step 5 as skipped in that case. +> **License:** AnnotSV's code is GPL-3.0. Its annotation bundle gathers many sources, each under its own terms, OMIM-derived gene annotations among them; AnnotSV's manual lists each source and its version for the release. AnnotSV leaves GeneHancer and COSMIC out of the bundle because they need a licence of their own. The pipeline does not redistribute the bundle: `setup.sh` downloads it from AnnotSV's server, the same file AnnotSV's own installer fetches. Check the terms of each source before any commercial use. + ### gnomAD-SV frequencies and MANE Select transcripts `setup.sh` adds two files to the bundle. Both are pinned in `versions.env` with a sha256, and the run manifest records the pins through its copy of `versions.env`. `./scripts/setup.sh --annotsv-data ${GENOME_DIR}` adds them to an existing install without running the rest of setup. @@ -124,7 +126,7 @@ Some class 4 and 5 calls are common or unreliable for a reason AnnotSV does not - **The MHC** (`mhc`). An SV more than half inside the MHC, GRCh38 chr6:28,510,120-33,480,577. Its haplotypes differ by tens of kilobases between people, and gnomAD-SV marks every SV over half inside IGH or the MHC as low confidence (FILTER `IGH_MHC_OVERLAP`, Collins 2020, PMID 32461652). CYP21A2 lies in the MHC; short reads cannot call it here, and [step 35b](35-paralogs.md) reads it from PacBio HiFi reads. - **A pseudogene named by a disease gene's symbol** (`gene_alias`). AnnotSV joins its gene annotations by symbol. A few pseudogenes carry a disease gene's symbol as an HGNC alias or previous symbol (for example RHEBP1, whose HGNC alias is RHEB). When `Gene_name` lists that symbol and the SV reaches no transcript of the disease gene in AnnotSV's genes file, the table names the pseudogene instead, and the call moves to class 3 when no other gene is left. This needs the genes file, like the exon-edge check. -The regions are in `assets/sv_rule_regions.tsv`, one row each (`chrom`, `start` 0-based, `end`, `rule`, `action`, `name`, `source`): 2,409 coding tandem repeats, the six IG and TR loci, the MHC and 10 pseudogenes. `scripts/ci/build-sv-rule-regions.sh` writes it from four pinned downloads, each checked against its sha256: TRExplorer v2.1's GRCh38 tandem repeat catalog (the file upstream rebuilt in place on 2026-10-30, sha256 `df9c23c4…`; every repeat of 50 bp or more on a MANE Select coding exon of GENCODE 50), GENCODE 50's IG and TR genes, the MHC row of the GRCh38 assembly regions report, and HGNC's complete set of 2026-10-06 (each pseudogene whose alias or previous symbol is the approved symbol of a gene with a GenCC curation). The file is about 250 KB and ships with the repository, so the step downloads nothing. The e2e case `followups-ci-3-sv-rule-regions` rebuilds it with `scripts/ci/build-sv-rule-regions.sh --check`, which fails when one byte differs, so a hand edit or a drifted pin cannot ship. Step 05 mounts it into the AnnotSV image and the Nextflow `ANNOTSV` gets it as an input. +The regions are in `assets/sv_rule_regions.tsv`, one row each (`chrom`, `start` 0-based, `end`, `rule`, `action`, `name`, `source`): 2,409 coding tandem repeats, the six IG and TR loci, the MHC and 10 pseudogenes. `scripts/ci/build-sv-rule-regions.sh` writes it from four pinned downloads, each checked against its sha256: TRExplorer v2.1's GRCh38 tandem repeat catalog (the file upstream rebuilt in place on 2026-10-30, sha256 `df9c23c4…`; every repeat of 50 bp or more on a MANE Select coding exon of GENCODE 50), GENCODE 50's IG and TR genes, the MHC row of the GRCh38 assembly regions report, and HGNC's complete set of 2026-10-06 (each pseudogene whose alias or previous symbol is the approved symbol of a gene with a GenCC curation). The file is about 250 KB and ships with the repository, so the step downloads nothing. Its header names each source's terms: the TRExplorer catalog is MIT, copyright 2024 Broad Institute, with its notice in `assets/licences/TRExplorer-LICENSE.txt`; GENCODE is open access, and HGNC and the NCBI assembly regions carry no restriction on use. The e2e case `followups-ci-3-sv-rule-regions` rebuilds it with `scripts/ci/build-sv-rule-regions.sh --check`, which fails when one byte differs, so a hand edit or a drifted pin cannot ship. Step 05 mounts it into the AnnotSV image and the Nextflow `ANNOTSV` gets it as an input. How many callers saw each SV comes from step 22's consensus (`sv_merged/_sv_consensus.vcf.gz`), which runs after this step, and beside `ANNOTSV` in Nextflow. So the reports (`og summary collect`) join it when they are written: an SV matches the consensus record of the same type whose two breakpoints lie within 1,000 bp of its own, step 22's distance, and its support is that record's `SUPP` with the callers of `SUPP_VEC`. An SV in no consensus record was made by one caller and shows as "single caller". Without the consensus file the support is "not known", never 1. `og sv postfilter --consensus` adds the same `Support` and `Support_callers` columns to the table. diff --git a/docs/07-pharmacogenomics.md b/docs/07-pharmacogenomics.md index 0ac0c286a..07577033c 100644 --- a/docs/07-pharmacogenomics.md +++ b/docs/07-pharmacogenomics.md @@ -26,7 +26,8 @@ GENOME_DIR=/path/to/your/data # PharmCAT's gene regions into a plain VCF, so a covered position where you # match the reference is a 0/0 call and an uncovered one (./.) stays missing; # then og pgx refblock-fill (bin/og) calls 0/0 the positions longer than one base -# (indels) that reference blocks with GQ >= 20 cover (see below) +# (indels) that reference blocks with GQ >= 20 cover, and leaves out every +# reference call below GQ 20, so PharmCAT reads it as missing (see below) docker run --rm \ -v ${GENOME_DIR}/${SAMPLE}/vcf:/data \ -v "${GENOME_DIR}:/genome" \ @@ -96,7 +97,8 @@ docker run --rm \ ### Input the preprocessor or PharmCAT refuses - **gVCF.** PharmCAT refuses a gVCF, and decides by the file name too (`.g.vcf`, `.genomic.vcf`). Yet a gVCF is the better input: a variants-only VCF leaves about half of PharmCAT's genes Unknown, because PharmCAT cannot tell a reference call from a position that was not covered. So the script reads `vcf/${SAMPLE}.g.vcf.gz` when step 3 wrote one and expands its reference blocks into `${SAMPLE}.pgx_regions.vcf.gz` (step 0 above, deleted afterwards), which PharmCAT accepts; without a gVCF it reads `${SAMPLE}.vcf.gz`, and does not check whether that file is itself a gVCF (PharmCAT then stops on it). The Nextflow pipeline does the same with DeepVariant's gVCF, or with the gVCF a samplesheet row gives in its `gvcf` column (`run-all.sh` fills it from `vcf/${SAMPLE}.g.vcf.gz`); a gVCF given in the `vcf` column stops the run before any analysis when `pharmcat` is selected. For a vendor gVCF, remove the reference blocks and rename the file: [Starting from a Vendor VCF](vcf-first.md). -- **Positions longer than one base.** The expansion writes one record per base, each with a one-base REF. 51 PharmCAT 3.4.0 positions have a REF or ALT longer than one base: the insertions and deletions of DPYD, UGT1A1 (\*28, the TA-repeat insertion at chr2:233760233), TPMT, CYP3A4, CYP3A5, CFTR, CYP2C9, NUDT15, RYR1, CYP2D6 and G6PD, and two two-base substitutions in RYR1. PharmCAT's preprocessor does not take a one-base record as a call at such a position: it sets the record aside (FILTER `PCATxINDEL`, or `PCATxREF` for the substitutions) and lists the position in `missing_pgx_var.vcf`. Where PharmCAT's REF is longer than one base (the deletions, UGT1A1 \*28, the substitutions), its matcher then discards the record ("REF in VCF (C) does not match expected reference (CAT)"), so the position has no call and the alleles defined there are uncallable, even where the gVCF shows you match the reference over the whole span. At an insertion with a one-base REF the matcher still reads the set-aside record as a reference call ("PharmCAT cannot validate this position"). So step 0 runs `og pgx refblock-fill` on the expanded file. For each of these positions in PharmCAT's positions file (`/pharmcat/pharmcat_positions.vcf.bgz` in the image), it writes a 0/0 record with PharmCAT's own ID, REF and ALT (INFO flag `PGX_REFBLOCK`) in place of the one-base record, when every base of the REF span lies in reference blocks with GQ 20 or more (GQ is Phred-scaled: 20 means a 1 in 100 chance the reference call is wrong; genotype 0/0, or 0 on a haploid chrX; FILTER `PASS` or `.`) and no other record overlaps the span: no variant call, no `./.` block, no block below GQ 20. Otherwise the expanded file stays as it was there: the position stays missing, and at an insertion the matcher reads the one-base record as before. The step log names the positions it filled (`pgx_refblock_fill: N of 51 PharmCAT positions longer than one base called 0/0 from reference blocks with GQ >= 20: ...`). The GQ threshold applies to these positions only: a one-base position takes any 0/0 block, as before. Where the expanded file has a record at such a position that is not a one-base reference call, that record stays and no 0/0 record is added beside it; the log says so. The Nextflow module does the same. +- **Positions longer than one base.** The expansion writes one record per base, each with a one-base REF. 51 PharmCAT 3.4.0 positions have a REF or ALT longer than one base: the insertions and deletions of DPYD, UGT1A1 (\*28, the TA-repeat insertion at chr2:233760233), TPMT, CYP3A4, CYP3A5, CFTR, CYP2C9, NUDT15, RYR1, CYP2D6 and G6PD, and two two-base substitutions in RYR1. PharmCAT's preprocessor does not take a one-base record as a call at such a position: it sets the record aside (FILTER `PCATxINDEL`, or `PCATxREF` for the substitutions) and lists the position in `missing_pgx_var.vcf`. Where PharmCAT's REF is longer than one base (the deletions, UGT1A1 \*28, the substitutions), its matcher then discards the record ("REF in VCF (C) does not match expected reference (CAT)"), so the position has no call and the alleles defined there are uncallable, even where the gVCF shows you match the reference over the whole span. At an insertion with a one-base REF the matcher still reads the set-aside record as a reference call ("PharmCAT cannot validate this position"). So step 0 runs `og pgx refblock-fill` on the expanded file. For each of these positions in PharmCAT's positions file (`/pharmcat/pharmcat_positions.vcf.bgz` in the image), it writes a 0/0 record with PharmCAT's own ID, REF and ALT (INFO flag `PGX_REFBLOCK`) in place of the one-base record, when every base of the REF span lies in reference blocks with GQ 20 or more (GQ is Phred-scaled: 20 means a 1 in 100 chance the reference call is wrong; genotype 0/0, or 0 on a haploid chrX; FILTER `PASS` or `.`) and no other record overlaps the span: no variant call, no `./.` block, no block below GQ 20. Otherwise the expanded file stays as it was there: the position stays missing, and at an insertion the matcher reads the one-base record as before. The step log names the positions it filled (`pgx_refblock_fill: N of 51 PharmCAT positions longer than one base called 0/0 from reference blocks with GQ >= 20: ...`). Where the expanded file has a record at such a position that is not a one-base reference call, that record stays and no 0/0 record is added beside it; the log says so. The Nextflow module does the same. +- **Low-quality reference calls.** With a gVCF, the same GQ 20 floor holds for every record of the expanded file, one-base positions included. Without a gVCF there is no expanded file and this filter does not run: a low-GQ reference call in `${SAMPLE}.vcf.gz`, such as a DeepVariant `RefCall` record, goes to PharmCAT unchanged. A reference call (genotype 0/0, or 0 on a haploid chrX) with GQ below 20, or with no GQ, is left out of the expanded file, so PharmCAT reads the position as missing instead of a confident match with the reference. This covers a reference block with a low GQ and a DeepVariant `RefCall` record (a candidate it called reference) with a low GQ. Before, such a call at a one-base position reached PharmCAT as 0/0: a GQ 5 block at CYP2C19 rs4244285, the \*2 position, read as "not \*2" when the data could not tell. A variant call passes whatever its GQ. The step log counts them and names those at PharmCAT positions (`pgx_refblock_fill: N reference calls with GQ below 20 (or none) left out, so PharmCAT reads them as missing; at PharmCAT positions: CYP2C19 chr10:94781859, ...`). PharmCAT then lists these positions in `missing_pgx_var.vcf` and does not use them to call or rule out an allele. The Nextflow module does the same. - **MT-RNR1 from the chrM calls.** PharmCAT 3.4.0 has no MT-RNR1 definition for its matcher: it reads the gene only as an outside call, one allele (chrM is not a pair), so from a VCF alone MT-RNR1 is No Result on every sample. When [step 20](20-mtoolbox.md) wrote its Mutect2 chrM calls (`mito/${SAMPLE}_chrM_filtered.vcf.gz`), the script runs `og pgx mito-merge` (step 3 above). It reads PharmCAT's own MT-RNR1 alleles from the jar (`Reference` and names such as `m.1555A>G`) and adds one MT-RNR1 line to a copy of step 36's outside calls (`${SAMPLE}.pharmcat_outside_calls.tsv`, deleted afterwards): a named single-base allele with FILTER `PASS` and an allele fraction (AF) of 0.05 or more, the pipeline's heteroplasmy floor; the one PharmCAT ranks highest (increased risk, then uncertain, then normal) when there are several, with the others named in the step log; or `Reference` when no named allele is called. A heteroplasmic allele (AF 0.05 to 0.95) is passed like a homoplasmic one: CPIC's MT-RNR1 guideline sets no heteroplasmy level at which aminoglycosides become safe, and asks for the homoplasmic guidance whenever a relevant variant is detected. So a heteroplasmic m.1555A>G or m.1494C>T gives PharmCAT's aminoglycoside recommendation, and the step log says `heteroplasmic` with the AF (the [step 20](20-mtoolbox.md) table and the report's chrM section give the level too). Mutect2 writes variant records only, so a position without reads has no record either: `Reference` needs read evidence, 20 reads or more (`samtools depth`, MAPQ and base quality 20) at every position where PharmCAT names an MT-RNR1 allele, from the sample's BAM (`aligned/${SAMPLE}_sorted.bam`, the one step 20 read). Without the BAM, or with a position below 20 reads, no `Reference` is passed and the log names the positions; a named allele needs no depth, its record is the evidence. Mutect2 writes the genotype 0/1 even at AF 1.0, so the AF decides, not the genotype. No line is added, and the gene stays No Result with the reason in the step log, when a named allele is below the detection floor (AF below 0.05) and no other named allele is called (the log says so, and the gene is not called Reference either; beside a called allele it is only named in the log), filtered, or has no AF (or an AF that reads `nan`); when a `PASS` record at AF 0.05 or more at a position where PharmCAT names an allele (m.960 and m.961 included, named there only as deletions) has an ALT PharmCAT does not name; when a `PASS` insertion or deletion overlaps a named position or lies within 10 bases of m.960 or m.961, where PharmCAT names deletions in a C run that the script does not map; and when the file has no `PASS` chrM record. Without step 20's file the step says so and MT-RNR1 stays No Result: run step 20 before this step. The PHARMCAT module does the same with MITO_VARIANTS' calls. - **PharmCAT's own log file.** The jar's built-in `logback.xml` writes `pharmcat.log` into the working directory. In the image that is `/pharmcat`, which the calling user cannot write, so every run printed a logback status dump with a `pharmcat.log (Permission denied)` stack trace (the calls were not affected). The script runs the jar with `-w /tmp`, a writable directory that goes away with the container. A Nextflow task runs in its own writable work directory, so the module needs nothing: the log lands there. - **A backslash in a `##` header line.** PharmCAT up to 3.4.0 bundles vcf-parser 0.3.1, which stops with "Error parsing metadata: character to be escaped is missing" on one. The line is valid VCF; bcftools writes it for a soft filter with a quoted string (`bcftools filter -s LowDP -e 'FORMAT/DP<10 && GT!="0/0"'`). The script and the Nextflow module rewrite the header of PharmCAT's own copy (`${SAMPLE}.pharmcat_input.vcf`, deleted afterwards by the script): on `##` lines `\"` becomes `'` and any other `\` becomes `/`. PharmCAT's calls are the same with and without the rewrite. A newer PharmCAT is no fix yet: 3.4.0 still bundles vcf-parser 0.3.1 and fails the same way. @@ -105,7 +107,7 @@ docker run --rm \ - HTML report with drug recommendations per gene, including HLA-A, HLA-B and CYP2D6 when [step 36](36-pgx-consensus.md) passed them as outside calls, and MT-RNR1 (aminoglycosides) when step 20's chrM calls gave it a call - JSON report used by step 27 (`${SAMPLE}.report.json`) - Preprocessed VCF (`${SAMPLE}.preprocessed.vcf.bgz`) generated as an intermediate -- `${SAMPLE}.missing_pgx_var.vcf`: the PGx positions absent from PharmCAT's input. With the gVCF these are the positions without coverage, plus the positions longer than one base whose span is not wholly inside reference blocks with GQ 20 or more; with a variants-only VCF they include every position where you match the reference. +- `${SAMPLE}.missing_pgx_var.vcf`: the PGx positions absent from PharmCAT's input. With the gVCF these are the positions without coverage, the positions whose reference call has a GQ below 20, and the positions longer than one base whose span is not wholly inside reference blocks with GQ 20 or more; with a variants-only VCF they include every position where you match the reference. - Covers CYP2C19, CYP2D6, CYP2B6, CYP3A4/5, UGT1A1, DPYD, NAT2, TPMT, etc. - Star allele calls with metabolizer status (Poor/Intermediate/Normal/Rapid/Ultra-rapid) diff --git a/docs/09-str-expansions.md b/docs/09-str-expansions.md index 795c99b44..0ae39c423 100644 --- a/docs/09-str-expansions.md +++ b/docs/09-str-expansions.md @@ -61,7 +61,7 @@ SLC6A4 5-HTTLPR, the serotonin transporter promoter length polymorphism, is not ## Key Disease Thresholds -The thresholds step 9b grades with on the STRchive v2.28.0 catalog, in repeat units: Stranger calls a count up to the normal maximum `normal`, one in the pre-mutation band `pre_mutation`, and one from the full-mutation minimum `full_mutation`. `tests/test_str_ranges.py` checks every row against the catalog. With `EH_CATALOG=bundled`, step 9b uses Stranger's bundled catalog, whose thresholds differ at some loci. +The thresholds step 9b grades with on the STRchive v2.28.0 catalog, in repeat units: Stranger calls a count up to the normal maximum `normal`, one in the pre-mutation band `pre_mutation`, and one from the full-mutation minimum `full_mutation`. `rust/crates/og-setup/tests/genome_str_ranges.rs` checks every row against the catalog. With `EH_CATALOG=bundled`, step 9b uses Stranger's bundled catalog, whose thresholds differ at some loci. | Disease | Gene | Repeat Unit | Normal | Pre-mutation | Full mutation | |---|---|---|---|---|---| @@ -73,7 +73,7 @@ The thresholds step 9b grades with on the STRchive v2.28.0 catalog, in repeat un | SCA1 | ATXN1 | CAG | ≤35 | 36-38 | ≥39 | | SCA2 | ATXN2 | CAG | ≤28 | 29-34 | ≥35 | -Stranger's pre-mutation band is everything between the two thresholds; it is wider than a clinical intermediate range at some loci. At FMR1 it covers both the gray zone and the premutation below. `setup.sh` also writes `reference/strchive-/str_ranges.tsv`, one row per locus with these two thresholds and STRchive's own intermediate range. +Stranger's pre-mutation band is everything between the two thresholds; it is wider than a clinical intermediate range at some loci. At FMR1 it covers both the gray zone and the premutation below. At HTT, Stranger's full mutation starts at 36, but 36 to 39 is the reduced-penetrance range of GeneReviews: such a count can cause Huntington disease, but not in everyone who carries it. `og summary collect` marks a sized HTT count of 36 to 39 as reduced penetrance in `summary.json`, from `assets/str_penetrance_ranges.tsv`. Step 24 (`run-all.sh`) does this; the Nextflow report does not stage that table yet, so a Nextflow run has no such mark ([how to read it](results/structural-and-repeats.md#how-to-read-expansionhunter-output)). `setup.sh` also writes `reference/strchive-/str_ranges.tsv`, one row per locus with these two thresholds and STRchive's own intermediate range. ## FMR1 Clinical Zones @@ -101,4 +101,4 @@ The second argument (`male`/`female`) is **required** — it affects X-linked lo - **Why STRchive, not a larger catalog.** STRchive lists the loci with a published disease link, each with the sources of its thresholds. Larger catalogs (tens of thousands of loci) are for research, have no thresholds, and would make step 9b's grades meaningless. Illumina has published no newer catalog than the bundled one (2021). - **What the STRchive catalog cannot do.** It does not make long repeats readable: the seven loci above stay ungraded, and an expansion longer than a read is still sized only roughly. The motif count of step 9b reads the motif, never the size. - Short-read WGS can reliably detect expansions up to ~150 repeats; very large expansions (>1000) are less accurate -- **How well each allele was sized.** The VCF's `SO` field says which reads support each allele: `SPANNING` (reads cross the whole repeat, so it is sized), `FLANKING` (reads reach into the repeat from one side only, so the size is not determined) or `INREPEAT` (reads made only of repeat, so the allele is longer than a read). `ADSP` counts the spanning reads and `REPCI` gives the interval. The report uses them: a `FLANKING` or `INREPEAT` allele, one with fewer than 2 spanning reads, or one whose interval reaches the pathogenic minimum is listed as not sized and never as normal ([how the report reads them](interpreting-results.md#str-expansions-step-9)) +- **How well each allele was sized.** The VCF's `SO` field says which reads support each allele: `SPANNING` (reads cross the whole repeat, so it is sized), `FLANKING` (reads reach into the repeat from one side only, so the size is not determined) or `INREPEAT` (reads made only of repeat, so the allele is longer than a read). `ADSP`, `ADFL` and `ADIR` count the spanning, flanking and in-repeat reads, and `REPCI` gives the interval. An allele with no spanning and no flanking read but at least one in-repeat read rests on in-repeat reads only, so it is longer than a read and is read as `INREPEAT`, whatever its `SO` says. The report uses them: a `FLANKING` or `INREPEAT` allele, one with fewer than 2 spanning reads, or one whose interval reaches the pathogenic minimum is listed as not sized and never as normal ([how the report reads them](interpreting-results.md#str-expansions-step-9)) diff --git a/docs/09b-stranger.md b/docs/09b-stranger.md index 918bb83b7..35dfd8a03 100644 --- a/docs/09b-stranger.md +++ b/docs/09b-stranger.md @@ -28,7 +28,7 @@ Pinned in `versions.env`; [Image versions](versions.md) lists the current tag. By default, the catalog step 9 ran on (`expansion_hunter/_eh_catalog.json`) when it carries Stranger's thresholds: that is the STRchive catalog `setup.sh` builds ([step 9](09-str-expansions.md#which-catalog-runs)). Its thresholds are STRchive's, so steps 9 and 9b read one list of loci, and every graded record carries `SourceDisplay=STRchive-`. The log names it. Without it (step 9 ran on the bundled 31 loci, or on a catalog without thresholds) Stranger's bundled GRCh38 catalog grades, as before. `STRANGER_REPEATS=file` picks another catalog (TSV or JSON), `STRANGER_REPEATS=bundled` the bundled GRCh38 one. The Nextflow `STRANGER` module takes `--expansion_catalog` and makes the same choice. -The thresholds differ from the bundled catalog's at some loci. HTT, for example: STRchive's benign maximum is 26 and its pathogenic minimum 36, so 27 to 35 CAG is `pre_mutation`, where the bundled catalog calls up to 34 normal. Seven STRchive loci get no status at all (MUC1, CEL, TYMS, PLIN4, VWA1, POLG, MIR7-2; [why](09-str-expansions.md#which-catalog-runs)). +The thresholds differ from the bundled catalog's at some loci. HTT, for example: STRchive's benign maximum is 26 and its pathogenic minimum 36, so 27 to 35 CAG is `pre_mutation`, where the bundled catalog calls up to 34 normal. From 36 Stranger says `full_mutation`, but 36 to 39 is the reduced-penetrance range: `summary.json` of step 24 marks a sized count there as reduced penetrance; the Nextflow report does not yet ([how to read it](results/structural-and-repeats.md#how-to-read-expansionhunter-output)). Seven STRchive loci get no status at all (MUC1, CEL, TYMS, PLIN4, VWA1, POLG, MIR7-2; [why](09-str-expansions.md#which-catalog-runs)). ## Command diff --git a/docs/16b-mosdepth.md b/docs/16b-mosdepth.md index 8a2f56122..972012d3f 100644 --- a/docs/16b-mosdepth.md +++ b/docs/16b-mosdepth.md @@ -11,7 +11,7 @@ Reads the BAM file and computes: 2. **Coverage distribution** — cumulative fraction of bases at each depth level 3. **Region coverage** — mean depth in 500bp windows across the genome 4. **Threshold report** — fraction of bases at 1x, 5x, 10x, 15x, 20x, 30x, 50x depth -5. **Gene callability** — for each gene of `assets/callability_genes.tsv` on chr1-22, X and Y, the bases with 10 or more reads of mapping quality 20 or more (a second mosdepth pass) +5. **Gene callability** — for each gene of `assets/callability_genes.tsv` on chr1-22, X and Y, the bases with 10 or more reads of mapping quality 20 or more (a second mosdepth pass, which counts the two mates of a pair once where they overlap) ## Why @@ -90,7 +90,7 @@ 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. 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. 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. On a partial BAM (the CI fixture, an exome) most genes are not read, because they have no reads at all. `CALLABILITY_GENES` names another table with the same columns (the CI case uses a two-gene one). 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, step 16b runs the gene pass alone. @@ -100,17 +100,21 @@ The CMRG gene list and the stratification BEDs are only inputs of the build scri | Dataset | Threads | Time | Memory | |---|---|---|---| -| 30-40x WGS, measured in three runs ([runtime](hardware-requirements.md#runtime-per-step)) | 4 | 2-3 min | 1.9 GB | -| The gene callability pass on the same BAM (estimate: a second read of the BAM) | 4 | about as long again | < 2 GB | +| The genome-wide pass, 30-40x WGS, measured in three runs ([runtime](hardware-requirements.md#runtime-per-step)) | 4 | 2-3 min | 1.9 GB | +| The gene callability pass, public HG002 30x, measured in two runs (below) | 4 | 3 min 26 s - 3 min 50 s | 2.0 GB | | chr22 BAM (estimate) | 2 | < 30 sec | < 1 GB | +The gene pass was measured on Google's public HG002 NovaSeq PCR-free 30x BAM on GRCh38 (`HG002.novaseq.pcr-free.30x.dedup.grch38.bam`, 43.7 GB, from `storage.googleapis.com/brain-genomics-public`), with mosdepth 0.3.14 and 4 threads, on a 10-core Mac mini that was running other jobs. Without `--fast-mode` it took 3 min 26 s and 3 min 50 s; with it, as before, 1 min 46 s and 2 min 29 s. The CPU time is the steadier figure: about 7 min without `--fast-mode` against 5 min with it, 37% more. The genome-wide pass took 3 min 15 s on the same machine. Peak memory was 2.0 GB in every run. + +On that genome 934 of the 1,553 catalog genes with a position are read, against 938 with `--fast-mode`. The share of bases at 10x fell by 0.2 points on average and by 7 points at most. Four genes moved from read to not read: DHX40, SPATA31C2 and GOLGA6L10 were at 90.1-90.2% and are now at 89.6-89.9%, and UGT2B17 (step 32 calls it) went from 91.7% to 89.9%. No gene moved the other way. + ## MultiQC Integration mosdepth output is automatically detected by MultiQC. The `mosdepth.global.dist.txt` and `mosdepth.summary.txt` files are consumed to generate coverage distribution plots and summary statistics in the aggregated report. ## Notes -- `--fast-mode` skips per-base output (saves ~10 GB of disk for 30X WGS) while keeping all distributions and thresholds +- The genome-wide pass runs with `--fast-mode`: mosdepth reads only each read's start and end, so it neither corrects for overlapping mates nor reads the CIGAR. That is faster and close enough for the depth summaries. `--no-per-base`, not `--fast-mode`, is what leaves out the large per-base BED. The gene callability pass runs without `--fast-mode` (see [Gene callability](#gene-callability)) - Supports `ALIGN_DIR` variable to use alternative alignments: `ALIGN_DIR=aligned_bwamem2 ./scripts/16b-mosdepth.sh sample` - Supports `CAPTURE_BED` for WES on-target coverage: `CAPTURE_BED=${GENOME_DIR}/captures/my_panel.bed ./scripts/16b-mosdepth.sh sample`. **The BED file must be inside `GENOME_DIR`** — the Docker container only mounts `GENOME_DIR` as `/genome/`, so paths outside it are invisible to the container - mosdepth uses 1 main thread + N decompression threads, so `--threads 4` actually uses 5 threads total diff --git a/docs/22-survivor-merge.md b/docs/22-survivor-merge.md index af18426b9..f441d7a9d 100644 --- a/docs/22-survivor-merge.md +++ b/docs/22-survivor-merge.md @@ -2,7 +2,7 @@ ## What This Does -Keeps the structural variants (SVs) that two or more independent callers agree on. SURVIVOR merge pairs two calls when both of their breakpoints lie within 1,000 bp of each other, their SV type and strands agree, and the event is at least 50 bp long. Each consensus record says how many callers support it and which. +Keeps the structural variants (SVs) that two or more callers agree on. SURVIVOR merge pairs two calls when both of their breakpoints lie within 1,000 bp of each other, their SV type and strands agree, and the event is at least 50 bp long. Each consensus record says how many callers support it and which. That is caller agreement, not validation (see Why). ## Why @@ -12,7 +12,7 @@ Individual SV callers each have distinct biases and false-positive profiles: - **Delly**: strongest for inversions and balanced translocations (paired-end, split reads and depth) - **CNVpytor**: best for large CNVs (read depth only) -An SV seen by two callers that use different signals is more likely to be real. +An SV that two callers report is less likely to be one caller's artefact. Agreement is not independent proof, though. Manta and Delly both read split and paired reads from the same alignment, so a misaligned read cluster both of them see can reach the consensus. Only CNVpytor reads a different signal, depth, and its breakpoints are coarse (see Limitations). The step used to bin calls by chromosome, `int(POS/1000)` and SV type. That split one deletion called at positions 999 and 1001 over two bins, and counted two deletions of very different size that start in one bin as agreement. SURVIVOR compares both breakpoints, so neither happens: the e2e case `tests/e2e/sv-mito-telomere-steps-1-sv-merge.sh` runs both situations on the synthetic three-caller set in `tests/fixtures/sv/`. @@ -41,7 +41,7 @@ At least two of the following (the script uses every one it finds): | TIDDIT (script 4a) | `${GENOME_DIR}/${SAMPLE}/sv_tiddit/${SAMPLE}_sv.vcf.gz` | | Sniffles2 (script 4c, long reads) | `${GENOME_DIR}/${SAMPLE}/sv_sniffles/${SAMPLE}_sv.vcf.gz` | -GRIDSS (step 4b) is left out, and the script says so when its VCF exists. GRIDSS reports every event as a pair of breakends (`SVTYPE=BND`), which never match the DEL, DUP and INV records of the other callers. +GRIDSS (step 4b) is left out of the SV consensus, and the script says so when its VCF exists. GRIDSS reports every event as a pair of breakends (`SVTYPE=BND`), and nothing here turns a pair into one DEL, DUP or INV. SURVIVOR 1.0.7 counts BND as the same type as INV and TRA, so a GRIDSS breakend would pair with another caller's inversion or translocation and count as a vote for an event GRIDSS never typed. Step 4b writes GRIDSS's own high-confidence calls to `sv_gridss/_gridss.high.vcf.gz`. The Nextflow pipeline (`survivor_merge` in `--tools`, with at least two of `manta`, `delly`, `cnvpytor`) merges the callers it ran. @@ -83,7 +83,7 @@ A typical 30X WGS genome produces: - **Delly**: 5,000-15,000 SVs - **CNVpytor**: 3,000-4,000 CNVs, 1,500-2,000 of them with e-value < 0.01 (see [interpreting results](interpreting-results.md#cnvpytor-results-step-18)) -Multi-caller SVs have lower false-positive rates than single-caller calls. The count after the merge has not been measured on a real genome with this version of the step. +An SV two callers report is less likely to be one caller's artefact, but it is not validated: see Why. The count after the merge has not been measured on a real genome with this version of the step. SV types in the output: **DEL** (deletion), **DUP** (duplication), **INV** (inversion), **INS** (insertion), **TRA** (a translocation, SURVIVOR's name for a breakend pair between two chromosomes). @@ -102,12 +102,12 @@ docker run --rm -v "${GENOME_DIR}:/genome" "${BCFTOOLS_IMAGE}" \ - Single-caller SVs are discarded even if they are real. If you suspect a specific SV, check the individual caller outputs directly. - CNVpytor's calls are depth-only and their breakpoints are coarse (its bin size), so a CNVpytor call often lies more than 1 kb from the Manta or Delly breakpoint of the same event and does not pair with it. - The CNVpytor VCF made from its table carries no genotype and no quality. -- Breakend (BND) records pair only with breakends of another caller. That includes a lone Manta inversion junction of 1 Mb or more, which step 4 keeps as its two breakends instead of a whole-span inversion. +- A breakend (BND) record pairs with a breakend, an inversion (INV) or a translocation (TRA) of another caller: SURVIVOR 1.0.7 lets a BND match those two types. That includes a lone Manta inversion junction of 1 Mb or more, which step 4 keeps as its two breakends instead of a whole-span inversion. ## Notes - Run this step only after completing at least two of: step 4 (Manta), step 19 (Delly), step 18 (CNVpytor). -- The consensus VCF can be annotated or loaded into IGV for visual inspection. +- Load the consensus VCF into IGV to look at it, but never run AnnotSV on it. Its sample columns are the callers, not you, and its positions are SURVIVOR's merged ones. AnnotSV (step 5) annotates the callers' own calls, and the reports join `SUPP` and `SUPP_VEC` onto them ([step 5](05-annotsv.md)). ## Links diff --git a/docs/25-prs.md b/docs/25-prs.md index cdbd5e5ee..8ef1b061d 100644 --- a/docs/25-prs.md +++ b/docs/25-prs.md @@ -128,7 +128,7 @@ Which docker flags pgsc_calc's own containers get: they run as you (`-u` with yo | File | Contents | |---|---| -| `${SAMPLE}_prs_summary.tsv` | `Condition`, `PGS_ID`, `Score_SUM`, `Variants_Matched`, `Variants_Total`, `Matched_Pct`, `Percentile`, `Ancestry_Group`, `ChrX`, `Ambiguous`, `Applies_To`, `Sex_Check`, `Evaluated_In`, `Effect`, `Input`. `Evaluated_In` and `Effect` are written when the score list names evaluations, as the shipped one does | +| `${SAMPLE}_prs_summary.tsv` | `Condition`, `PGS_ID`, `Score_SUM`, `Variants_Matched`, `Variants_Total`, `Matched_Pct`, `Percentile`, `Ancestry_Group`, `ChrX`, `Ambiguous`, `Applies_To`, `Sex_Check`, `Evaluated_In`, `Effect`, `Percentile_Note`, `Input`. `Evaluated_In` and `Effect` are written when the score list names evaluations, as the shipped one does. Step 25 and `PRS_SUMMARY` always write `Percentile_Note` | | `${SAMPLE}_prs_summary..tsv` | The same table under the time it was written, one per run, so a rerun keeps the earlier ones | | `pgsc_calc./` | Step 25 only: the previous run's `pgsc_calc/` folder, moved aside by the rerun | | `pgsc_calc/target.vcf.gz` | The genotypes pgsc_calc scored: the score (and panel) positions, from the gVCF or the VCF | @@ -187,7 +187,7 @@ That run scored PGS000018 alone and fits a 16 GB machine; the default scores nee - **Variants_Matched**: score variants pgsc_calc matched in your genotypes. `NA` when every score fell under pgsc_calc's 75% match rate: pgsc_calc then stops and publishes no match counts, and `Matched_Pct` is the rate its log gave. - **Variants_Total**: variants of the scoring file with a GRCh38 position on the autosomes, plus chrX when the sex was given. Strand-ambiguous rows count unless a failed strand check left them out. - **Matched_Pct**: `Variants_Matched / Variants_Total` as a percentage; the step warns below 50%, and pgsc_calc gives no sum below 75%. -- **Percentile**: with the panel, where your score falls among the reference samples of `Ancestry_Group` (pgsc_calc's empirical percentile, `percentile_MostSimilarPop`). `NA` without the panel, and `NA` for a score that does not apply to the declared sex. +- **Percentile**: with the panel, where your score falls among the reference samples of `Ancestry_Group` (pgsc_calc's empirical percentile, `percentile_MostSimilarPop`). `NA` without the panel, `NA` for a score that does not apply to the declared sex, and `NA` when the input lists variants only (see `Percentile_Note`). - **Ancestry_Group**: the panel population whose genetic ancestry is most similar to yours (for the 1000 Genomes panel: AFR, AMR, EAS, EUR or SAS). `NA` without the panel. - **ChrX**: the score's rows on chrX: `8 scored` with the sex, `8 left out` without it, `0` when it has none. With the panel, `8 left out (not matched in the panel run)` when pgsc_calc matched none of them and `5 scored, 3 left out (not matched in the panel run)` when it matched some, see [chrX and the sex](#chrx-and-the-sex). - **Ambiguous**: the score's strand-ambiguous rows (A/T and C/G) and what happened to them: `11 dropped` by default, `11 kept` with `PRS_KEEP_AMBIGUOUS=true`, `11 dropped, strand check failed` when the score's other rows did not agree with the reference. `0` when it has none. @@ -195,9 +195,10 @@ That run scored PGS000018 alone and fits a 16 GB machine; the default scores nee - **Sex_Check**: for those scores, `applies`, `not applicable to the declared sex` or `no sex declared`; empty for the rest. - **Evaluated_In**: the groups the score has an evaluation for in the score list (`EUR;AFR;AMR`), empty when it has none. - **Effect**: the OR or HR of the evaluation in `Ancestry_Group`, with the group and the PPM id (`HR 1.53 (EUR, PPM000591)`). Empty without the panel, when the score has no percentile or was not evaluated in your group, and for a score that does not apply to the declared sex. -- **Input**: `gvcf` when the positions were genotyped from the gVCF, `vcf` when only the variant-only VCF was there. +- **Percentile_Note**: `percentile withheld: the input lists variants only` when the panel gave a percentile and the genotypes pgsc_calc scored hold no reference calls (see [Hom-ref sites come from the gVCF](#hom-ref-sites-come-from-the-gvcf)); empty otherwise. +- **Input**: `gvcf` when the positions were genotyped from the gVCF, `vcf` when only the VCF was there. The percentile does not depend on it: a chip VCF is `vcf`, and keeps its percentile when it passes the reference-call rule of [Hom-ref sites come from the gVCF](#hom-ref-sites-come-from-the-gvcf). -Both reports show the percentile with its group, or one line saying "Raw score only" when no panel was used. With the panel they also show the effect in your group, or say that the score has none for it and name the groups it was evaluated in. When a score's chrX rows were left out because no sex was given, the same line names the score and how many rows; rows left out in a panel run show only in the summary's ChrX column. A score that does not apply to the declared sex shows "not applicable to the declared sex" in place of its percentile, and when no sex was declared the reports say which scores are for one sex only. +Both reports show the percentile with its group. When no panel was used, they show one line saying "Raw score only" instead, and the "Not assessed" list says that no ancestry reference panel was used. When the panel ran but every percentile was withheld for a variant-only input (see `Percentile_Note`), the line says "Percentile withheld: the input lists variants only" and why, and the "Not assessed" list says the percentiles were withheld; neither says that no panel was installed. With the panel they also show the effect in your group, or say that the score has none for it and name the groups it was evaluated in. When a score's chrX rows were left out because no sex was given, the same line names the score and how many rows; rows left out in a panel run show only in the summary's ChrX column. A score that does not apply to the declared sex shows "not applicable to the declared sex" in place of its percentile, and when no sex was declared the reports say which scores are for one sex only. A raw `Score_SUM` from a run with the panel is not comparable with one from a run without it: with the panel pgsc_calc scores only the variants the panel has too. Compare percentiles, which only a panel run gives. @@ -224,12 +225,14 @@ The check says the score was reported on the forward strand; it does not prove e The VCF from step 3 lists only sites where you differ from the reference. A scoring variant whose effect allele is the reference allele is missing from that VCF when you carry two copies of it, and adds nothing to your sum. Step 3 also writes a gVCF, which records where you match the reference, and step 25 reads those sites from it as 0/0. With the gVCF, a site is missing when it was not covered or its record is filtered (FILTER other than `PASS` or `.`, such as LowQual or RefCall). -Without a gVCF (`Input` is `vcf`, a sample called by an older version), the sum misses the weight of every reference-allele effect allele you carry on two copies, and few scores reach pgsc_calc's 75% match rate. The step then prints: +Without a gVCF (`Input` is `vcf`, a sample called by an older version), the sum misses the weight of every reference-allele effect allele you carry on two copies, and few scores reach pgsc_calc's 75% match rate. A missing site adds nothing to the sum, so a sum from a variant-only VCF is not comparable with the panel's sums, which come from complete genotypes. Each score then keeps its raw sum and loses its percentile and its effect: `Percentile` is `NA`, `Percentile_Note` says `percentile withheld: the input lists variants only`, and the step prints: ``` -NOTE: hom-ref sites are absent from this VCF, so the score is biased; not comparable to published distributions +NOTE: hom-ref sites are absent from this input (0 of N genotyped positions are reference calls), so a missing site adds nothing to the sum and the sums are biased; not comparable to published distributions, and no percentile is given ``` +The decision reads the genotypes pgsc_calc scored (`pgsc_calc/target.vcf.gz`; in Nextflow the output of `PRS_SCORE_SITES`), not the kind of input: the input lists reference calls when at least one in five of its genotyped positions is 0/0, the rule step 26b applies to the panel's sites. Genotypes from a gVCF pass it. So does a chip VCF from `scripts/chip-to-vcf.sh`, which lists every probe it read, reference calls included, so chip data keeps its percentiles. A variant-only VCF lists no 0/0 and fails it, and so does a gVCF without reference blocks at the positions. + Call the sample again with step 3 to get the gVCF. Imputation (step 14) is not needed for a score from a gVCF: it adds phasing, which the scores do not use, and a percentile needs the ancestry panel, not imputed sites. ### What these scores are NOT diff --git a/docs/33-sample-qc.md b/docs/33-sample-qc.md index 2aed8fd77..fa8be9751 100644 --- a/docs/33-sample-qc.md +++ b/docs/33-sample-qc.md @@ -3,8 +3,8 @@ ## What This Does Checks two things about a sample before you read any result from it, and estimates a third: -- **Is it the person you think?** somalier reads the BAM at 17,766 known polymorphic sites and infers the sex from the reads: a male has no heterozygous sites on chrX outside the pseudoautosomal regions. A sex that differs from the one you declare stops the step. In a Nextflow run with several samples, somalier also compares every pair, so two rows that are the same person show up. -- **Is another person's DNA mixed in?** VerifyBamID2 estimates FREEMIX, the share of reads that come from someone else, from the allele balance at 100,000 markers of the 1000 Genomes panel. Above 0.03 the step warns. +- **Is it the person you think?** somalier reads the BAM at 17,766 known polymorphic sites and infers the sex from the reads: a male has no heterozygous sites on chrX outside the pseudoautosomal regions. A sex that differs from the one you declare stops the step. In a Nextflow run with several samples, somalier also compares every pair, so two rows that are the same person show up. Below 1,000 informative sites the table says identity is `uncertain`. At 1,000 or more, with one sample there is nothing to compare, and it says `not_checked`. +- **Is another person's DNA mixed in?** VerifyBamID2 estimates FREEMIX, the share of reads that come from someone else, from the allele balance at 100,000 markers of the 1000 Genomes panel. Above 0.03 the step warns. An estimate from fewer than 5,000 markers, or with VerifyBamID2's marker check skipped, is marked `uncertain`. - **Did some cells lose the Y, or one X?** From the depth step 16b measured and, for a woman, the VCF's chrX allele fractions, the step estimates the share of cells that lost the Y chromosome (men) or one X (women), with its 95% range. See [Mosaic loss of chrY or chrX](#mosaic-loss-of-chry-or-chrx). ## Why @@ -19,7 +19,7 @@ Contamination only warns. A contaminated sample is still your sample; its calls ## Docker Image - `SOMALIER_IMAGE` - `VERIFYBAMID2_IMAGE` -- `PYTHON_IMAGE` (the verdict, from `og summary collect`, and the mosaic estimate, from `og qc sex-loss`, the Rust binary `scripts/setup.sh --og` builds) +- `PYTHON_IMAGE` (the verdict, from `og qc sample`, and the mosaic estimate, from `og qc sex-loss`, the Rust binary `scripts/setup.sh --og` builds) Pinned in `versions.env`; [Image versions](versions.md) lists the current tags. @@ -61,7 +61,11 @@ The pedigree is one line: the sample, itself as its family, no parents (`-9`), t The bash step lets somalier name the sample after the BAM's `@RG SM` tag; every BAM step 02 writes has one. In Nextflow, somalier names each sample by its samplesheet id instead, so two rows whose BAMs share an `SM` stay two samples, and a BAM with no read group works. -VerifyBamID2 refuses to estimate when fewer than 1,000 panel markers have reads ("Insufficient Available markers"), as on a targeted (WES) or sliced BAM. The step then runs it again with `--DisableSanityCheck` and records `verifybamid2_marker_check skipped`, so the report says FREEMIX rests on fewer than 1,000 markers. On the CI fixture, with about 320 markers that have reads, FREEMIX still read 0.0004 for the clean HG002 and 0.093 for HG002 with 9.3% of its reads from HG001. +VerifyBamID2 refuses to estimate unless its marker check keeps more than 1,000 markers and more than a tenth of the panel ("Insufficient Available markers"), as on a targeted (WES) or sliced BAM. On the 100,000-marker panel that means 10,000 or fewer markers with reads. The step then runs it again with `--DisableSanityCheck` and records `verifybamid2_marker_check skipped`, so the report says FREEMIX is a rough estimate. On the CI fixture, with about 320 markers that have reads, FREEMIX still read 0.0004 for the clean HG002 and 0.093 for HG002 with 9.3% of its reads from HG001. + +VerifyBamID2's marker check logs how many markers it kept: those with reads and a depth within three standard deviations of the mean (`NOTICE - N SNP markers remained after sanity check.`). The run without the check does not log it, so the step reads the count from the first run's log and records it as `verifybamid2_markers`. FREEMIX is `contamination_confidence uncertain` when the check was skipped or when it kept fewer than 5,000 markers. That floor is five times the 1,000 markers the check asks for, and half of the 10% of the panel it also asks for. A whole genome at 30x keeps far more. `contamination` (`ok` or `warn`) still compares FREEMIX with `FREEMIX_WARN` as before; the confidence row only says how far to trust that number. + +Identity rests on somalier's informative sites: the sites it genotyped for the sample (`sites_genotyped`) and, for each pair, the sites both samples have a genotype at (its `n` column). Below 1,000 genotyped sites, about one in 18 of somalier's 17,766 sites, `identity` is `uncertain`. From 1,000 sites on, with one sample, as in every bash run, there is no other sample to compare with: `identity` is `not_checked`, and the sex check is the only identity check. It is `checked` when somalier compared the sample with another sample of the run on 1,000 or more shared sites. A pair with fewer shared sites, with no `n` column, or with no relatedness (somalier writes `nan` when two samples share no site) does not count, and when no pair counts, `identity` is `uncertain`. In Nextflow, add `sample_qc` to `--tools` with `--somalier_sites` and `--verifybamid2_panel` (the folder that holds the `.UD`, `.mu` and `.bed` files); `--freemix_warn` and `--sex_check` work as above. `SOMALIER_RELATE` runs once over every sample of the run, with a pedigree of every sample's samplesheet sex. A sex mismatch stops the run, after `INDEXCOV` made the same check from the index. `SAMPLE_QC` gets `MOSDEPTH`'s windows when `mosdepth` is in `--tools` (it is in the default list), and the row's VCF. It waits for that VCF, so on a FASTQ row somalier's sex check reports after `DEEPVARIANT`; `INDEXCOV`'s check still stops the run before it. @@ -80,7 +84,7 @@ The step needs step 16b's windows for the depth estimate and, for a woman, the V ## Output Files | File | Description | |---|---| -| `qc/${SAMPLE}_sample_qc.tsv` | The verdict, one `key` and `value` per line: `inferred_sex`, `sex_check` (`ok`, `mismatch` or `not_checked` with `sex_check_reason`), the chrX and chrY numbers it rests on, `freemix`, `contamination` (`ok` or `warn`), `panel_markers`, `verifybamid2_marker_check` (`passed`, or `skipped` when fewer than 1,000 markers had reads), `same_person_as`; then the mosaic rows below | +| `qc/${SAMPLE}_sample_qc.tsv` | The verdict, one `key` and `value` per line: `inferred_sex`, `sex_check` (`ok`, `mismatch` or `not_checked` with `sex_check_reason`), the chrX and chrY numbers it rests on, `freemix`, `contamination` (`ok` or `warn`), `panel_markers`, `verifybamid2_marker_check` (`passed`, or `skipped` when the check kept 1,000 or fewer markers, or a tenth of the panel or fewer), `same_person_as`, `verifybamid2_markers` (the markers VerifyBamID2 kept, empty when its log does not say), `contamination_confidence` (`ok`, `uncertain`, or empty when VerifyBamID2 did not run) with `contamination_confidence_reason`, `identity` (`checked`, `uncertain` or `not_checked`) with `identity_reason`; then the mosaic rows below | | `qc/somalier/${SAMPLE}.samples.tsv` | somalier's per-sample table: depth, genotype counts, chrX and chrY counts, `original_pedigree_sex` (the declared sex: `male`, `female`, or `unknown` when none was declared), `sex` (the pedigree's code, changed when the reads tell: 1 male, 2 female, -9 unknown, -2 when it is female but chrY has reads) | | `qc/somalier/${SAMPLE}.declared.ped` | The pedigree somalier got: the declared sex | | `qc/somalier/${SAMPLE}.pairs.tsv`, `.html` | Relatedness of every pair (one sample here; every sample of the run in Nextflow, under `somalier/`) | @@ -112,7 +116,10 @@ The HTML report (step 24) shows the inferred sex, FREEMIX and any duplicate in i | FREEMIX below 0.01 | Clean | Nothing | | FREEMIX 0.01 to 0.03 | Trace contamination, usual for a library | Nothing | | FREEMIX above 0.03 | About that share of the reads are someone else's | Treat heterozygous calls with care; ask the lab whether it can resequence | +| `contamination_confidence uncertain` | FREEMIX rests on fewer than 5,000 markers, or VerifyBamID2 skipped its marker check | Read FREEMIX as a rough estimate. Normal on a targeted or sliced BAM; on a whole genome, check the depth | | `same_person_as` set | Two samples of the run share their genome (relatedness 0.9 or more) | A duplicate row, a resequenced sample, an identical twin, or a swap | +| `identity not_checked` | 1,000 or more informative sites, but no other sample in the somalier run to compare with | Nothing. To compare with an earlier sample, relate the two `.somalier` files (Notes below) | +| `identity uncertain` | Fewer than 1,000 informative somalier sites for the sample, or no other sample known to share 1,000 or more with it | A relatedness or a `same_person_as` from so few sites can be wrong. Normal on a targeted or sliced BAM | | `mosaic_call not_detected` | The 95% range does not put a loss of the Y (or of one X) above 10% of the cells; the estimate itself can be higher when the range is wide | Nothing; a smaller loss cannot be told from noise at 30x | | `mosaic_call detected` | The low end of the 95% range is above 10%: a share of the blood cells lost the Y, or one X | Nothing follows from it alone. It is a population-level marker, not a diagnosis; a doctor would test blood cells directly if it ever mattered | | `mosaic_call gain` | More depth than one Y or two X | An extra copy (47,XYY, 47,XXX) or a gain; it is not a loss | diff --git a/docs/35-paralogs.md b/docs/35-paralogs.md index c49a71dd2..bbc6d4529 100644 --- a/docs/35-paralogs.md +++ b/docs/35-paralogs.md @@ -183,7 +183,7 @@ One owner per locus. These loci are Parascopy's: no row of `bin/cn_loci.tsv` tha A new locus is a new row for a model already in the pinned data; it needs no code change. A rerun of the bash step removes the table of a row the catalog no longer has, so every catalog table in `paralogs/` comes from the last run. A row whose region has no read is not assessed and costs one `samtools view -c`, so a BAM of part of the genome runs Parascopy only where it has reads. -`assets/parascopy_models_v1.7.txt` lists every region of the 167 models of the pinned data (`models_GRCh38_1KGP_v1.7.tar.gz`, Zenodo record 15019940, archive sha256 `2e9be08b69936f13a49d52c7764f2414beac27a99b95e0c48b2e2ccafbb8c846`), the same for the five populations. Each gene there is the model file `.gz` of the `list.txt` the data installs. `cargo test -p og-steps --test paralog_loci` refuses a catalog row whose model is not on that list: the gene GBA1, for example, has the model `GBA.gz`, not `GBA1.gz`. +`assets/parascopy_models_v1.7.txt` lists every region of the 167 models of the pinned data (`models_GRCh38_1KGP_v1.7.tar.gz`, Zenodo record 15019940, archive sha256 `2e9be08b69936f13a49d52c7764f2414beac27a99b95e0c48b2e2ccafbb8c846`), the same for the five populations. That data is Timofey Prodanov's, licensed CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/); the file's header names it and what changed: only the model regions are kept, and overlapping copy regions are merged. Each gene there is the model file `.gz` of the `list.txt` the data installs. `cargo test -p og-steps --test paralog_loci` refuses a catalog row whose model is not on that list: the gene GBA1, for example, has the model `GBA.gz`, not `GBA1.gz`. ## HBA1 and HBA2 from Depth diff --git a/docs/41-bloodtype.md b/docs/41-bloodtype.md index 650c9de24..acbadea0b 100644 --- a/docs/41-bloodtype.md +++ b/docs/41-bloodtype.md @@ -18,7 +18,7 @@ Most blood group antigens differ by one known variant, so the genome predicts th - bcftools `norm` to left-align the VCF's records near the marker sites against the reference first (see [Indels written another way](#indels-written-another-way)) - samtools `bedcov` for the read depth over the marker sites and RHD; the RHD regions are the RHD row of `bin/cn_loci.tsv`, and og cn's engine turns their depth into the copy number (see [Copy number from depth](cn-loci.md)) -The variants and the antigens they define are the ISBT allele definitions, as RBCeq2 2.4.4 packages them (database v2.5.1, MIT licence, Australian Red Cross Lifeblood). The table's header names the release and the checksum of the file they were read from. Each position and REF base was checked against Ensembl GRCh38 and its dbSNP id. The HPA positions come from dbSNP through Ensembl, because that RBCeq2 database lists them at their GRCh37 positions. +The variants and the antigens they define are the ISBT allele definitions, as RBCeq2 2.4.4 packages them (database v2.5.1, MIT licence, Australian Red Cross Lifeblood). The table's header names the release and the checksum of the file they were read from. What the table takes from RBCeq2 is used under that MIT licence; its full notice ships as `assets/licences/RBCeq2-LICENSE.txt`. The system, antigen and allele names follow the ISBT nomenclature (International Society of Blood Transfusion (ISBT) Blood Group Database, https://blooddatabase.isbtweb.org). No row was read from that database or its API. Each position and REF base was checked against Ensembl GRCh38 and its dbSNP id. The HPA positions come from dbSNP through Ensembl, because that RBCeq2 database lists them at their GRCh37 positions. The null alleles (an allele that makes no antigen) are the single-variant null alleles RBCeq2 lists for SMIM1 (Vel), ABCB6 (Lan), ABCG2 (Jra), FUT1 (H), FUT2 (secretor), KEL (K0) and SLC14A1 (Jk(a-b-)): 205 rows. Null alleles at one position with the same REF share a row, its ALT then a comma list. Left out are the alleles of two or more variants, the two deletions over 50 bp, one KEL allele that shares its position with another under a different REF, and three alleles too common to be a null on their own (see Notes). HPA-7 to HPA-35 are RBCeq2's HPA alleles. That database gives them at GRCh37 positions, so each was mapped to GRCh38 with Ensembl's assembly map. Every new row was then checked on GRCh38 on 2026-11-03: Ensembl VEP on the row's REF and ALT gives the allele's c. change on its RefSeq transcript, and the REF is Ensembl's sequence. Where RBCeq2's text has a slip, the table keeps VEP's change: HPA-13 is ITGA2 c.2483C>T, HPA-16 is ITGB3 c.497C>T and HPA-35 is ITGB3 c.1514G>A. The IPD-HPA database (https://www.ebi.ac.uk/ipd/hpa/) names the same antigens. diff --git a/docs/42-traits.md b/docs/42-traits.md index 66e419782..6bd27af64 100644 --- a/docs/42-traits.md +++ b/docs/42-traits.md @@ -11,7 +11,7 @@ These are the results most people find easiest to read, and the pipeline had no ## Tool - **bcftools** (`bcftools convert --gvcf2vcf`, `view`, `query`) reads the genotypes at the table's positions from the gVCF. -- **WhatsHap** (`whatshap phase`) phases the heterozygous sites of a rule that needs phase from the BAM's reads. +- **WhatsHap** (`whatshap phase`) phases from the BAM's reads the heterozygous sites of a rule that needs phase, and those of a rule read without phase whose genotypes assume which alleles share a copy. - **`og traits table`** (Rust) reads each genotype against the table, and each rule against the rule table. ## Docker Image @@ -22,7 +22,7 @@ These are the results most people find easiest to read, and the pipeline had no - `${SAMPLE}/vcf/${SAMPLE}.g.vcf.gz` with its `.tbi`: the gVCF of [step 3](03-variant-calling.md). A gVCF holds reference blocks, so a position where you match the reference reads as ref/ref, and a position with no reads has no record and reads as "not covered". A variant-only VCF cannot tell those two apart, so the step does not read one. The gVCF must hold one sample: a gVCF with several sample columns stops the step with the count. - `assets/traits.tsv`: the table, and `assets/genotype_rules.tsv`: the rules. -- `${SAMPLE}/aligned/${SAMPLE}_sorted.bam` with its `.bai` (`ALIGN_DIR` as for the other steps), optional: WhatsHap reads it when a rule needs phase. Without it, or when WhatsHap fails (step 42 prints a warning and goes on, as `TRAITS_PHASE` does in Nextflow), such a rule is read only when at most one of its sites is heterozygous. +- `${SAMPLE}/aligned/${SAMPLE}_sorted.bam` with its `.bai` (`ALIGN_DIR` as for the other steps), optional: WhatsHap reads it when a rule needs phase. Without it, or when WhatsHap fails (step 42 prints a warning and goes on, as `TRAITS_PHASE` does in Nextflow), such a rule is read only when at most one of its sites is heterozygous. WhatsHap also phases the double heterozygote of a rule read without phase; without the BAM such a reading keeps its "Phase unknown" note. In the Nextflow pipeline (`traits` in `--tools`, part of the default list) the processes `TRAITS_SITES` and `TRAITS` run for every sample with a gVCF, and `TRAITS_PHASE` (WhatsHap) for every such sample with a BAM: one DeepVariant wrote (FASTQ, BAM or CRAM rows) or one the samplesheet gives in its `gvcf` and `gvcf_index` columns. A sample without one is skipped with a warning. From an existing VCF, `run-all.sh` passes a gVCF on only for a sample with a BAM and a VCF whose gVCF lies beside the VCF; any other sample that starts from a VCF gets step 42 listed as skipped, with the reason. A failed traits task is skipped and the run goes on, as for the other report-only tools. @@ -88,10 +88,10 @@ Some results need several sites read together: APOE's ε alleles come from two s The two haplotypes a person's genotypes make are looked up by their alleles, and the pair gives the combination line. A heterozygous site does not say which of its alleles shares a copy with the alleles at the other sites, so: -- **`needs_phase no`** (APOE): the combination line is the one listing every pair the genotypes allow. Heterozygous at both APOE sites allows ε2/ε4 and ε1/ε3; that line reads ε2/ε4 and says it could also be the rare ε1/ε3. +- **`needs_phase no`** (APOE, APOL1, SERPINA1, HFE, GC, CAD9p21, MAPT): the combination line is the one listing every pair the genotypes allow. Heterozygous at both APOE sites allows ε2/ε4 and ε1/ε3; that line reads ε2/ε4 and says it could also be the rare ε1/ε3. When the genotypes allow one pair only but two or more sites are heterozygous, that pair is an assumption about which alleles share a copy: heterozygous at both HFE sites reads C282Y/H63D only if C282Y and H63D sit on different copies. Such a reading ends with what it assumes, for example "Phase unknown: this reading assumes rs1800562 A and rs1799945 G sit on different copies (the copies C282Y and H63D); no phasing ran (no BAM, or phasing failed), so that is not checked." Those sites also go to WhatsHap (`og traits phase-sites`); APOE's do not, because its line already names both pairs. When one phase block holds them all, the phase decides (`phase` read_backed): the pair it confirms reads without the caveat, and a pair with a copy the rule does not describe is `other_haplotype`, not read. Its reading says where the reads put the alleles, and, when only one copy carries any change, "one copy is changed and the other is not". Phased C282Y and H63D on one copy read that way, with the other copy wt. - **`needs_phase yes`** (TAS2R38): with one heterozygous site or none, the two haplotypes follow from the genotypes. With two or more, WhatsHap phases them from the reads: a read, or the two reads of a pair, that covers two of the sites shows which alleles sit on one copy. When every heterozygous site of the rule lands in one phase block the rule is read (`phase` read_backed); otherwise it is `unphased`, not read. The three TAS2R38 sites lie within 741 bases, so a read pair can span them, but not always. -`status` of a rule line is `called`, `not_covered` (a site has no genotype), `low_gq` (a site's call has a GQ below 20 or a caller filter: not read, no result), `other_allele` (an allele the rule does not describe), `other_haplotype` (a copy that is none of the rule's haplotypes; it names the alleles) or `unphased`. `phase` is `not_used` (needs_phase no), `not_needed`, `read_backed` or `unphased`. +`status` of a rule line is `called`, `not_covered` (a site has no genotype), `low_gq` (a site's call has a GQ below 20 or a caller filter: not read, no result), `other_allele` (an allele the rule does not describe), `other_haplotype` (a copy that is none of the rule's haplotypes; it names the alleles) or `unphased`. `phase` is `not_used` (needs_phase no, and no phase block held the heterozygous sites), `not_needed`, `read_backed` or `unphased`. The rules today: @@ -106,7 +106,7 @@ The rules today: | CAD9p21 | rs10757278, rs1333049 | nonrisk, risk | 17478679, 17554300, 17478681 | | MAPT | rs1052553, rs8070723 | H1, H2 | 15654335, 19912324, 21685912 | -The six rules after TAS2R38 need no phase. Their sites lie close together on one copy (the two APOL1 G1 changes were in perfect linkage disequilibrium in Genovese et al. 2010; the 9p21 and 17q21.31 tags each mark one haplotype), or, for HFE, a double heterozygote reads as one change on each copy. A copy the rule does not describe, such as a 9p21 copy with only one of the two risk alleles, is `other_haplotype`, not read. What each rule leaves out, said in its note: +The six rules after TAS2R38 are read without phase. A double heterozygote of each rests on an assumption, and the reading says it (see `needs_phase no` above). SERPINA1 PiSZ, HFE C282Y/H63D and GC Gc1S/Gc2 assume the two changes sit on different copies. APOL1 G0/G1, CAD9p21 "one risk copy" and MAPT H1/H2 assume both sites sit on one copy: the two APOL1 G1 changes were in perfect linkage disequilibrium in Genovese et al. (2010), and the 9p21 and 17q21.31 tags each mark one haplotype. A copy the rule does not describe, such as a 9p21 copy with only one of the two risk alleles, is `other_haplotype`, not read. What each rule leaves out, said in its note: - APOL1 G2 (rs71785313) is a 6-base deletion. The rule table reads single-base sites only, so the rule itself reads G1, and a G2 copy reads as G0 there. The HTML and text reports read G2 beside the rule (`og summary collect`, the `apol1` module of `rust/crates/og-summary/src/collect/group_c/traits.rs`) from the sample's gVCF, or its VCF when there is no gVCF, and show the G1 plus G2 result under "With G2": G1/G2, G2/G2 and G1/G1 are the high-risk genotype. Two G2 copies read G2/G2 even when the G1 sites were not read. A VCF without reference blocks cannot tell a reference base from a position with no reads, so there a result with no G2 copy is marked `(no G2 call)`. The G2 reading uses the same floor as the trait sites: a call over the deletion span with a GQ below 20, a G2 call whose FILTER is not `PASS` or `.`, or a reference call whose FILTER is not `PASS`, `.` or `RefCall`, leaves G2 not read, so two G2 copies at GQ 5 never read G2/G2. The Nextflow report gets the sample's gVCF too (DeepVariant's, or the samplesheet's `gvcf` column), so both runs read the gVCF when there is one. - SERPINA1: M is any copy with neither S nor Z; rarer deficiency and null alleles are not read. A serum level confirms a deficiency. @@ -139,13 +139,13 @@ The APOE line is the APOE rule of `assets/genotype_rules.tsv`, written into the ## Runtime -Seconds: bcftools reads the gVCF at the table's positions through its index (36 rows and 17 rule sites), and WhatsHap, when a rule needs it, reads the BAM over three sites within 741 bases. +Seconds: bcftools reads the gVCF at the table's positions through its index (36 rows and 17 rule sites), and WhatsHap, when a rule has two or more heterozygous sites to phase, reads the BAM over them (each rule's sites lie within about 7 kb). ## Notes - A reading is what the cited studies found on average in the people they studied. It is not a diagnosis, and for most traits it says little about one person. - Rows marked `ancestry` read differently in other populations; their note says how. Lactase persistence is the clearest case: -13910T explains it in Europeans, and the three African alleles have their own rows. -- Each traits table row is read alone. The genotype rules read several sites together: APOE, the TAS2R38 taster haplotype with read-backed phase, and the six rules of the table above. Two different MC1R red-hair variants on the same or on different copies are still read one by one; their note says so. +- Each traits table row is read alone. The genotype rules read several sites together: APOE, the TAS2R38 taster haplotype with read-backed phase, and the six rules of the table above, which use read-backed phase when it covers their heterozygous sites. Two different MC1R red-hair variants on the same or on different copies are still read one by one; their note says so. - SNVs only; the table has no indel and no chrX, chrY or chrM row. - Positions with no genotype (no reads, or a no-call) are listed as not read. On the e2e fixture, a small slice of the HG002 genome, only the table positions inside its slices are read, and the e2e case checks their genotypes against the GIAB truth. - The licence: the readings, notes and table are this project's own text, GPL-3.0-or-later like the rest of the repository. diff --git a/docs/45-y-str.md b/docs/45-y-str.md index d574588a0..089fb7b23 100644 --- a/docs/45-y-str.md +++ b/docs/45-y-str.md @@ -26,6 +26,9 @@ Pinned in `versions.env`; [Image versions](versions.md) lists the current tag. - **Order, names and panels**: FamilyTreeDNA's "Y-STR Results Guide" (https://help.familytreedna.com/hc/en-us/articles/4408063356303-Y-STR-Results-Guide), read on 2026-10-25 through the Internet Archive copy of 2026-04-13, because the live page refuses scripted requests. - **Regions** (GRCh38, the motif length and the reference copies): the Y-STR set HipSTR's authors annotated, `human/all_annot_markers.hg38.fixed.bed` of HipSTR-references at a fixed commit (MIT licence). Some markers are several regions there (DYS389II, DYS448, DYS449, DYS450, DYS504, DYS510, DYS532, DYS552); the table keeps those parts as the source gives them. - **Motif**: NIST STRBase's repeat structure, where it has one. +- **Offset** (read 2026-11-19): how many repeats to add to reach FamilyTreeDNA's count. For the 23 markers with a motif, and for DYS389I (the first block of DYS389II's motif), the GRCh38 sequence was counted by that repeat structure, which FamilyTreeDNA follows for these markers. For Y-GATA-H4, ISOGG's conversion table (https://isogg.org/wiki/Y-STR) says FamilyTreeDNA's count is NIST's minus one. The offset is that count minus the region's reference copies. The other markers have no published counting rule, so their offset is empty. + +FamilyTreeDNA is a trademark of Gene by Gene, Ltd. The table reproduces the order, names and panels only so that counts line up with FamilyTreeDNA results and surname-project tables. It copies no FamilyTreeDNA text, and its header says so. The 111 markers fall into four kinds: @@ -80,13 +83,13 @@ HipSTR --bams --fasta --regions regions.bed --str-vcf | `y_str/${SAMPLE}_y_str.vcf.gz` | HipSTR's calls | | `y_str/${SAMPLE}_y_str.log` | HipSTR's log: why it skipped a region | -How a count is made: HipSTR gives, per region, how many base pairs the call differs from the reference allele. The count is the region's reference copies (rounded to whole repeats, halves up) plus that difference divided by the motif length. Base pairs left over are written after a dot, the usual notation of a partial repeat (`11.2`: eleven repeats and two bases). +How a count is made: HipSTR gives, per region, how many base pairs the call differs from the reference allele. The count is the region's reference copies (rounded to whole repeats, halves up) plus that difference divided by the motif length, plus the marker's offset. Base pairs left over are written after a dot, the usual notation of a partial repeat (`11.2`: eleven repeats and two bases). A called marker with no offset says in its note that its count is on the reference's scale, not FamilyTreeDNA's. Confidence: | Value | Meaning | |---|---| -| `high` | HipSTR's own haploid filters pass (posterior at least 0.9, at most 15% of the reads with a stutter artifact and at most 15% with an indel in the flanks), and at least 10 reads were used | +| `high` | HipSTR's own haploid filters pass (posterior at least 0.9, at most 15% of the reads with a stutter artifact and at most 15% with an indel in the flanks), at least 10 reads were used, and at least 70% of the reads that span the repeat show the called length (HipSTR's `MALLREADS`, each read's most likely length). The read quality alone does not make a call high: the reads must also agree on the length | | `low` | a call that fails one of those; the note says which | | `no call` | HipSTR wrote no genotype for the marker or for one of its parts. When it wrote no record at all, the note quotes the reason from HipSTR's log, such as `Skipping locus with too few reads`, or `Aborting genotyping of the locus as the sequence downstream of the repeat is too repetitive for accurate genotyping` when the bases beside the repeat are themselves repetitive | | `not callable` | multi-copy, no region, or a repeat longer than 150 bp reads can span with 10 bases on each side (DYS452, 155 bp in the reference, and the DYS389II and DYS448 spans) | @@ -95,7 +98,8 @@ Both reports get a Y-STR section: the number of markers per confidence and every ## Comparing with FamilyTreeDNA -- **A count can differ from FamilyTreeDNA's by a fixed number of repeats.** Labs do not all count the same repeat blocks of a marker, and the region edges of the marker set are not always the edges a lab counts. FamilyTreeDNA does not publish its conventions marker by marker, and we found no published table of the offsets between these regions and FamilyTreeDNA's counts (searched 2026-10-25), so the table's `offset` column is empty and no count is adjusted. A difference that is the same for every man of a project is a convention, not a mutation. The safe comparison is with a relative or project member who also has a genome, or with one known FamilyTreeDNA result of the same man. +- **24 markers are on FamilyTreeDNA's scale.** The marker set's regions do not always cover the blocks a lab counts. At DYS19 the region holds 16 repeat units, but FamilyTreeDNA does not count the `CCTA` unit in it, so the GRCh38 reference reads 15. At DYS449 the two parts hold 36 units, and FamilyTreeDNA counts only the two `TTTC` blocks, 15 and 14, so the reference reads 29. The offsets in the table move every one of the 24 markers with a published counting rule onto FamilyTreeDNA's scale: DYS19 -1, DYS389II +1, DYS448 -1, DYS449 -7, Y-GATA-H4 -20, DYS438 +2 (two repeat units lie just before the region) and DYS461 +1; the other 17 need no change. `og-reports`' test `i411_ystr_ftdna_scale` checks that the reference reads FamilyTreeDNA's count at each of them. +- **The other called markers are on the reference's scale, and their note says so.** No published rule says which blocks FamilyTreeDNA counts there, so a count can differ from FamilyTreeDNA's by a fixed number of repeats. A difference that is the same for every man of a project is a convention, not a mutation. The safe comparison is with a relative or project member who also has a genome, or with one known FamilyTreeDNA result of the same man. - FamilyTreeDNA reports DYS389II as the sum total of DYS389I and DYS389II (its guide says so). The DYS389II span here starts where DYS389I starts, so its count would cover both too. At 164 bp it is longer than 150 bp reads can span, so from such reads DYS389II is not callable; DYS389I is. - FamilyTreeDNA lists DYS385, DYS459, DYS464, YCAII, CDY, DYF395S1 and DYS413 as two or four values; those are the not callable rows here. @@ -107,4 +111,4 @@ Seconds to a few minutes: HipSTR reads 86 short regions of chrY. - Short reads at 30x put about 15 reads on each Y region (one copy). A repeat near the read length gets fewer reads that span it, so its call is `low` or `no call` more often. - HipSTR is built for Illumina short reads; long-read BAMs are not tested here. -- The e2e case reads HG002's reads at every region from GIAB's 60x BAM, checks each high call, the span markers included, against a count made from the reads themselves, keeps HipSTR's log with the case logs, and checks the step against the Nextflow process on the fixture's own BAM. +- The e2e case reads HG002's reads at every region from GIAB's 60x BAM, checks each high call, the span markers included, against a count made from the reads themselves plus the panel's offset, keeps HipSTR's log with the case logs, and checks the step against the Nextflow process on the fixture's own BAM. diff --git a/docs/49-chip.md b/docs/49-chip.md index fb86153f2..24b198f07 100644 --- a/docs/49-chip.md +++ b/docs/49-chip.md @@ -50,7 +50,7 @@ With `run-all.sh`: `TOOLS=...,chip`. It is opt-in, so a run lists step 49 only w |---|---|---| | DNMT3A | truncating anywhere; missense at R882 | 25426837, 21067377 | | TET2 | truncating anywhere | 25426837, 19474426 | -| ASXL1 | truncating anywhere | 25426837, 19388938 | +| ASXL1 | truncating in the last two exons, 12 and 13 (11 and 12 in the older transcript numbering of the CHIP studies) | 25426837, 19388938 | | JAK2 | V617F | 25426837, 15858187 | | TP53 | truncating anywhere; missense in the DNA-binding core domain, residues 102 to 292 | 25426837, 8023157 | | PPM1D | truncating in the last exon (6) | 23242139, 29954749 | @@ -68,13 +68,18 @@ With `run-all.sh`: `TOOLS=...,chip`. It is opt-in, so a run lists step 49 only w | Status | Rule | |---|---| -| `chip` | passed FilterMutectCalls, in the gene's class, VAF under 35%, at least 3 reads with the change | -| `likely_germline` | VAF 35% or more. An inherited variant sits near 50% or 100%, and without a matched normal sample the two cannot be told apart | +| `chip` | passed FilterMutectCalls, in the gene's class, VAF from 2% to under 35%, at least 3 reads with the change | +| `likely_germline` | VAF 35% or more. An inherited variant sits near 50% or 100%, and without a matched normal sample it cannot be told apart from a large clone | | `filtered` | FilterMutectCalls did not pass it; its filters are in the `note` column | | `low_support` | fewer than 3 reads with the change | +| `low_vaf` | VAF under 2%, the VAF that defines CHIP (Steensma et al., PMID 25931582). Not counted | | `other_change` | a protein change outside the gene's class | -Synonymous, intronic and UTR changes are left out. +The rules are tested in that order, so a call is `low_vaf` only when it passed the filters and has 3 reads. Synonymous, intronic and UTR changes are left out. + +A `chip` row is a possible finding, not a diagnosis, and its `note` starts with `possible clonal haematopoiesis (not a diagnosis)`, then the class rule it matched. CHIP itself is a clinical term: it also needs a normal blood count and no blood cancer, which a genome cannot show. + +5. A `chip` call whose reads also fit an inherited heterozygous variant keeps its status and gets one more sentence in its `note`: `10 of 30 reads also fit an inherited heterozygous variant`. The test is a binomial count at 50%: the reads fit when at least 1 in 100 inherited heterozygous variants at that depth would show as few reads with the change, or fewer. At 20x that is 5 reads of 20 and up (25%), at 30x 9 of 30 and up (30%), at 40x 13 of 40 and up (33%). From 60x the fit starts at the 35% cut, so no counted call gets the sentence there. These calls stay counted, because a real clone of 25% to 35% looks the same, and the step's log line counts them apart: `2 CHIP calls in 13 genes (possible clonal haematopoiesis, not a diagnosis; 1 of them also fits an inherited variant; ...)`. ## The read-support limit @@ -121,7 +126,8 @@ Not measured on a whole genome. Mutect2 reads about 35 kb of the BAM, which take ## Notes -- A `chip` row is a finding worth showing a haematologist, together with a blood count. It does not mean a blood cancer, and the risks the studies report are averages over many people. -- Tumour-only calling cannot prove a change is acquired. The VAF rule removes most inherited variants, but a change at 35% or more is never counted, and a real large clone there is missed too. +- A `chip` row is a possible finding worth showing a haematologist, together with a blood count. It does not mean a blood cancer, and the risks the studies report are averages over many people. +- Tumour-only calling cannot prove a change is acquired. The VAF rule removes most inherited variants, but a change at 35% or more is never counted, and a real large clone there is missed too. A counted call with the germline-fit sentence may be inherited: a test of a second tissue (a cheek swab or hair) or of a parent tells the two apart. +- A clone under 2% is not CHIP by its definition, so a call under 2% is `low_vaf` and not counted. Such a call needs 3 reads with the change, so more than 150 reads over the site: it shows only where the depth is far above a usual 30x genome. - **U2AF1 on the default reference.** GRCh38 added to the short arm of chr21 a near copy of the U2AF1 locus that real genomes do not have, and the no-ALT analysis set keeps it. Reads from U2AF1 then fit both copies equally well and get mapping quality 0. Miller et al. 2022 (PMID 35041928) found that GRCh38 pipelines missed U2AF1 mutations for this reason, and that they were found again once the copy was masked. This step counts depth and Mutect2 reads only from mapping quality 20 up, so on the default reference expect U2AF1 to show `too_shallow` or `partly_covered` in `chip_depth.tsv`, or a read-support limit far above the other genes'. Either way, no call at S34 or Q157 does not mean there is none. The fix is the masked reference, at the same coordinates: `setup.sh --masked-reference` builds it, with the false copies set to N as FixItFelix (Behera et al. 2023, PMID 36810122) and GIAB do, and a sample realigned to it gets its U2AF1 reads back ([the masked reference](realignment.md#the-masked-reference)). On chr21 of GIAB's HG002, step 16b reads U2AF1 on the masked reference and not on the default one (CI case `fixitfelix-chr21-1`); this step has not been measured on a whole genome either way. - Steps 29 and 49 call the same genes in two ways: step 29 calls gene bodies and leaves the calls unread, step 49 calls the coding exons and reads them. diff --git a/docs/50-mei.md b/docs/50-mei.md index f48aed70f..1553c314d 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, 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 callable. 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: @@ -61,7 +61,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, **not callable** when the BAM has no reads of that contig or the mean depth over the window is under 10, 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 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. ## Output @@ -69,7 +69,7 @@ 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 | | `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, not seen, not callable), `mean_depth` over the window and `call` (the insertion seen: position, subfamily, copies, filter) | +| `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}_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 | @@ -84,7 +84,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. +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. ## Notes diff --git a/docs/53-locityper.md b/docs/53-locityper.md index b14b39899..79c5065af 100644 --- a/docs/53-locityper.md +++ b/docs/53-locityper.md @@ -2,7 +2,7 @@ ## What This Does -Genotypes five of the hardest polymorphic regions of the genome with Locityper: HLA-DRB1, HLA-DQB1, the KIR cluster, CYP2D6 and FCGR. For each one it names the two haplotypes of a pangenome panel that best explain the sample's reads there, with a quality and a pass or fail filter. Opt-in. +Genotypes five of the hardest polymorphic regions of the genome with Locityper: HLA-DRB1, HLA-DQB1, the KIR cluster, CYP2D6 and FCGR. For each one it names the two haplotypes of a pangenome panel that best explain the sample's reads there, with a quality. At HLA-DRB1, HLA-DQB1 and KIR the call also gets the pass or fail filter of the authors' HLA and KIR benchmark; at CYP2D6 and FCGR that filter reads "uncalibrated". Opt-in. It is a second opinion. The report shows it beside the call of the step that owns the gene, never in its place. @@ -14,12 +14,12 @@ Locityper (Prodanov et al., Nat Genet 2025, PMID 41107551, doi 10.1038/s41588-02 ## Tool -- Locityper, the release `LOCITYPER_IMAGE` pins (1.7.14 today; MIT licence, https://github.com/tprodanov/locityper): `locityper preproc` and `locityper genotype` on the BAM +- Locityper, the release `LOCITYPER_IMAGE` pins (1.7.15 today; MIT licence, https://github.com/tprodanov/locityper): `locityper preproc` and `locityper genotype` on the BAM - `og locityper report` (OwnGenome's Rust binary, [og](rust.md), static, so it runs inside the Locityper image) for the table ## Docker Image -- `LOCITYPER_IMAGE`: the Bioconda build, `quay.io/biocontainers/locityper`. It carries Locityper, jellyfish, samtools, minimap2, strobealign, tabix and Python. 1.7.15 exists; its only change is in `locityper align`, which this step does not run, so the pin stays at 1.7.14. +- `LOCITYPER_IMAGE`: the Bioconda build, `quay.io/biocontainers/locityper`. It carries Locityper, jellyfish, samtools, minimap2, strobealign, tabix and Python. Pinned in `versions.env`; [Image versions](versions.md) lists the current tags. The line is marked optional, so `setup.sh` pulls it only with `--locityper-data`. @@ -36,7 +36,7 @@ Then it follows Locityper's documentation (https://locityper.vercel.app, "Prepar ## The loci -`assets/locityper_loci.bed` lists them. The regions are those of the Locityper authors' own GRCh38 database of 326 loci (Zenodo record 15879519, https://zenodo.org/records/15879519), except FCGR, where their FCGR3A and FCGR2B loci overlap and are joined. +`assets/locityper_loci.bed` lists them. The regions are those of the Locityper authors' own GRCh38 database of 326 loci (Zenodo record 15879519, https://zenodo.org/records/15879519), except FCGR, where their FCGR3A and FCGR2B loci overlap and are joined. That database is Timofey Prodanov's, licensed CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/); the file's header names it and what changed. The HPRC panel the database is built from is public domain (https://humanpangenome.org/data-use/). `setup.sh` builds the database on your machine, and the repository ships none of the panel. | Locus | GRCh38 region | Primary caller here | |---|---|---| @@ -69,6 +69,10 @@ With `run-all.sh`: `TOOLS=...,locityper`. It is opt-in, so a run lists step 53 o The filter is the one the authors used for their HLA and KIR benchmark (Zenodo 15879519, README): a call passes with no Locityper warning, a weighted distance of 30 or less, and fewer than 1000 or fewer than 20% unexplained reads. A call whose result gives no read counts fails it, and its `total_reads` and `unexplained_reads` read `.`. The weighted distance is the edit distance from the call to the other likely genotypes, weighted by their probability: a high value means the reads fit very different genotypes about as well. +The authors set that filter on HLA and KIR genes only, so the `filter` column reads pass or fail only at a locus whose name starts with `HLA-` or `KIR` (HLA-DRB1, HLA-DQB1 and KIR here). At any other locus, CYP2D6 and FCGR here, it reads `uncalibrated`: nobody has measured what a pass means there, so the table never shows one. The `reason` column then says what the rule alone gives, for example `the authors calibrated this filter on HLA and KIR loci only; by its rule alone it passes`, or `... it fails:` with the reasons. A locus of your own list (`LOCITYPER_LOCI`) follows the same rule by its name. The reports count only `pass` rows as passing. + +At HLA and KIR the cut of 30 is also older than the distance it is applied to. The authors' results came from Locityper 0.17.3, where the weighted distance was a Jaccard distance between sets of minimizers (the Zenodo README). Locityper 1.7.0 changed the estimate, and the 1.7.15 this step runs gives it as an edit distance (`dist_type` `edit` in `res.json.gz`), from the alignments `locityper augment` writes. So a pass there is the authors' rule applied to a newer measure, not a result they benchmarked. + Locityper names haplotypes of panel people, such as `HG00733.1`, not alleles. The two callers are shown side by side and not compared: an allele name from T1K and a panel haplotype are not the same kind of answer. ## Output @@ -82,7 +86,7 @@ ${SAMPLE}/locityper/ └── gt/loci//res.json.gz ``` -Columns: `locus`, `region`, `status`, `genotype`, `haplotype_1`, `haplotype_2`, `quality` (Phred), `total_reads`, `unexplained_reads`, `weighted_distance`, `warnings`, `filter`, `reason`. +Columns: `locus`, `region`, `status`, `genotype`, `haplotype_1`, `haplotype_2`, `quality` (Phred), `total_reads`, `unexplained_reads`, `weighted_distance`, `warnings`, `filter` (`pass`, `fail`, `uncalibrated` outside HLA and KIR, or `.` when not called), `reason`. Both reports carry a section "Locityper Second Opinion at Hard Loci" in the medicines chapter: per locus Locityper's call with its filter, and the primary caller's call. @@ -110,5 +114,5 @@ The fixture's three loci took about 5 minutes to build and 8 minutes to augment - Prodanov T, et al. Nat Genet 2025. PMID 41107551, doi 10.1038/s41588-025-02362-4 (read 2026-11-03) - Locityper documentation, https://locityper.vercel.app (read 2026-11-03) -- Locityper authors' databases and benchmark filter, Zenodo record 15879519, https://zenodo.org/records/15879519 (read 2026-11-03) -- HPRC release 2 Minigraph-Cactus GRCh38 VCF, https://s3-us-west-2.amazonaws.com/human-pangenomics/pangenomes/freeze/release2/minigraph-cactus/v2.1/hprc-v2.1-mc-grch38/ (read 2026-11-03) +- Locityper authors' databases and benchmark filter, Zenodo record 15879519, https://zenodo.org/records/15879519, CC BY 4.0 (read 2026-11-03) +- HPRC release 2 Minigraph-Cactus GRCh38 VCF, https://s3-us-west-2.amazonaws.com/human-pangenomics/pangenomes/freeze/release2/minigraph-cactus/v2.1/hprc-v2.1-mc-grch38/, public domain (read 2026-11-03) diff --git a/docs/getting-started.md b/docs/getting-started.md index 9e37ca022..67db9ed83 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -181,7 +181,7 @@ When the run starts from an existing VCF, the pipeline does not read a gVCF besi | `EXTRA_CALLERS=gatk,freebayes,strelka2,octopus` | run the alternative callers 3a to 3d after the pipeline | | | `BENCHMARK=true` | runs `benchmark-variants.sh` after them; it needs `EXTRA_CALLERS` or a second caller's VCF from an earlier 3a-3d run, and is skipped without one | | -GRIDSS is not part of the SV consensus (step 22): it reports every event as a pair of breakends, which never match the DEL, DUP and INV records of Manta, Delly and CNVpytor. +GRIDSS is left out of the SV consensus (step 22): it reports every event as a pair of breakends, and nothing in the pipeline turns a pair into one DEL, DUP or INV. Step 4b writes GRIDSS's high-confidence calls to `sv_gridss/_gridss.high.vcf.gz` beside its raw VCF. Without `THREADS` or `--max_cpus`, `run-all.sh` passes the machine's CPU count as `--max_cpus`, and without `--max_memory` it passes the machine's RAM in whole GB (31.GB on a 32 GB Linux machine). Nextflow refuses a task that asks for more than the machine has, and the larger steps ask for 8 CPUs and 32 GB; with the caps they run with less. Options after the sex go to `nextflow run` unchanged, for example `./scripts/run-all.sh your_name male --max_memory 24.GB` to cap each task at 24 GB, or `--sex_check warn` to go on when the sex inferred from the BAM differs from the one given. [Nextflow Parameters](parameters.md) lists every parameter. `MAX_JOBS` is no longer read: Nextflow starts a task when its CPUs and memory fit in what is left of the machine's, and `--max_cpus` and `--max_memory` cap each task, not the total; [a shared host](hardware-requirements.md#a-shared-host) shows how to bound the total. diff --git a/docs/hardware-requirements.md b/docs/hardware-requirements.md index 1da8b16a0..00555f527 100644 --- a/docs/hardware-requirements.md +++ b/docs/hardware-requirements.md @@ -211,7 +211,7 @@ Both ends of each measured figure are also in `assets/steps.tsv` (`hours_low` an | 14 Imputation prep (opt-in) | not measured (estimate ~10 min) | | | | | 15 duphold | 3-4 min | 1.0 GB | 3.2-4.1 | plus about a second for its filter | | 16 indexcov | 1-3 s | | | | -| 16b mosdepth | 2-3 min | 1.9 GB | 2.7-3.5 | | +| 16b mosdepth | 2-3 min | 1.9 GB | 2.7-3.5 | the time is the genome-wide pass only; the gene callability pass adds 3.5-4 min (measured on public HG002 30x, without `--fast-mode`, which costs it about 37% more CPU time), so the step takes about 6-7 min on 30x ([step 16b](16b-mosdepth.md#runtime)) | | 17 CPSR | 17-36 min | 12.3-15.6 GB (`peak_rss`, see above) | 1.8-2.3 | | | 18 CNVpytor | 14-20 min | 1.4-2.7 GB | 2.3-3.7 | | | 19 Delly | 21 min - 3 h 19 min | 1.2-3.1 GB | 1.0-1.1 | five runs: 21 and 25 min on two samples, 1 h 35 min to 3 h 19 min in three runs on the third | diff --git a/docs/lessons-learned.md b/docs/lessons-learned.md index 458f90de5..db179a266 100644 --- a/docs/lessons-learned.md +++ b/docs/lessons-learned.md @@ -313,9 +313,10 @@ Most bioinformatics containers name a non-root user of their own, which may not - **Observed:** fastp's `--detect_adapter_for_pe` works for Illumina, BGI, and MGI adapters without specifying adapter sequences. BGI/MGI adapters are compiled into fastp's `knownadapters.h`. - **No action needed:** The `--detect_adapter_for_pe` flag handles all common sequencing platforms. -### mosdepth: --fast-mode skips per-base output -- **Observed:** `--fast-mode` uses a simpler, faster counting method and does NOT write the per-base `.per-base.bed.gz` file. This saves ~2 GB of output and cuts runtime by ~40%. -- **Fix:** Always use `--fast-mode` unless per-base resolution is specifically needed. +### mosdepth: --fast-mode counts overlapping mates twice +- **Observed:** `--fast-mode` counts every base from a read's start to its end. It does not correct for the two mates of a pair that overlap, and it does not read the CIGAR, so the bases of a deletion count as read. A short-insert pair lifts the depth of its overlap to 2 where one fragment was read. The per-base `.per-base.bed.gz` is left out by `--no-per-base`, not by `--fast-mode`; this entry said otherwise before. +- **Why it mattered:** step 16b's gene callability pass ran with `--fast-mode`, so a gene with fewer than 10 fragments over its bases could still reach 10x and read as read. +- **Fix:** the gene callability pass runs without `--fast-mode`. The genome-wide 500 bp pass keeps it, because it only describes depth. Use `--fast-mode` only where a base's depth decides nothing. ### MultiQC: Auto-discovers fastp JSON by content, not filename - **Observed:** MultiQC identifies fastp output by looking for `"before_filtering": {` in JSON files, not by filename pattern. Files must end in `.json`. @@ -530,6 +531,11 @@ Most bioinformatics containers name a non-root user of their own, which may not - **Why:** PharmCAT 3.4.0's preprocessor does not read a one-base 0/0 record as a call at a position whose REF or ALT is longer than one base. It sets the record aside with FILTER `PCATxINDEL` (or `PCATxREF` for a two-base substitution) and lists the position as missing; where PharmCAT's REF is longer than one base, the matcher then discards it. - **Fix:** `og pgx refblock-fill` (was `bin/pgx_refblock_fill.py`) writes PharmCAT's own record (its ID, REF and ALT) as 0/0 at each such position when every base of the span lies in reference blocks with GQ 20 or more and nothing else overlaps it. The details are in [Pharmacogenomics, Input the preprocessor or PharmCAT refuses](07-pharmacogenomics.md#input-the-preprocessor-or-pharmcat-refuses). +### A low-quality reference call reached PharmCAT as a confident 0/0 +- **Failed:** a one-base reference block with GQ 5 at CYP2C19 rs4244285 (the \*2 position) reached PharmCAT as 0/0, so the sample read as "not \*2" when the data could not tell. A DeepVariant `RefCall` record with a low GQ did the same. +- **Why:** `bcftools convert --gvcf2vcf` writes a 0/0 record for every base of a block, whatever its GQ, and the GQ 20 floor of `og pgx refblock-fill` held only for the 0/0 records it writes itself at positions longer than one base. Every other reference call passed through unchecked. +- **Fix:** `og pgx refblock-fill` leaves out every reference call (GT all 0) below GQ 20, or without a GQ, so PharmCAT reads the position as missing. A variant call passes whatever its GQ. The step log counts them and names those at PharmCAT positions. The details are in [Pharmacogenomics, Input the preprocessor or PharmCAT refuses](07-pharmacogenomics.md#input-the-preprocessor-or-pharmcat-refuses). + ### PharmCAT reads MT-RNR1 only as an outside call - **Failed:** MT-RNR1 (aminoglycoside-induced hearing loss) was No Result on every sample, although step 20 calls chrM with Mutect2 at high depth. - **Why:** PharmCAT 3.4.0 has no MT-RNR1 allele definition for its matcher, so chrM records in its VCF input are never matched for the gene. It lists MT-RNR1 among the genes it prefers as an outside call, and its own MT-RNR1 test passes the gene that way. diff --git a/docs/long-read-guide.md b/docs/long-read-guide.md index f97909f2c..3a0fecc9f 100644 --- a/docs/long-read-guide.md +++ b/docs/long-read-guide.md @@ -149,6 +149,12 @@ The script auto-detects input files in this order: Override with: `INPUT=${GENOME_DIR}/your_sample/fastq/custom_reads.fastq.gz PLATFORM=ont ./scripts/02b-alignment-longread.sh your_sample` +For ONT reads the script also records the basecaller model in the aligned BAM's read group (`DS:basecall_model=...`), where step 3e reads it to pick the Clair3 model. It takes `BASECALL_MODEL` when set, else the `basecall_model=` that Dorado writes into an unaligned BAM's read group. A FASTQ does not carry it, so set it for FASTQ input: + +```bash +BASECALL_MODEL=dna_r10.4.1_e8.2_400bps_sup@v5.0.0 PLATFORM=ont ./scripts/02b-alignment-longread.sh your_sample +``` + > **Note:** The INPUT path must be **physically** inside `GENOME_DIR` because Docker only mounts that directory. Symlinks that point outside `GENOME_DIR` will not work — Docker cannot follow them. Copy or move the file instead. ### Step 3: Variant Calling (SNPs + Indels) @@ -167,7 +173,21 @@ PLATFORM=hifi ./scripts/03e-clair3.sh your_sample Output: `${GENOME_DIR}/your_sample/vcf_clair3/your_sample.vcf.gz` -Clair3 uses deep-learning models trained specifically on long-read error profiles. It auto-selects the correct model based on your PLATFORM setting. +Clair3 uses deep-learning models trained on long-read error profiles, one per platform and, for ONT, one per basecaller model. HiFi uses `hifi_revio`. For ONT the step picks the model that matches the reads' basecaller (`og longread clair3-model`): + +1. `CLAIR3_MODEL`, a model directory, when you set it. +2. Else `BASECALL_MODEL`, a Dorado model name such as `dna_r10.4.1_e8.2_400bps_sup@v5.0.0`. +3. Else the `basecall_model=` in the BAM's read group (step 2b writes it; a BAM aligned by Dorado has it too). + +| Basecaller model | Clair3 model | +|---|---| +| `dna_r10.4.1_e8.2_400bps_sup@vX.Y.Z` | `r1041_e82_400bps_sup_vXYZ` (for example v5.0.0 gives `r1041_e82_400bps_sup_v500`) | +| `dna_r10.4.1_e8.2_400bps_hac@vX.Y.Z` | `r1041_e82_400bps_hac_vXYZ` | +| R9.4.1 SUP (Dorado `dna_r9.4.1_e8_sup@v3.3`, Guppy `dna_r9.4.1_450bps_sup`) | `r941_prom_sup_g5014` | +| R9.4.1 HAC | `r941_prom_hac_g360+g422` | +| fast models, other pores or speeds, RNA | none | + +The pinned image holds the R10.4.1 SUP models v4.1.0, v5.0.0 and v5.2.0 and the HAC models v4.1.0, v5.0.0, v5.2.0 and v6.0.0. Before Clair3 runs, the step checks that the chosen directory exists in the image, `CLAIR3_MODEL` included. With no basecaller model known, read groups that name different models or only some that name one, a basecaller with no Clair3 model (fast basecalls), or a model the image lacks (for example SUP v4.3.0), the step stops with exit 1 and lists the image's models. It never falls back to another model: a model trained on other basecalls still writes a VCF, but every call is less accurate and nothing in the output says so. Set `CLAIR3_MODEL` to use a model by hand. #### Option B: DeepVariant (long-read mode) @@ -293,7 +313,7 @@ dorado basecaller sup pod5_dir/ > reads.bam dorado demux reads.bam # if barcoded ``` -The Clair3 model (`r1041_e82_400bps_sup_v500`) assumes R10.4.1 chemistry with SUP basecalling. Using a different chemistry or basecaller may reduce accuracy. +Step 3e picks the Clair3 model from the basecaller model (see Step 3 above), so keep the `basecall_model=` that Dorado writes into the BAM, or set `BASECALL_MODEL`. Clair3 has no model for fast basecalls. ### Read Length Distribution @@ -345,13 +365,12 @@ Long-read alignment uses more memory than short-read because the index is loaded # In the script, change --memory 16g to --memory 24g or higher ``` -### "Clair3 model not found" +### "names no basecaller model", "has no model" or "is not in the image" -The Docker image `CLAIR3_IMAGE` bundles models at `/opt/models/`. If you get a model-not-found error: +Step 3e stopped before Clair3 ran, because it could not match a model to the reads' basecaller. The message lists the models in `CLAIR3_IMAGE` (`/opt/models/`). -1. Verify the image is pulled: `docker images | grep clair3` -2. Check available models: `docker run --rm "${CLAIR3_IMAGE}" ls /opt/models/` (after `source versions.env` in the repository root) -3. If your ONT chemistry is different (e.g., R9.4.1), look for a matching model in the container +1. No basecaller model, or read groups that do not agree on one: set `BASECALL_MODEL` to the Dorado model the reads were basecalled with. Dorado's BAM names it in its `@RG` line (`samtools view -H reads.bam | grep '^@RG'`), and its FASTQ headers carry `basecall_model_version_id=`. +2. No Clair3 model or not in the image: set `CLAIR3_MODEL` to the listed model closest to your basecaller, for example `CLAIR3_MODEL=/opt/models/r1041_e82_400bps_sup_v520`, or use a newer `CLAIR3_IMAGE` that ships the matching model. ### "Sniffles2 needs long reads" or "Sniffles2 produces 0 SVs" diff --git a/docs/nextflow.md b/docs/nextflow.md index 544cc1d86..68d7eae1a 100644 --- a/docs/nextflow.md +++ b/docs/nextflow.md @@ -406,7 +406,7 @@ Tools that require external databases (VEP, slivar, clinvar, CPSR, ExpansionHunt ### SV consensus merge -`survivor_merge` runs `SURVIVOR merge` (step 22's parameters: breakpoints within 1 kb, same type and strands, at least 50 bp, two or more callers) over the callers this run selected among `manta`, `delly` and `cnvpytor`, each cut to its PASS records first (`SURVIVOR_PREP`, `SURVIVOR_MERGE`, `SURVIVOR_SORT`). CNVpytor's depth-only calls count as one caller like the others; their coarse breakpoints often lie more than 1 kb from the paired-end callers'. TIDDIT and Sniffles2 have no module, so the consensus of the script (step 22) can hold those two callers as well. GRIDSS is in neither: its breakend (BND) records never match the DEL, DUP and INV records of the other callers. See [step 22](22-survivor-merge.md). +`survivor_merge` runs `SURVIVOR merge` (step 22's parameters: breakpoints within 1 kb, same type and strands, at least 50 bp, two or more callers) over the callers this run selected among `manta`, `delly` and `cnvpytor`, each cut to its PASS records first (`SURVIVOR_PREP`, `SURVIVOR_MERGE`, `SURVIVOR_SORT`). CNVpytor's depth-only calls count as one caller like the others; their coarse breakpoints often lie more than 1 kb from the paired-end callers'. TIDDIT and Sniffles2 have no module, so the consensus of the script (step 22) can hold those two callers as well. GRIDSS is in neither: it reports every event as a pair of breakends (BND), and nothing turns a pair into one DEL, DUP or INV. See [step 22](22-survivor-merge.md). ### FILTER=PASS required diff --git a/docs/output-contract.md b/docs/output-contract.md index 668571d3e..31ab738ba 100644 --- a/docs/output-contract.md +++ b/docs/output-contract.md @@ -19,7 +19,8 @@ A 1.x release never does any of these to a `stable` row: - remove or rename a file, or move it to another folder; - remove or rename a column of a table, an INFO or FORMAT field of a VCF, or a top-level key of a JSON file; -- remove or rename a param, a `--tools` name or a `run-all.sh` switch, or change what it means. +- remove or rename a param, a `--tools` name or a `run-all.sh` switch, or change what it means; +- make it `experimental` or `internal`, change the format of a file, or stop writing a file on a leg (the Nextflow pipeline or the single-step script) that wrote it. These are not breaks, and can come in any 1.x release: @@ -39,10 +40,11 @@ The engines that run by default, and every step that existed before 1.0, are `st ## How CI holds it -Two checks read the contract, both with `og dev contract` ([`rust/crates/og-dev/src/contract.rs`](https://github.com/GeiserX/OwnGenome/blob/main/rust/crates/og-dev/src/contract.rs)): +Three checks read the contract, all with `og dev contract` ([`rust/crates/og-dev/src/contract.rs`](https://github.com/GeiserX/OwnGenome/blob/main/rust/crates/og-dev/src/contract.rs)): - **On every pull request, with no run** (`og dev contract --static`, run by [`rust/crates/og-dev/tests/repo.rs`](https://github.com/GeiserX/OwnGenome/blob/main/rust/crates/og-dev/tests/repo.rs) in the `rust` job of the Guard workflow): every param of `nextflow_schema.json`, every `--tools` name of `main.nf` and every switch of `run-all.sh` has a row, and every row still names one. Every file row of a Nextflow process still matches a file that process writes and publishes, in the folder of a `publishDir` that keeps it (a `saveAs` that returns `null` for the file does not count), and every file a module publishes has a row. A published row with leg `nextflow` fails when its step's script writes the same path too, since its leg is then `both`; the check reads the script with its shell variables filled in, so a path it cannot follow is not flagged, and a `both` row it does not find is not refused. Every default in `nextflow_schema.json` must equal the value in `nextflow.config`, with the same JSON type: `false` is not `0`. A removed or renamed stable item fails as `BREAKING`. A new one with no row fails too, with the message to add it, so the contract is always the full list. The test also plants each kind of break on a copy of the code (a renamed output, a removed param, a removed switch, a new tool and a new output with no row, a schema default that differs from `nextflow.config`, one of another JSON type, a row in the folder a `saveAs` drops the file from, and a `nextflow` row a step script also writes) and requires each to fail. -- **On the HG002 end-to-end run** (`tests/e2e/output-contract-1-hg002.sh`): every stable file whose `e2e` column names a leg must be in the results that leg wrote, under its contracted name, with its required fields. The bash leg is the single-step scripts the base cases run; the Nextflow leg is case `60-nextflow`. Rows whose step the fixture run does not reach have `e2e` set to `-` and are held by the static check only. The two files `run-all.sh` writes itself, `run_manifest.tsv` and `logs/run_status.tsv`, are listed but no check holds them yet: neither the fixture run nor a module writes them. The same case copies the Nextflow results, drops the `clnsig` column of the ClinVar hits table and renames the ROH summary, and requires the check to fail on both. It also prints every file each leg wrote with its fields, which is what to read when the contract is written again. +- **Against the last release, on every pull request** (`og dev contract --baseline`, a step of the same `rust` job): the contract of the newest `v1.x.y` tag of GeiserX/OwnGenome is the baseline. Every stable row there must still have a row here, still `stable`. A stable file keeps its format, every leg that wrote it and every required field. New rows, a new leg or field, and changes to the `step`, `process` and `e2e` cells or to `experimental` and `internal` rows pass. This catches the break the first check cannot see: a stable output renamed or removed together with its row. Until 1.0.0 is tagged there is no baseline and the step says so; after that, a tag it cannot read fails it. Its control plants a stable row that is gone since the baseline and requires the check to fail. The pull request that starts 2.0 sets `MAJOR` in that step to 2. +- **On the HG002 end-to-end run** (`tests/e2e/output-contract-1-hg002.sh`): every stable file whose `e2e` column names a leg must be in the results that leg wrote, under its contracted name, with its required fields. The bash leg is the single-step scripts the base cases run; the Nextflow leg is case `60-nextflow`. Every stable file the base cases write has the leg that writes it in `e2e`. A row has `e2e` set to `-` when the fixture run does not reach its step, or when the fixture provides the file instead of the step (the VEP output of step 13); the static check holds those rows. `run_manifest.tsv` is checked on the bash leg: step 24 writes it for a sample that has none, as `run-all.sh` does when a run starts. `logs/run_status.tsv` is listed but no check holds it yet: only `run-all.sh` writes it, and the fixture run does not call `run-all.sh`. The same case copies the Nextflow results, drops the `clnsig` column of the ClinVar hits table and renames the ROH summary, and requires the check to fail on both. It also prints every file each leg wrote with its fields, which is what to read when the contract is written again. ## Changing the contract diff --git a/docs/resources.md b/docs/resources.md index d90ddc14f..738288a42 100644 --- a/docs/resources.md +++ b/docs/resources.md @@ -52,6 +52,17 @@ Free resources for understanding your genomic data, organized from most accessib - **[1000 Genomes Project](https://www.internationalgenome.org/)** — Catalog of human genetic variation from 2,504 individuals across 26 populations. - **[gnomAD paper (2020)](https://www.nature.com/articles/s41586-020-2308-7)** — Understanding allele frequencies and how gnomAD's constraint metrics (pLI, LOEUF) predict gene essentiality. +### Cohort data terms + +`setup.sh` downloads or builds each population panel on your own machine, from its source. The repository ships none of them. These are the terms of each source: + +- **1000 Genomes** (the phase 3 sites of step 43, the high-coverage panel of step 51 (MoChA), and pgsc_calc's panel of steps 25 and 26): available without embargo. Cite the project (The 1000 Genomes Project Consortium, Nature 2015, doi:10.1038/nature15393; https://www.internationalgenome.org/IGSR_disclaimer). For the high-coverage data, cite Byrska-Bishop et al., Cell 2022 (doi:10.1016/j.cell.2022.08.004) and add: "These data were generated at the New York Genome Center with funds provided by NHGRI Grants 3UM1HG008901-03S1 and 3UM1HG008901-04S2." NYGC asks for this text for the extended 3202-sample set the panel comes from: https://ftp.1000genomes.ebi.ac.uk/vol1/ftp/data_collections/1000G_2504_high_coverage/20200526_1000G_2504plus698_high_cov_data_reuse_README.txt. Its cell lines come from the NIGMS Human Genetic Cell Repository at the Coriell Institute for Medical Research. +- **gnomAD HGDP + 1000 Genomes** (step 26b): released under gnomAD's terms, CC0 1.0 (https://gnomad.broadinstitute.org/terms). +- **HPRC release 2** (step 53, Locityper): public domain (https://humanpangenome.org/data-use/). +- **HAPNEST** (the PGS Catalog's small synthetic panel the tests use; `ANCESTRY_PANEL_NAME` can pick it for steps 25 and 26): synthetic genotypes made from 1000 Genomes and HGDP, published by EMBL-EBI (BioStudies S-BSST936, https://www.ebi.ac.uk/biostudies/studies/S-BSST936) under EMBL-EBI's terms of use (https://www.ebi.ac.uk/about/terms-of-use/). + +The test-data prerelease `e2e-data-1` (https://github.com/GeiserX/OwnGenome/releases/tag/e2e-data-1) mirrors some of these files and the table builders' downloads unchanged, for CI only. Its release notes name each file's source and terms. + ### Online Courses (Free) - **[Coursera: Genomic Data Science](https://www.coursera.org/specializations/genomic-data-science)** — Johns Hopkins. 8-course specialization covering the full analysis pipeline from FASTQ to interpretation. diff --git a/docs/results/ancestry-and-lineage.md b/docs/results/ancestry-and-lineage.md index 307123675..e6fc3f2aa 100644 --- a/docs/results/ancestry-and-lineage.md +++ b/docs/results/ancestry-and-lineage.md @@ -102,4 +102,4 @@ Closeness on the PCA is genetic similarity, not descent: being near an ancient g With the ancestry panel installed (`scripts/setup.sh --ancestry-panel`), each score has a **Percentile** and an **Ancestry_Group**: the 80th percentile means your score is higher than 80% of the reference samples whose genetic ancestry is most similar to yours (step 26 names that group). A percentile is still not a probability: most people at a high percentile never get the condition, and lifestyle and family history often weigh more. Percentiles of different conditions are not comparable either. -Without the panel the report says "Raw score only": the sum cannot be compared with anyone, so read nothing into its size. A score with `NA` as its sum matched under 75% of its variants and was not scored; `Matched_Pct` says how many. When `Input` is `vcf` (no gVCF), the sums leave out the sites where you match the reference ([step 25](../25-prs.md#interpreting-results) explains why). When `ChrX` says `left out`, the sample's sex was not given and the score's chrX rows are not in its sum ([chrX and the sex](../25-prs.md#chrx-and-the-sex)). The breast cancer score is for women and the prostate cancer score for men: when you declared the other sex, `Sex_Check` says `not applicable to the declared sex` and the score has no percentile. The blood pressure and lipid scores rank a genetic tendency only; a measured blood pressure or lipid panel says far more. The Alzheimer's score includes APOE: read [Before you look](../interpreting-results.md#before-you-look-what-the-pipeline-can-tell-you) first. +Without the panel the report says "Raw score only": the sum cannot be compared with anyone, so read nothing into its size. A score with `NA` as its sum matched under 75% of its variants and was not scored; `Matched_Pct` says how many. When the input lists variants only (a VCF without its gVCF), the sums leave out the sites where you match the reference ([step 25](../25-prs.md#hom-ref-sites-come-from-the-gvcf) explains why). Each score then keeps its raw sum but gets no percentile, `Percentile_Note` says `percentile withheld: the input lists variants only`, and the report says "Percentile withheld" in place of "Raw score only". A score keeps its percentile when the genotypes have a reference call (0/0) at one genotyped position in five or more, which a chip VCF usually has. When `ChrX` says `left out`, the sample's sex was not given and the score's chrX rows are not in its sum ([chrX and the sex](../25-prs.md#chrx-and-the-sex)). The breast cancer score is for women and the prostate cancer score for men: when you declared the other sex, `Sex_Check` says `not applicable to the declared sex` and the score has no percentile. The blood pressure and lipid scores rank a genetic tendency only; a measured blood pressure or lipid panel says far more. The Alzheimer's score includes APOE: read [Before you look](../interpreting-results.md#before-you-look-what-the-pipeline-can-tell-you) first. diff --git a/docs/results/quality.md b/docs/results/quality.md index 08ddc776f..e66b1382c 100644 --- a/docs/results/quality.md +++ b/docs/results/quality.md @@ -11,6 +11,19 @@ These steps check that the data is good enough for everything else. Look at them - **Coverage (step 16b, mosdepth):** `${SAMPLE}/mosdepth/${SAMPLE}.mosdepth.summary.txt`. The `total` row should show a mean near the depth you paid for (about 30). Below 15, small-variant calls lose accuracy. See [step 16b](../16b-mosdepth.md#interpreting-results). - **Sex check (step 16, indexcov):** `${SAMPLE}/indexcov/` estimates the copy number of chrX and chrY from the BAM index. About 1 and 1 is XY, about 2 and 0 is XX. A result that does not match the sex you gave the pipeline means a sample swap, a mislabelled file or a real sex-chromosome difference; [step 16](../16-indexcov.md#interpretation) lists the patterns. Re-check the input before reading anything else. +## What Part of the Genome a Run Covered + +Some results are a share, a sum or a placement over the whole genome: callability, the polygenic scores, fine-grained ancestry, telomere content, runs of homozygosity and archaic ancestry. A run on part of the genome (`--intervals`, or a VCF or BAM cut down to a few chromosomes) gives these results too, and they look the same as whole-genome results. + +So `summary.json` records the run's scope under `scope`. It comes from the chromosomes that the records of the sample VCF are on (`chr20` and `20` count alike): + +- `autosomes_covered`: how many of chr1 to chr22 have calls, and `autosomes`: which ones. +- `chrx`: whether chrX has calls. chrX alone does not make a run partial, because these results read the autosomes. +- `intervals`: the intervals the run was limited to, from a `run intervals` row of `run_manifest.tsv`, else `null`. No step writes this row yet, so today it is `null`: a run limited with `--intervals` is caught only by the chromosomes its calls are on. +- `partial` and `mark`: the run is partial when it covers fewer than 22 autosomes (`partial: covers 2 of 22 autosomes`) or was limited to intervals (`partial: limited to the run's intervals (...)`). + +When the run is partial, each of those six sections that has a result of this run gets the same text in its `partial` field. A stale section holds a result from an earlier run, and that run's scope was not recorded: it gets `partial: not known, from an earlier run`, whatever this run covered. Without a sample VCF that can be read to its end, the scope is not known: `summary.json` has no `scope`, and no section is marked. The scope says which chromosomes have calls. It does not say how much of each chromosome was read well; callability does that. + ## Reports (Steps 24 and 28) - **HTML report (step 24):** `${SAMPLE}/${SAMPLE}_report.html` collects the headline results of the other steps on one page, including the ClinVar hits table. It contains health findings: share it only as you would share a medical record. diff --git a/docs/results/structural-and-repeats.md b/docs/results/structural-and-repeats.md index 7afbb24aa..6e9092a8b 100644 --- a/docs/results/structural-and-repeats.md +++ b/docs/results/structural-and-repeats.md @@ -34,14 +34,14 @@ A typical human genome has: ### Which Callers to Trust? If you ran multiple SV callers: -- **Called by 2+ callers (Manta + Delly, or Manta + CNVpytor):** Lower false-positive rate +- **Called by 2+ callers (Manta + Delly, or Manta + CNVpytor):** less likely to be one caller's artefact, but not validated: Manta and Delly read the same split and paired reads, so an alignment artefact can reach both - **Called by 1 caller only:** Lower confidence, may be false positive - **duphold DHFFC < 0.7 for deletions:** High confidence (depth drops as expected) - **duphold DHBFC > 1.3 for duplications:** High confidence (depth rises as expected) ### SV Consensus (Step 22) -`${SAMPLE}/sv_merged/${SAMPLE}_sv_consensus.vcf.gz` keeps the SVs that two or more callers found (Manta, Delly, CNVpytor and, when they ran, Sniffles2 and TIDDIT): SURVIVOR pairs two calls when both breakpoints lie within 1 kb of each other and their type and strands agree. `SUPP` says how many callers found each one and `SUPP_VEC` which. GRIDSS is left out (its breakend records never match). It is the short list to read first, but it drops real SVs that only one caller found; see [step 22](../22-survivor-merge.md#limitations). +`${SAMPLE}/sv_merged/${SAMPLE}_sv_consensus.vcf.gz` keeps the SVs that two or more callers found (Manta, Delly, CNVpytor and, when they ran, Sniffles2 and TIDDIT): SURVIVOR pairs two calls when both breakpoints lie within 1 kb of each other and their type and strands agree. `SUPP` says how many callers found each one and `SUPP_VEC` which. `SUPP` is caller agreement, not validation. GRIDSS is left out of the SV consensus: nothing here turns its breakend pairs into DEL, DUP or INV events. Its high-confidence calls are in `${SAMPLE}/sv_gridss/${SAMPLE}_gridss.high.vcf.gz` ([step 4b](../04b-gridss.md#quality-filtering)). The consensus is the short list to read first, but it drops real SVs that only one caller found; see [step 22](../22-survivor-merge.md#limitations). Never run AnnotSV on it: its sample columns are the callers and its positions are SURVIVOR's. The reports already join its support onto AnnotSV's class 4 and 5 SVs ([step 5](../05-annotsv.md)). ### AnnotSV Output @@ -79,8 +79,9 @@ The output VCF lists each tested locus with the number of repeats found. Key loc The report prints no all-clear verdict for these loci. It lists every locus in the ExpansionHunter output, the five above first, with its repeat count, Stranger's status and the catalog's normal maximum (`STR_NORMAL_MAX`), and, when step 9b (Stranger) ran, every locus Stranger marks `pre_mutation` or `full_mutation`; without step 9b, compare the counts with the table yourself. It also says: -- **Not sized.** A locus whose call rests on flanking reads only prints "size not determined (flanking reads only)"; one with in-repeat reads only (longer than a read) prints its count as at least the lower end of ExpansionHunter's interval; one with fewer than 2 spanning reads, or an interval that reaches the catalog's pathogenic minimum, is marked low confidence. Such a locus is listed apart and never shown as normal, because an unsized repeat can hide an expansion. -- **Intermediate range.** A sized count inside the HTT, FMR1 or DMPK intermediate range of the table above prints the range, a note that it does not cause disease but may expand in offspring, and the GeneReviews chapter. The report reads these ranges from `bin/str_intermediate_ranges.tsv`, and `tests/test_str_ranges.py` checks that the table above prints the same ones. +- **Not sized.** A locus whose call rests on flanking reads only prints "size not determined (flanking reads only)"; one with in-repeat reads only (longer than a read) prints its count as at least the lower end of ExpansionHunter's interval. An allele counts as in-repeat when its `SO` says `INREPEAT`, or when ExpansionHunter found no spanning and no flanking read for it but at least one in-repeat read (`ADSP` and `ADFL` 0, `ADIR` above 0), whatever its `SO` says; one with fewer than 2 spanning reads, or an interval that reaches the catalog's pathogenic minimum, is marked low confidence. Such a locus is listed apart and never shown as normal, because an unsized repeat can hide an expansion. +- **Intermediate range.** A sized count inside the HTT, FMR1 or DMPK intermediate range of the table above prints the range, a note that it does not cause disease but may expand in offspring, and the GeneReviews chapter. The report reads these ranges from `bin/str_intermediate_ranges.tsv`, and `rust/crates/og-setup/tests/genome_str_ranges.rs` checks that the table above prints the same ones. +- **Reduced penetrance.** Stranger grades HTT with one pathogenic minimum, 36 on the STRchive catalog, so a count of 36 to 39 reads as plain `full_mutation`. It is the reduced-penetrance range of the table above. `summary.json` marks a sized HTT allele of 36 to 39 with `penetrance` (`36-39`), `penetrance_label` and `penetrance_citation` (the GeneReviews chapter) on the locus, and on its entry in the flagged list. The range comes from `assets/str_penetrance_ranges.tsv`. An allele that was not sized gets no such mark: its point estimate is not a count. Stranger's status stays as Stranger wrote it. The report does not print this mark yet; it is in `summary.json` only, and only from step 24 (`run-all.sh`): the Nextflow report does not stage the table yet, so a Nextflow run has no such mark. - **RFC1.** A `full_mutation` flag at RFC1 carries the motif verdict of step 9b ([RFC1 note](../09b-stranger.md#notes)). A count under every threshold is not a guarantee: repeat-expansion calls from short reads can be wrong at some loci, and a long expansion cannot be sized. Intermediate-range results should be discussed with a genetic counselor. @@ -177,4 +178,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; 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. **Not callable** means too few reads there (under 10x) to tell. 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 callable** means too few reads there (under 10x, or none) to tell. Confirm anything that matters in a clinical laboratory. [Step 50](../50-mei.md) explains the columns. diff --git a/docs/rust.md b/docs/rust.md index e8ff74726..3e2a92a88 100644 --- a/docs/rust.md +++ b/docs/rust.md @@ -130,6 +130,7 @@ To add a primitive: write it in `pycompat` with unit tests, add an operation to - **Guard, job `rust`** (every pull request, required through `ci-ok`): `cargo fmt --check`; `cargo clippy -D warnings`; a planted failing test (`--features planted-failure`) that must fail; the planted mistakes of the live ops card (`-p og-live --features fault-inject`, the `planted_*` tests of `crates/og-live/tests/ops*.rs`), every one of which must fail its check; `cargo test`; the differential test at 100,000 cases per operation; the four builds through `scripts/setup.sh --og` (both musl ones and the macOS pair); and the stale check on the real binaries, which must refuse them after an edit to `rust/`, in `rust/og.sh check` and in `nextflow run main.nf -stub`, before any task. Then the fake-docker case `reports-stale-step` runs with `bin/og` and must check its `summary.json` with `og dev schema`, and every test that carries the line `# og-leg: OG_REQUIRED` (the tests that run `og`, such as the `og sv` and `og pgx` filter tests, the step 05 tests and `tests/test_ancestry_fine_report.py`) runs with `bin/og` and `OG_REQUIRED=1`; in `unit-tests`, which has no `og`, they skip with a note. A new test that needs `og` adds that line; the job has no list to edit. Before the real run the step plants a marked test with a failing assert, which must be picked and fail. The planned-verb test must fail once one verb's arm is dropped from `og/src/main.rs`. `cargo test` includes `og dev contract --static` and `og dev report-only` on the checkout (`rust/crates/og-dev/tests/repo.rs`). Its unit tests run `og dev params-doc` on the checkout too: every parameter of `nextflow_schema.json` has one row in `docs/parameters.md`, and every row names a parameter. It also runs `og dev helpers --static` and `--list` on the checkout (`rust/crates/og-dev/tests/helpers_repo.rs`); the `helper-binaries` job runs the same verb through `scripts/ci/check-container-helpers.sh`, with the og the `og` job builds. - **Guard, job `unit-tests`**: `tests/test_og_check.sh` runs the check on planted trees (no binary, a stale one, an edit that is uncommitted, untracked or committed, a file git ignores, a binary stamped `unknown`, a fresh and a stale macOS pair, a tree hash that cannot be computed, a release download with a bad checksum or attestation, without the macOS pair, with `gh` not logged in, with a network error, without binaries, or whose copy into `bin/.og` fails), and checks that `run-all.sh`, `validate-setup.sh` and `write_manifest.sh` act on it. - **Rust** (`rust.yml`, on a pull request that touches the Rust code, the shim or `versions.env`): times a cold and a cached build, runs `og` by bare name in the four images on amd64 and arm64 (QEMU), runs that check once more with a wrong-arch binary planted, which must fail, runs the fetch smoke with both binaries (arm64 under QEMU) and with pysam in `PYPGX_IMAGE`, which must all match `fetch.pysam.tsv`, and keeps the binaries as the artifact `og-binaries`. Every night it runs the differential test at 10,000,000 cases per operation with a new seed. +- **E2E** (`e2e.yml`): a pull request that changes `rust/` runs the smoke cases and every e2e case whose row in `scripts/ci/e2e-case-paths.tsv` has a glob that matches `bin/og`, the cases that run `og` on real tool output ([Which cases a pull request runs](testing.md#which-cases-a-pull-request-runs)). A merge to main that changes `rust/` runs every case. - **Release** (`release.yml`): a tag builds the four binaries and `THIRD-PARTY-LICENSES.txt`, writes `SHA256SUMS` over all five, checks them with `scripts/ci/check-release.sh dist` (each file there, listed once and matching its sum, and the notices of the Rust standard library, musl, htslib and htscodecs in the licence file), attests them and attaches all six files to the release. A pull request that changes `rust/` or the workflow builds them as a dry run, with the same check. - **`og dev licences notices`**: `cargo test -p og-dev --test licences` runs it through real `cargo metadata` on a planted workspace. The crates the binary links must all be credited, each text once; build, dev, procedural-macro, other-target and feature-off crates must not be; an extra part's HTML notices must come out as text; and a crate under SSPL-1.0, one with no licence text that MIT cannot cover, a licence file it cannot read and a missing extra file must each stop it. diff --git a/docs/testing.md b/docs/testing.md index 408186b35..f7917f07d 100644 --- a/docs/testing.md +++ b/docs/testing.md @@ -80,9 +80,9 @@ In CI the cases run in parallel legs, each case at most once: a pull request run - The table holds each case's median time on the passing runs of nine e2e runs of 2026-11-04 (41766267038, 41767270253, 41773233871, 41774860458, 41779067613, 41790595358, 41799741941, 41807346887 and 41821518376), and its `needs`: the non-base cases whose outputs it reads. The needs were written from what each case says it reads (its header and its checks) and from the cases that failed in a split run without them (run 41455829120). A case and every case it needs, followed through, form a group that stays in one shard, in name order. Groups go to the least loaded shard, heaviest first. Every case needs a row: `e2e-shards.sh check`, which `tests/test_e2e_shards.sh` runs on the real table in the unit tests, fails and names each case without one. The split itself still runs a case with no row, as a 300-second case that needs nothing, so add the row with the case's measured seconds from its first passing run. - The base leg runs first. It packs every file its cases wrote or changed (at its absolute path, with owners, modes and times) and uploads it as the artifact `e2e-base`, kept for 3 days so that "Re-run failed jobs" the next day still finds it. The shard legs start only after it passed (`needs:`), so a shard never holds a runner while it waits: when many runs share the account's runners, shards that started early and waited took the runners the base legs needed (run 41506673662 had three shards running and its base leg still queued). Each shard fetches the artifact, tried up to five times, takes the base leg's work area, unpacks the archive there, deletes it (about 4 GB the cases need) and runs its cases. When the base leg fails, the shards are skipped and `e2e` is red. - The shard that holds `nextflow-from-fastq-2-nextflow` and the one that holds `nextflow-hardening-2-nf` run the parity checks; the plan fails when either case runs and the case before it in its pair is in a different shard. -- The required check is the job `e2e`. It merges every leg's results into one table of case, result, time and job, followed by the failed checks of each failed case, and it is red unless the plan and every leg succeeded, every picked case reported exactly one pass and each parity check passed once when its cases ran (and not at all when they did not). It is red too when `e2e-scope` did not succeed. A leg that was skipped, cancelled or cut by its limit leaves cases with no result, and that is red too. The full logs are in the `e2e-logs-` artifacts. +- The required check is the job `e2e`. It merges every leg's results into one table of case, result, time and job, followed by the failed checks of each failed case, and it is red unless the plan and every leg succeeded, every picked case reported exactly one pass and each parity check passed once when its cases ran (and not at all when they did not). It is red too when `e2e-scope` did not succeed. A leg that was skipped, failed or cut by its time limit leaves cases with no result, and that is red too. When the run itself is cancelled, by a newer push to the pull request or by hand, `e2e` is cancelled with it and reads cancelled, not failed: no case ran, so none failed. A cancelled `e2e` blocks a merge as a red one does; re-run the workflow, or push again, to get a result. The full logs are in the `e2e-logs-` artifacts. -`tests/test_e2e_shards.sh` (unit tests) checks the split against planted faults: a case listed twice or missing, a stale or malformed table row, a need on a case that runs later, a pick that leaves out a need, and results missing, failed or reported twice; the leg count; and a case with no row, which `check` must name. `tests/test_e2e_scope.sh` checks the pick: a case with no paths row, a second row, a row for no case and a glob that matches no file must each fail `e2e-scope.sh check`, and a docs-only change, a change to `main.nf`, a change to one helper, to one module, to a case and to a table row must each pick the cases listed below. +`tests/test_e2e_shards.sh` (unit tests) checks the split against planted faults: a case listed twice or missing, a stale or malformed table row, a need on a case that runs later, a pick that leaves out a need, and results missing, failed or reported twice; the leg count; and a case with no row, which `check` must name. `tests/test_e2e_scope.sh` checks the pick: a case with no paths row, a second row, a row for no case and a glob that matches no file must each fail `e2e-scope.sh check`, and a docs-only change, a change to `main.nf`, a change to one helper, to one module, to a case, to a table row and to `rust/` must each pick the cases listed below. On the real table, a change to `rust/` must pick what a change to `bin/og` picks. To measure the table again, run the E2E workflow by hand with `job: e2e` and `trace: true`. That run puts every non-base case in one shard, so it runs as long as one serial run. After each case `e2e-run.sh` records its time and, with the file systems remounted `strictatime`, every file under the work area and the checkout whose atime moved during the case, attributed to the case whose run last changed that file's ctime. The job `e2e` then prints a new `e2e-case-times.tsv` in its summary and uploads it as the artifact `e2e-case-times`; it keeps each row's stage and needs and adds the traced needs. It refuses a trace that saw no case read another case's file. The traced needs are an upper bound, not the table to commit: a file counts for the case that changed it last, so a case that rewrites or touches a shared file (a report, an index) shows up as a need of every later case that reads that file, and a case that scans a folder reads everything in it. On the trace of run 41454755531 they joined almost every case into one group, so check each traced need against the case before you add it. A read the trace cannot see, such as a test for whether a file exists, is not in the table: such a case fails in its shard, and its row then needs a hand-written `needs`. @@ -92,9 +92,9 @@ Every pull request starts the workflow, so main can require the e2e check. Its ` A pull request's e2e run used to run every case: 2 h 17 min from start to end and 339 job-minutes with free runners (run 41774860458, 2026-11-04), while most cases cannot be affected by a given change. [`scripts/ci/e2e-scope.sh`](https://github.com/GeiserX/OwnGenome/blob/main/scripts/ci/e2e-scope.sh) now picks the cases from the files the pull request changed since it left main (`git diff BASE...HEAD`, three dots): -- **None** when no changed path is in the e2e scope: `scripts/`, `modules/`, `workflows/`, `bin/`, `conf/`, `assets/`, `tests/e2e/`, `tests/fixtures/VERSION`, `main.nf`, `nextflow.config`, `nextflow_schema.json`, `versions.env`, `.github/workflows/e2e.yml`, `.github/actions/`, and the committed files under `tests/fixtures/` that a case reads (each named in `SCOPE_FILES` and in that case's row; the other files there feed only the unit tests). +- **None** when no changed path is in the e2e scope: `scripts/`, `modules/`, `workflows/`, `bin/`, `conf/`, `assets/`, `rust/`, `tests/e2e/`, `tests/fixtures/VERSION`, `main.nf`, `nextflow.config`, `nextflow_schema.json`, `versions.env`, `.github/workflows/e2e.yml`, `.github/actions/`, and the committed files under `tests/fixtures/` that a case reads (each named in `SCOPE_FILES` and in that case's row; the other files there feed only the unit tests). - **Every case** when a changed path is shared wiring (`FULL` in the script): `main.nf`, `nextflow.config`, `nextflow_schema.json`, `versions.env`, `assets/steps.tsv`, `workflows/`, `conf/`, `scripts/lib/`, `scripts/run-all.sh`, steps 02 and 03 (the BAM and VCF every case starts from), the fixture (`tests/fixtures/VERSION`, `scripts/ci/build-fixture.sh`), and the e2e runner and planner (`e2e-run.sh`, `e2e-shards.sh`, `e2e-scope.sh`, `tests/e2e/lib.sh`, `tests/e2e/bin/`, `e2e.yml`) with the composite actions every leg runs (`.github/actions/`). Also when the pull request carries the label `e2e-full`: the scope job reads the labels when it runs, so add the label and re-run the workflow (or push). -- **Otherwise** the smoke cases `nextflow-from-fastq-1-bash` and `nextflow-from-fastq-2-nextflow` (the bash steps and the pipeline from FASTQ, and their parity check), every case whose own file changed, every case whose row in `e2e-case-paths.tsv` or `e2e-case-times.tsv` changed, every case with a path glob that matches a changed file, and the cases those need (`needs`, followed through). +- **Otherwise** the smoke cases `nextflow-from-fastq-1-bash` and `nextflow-from-fastq-2-nextflow` (the bash steps and the pipeline from FASTQ, and their parity check), every case whose own file changed, every case whose row in `e2e-case-paths.tsv` or `e2e-case-times.tsv` changed, every case with a path glob that matches a changed file, and the cases those need (`needs`, followed through). A change under `rust/` counts as a change to `bin/og`, which runs the binary built from it: it runs every case with a glob that matches `bin/og`. So a case that runs `og`, itself or through a step script, helper or module, lists `bin/og` in its row. The base leg runs every base case whenever any case runs, because every shard starts from what they wrote. A change to a base step other than 02 and 03 therefore runs the base cases, the smoke cases and the cases that list the step, but not a shard case that only reads that step's output: the full run on main after the merge is what tests those. The job summary of `e2e-scope` lists every picked case with the reason it was picked. @@ -102,7 +102,7 @@ The base leg runs every base case whenever any case runs, because every shard st The images the cases use are cached in four GitHub Actions cache entries, one per group. `scripts/ci/e2e-run.sh --image-groups` names each image's group, taken from its repository name without the tag, so a version bump changes the key of one group only; a group whose key missed restores the newest older entry of that group and pulls only what changed. A group keeps its smallest images up to 1500 MB of zstd output, and the larger ones are pulled on every run. Four groups of 1500 MB and the six data entries below stay under the repository's 10 GB cache limit even while main replaces one group: 5.9 GB of images, 1.5 GB more for the group being replaced, and about 2.4 GB of data. Images pinned by digest are not cached, because `docker load` gives them back without the digest, and they are left out of the group's key, so a digest bump misses no entry. Only the base leg saves, and only on main (or in a run by hand with `save_images`, on any branch), after it pulled every image the cases use and got through its cases, and only the groups whose key missed: a cache saved by a pull request can be read by that pull request alone and would only push main's entries out. The job summary lists every image with its size and what the cache did with it: restored on an exact key hit, restored from an older entry, saved, or pulled. Every merge in the e2e scope starts a run on main, so the cache follows main's images. GitHub drops an entry no run has read for 7 days, so after a quiet week the next run on main fills the cache again. Until this layout the cache was one entry, and by October 2026 it had grown to about 11 GB, over the limit, so every run missed it. -Six downloads are cached the same way. Two come from EBI's 1000 Genomes server, which is slow and at times stalls: MoChA's chr20 panel with its manifest (0.64 GB, case `mocha-1`), keyed on `MOCHA_PANEL_MANIFEST_SHA256` and the chromosome, and the 1000 Genomes phase 3 sites VCF (1.36 GB, case `archaic-ancestry-1`), keyed on `ARCHAIC_1KG_SITES_MD5`. On a miss, each of those two is tried first at `E2E_DATA_MIRROR`, the GitHub release `e2e-data-1` that holds copies of the pinned files, and then at EBI; the pin checks both. The release also holds the four PGS Catalog score files, the HAPNEST panel and the table builders' downloads below, so an EBI outage costs none of them on a cold cache. It holds the TRExplorer catalog of `build-sv-rule-regions.sh` too (the v2.1 file its `TRX_SHA256` pins), so a miss tries the mirror first and the catalog's own GitHub release after it. Two are small and failed whole runs on 2026-11-04, because their case is in the base leg or a shard that cannot start without it: `hla.dat` of the two IPD-IMGT/HLA releases `bash-step-08-hla` installs, from raw.githubusercontent.com (which served it under 1 KB/s), with GENCODE's gene and exon files from EBI's FTP server (curl exit 7 and 28), and the four real PGS Catalog score files of `prs-scores-and-run-options-1-strand-sex`, from the same server. `scripts/ci/e2e-run.sh --data-key` names their keys: the releases and a hash of the code in `scripts/lib/common.sh` that installs them, and a hash of the score ids and their server. `scripts/ci/e2e-run.sh` hands each case its files just before it runs, at the paths `setup.sh` and `install_data_file` read them from, so they download nothing; the score files the case copies from the cache itself. On a miss it downloads them first, checked against their pins or the checksum files the servers publish beside them (`MD5SUMS`, `md5checksum.txt`, the `.md5` of each score), trying up to 6 times 30 s apart. The four score files are pinned by md5 in `PGS_MD5` of `e2e-run.sh` (the md5 the PGS Catalog served beside each on 2026-11-06), tried on the mirror first and then at EBI; a restored or downloaded score must match its pin as well as its `.md5`. A file gets at most `E2E_MIRROR_BUDGET` seconds on the mirror (900, or half the fill's budget when that is less), so a mirror that trickles leaves EBI its turn. One fill may take at most `E2E_DATA_BUDGET` seconds (2400 in `e2e.yml`): a source that trickles above `fetch`'s stall limit would otherwise run on to the leg's 240-minute limit, as EBI's 1000 Genomes server did twice on 2026-11-05. A fill still running then is stopped and its case fails as `FAIL (data fill over 2400s)` without running, since its own download would be as slow. A restored entry is checked again before use (`--data-check`): the IPD-IMGT/HLA and GENCODE entry against the sha256 list written when it was filled, the score files against their `.md5`; one that fails is downloaded again. `bash-step-08-hla` then runs with every HTTP and HTTPS request sent to a closed port, after a control shows that a request under that block fails at the closed port, so a warm cache cannot reach either host. Only the leg whose cases include the case restores and saves its entry, and it saves only on main or in a run by hand with `save_images`, as with the images. The job summary says whether each key hit, and the case's log says where its files came from. The fifth is the PGS Catalog's synthetic HAPNEST panel (0.27 GB, cases `prs-2-ancestry` and `prs-scores-and-run-options-2-panel-chrx`) from EBI's FTP server, which failed cases with curl exit 7 on 2026-11-04. It is keyed on the sha256 `tests/e2e/lib.sh` pins (`HAPNEST_SHA256`). The cases handle it themselves (`setup_ancestry_panel` in `lib.sh`): with the panel in the cache, or on a miss from `E2E_DATA_MIRROR`, they check the sha256 and run `setup.sh --ancestry-panel` with every HTTP and HTTPS request sent to a closed port, so an EBI outage cannot fail them; when neither has it, `setup.sh` downloads the panel from EBI as a user's run does. The first case puts a panel that did not come from the cache in the cache for the save step. A red control in `prs-2-ancestry` runs `setup.sh` with the network blocked and no panel, which must fail. The sixth, entry `catalogs`, holds the pinned downloads of `scripts/ci/build-callability.sh`, `scripts/ci/build-cn-intervals.sh` and `scripts/ci/build-sv-rule-regions.sh`, whose cases `callability-1-catalog`, `cn-intervals-1-catalog` and `followups-ci-3-sv-rule-regions` rebuild `assets/callability_genes.tsv`, the interval rows of `bin/cn_loci.tsv` and `assets/sv_rule_regions.tsv` and compare them with the committed files. Each builder lists its downloads with `--list`; the key is a hash of those lists, so a new pin is a new key. GENCODE's GTF among them comes from EBI's FTP server, which refused every connection for minutes on 2026-11-06 and failed `callability-1-catalog` on main (run 42259432681). The runner fills the entry as it does the others, mirror first and every file checked against its sha256, and each case points its builder's cache at its folder there; a builder that still has to download tries for about five minutes, 30 s apart, and gives up at once on a 403 or 404 (`fetch_pinned` in `scripts/ci/lib/fetch-pinned.sh`, which the three builders share). The builders download with `curl` and hand the folder to `og dev build`, which reads local files only. Every download, there and in `setup.sh`, gives up on a transfer that stalls (`FETCH_STALL`, see `fetch` in `scripts/lib/common.sh`), and the next try resumes it. +Six downloads are cached the same way. Two come from EBI's 1000 Genomes server, which is slow and at times stalls: MoChA's chr20 panel with its manifest (0.64 GB, case `mocha-1`), keyed on `MOCHA_PANEL_MANIFEST_SHA256` and the chromosome, and the 1000 Genomes phase 3 sites VCF (1.36 GB, case `archaic-ancestry-1`), keyed on `ARCHAIC_1KG_SITES_MD5`. On a miss, each of those two is tried first at `E2E_DATA_MIRROR`, the GitHub release `e2e-data-1` that holds copies of the pinned files, and then at EBI; the pin checks both. The release also holds the four PGS Catalog score files, the HAPNEST panel and the table builders' downloads below, so an EBI outage costs none of them on a cold cache. It holds the TRExplorer catalog of `build-sv-rule-regions.sh` too (the v2.1 file its `TRX_SHA256` pins), so a miss tries the mirror first and the catalog's own GitHub release after it. The release keeps each file unchanged, and its notes name the source and the terms of every file it holds. Two are small and failed whole runs on 2026-11-04, because their case is in the base leg or a shard that cannot start without it: `hla.dat` of the two IPD-IMGT/HLA releases `bash-step-08-hla` installs, from raw.githubusercontent.com (which served it under 1 KB/s), with GENCODE's gene and exon files from EBI's FTP server (curl exit 7 and 28), and the four real PGS Catalog score files of `prs-scores-and-run-options-1-strand-sex`, from the same server. `scripts/ci/e2e-run.sh --data-key` names their keys: the releases and a hash of the code in `scripts/lib/common.sh` that installs them, and a hash of the score ids and their server. `scripts/ci/e2e-run.sh` hands each case its files just before it runs, at the paths `setup.sh` and `install_data_file` read them from, so they download nothing; the score files the case copies from the cache itself. On a miss it downloads them first, checked against their pins or the checksum files the servers publish beside them (`MD5SUMS`, `md5checksum.txt`, the `.md5` of each score), trying up to 6 times 30 s apart. The four score files are pinned by md5 in `PGS_MD5` of `e2e-run.sh` (the md5 the PGS Catalog served beside each on 2026-11-06), tried on the mirror first and then at EBI; a restored or downloaded score must match its pin as well as its `.md5`. A file gets at most `E2E_MIRROR_BUDGET` seconds on the mirror (900, or half the fill's budget when that is less), so a mirror that trickles leaves EBI its turn. One fill may take at most `E2E_DATA_BUDGET` seconds (2400 in `e2e.yml`): a source that trickles above `fetch`'s stall limit would otherwise run on to the leg's 240-minute limit, as EBI's 1000 Genomes server did twice on 2026-11-05. A fill still running then is stopped and its case fails as `FAIL (data fill over 2400s)` without running, since its own download would be as slow. A restored entry is checked again before use (`--data-check`): the IPD-IMGT/HLA and GENCODE entry against the sha256 list written when it was filled, the score files against their `.md5`; one that fails is downloaded again. `bash-step-08-hla` then runs with every HTTP and HTTPS request sent to a closed port, after a control shows that a request under that block fails at the closed port, so a warm cache cannot reach either host. Only the leg whose cases include the case restores and saves its entry, and it saves only on main or in a run by hand with `save_images`, as with the images. The job summary says whether each key hit, and the case's log says where its files came from. The fifth is the PGS Catalog's synthetic HAPNEST panel (0.27 GB, cases `prs-2-ancestry` and `prs-scores-and-run-options-2-panel-chrx`) from EBI's FTP server, which failed cases with curl exit 7 on 2026-11-04. It is keyed on the sha256 `tests/e2e/lib.sh` pins (`HAPNEST_SHA256`). The cases handle it themselves (`setup_ancestry_panel` in `lib.sh`): with the panel in the cache, or on a miss from `E2E_DATA_MIRROR`, they check the sha256 and run `setup.sh --ancestry-panel` with every HTTP and HTTPS request sent to a closed port, so an EBI outage cannot fail them; when neither has it, `setup.sh` downloads the panel from EBI as a user's run does. The first case puts a panel that did not come from the cache in the cache for the save step. A red control in `prs-2-ancestry` runs `setup.sh` with the network blocked and no panel, which must fail. The sixth, entry `catalogs`, holds the pinned downloads of `scripts/ci/build-callability.sh`, `scripts/ci/build-cn-intervals.sh` and `scripts/ci/build-sv-rule-regions.sh`, whose cases `callability-1-catalog`, `cn-intervals-1-catalog` and `followups-ci-3-sv-rule-regions` rebuild `assets/callability_genes.tsv`, the interval rows of `bin/cn_loci.tsv` and `assets/sv_rule_regions.tsv` and compare them with the committed files. Each builder lists its downloads with `--list`; the key is a hash of those lists, so a new pin is a new key. GENCODE's GTF among them comes from EBI's FTP server, which refused every connection for minutes on 2026-11-06 and failed `callability-1-catalog` on main (run 42259432681). The runner fills the entry as it does the others, mirror first and every file checked against its sha256, and each case points its builder's cache at its folder there; a builder that still has to download tries for about five minutes, 30 s apart, and gives up at once on a 403 or 404 (`fetch_pinned` in `scripts/ci/lib/fetch-pinned.sh`, which the three builders share). The builders download with `curl` and hand the folder to `og dev build`, which reads local files only. Every download, there and in `setup.sh`, gives up on a transfer that stalls (`FETCH_STALL`, see `fetch` in `scripts/lib/common.sh`), and the next try resumes it. How long it took in one job, before the split: a passing e2e job took about 105 to 205 minutes with 84 cases, and 230 minutes of cases with 130 (run 41390434697, 2026-11-02). The runner decides much of it, not the cache: the same CPU model took 106 minutes in one run and 166 in another. In October 2026, with 84 cases, the same code took 106 and 166 minutes on an AMD EPYC 9V45 (runs 39197502832 and 39075176392, the second of which also saved the cache), 112 minutes on an Intel Xeon 6973P (run 39088086725), 156 and 191 minutes on an AMD EPYC 7763 (runs 39075764278 and 39075201465) and 205 minutes on an AMD EPYC 9V74 (run 39197512594, which saved three groups). The image cache saves about 7 minutes of that: pulling every image took 9 minutes, restoring and loading the four groups took 2.5 (run 39075201465 restored 39 images in 118 seconds), and saving them all took 12. Each leg has a limit of 240 minutes (355 for a traced shard leg); the base leg waits up to 75 minutes for a fixture a pull request bumps. Each leg's first steps print the runner's CPU model and CPU count to the log and the job summary, so a later timing can name the hardware. @@ -158,7 +158,7 @@ A new check has to be seen failing once before it is trusted: run it against the ### What no e2e case runs -This is every step script that no e2e case runs, plus the full-size index build of step 02a. The first eight rows need data, hardware or a binary an e2e job does not have. The three long-read rows need long reads, and the e2e fixture has short reads only. The others could run, but no case runs them yet. The last column says what checks each one instead. An image's smoke test is a row of `tests/smoke/commands.tsv` that `container-test.yml` runs on the fixture when the image changes and once a month; it runs the tool, not the step's script. +This is every step script that no e2e case runs, plus the full-size index build of step 02a. The first eight rows need data, hardware or a binary an e2e job does not have. The three long-read rows need long reads, and the e2e fixture has short reads only. The others could run, but no case runs them yet. The last column says what checks each one instead. An image's smoke test is a row of `tests/smoke/commands.tsv` that `container-test.yml` runs on the fixture when the image changes and once a month; it runs the tool, not the step's script. Its required check `container-ok` is green on a pull request that changes no image: then no smoke row ran, so that green says only that no image changed. The row that runs AnnotSV with its 5.3 GB of full data runs monthly and on dispatch, never on a pull request, so no image pull request waits on that download. | Step | Why no e2e case runs it | What checks it instead | |---|---|---| diff --git a/docs/tool-rationale.md b/docs/tool-rationale.md index 8461e0097..4c3178c61 100644 --- a/docs/tool-rationale.md +++ b/docs/tool-rationale.md @@ -144,7 +144,7 @@ Manta is the primary SV caller because: - **Best for inversions and balanced translocations.** Delly combines all three signal types (paired-end, split-read, read-depth) and is the most accurate caller for inversions (INV) and breakend events (BND). - **Higher sensitivity overall.** Delly calls more SVs than Manta (5,000-15,000 vs 3,000-5,000), catching events that Manta's more conservative filters miss. -- **Higher false positive rate.** The extra sensitivity comes with more false calls. This is why the pipeline uses multi-caller consensus (step 22) rather than trusting any single caller. +- **Higher false positive rate.** The extra sensitivity comes with more false calls. Step 22 marks the calls that two or more callers agree on, and the reports show that support. Agreement with Manta is not independent proof: both callers read split and paired reads. ### CNVpytor: strengths and role @@ -170,7 +170,7 @@ Manta is the primary SV caller because: | Large CNV focus | CNVpytor alone or CNVpytor + Manta | | Inversions / translocations | Delly (strongest for these SV types) | -The consensus merge (step 22) keeps only SVs called by two or more callers, reducing false positives at the cost of losing some real single-caller-only events. For more thorough SV analysis, consider also running AnnotSV (step 5) on the consensus set. +The consensus merge (step 22) keeps only SVs called by two or more callers, which removes many single-caller artefacts at the cost of losing some real single-caller-only events. It reports caller agreement, not validation. AnnotSV (step 5) annotates the callers' own calls, and the reports join the consensus support onto them; never run AnnotSV on the consensus VCF, whose sample columns are the callers. --- diff --git a/modules/local/mei/main.nf b/modules/local/mei/main.nf index 892dfb509..9ddd74fd2 100644 --- a/modules/local/mei/main.nf +++ b/modules/local/mei/main.nf @@ -16,7 +16,8 @@ class, NA for every insertion (AnnotSV 3.5 scores deletions and duplications only); then og mei report: the calls with those columns ("." without AnnotSV's data), and the - catalog as seen / not seen / not callable. 4 CPUs and 8 GB + catalog as seen / call filtered out / not seen / not + callable. 4 CPUs and 8 GB with AnnotSV's data, as step 05 gives AnnotSV, 1 and 2 GB without (conf/base.config) diff --git a/modules/local/mosdepth/main.nf b/modules/local/mosdepth/main.nf index 36e29350f..f27402a7a 100644 --- a/modules/local/mosdepth/main.nf +++ b/modules/local/mosdepth/main.nf @@ -51,14 +51,16 @@ process MOSDEPTH { # Gene callability, as scripts/16b-mosdepth.sh: the genes with a position # (not the ALT-only ones), reads of MAPQ 20 or more, bases at 10x or more. # It writes into callability/, so its own summary and region files never - # match the globs of the outputs above. + # match the globs of the outputs above. No --fast-mode: without it the + # bases where the two mates of a pair overlap count once and the bases of a + # CIGAR deletion do not count, so a gene is read only when 10 fragments + # cover it. mkdir -p callability awk -F'\\t' -v OFS='\\t' '!/^#/ && \$1 != "gene" && \$4 ~ /^[0-9]+\$/ {print \$3, \$4, \$5, \$1}' \\ ${callability_genes} > callability/genes.bed mosdepth \\ --by callability/genes.bed \\ --mapq 20 \\ - --fast-mode \\ --no-per-base \\ --threads ${task.cpus} \\ --thresholds 10 \\ diff --git a/modules/local/pharmcat/main.nf b/modules/local/pharmcat/main.nf index 2575b1410..86205ecb4 100644 --- a/modules/local/pharmcat/main.nf +++ b/modules/local/pharmcat/main.nf @@ -16,8 +16,11 @@ REF or ALT is longer than one base (an indel such as UGT1A1 *28), so og pgx refblock-fill writes a 0/0 record with PharmCAT's own alleles there when reference blocks with GQ >= 20 cover the whole REF - span and no other record overlaps it. The expanded file is named without - .g.vcf, which PharmCAT refuses. + span and no other record overlaps it. The same GQ 20 floor holds for + every reference call it passes on: a 0/0 record (a block or a + DeepVariant RefCall) below GQ 20, or without a GQ, is left out, so + PharmCAT reads that position as missing, not as a confident 0/0. The + expanded file is named without .g.vcf, which PharmCAT refuses. PharmCAT types neither HLA nor CYP2D6 from a VCF. When PGX_CONSENSUS wrote outside calls for the sample (HLA-A and HLA-B from T1K, a CYP2D6 diff --git a/modules/local/prs/main.nf b/modules/local/prs/main.nf index c0ad2f43f..4b3f5237e 100644 --- a/modules/local/prs/main.nf +++ b/modules/local/prs/main.nf @@ -24,7 +24,9 @@ samplesheet's sex its plink2 gets the sex (--update-sex), which it needs to read chrX PRS_SUMMARY _prs_summary.tsv (og prs table), - a score of the other sex marked not applicable, also + a score of the other sex marked not applicable, a + percentile withheld when PRS_SCORE_SITES' genotypes + list variants only (under one 0/0 in five), also published as _prs_summary..tsv so a rerun keeps it, and with the panel the ancestry table of step 26 @@ -328,7 +330,9 @@ process PRS_SUMMARY { publishDir { "${params.outdir}/${meta.id}/ancestry" }, mode: params.publish_dir_mode, pattern: '*_ancestry.tsv' input: - tuple val(meta), path(results), val(input_kind), path(scores, stageAs: 'pgs') + // target: PRS_SCORE_SITES' genotypes, which pgsc_calc scored; og prs + // table withholds the percentiles when they hold no reference calls. + tuple val(meta), path(results), val(input_kind), path(scores, stageAs: 'pgs'), path(target, stageAs: 'target/*') val(panel_name) // '' without an ancestry panel output: @@ -350,7 +354,7 @@ process PRS_SUMMARY { if [ -f ${results}/ZERO_MATCHES ]; then FLAGS=(--zero-matches); fi if [ -f ${results}/BELOW_THRESHOLD ]; then FLAGS=(--below-threshold ${results}/pgsc_calc.log); fi og prs table --sample ${meta.id} --results ${results} --sampleset sample \\ - --scores pgs --input-kind ${input_kind} --sex '${sex}' \${FLAGS[@]+"\${FLAGS[@]}"} ${anc} --out ${meta.id}_prs_summary.tsv + --scores pgs --input-kind ${input_kind} --sex '${sex}' --target ${target} \${FLAGS[@]+"\${FLAGS[@]}"} ${anc} --out ${meta.id}_prs_summary.tsv cp -p ${meta.id}_prs_summary.tsv ${meta.id}_prs_summary.\$(date -r ${meta.id}_prs_summary.tsv +%Y%m%d-%H%M).tsv printf '"%s":\\n python: %s\\n' "${task.process}" "${task.container.replaceFirst(/^[^:@]+[:@]/, '')}" > versions.yml @@ -358,7 +362,7 @@ process PRS_SUMMARY { stub: """ - printf 'Condition\\tPGS_ID\\tScore_SUM\\tVariants_Matched\\tVariants_Total\\tMatched_Pct\\tPercentile\\tAncestry_Group\\tChrX\\tAmbiguous\\tApplies_To\\tSex_Check\\tInput\\n' > ${meta.id}_prs_summary.tsv + printf 'Condition\\tPGS_ID\\tScore_SUM\\tVariants_Matched\\tVariants_Total\\tMatched_Pct\\tPercentile\\tAncestry_Group\\tChrX\\tAmbiguous\\tApplies_To\\tSex_Check\\tPercentile_Note\\tInput\\n' > ${meta.id}_prs_summary.tsv cp ${meta.id}_prs_summary.tsv ${meta.id}_prs_summary.20260101-0000.tsv if [ -n "${panel_name}" ]; then printf 'key\\tvalue\\nsample\\t%s\\n' ${meta.id} > ${meta.id}_ancestry.tsv; fi printf '"%s":\\n python: %s\\n' "${task.process}" "${task.container.replaceFirst(/^[^:@]+[:@]/, '')}" > versions.yml diff --git a/modules/local/somalier/main.nf b/modules/local/somalier/main.nf index 26af3cb47..09262ba81 100644 --- a/modules/local/somalier/main.nf +++ b/modules/local/somalier/main.nf @@ -17,15 +17,17 @@ SAMPLE_QC writes _sample_qc.tsv with og qc sample (rust/, bin/og on the task PATH; the rule scripts/33-sample-qc.sh runs too): somalier's sex against the samplesheet's, VERIFYBAMID2's FREEMIX against - --freemix_warn, and the other samples somalier finds to be the same - person. workflows/bam_analysis.nf stops the run on a sex mismatch - (--sex_check warn logs it), the check INDEXCOV makes from the BAM index, - made again from the reads. Then og qc sex-loss (rust/) adds the mosaic_* - rows: the share of cells that lost the Y (or one X), from MOSDEPTH's - windows (when mosdepth runs) and, for a woman, the VCF's chrX allele - fractions. SAMPLE_QC waits for the VCF, so on a FASTQ row somalier's sex - check reports after DEEPVARIANT; INDEXCOV's check still stops the run - before it. + --freemix_warn (uncertain on a skipped marker check or fewer than 5,000 + markers), and the other samples somalier finds to be the same person + (identity uncertain below 1,000 informative sites, not checked with no + other sample in the run). workflows/bam_analysis.nf stops the run on a + sex mismatch (--sex_check warn logs it), the check INDEXCOV makes from + the BAM index, made again from the reads. Then og qc sex-loss (rust/) + adds the mosaic_* rows: the share of cells that lost the Y (or one X), + from MOSDEPTH's windows (when mosdepth runs) and, for a woman, the + VCF's chrX allele fractions. SAMPLE_QC waits for the VCF, so on a FASTQ + row somalier's sex check reports after DEEPVARIANT; INDEXCOV's check + still stops the run before it. Equivalent to: scripts/33-sample-qc.sh ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -161,7 +163,8 @@ process SAMPLE_QC { --selfsm ${selfsm} \\ --declared-sex "${meta.sex ?: ''}" \\ --freemix-warn ${params.freemix_warn} \\ - --marker-check "\$(cat ${marker_check})" \\ + --marker-check "\$(sed -n 1p ${marker_check})" \\ + --verifybamid2-markers "\$(sed -n 2p ${marker_check})" \\ --out ${meta.id}_sample_qc.tsv og qc sex-loss --table ${meta.id}_sample_qc.tsv ${mosaic_args} diff --git a/modules/local/verifybamid2/main.nf b/modules/local/verifybamid2/main.nf index 538f1de9d..e99b21076 100644 --- a/modules/local/verifybamid2/main.nf +++ b/modules/local/verifybamid2/main.nf @@ -9,8 +9,12 @@ than 1,000 markers have reads (a targeted or sliced BAM); the task then runs it again with --DisableSanityCheck and writes "skipped" to .marker_check, so the report says the marker check was skipped. - SAMPLE_QC compares FREEMIX with --freemix_warn; contamination never stops - the run. + The second line of .marker_check is the number of markers the check + kept ("N SNP markers remained after sanity check" in the first run's + log; the run without the check does not log it), empty when the log + has no such line. SAMPLE_QC compares FREEMIX with --freemix_warn and + calls it uncertain on a skipped check or fewer than 5,000 markers; + contamination never stops the run. Equivalent to: the VerifyBamID2 part of scripts/33-sample-qc.sh ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -51,7 +55,10 @@ process VERIFYBAMID2 { --Output ${meta.id} --NumThread ${task.cpus} "\$@" > ${meta.id}.log 2>&1 } MARKER_CHECK=passed - if ! vb2; then + VB_RC=0 + vb2 || VB_RC=\$? + MARKERS=\$(sed -n '/SNP markers remained after sanity check/{s/.* \\([0-9][0-9]*\\) SNP markers remained.*/\\1/p;q;}' ${meta.id}.log) + if [ "\$VB_RC" -ne 0 ]; then if grep -q 'Insufficient Available markers' ${meta.id}.log; then echo "Fewer than 1,000 panel markers have reads: running again with --DisableSanityCheck" MARKER_CHECK=skipped @@ -61,7 +68,7 @@ process VERIFYBAMID2 { exit 1 fi fi - echo "\$MARKER_CHECK" > ${meta.id}.marker_check + printf '%s\\n%s\\n' "\$MARKER_CHECK" "\$MARKERS" > ${meta.id}.marker_check cat ${meta.id}.selfSM cat <<-END_VERSIONS > versions.yml @@ -72,7 +79,7 @@ process VERIFYBAMID2 { stub: """ - echo passed > ${meta.id}.marker_check + printf 'passed\\n100000\\n' > ${meta.id}.marker_check printf '#SEQ_ID\\tRG\\tCHIP_ID\\t#SNPS\\t#READS\\tAVG_DP\\tFREEMIX\\n%s\\tNA\\tNA\\t100000\\t1\\t30\\t0.001\\n' ${meta.id} > ${meta.id}.selfSM touch ${meta.id}.log diff --git a/rust/crates/og-admix/src/paint.rs b/rust/crates/og-admix/src/paint.rs index 1fc0f571c..036d3e2e0 100644 --- a/rust/crates/og-admix/src/paint.rs +++ b/rust/crates/og-admix/src/paint.rs @@ -1,2 +1,403 @@ -//! Local-ancestry painting, our own engine in place of RFMix. Empty until -//! its unit of the 1.0.0 plan lands. +//! Local-ancestry painting, our own engine in place of RFMix: a Li and +//! Stephens copying model whose hidden state is (ancestry, reference +//! haplotype), as Browning, Waples and Browning published it for FLARE +//! (AJHG 2023). The code is written from the published equations; no FLARE +//! or RFMix source was read. +//! +//! Along a target haplotype, ancestry events come at rate T per Morgan, and +//! each draws the new ancestry from the proportions mu (it may be the old +//! one) and a reference haplotype of it uniformly. Inside an ancestry a the +//! copied haplotype jumps at rate rho_a per Morgan to one drawn uniformly +//! from the n_a haplotypes of a. The copied haplotype carries the target's +//! allele with chance 1 - epsilon. [`hmm`] has the equations; each forward +//! and backward step costs O(H) through per-group totals, and the forward +//! values are kept only every sqrt(M) sites. +//! +//! [`paint`] fits mu, T, epsilon and rho_a by expectation-maximisation over +//! the whole genome, every chromosome and haplotype at once, for up to +//! [`Options::rounds`] rounds, and calls each site's ancestry as the group +//! of highest posterior. The start is [`Params::initial`]: mu from the +//! continental projection, T = 10, epsilon = 0.01 and rho_a = 4 Ne / n_a. +//! Chromosomes and haplotypes run on [`Options::threads`] threads; the +//! sums are taken in a fixed order, so any thread count gives the same +//! bytes. +//! +//! Memory: the reference haplotypes take M H / 8 bytes over all M sites of +//! the genome, each running haplotype about 16 sqrt(M_c) H bytes for its +//! chromosome of M_c sites, and the posteriors 8 A bytes per site and +//! haplotype for A groups. + +pub mod bits; +pub mod hmm; + +pub use bits::{Bits, RefPanel}; +pub use hmm::{Fb, Stats, checkpoint_block, forward_backward}; + +use crate::simulate::MAX_PER_MORGAN; +use crate::{Error, Result, repr}; +use std::io::Write; +use std::sync::atomic::{AtomicUsize, Ordering}; + +/// The effective population size the start of rho_a takes, 4 Ne / n_a per +/// Morgan. +pub const DEFAULT_NE: f64 = 10_000.0; +/// The start of T, ancestry events per Morgan. +pub const START_T: f64 = 10.0; +/// The start of epsilon. +pub const START_EPSILON: f64 = 0.01; +/// The most EM rounds [`paint`] runs by default. +pub const DEFAULT_ROUNDS: usize = 5; +/// EM stops early when no parameter moves by more than this share. +pub const TOLERANCE: f64 = 1e-4; + +/// The model's parameters. +#[derive(Debug, Clone, PartialEq)] +pub struct Params { + /// The proportion of each group, summing to 1. + pub mu: Vec, + /// T, ancestry events per Morgan. + pub generations: f64, + /// The chance that the copied haplotype does not carry the allele. + pub epsilon: f64, + /// rho_a, copying jumps per Morgan inside each group. + pub rho: Vec, +} + +impl Params { + /// The start: `mu` (the continental projection), T = 10, epsilon = + /// 0.01 and rho_a = 4 `ne` / n_a, `sizes` holding n_a. + pub fn initial(mu: Vec, sizes: &[usize], ne: f64) -> Params { + Params { + mu, + generations: START_T, + epsilon: START_EPSILON, + rho: sizes.iter().map(|&n| 4.0 * ne / n as f64).collect(), + } + } + + /// Checks the numbers for `groups` groups: mu above 0 and summing to 1 + /// (within 1e-6), T above 0 and at most [`MAX_PER_MORGAN`], epsilon + /// above 0 and at most 0.5, every rho_a finite and above 0. + pub fn check(&self, groups: usize) -> Result<()> { + if self.mu.len() != groups || self.rho.len() != groups { + return Err(Error(format!( + "{} proportions and {} jump rates for {groups} groups", + self.mu.len(), + self.rho.len() + ))); + } + if let Some(w) = self.mu.iter().find(|w| !(w.is_finite() && **w > 0.0)) { + return Err(Error(format!("a proportion is {w}: each must be above 0"))); + } + let total: f64 = self.mu.iter().sum(); + if (total - 1.0).abs() > 1e-6 { + return Err(Error(format!( + "the ancestry proportions sum to {total}, not 1" + ))); + } + let t = self.generations; + if !(t.is_finite() && t > 0.0 && t <= MAX_PER_MORGAN) { + return Err(Error(format!( + "T is {t}: ancestry events per Morgan must be above 0 and at most {MAX_PER_MORGAN}" + ))); + } + let eps = self.epsilon; + if !(eps.is_finite() && eps > 0.0 && eps <= 0.5) { + return Err(Error(format!( + "epsilon is {eps}: it must be above 0 and at most 0.5" + ))); + } + if let Some(r) = self.rho.iter().find(|r| !(r.is_finite() && **r > 0.0)) { + return Err(Error(format!( + "a copying jump rate is {r}: each must be above 0" + ))); + } + Ok(()) + } + + /// The next parameters from the expected counts of a pass. + fn update(&self, s: &Stats) -> Params { + let groups = self.mu.len(); + // mu: the mean posterior of each ancestry, kept above 1e-6 so no + // group drops out of the model. + let mut mu: Vec = s.ancestry.iter().map(|x| (x / s.sites).max(1e-6)).collect(); + let total: f64 = mu.iter().sum(); + mu.iter_mut().for_each(|x| *x /= total); + // T: expected events per Morgan walked. + let generations = if s.morgans > 0.0 { + (s.events / s.morgans).clamp(1e-3, MAX_PER_MORGAN) + } else { + self.generations + }; + let epsilon = (s.mismatches / s.sites).clamp(1e-6, 0.5); + let rho = (0..groups) + .map(|a| { + if s.exposure[a] > 0.0 { + (s.jumps[a] / s.exposure[a]).clamp(1e-3, 1e7) + } else { + self.rho[a] + } + }) + .collect(); + Params { + mu, + generations, + epsilon, + rho, + } + } + + /// The largest share by which any parameter differs from `other`; + /// infinite when a share is not a number, so a NaN never reads as + /// converged. + fn moved(&self, other: &Params) -> f64 { + let rel = |a: f64, b: f64| { + let r = (a - b).abs() / b.abs().max(f64::MIN_POSITIVE); + if r.is_nan() { f64::INFINITY } else { r } + }; + let mut m = rel(self.generations, other.generations).max(rel(self.epsilon, other.epsilon)); + for (a, b) in self + .mu + .iter() + .zip(&other.mu) + .chain(self.rho.iter().zip(&other.rho)) + { + m = m.max(rel(*a, *b)); + } + m + } +} + +/// One chromosome to paint. +#[derive(Debug, Clone, PartialEq)] +pub struct ChromInput { + pub name: String, + /// The genetic position of each site, cM, never going down. + pub cm: Vec, + pub panel: RefPanel, + /// The target's haplotypes at the panel's sites. + pub targets: Vec, +} + +/// How [`paint`] runs. +#[derive(Debug, Clone, PartialEq)] +pub struct Options { + /// Worker threads, at least 1. + pub threads: usize, + /// The most EM rounds; 0 paints with the start parameters. + pub rounds: usize, +} + +impl Default for Options { + fn default() -> Options { + Options { + threads: 1, + rounds: DEFAULT_ROUNDS, + } + } +} + +/// One painted haplotype. +#[derive(Debug, Clone, PartialEq)] +pub struct PaintedHap { + /// Site by site, the posterior of each group: `posterior[m * A + a]`. + pub posterior: Vec, + /// Site by site, the group of highest posterior (the first on a tie). + pub calls: Vec, +} + +/// One painted chromosome. +#[derive(Debug, Clone, PartialEq)] +pub struct PaintedChrom { + pub name: String, + pub haplotypes: Vec, +} + +/// The painting of a genome. +#[derive(Debug, Clone, PartialEq)] +pub struct Painting { + /// The parameters the painting was made with. + pub params: Params, + /// The EM rounds run (parameter updates made). + pub rounds: usize, + /// The log-likelihood of the genome under [`Painting::params`]. + pub loglik: f64, + pub chroms: Vec, +} + +fn check_input(chroms: &[ChromInput], start: &Params, opts: &Options) -> Result<()> { + if opts.threads == 0 { + return Err(Error("the painting needs at least one thread".into())); + } + let Some(first) = chroms.first() else { + return Err(Error("no chromosome to paint".into())); + }; + start.check(first.panel.groups())?; + if chroms.iter().all(|c| c.targets.is_empty()) { + return Err(Error("no target haplotype to paint".into())); + } + for c in chroms { + let name = repr(&c.name); + if c.panel.sizes() != first.panel.sizes() { + return Err(Error(format!( + "chromosome {name} has another reference panel than {}", + repr(&first.name) + ))); + } + let m = c.panel.sites(); + if m == 0 { + return Err(Error(format!("chromosome {name} has no site"))); + } + if c.cm.len() != m { + return Err(Error(format!( + "chromosome {name}: {} map positions for {m} sites", + c.cm.len() + ))); + } + if let Some(i) = (0..m).find(|&i| !c.cm[i].is_finite() || (i > 0 && c.cm[i] < c.cm[i - 1])) + { + return Err(Error(format!( + "chromosome {name}: the map position of site {i} is {} (it must be finite and never go down)", + c.cm[i] + ))); + } + if let Some(t) = c.targets.iter().position(|t| t.len() != m) { + return Err(Error(format!( + "chromosome {name}: target haplotype {t} has {} sites, the panel {m}", + c.targets[t].len() + ))); + } + } + Ok(()) +} + +/// Runs one forward-backward per (chromosome, haplotype) on `threads` +/// threads; the results in that order. +fn pass(chroms: &[ChromInput], params: &Params, threads: usize) -> Vec { + let units: Vec<(usize, usize)> = chroms + .iter() + .enumerate() + .flat_map(|(c, ch)| (0..ch.targets.len()).map(move |t| (c, t))) + .collect(); + let run = |&(c, t): &(usize, usize)| { + let ch = &chroms[c]; + forward_backward( + &ch.panel, + &ch.cm, + &ch.targets[t], + params, + checkpoint_block(ch.panel.sites()), + ) + }; + if threads <= 1 || units.len() <= 1 { + return units.iter().map(run).collect(); + } + let next = AtomicUsize::new(0); + let mut done: Vec<(usize, Fb)> = std::thread::scope(|s| { + let workers: Vec<_> = (0..threads.min(units.len())) + .map(|_| { + s.spawn(|| { + let mut out = Vec::new(); + loop { + let i = next.fetch_add(1, Ordering::Relaxed); + let Some(u) = units.get(i) else { break }; + out.push((i, run(u))); + } + out + }) + }) + .collect(); + workers + .into_iter() + .flat_map(|w| w.join().expect("a painting thread panicked")) + .collect() + }); + done.sort_by_key(|(i, _)| *i); + done.into_iter().map(|(_, fb)| fb).collect() +} + +/// Paints every target haplotype of `chroms`, fitting the parameters from +/// `start` by EM for up to `opts.rounds` rounds over the whole genome. A +/// round stops the fit early when no parameter moves by more than +/// [`TOLERANCE`]; the painting is then made with the parameters before +/// that last update. +pub fn paint(chroms: &[ChromInput], start: Params, opts: &Options) -> Result { + check_input(chroms, &start, opts)?; + let groups = chroms[0].panel.groups(); + let mut params = start; + let mut rounds = 0; + let (fbs, total) = loop { + let fbs = pass(chroms, ¶ms, opts.threads); + let mut total = Stats::zero(groups); + for fb in &fbs { + total.add(&fb.stats); + } + if rounds == opts.rounds { + break (fbs, total); + } + let next = params.update(&total); + next.check(groups)?; + if next.moved(¶ms) <= TOLERANCE { + break (fbs, total); + } + params = next; + rounds += 1; + }; + let mut fbs = fbs.into_iter(); + let out = chroms + .iter() + .map(|c| PaintedChrom { + name: c.name.clone(), + haplotypes: (0..c.targets.len()) + .map(|_| { + let fb = fbs.next().expect("one pass per haplotype"); + let calls = fb + .posterior + .chunks(groups) + .map(|p| { + (1..groups).fold(0, |best, a| if p[a] > p[best] { a } else { best }) + }) + .collect(); + PaintedHap { + posterior: fb.posterior, + calls, + } + }) + .collect(), + }) + .collect(); + Ok(Painting { + params, + rounds, + loglik: total.loglik, + chroms: out, + }) +} + +/// Writes `paint/params.tsv`: a header, then one `parameter group value` +/// row per value (`.` for a parameter of no group): T, epsilon, mu and rho +/// of each group, the EM rounds and the log-likelihood. `names` names the +/// groups in their order. +pub fn write_params(out: &mut dyn Write, painting: &Painting, names: &[String]) -> Result<()> { + let p = &painting.params; + if names.len() != p.mu.len() { + return Err(Error(format!( + "{} group names for {} groups", + names.len(), + p.mu.len() + ))); + } + let mut text = String::from("#parameter\tgroup\tvalue\n"); + text.push_str(&format!("T\t.\t{}\n", p.generations)); + text.push_str(&format!("epsilon\t.\t{}\n", p.epsilon)); + for (g, w) in names.iter().zip(&p.mu) { + text.push_str(&format!("mu\t{g}\t{w}\n")); + } + for (g, r) in names.iter().zip(&p.rho) { + text.push_str(&format!("rho\t{g}\t{r}\n")); + } + text.push_str(&format!("em_rounds\t.\t{}\n", painting.rounds)); + text.push_str(&format!("loglik\t.\t{}\n", painting.loglik)); + out.write_all(text.as_bytes()) + .map_err(|e| Error(format!("cannot write the painting parameters: {e}"))) +} diff --git a/rust/crates/og-admix/src/paint/bits.rs b/rust/crates/og-admix/src/paint/bits.rs new file mode 100644 index 000000000..8d79e63ea --- /dev/null +++ b/rust/crates/og-admix/src/paint/bits.rs @@ -0,0 +1,161 @@ +//! The bit-packed inputs of the painting: the reference haplotypes of one +//! chromosome, one bit per haplotype per site, and a target haplotype, one +//! bit per site. + +use crate::panel::{Haplotypes, bit, words}; +use crate::{Error, Result}; + +/// The reference haplotypes of one chromosome and the group (ancestry) of +/// each. A site takes `ceil(H / 64)` words, so a panel of H haplotypes at M +/// sites holds `M * H / 8` bytes. +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct RefPanel { + haplotypes: usize, + words: usize, + bits: Vec, + group: Vec, + size: Vec, +} + +impl RefPanel { + /// An empty panel: `group[h]` is the group of haplotype `h`, an index + /// below `groups`. Every group needs at least one haplotype. + pub fn new(group: Vec, groups: usize) -> Result { + if groups == 0 { + return Err(Error("the painting needs at least one group".into())); + } + let mut size = vec![0usize; groups]; + for (h, &g) in group.iter().enumerate() { + if g >= groups { + return Err(Error(format!( + "reference haplotype {h} is in group {g}, but there are {groups} groups" + ))); + } + size[g] += 1; + } + if let Some(g) = size.iter().position(|&n| n == 0) { + return Err(Error(format!("group {g} has no reference haplotype"))); + } + Ok(RefPanel { + haplotypes: group.len(), + words: words(group.len()), + bits: Vec::new(), + group, + size, + }) + } + + /// The panel of `haplotypes` (every site it holds); `group[p]` is the + /// group of person `p`, so both haplotypes of a person share it. + pub fn from_haplotypes( + haplotypes: &Haplotypes, + person_group: &[usize], + groups: usize, + ) -> Result { + if person_group.len() != haplotypes.people().len() { + return Err(Error(format!( + "{} groups given for {} reference people", + person_group.len(), + haplotypes.people().len() + ))); + } + let group = person_group.iter().flat_map(|&g| [g, g]).collect(); + let mut panel = RefPanel::new(group, groups)?; + for m in 0..haplotypes.sites().len() { + panel.push_site(haplotypes.row(m)); + } + Ok(panel) + } + + /// Adds a site: bit `h` of `row` is the allele of haplotype `h`. + pub fn push_site(&mut self, row: &[u64]) { + assert_eq!(row.len(), self.words, "a row of {} words", self.words); + self.bits.extend_from_slice(row); + // Bits past the last haplotype are never read, but zero them so + // equal panels compare equal. + let extra = self.words * 64 - self.haplotypes; + if extra > 0 { + let last = self.bits.len() - 1; + self.bits[last] &= u64::MAX >> extra; + } + } + + pub fn sites(&self) -> usize { + self.bits.len().checked_div(self.words).unwrap_or(0) + } + + pub fn haplotypes(&self) -> usize { + self.haplotypes + } + + pub fn groups(&self) -> usize { + self.size.len() + } + + /// The group of haplotype `h`. + pub fn group_of(&self, h: usize) -> usize { + self.group[h] + } + + /// The group of every haplotype. + pub fn group_all(&self) -> &[usize] { + &self.group + } + + /// The haplotypes of each group. + pub fn sizes(&self) -> &[usize] { + &self.size + } + + /// The alleles of every haplotype at site `m`. + pub fn row(&self, m: usize) -> &[u64] { + &self.bits[m * self.words..(m + 1) * self.words] + } + + /// The allele (0 or 1) of haplotype `h` at site `m`. + pub fn allele(&self, m: usize, h: usize) -> u8 { + bit(self.row(m), h) + } +} + +/// One haplotype to paint: one allele bit per site. +#[derive(Debug, Clone, PartialEq, Eq, Default)] +pub struct Bits { + len: usize, + words: Vec, +} + +impl Bits { + /// From alleles, each 0 or 1 (anything else counts as 1). + pub fn from_alleles(alleles: &[u8]) -> Bits { + let mut b = Bits::default(); + for &a in alleles { + b.push(a != 0); + } + b + } + + pub fn push(&mut self, one: bool) { + if self.len.is_multiple_of(64) { + self.words.push(0); + } + if one { + self.words[self.len / 64] |= 1 << (self.len % 64); + } + self.len += 1; + } + + pub fn len(&self) -> usize { + self.len + } + + pub fn is_empty(&self) -> bool { + self.len == 0 + } + + /// The allele at site `m`. + pub fn get(&self, m: usize) -> u8 { + assert!(m < self.len, "site {m} of {}", self.len); + bit(&self.words, m) + } +} diff --git a/rust/crates/og-admix/src/paint/hmm.rs b/rust/crates/og-admix/src/paint/hmm.rs new file mode 100644 index 000000000..f1f4624f5 --- /dev/null +++ b/rust/crates/og-admix/src/paint/hmm.rs @@ -0,0 +1,332 @@ +//! Forward-backward over the (ancestry, reference haplotype) states of one +//! target haplotype on one chromosome, in O(H) per site, with the forward +//! values kept only at checkpoints. +//! +//! Between sites m-1 and m, d Morgans apart, with pT = 1 - exp(-T d) and +//! pR(a) = 1 - exp(-rho_a d), the chance of moving from state (a, h) to +//! state (b, k) is +//! +//! ```text +//! P = (1 - pT) [ (1 - pR(a)) [h = k] + pR(a) / n_a ] [a = b] +//! + pT mu_b / n_b +//! ``` +//! +//! The first term keeps the ancestry (and, unless the copying jumps, the +//! haplotype); the second is an ancestry event, whose new ancestry is drawn +//! from mu (it may be the old one) and whose haplotype is drawn uniformly in +//! it. Every term is either the state itself or a group total, so with the +//! per-group sums S_a = sum of alpha(a, h) over h the forward step is +//! +//! ```text +//! alpha_m(b, k) = e_m(k) [ (1 - pT)(1 - pR(b)) alpha_{m-1}(b, k) +//! + (1 - pT) pR(b) S_b / n_b + pT mu_b / n_b sum(S) ] +//! ``` +//! +//! and the backward step, with g(b, k) = e_m(k) beta_m(b, k) and its group +//! sums G_b, is +//! +//! ```text +//! beta_{m-1}(a, h) = (1 - pT)(1 - pR(a)) g(a, h) + (1 - pT) pR(a) G_a / n_a +//! + pT sum_b mu_b G_b / n_b +//! ``` +//! +//! The emission e_m(k) is 1 - epsilon when reference haplotype k carries +//! the target's allele at site m and epsilon when it does not. Both passes +//! rescale each site to sum 1; the forward scales give the log-likelihood. +//! +//! The forward values of every `block`-th site are kept. The backward pass +//! recomputes one block at a time from its checkpoint, with the same code +//! and in the same order, so the values are the same bits as in the first +//! pass. With `block` near sqrt(M) the memory is about 2 sqrt(M) H values +//! instead of M H. + +use super::Params; +use super::bits::{Bits, RefPanel}; + +/// What one haplotype's pass adds to the EM step: expected counts, summed +/// over the sites of one chromosome. +#[derive(Debug, Clone, PartialEq)] +pub struct Stats { + /// Sites. + pub sites: f64, + /// The expected number of sites where the copied haplotype does not + /// carry the target's allele. + pub mismatches: f64, + /// Per group, the summed posterior of that ancestry over the sites. + pub ancestry: Vec, + /// The expected number of ancestry events. + pub events: f64, + /// Morgans from the first site to the last. + pub morgans: f64, + /// Per group, the expected number of copying jumps inside that + /// ancestry. + pub jumps: Vec, + /// Per group, the expected Morgans spent in that ancestry (each + /// interval weighted by the ancestry's posterior at its left end). + pub exposure: Vec, + /// The log-likelihood of the haplotype. + pub loglik: f64, +} + +impl Stats { + pub fn zero(groups: usize) -> Stats { + Stats { + sites: 0.0, + mismatches: 0.0, + ancestry: vec![0.0; groups], + events: 0.0, + morgans: 0.0, + jumps: vec![0.0; groups], + exposure: vec![0.0; groups], + loglik: 0.0, + } + } + + /// Adds `other` in place. + pub fn add(&mut self, other: &Stats) { + self.sites += other.sites; + self.mismatches += other.mismatches; + self.events += other.events; + self.morgans += other.morgans; + self.loglik += other.loglik; + for (a, b) in [ + (&mut self.ancestry, &other.ancestry), + (&mut self.jumps, &other.jumps), + (&mut self.exposure, &other.exposure), + ] { + for (x, y) in a.iter_mut().zip(b) { + *x += y; + } + } + } +} + +/// The result of one haplotype's pass. +#[derive(Debug, Clone, PartialEq)] +pub struct Fb { + /// Site by site, the posterior of each group: `posterior[m * A + a]`. + pub posterior: Vec, + pub stats: Stats, +} + +/// The transition terms of one interval, per group. +struct Step { + p_t: f64, + /// (1 - pT)(1 - pR(a)). + stay: Vec, + /// (1 - pT) pR(a) / n_a. + jump: Vec, + /// pT mu_a / n_a. + enter: Vec, +} + +impl Step { + fn new(groups: usize) -> Step { + Step { + p_t: 0.0, + stay: vec![0.0; groups], + jump: vec![0.0; groups], + enter: vec![0.0; groups], + } + } + + fn set(&mut self, params: &Params, sizes: &[usize], morgans: f64) { + let p_t = -(-params.generations * morgans).exp_m1(); + self.p_t = p_t; + for (a, &n) in sizes.iter().enumerate() { + let n = n as f64; + let p_r = -(-params.rho[a] * morgans).exp_m1(); + self.stay[a] = (1.0 - p_t) * (1.0 - p_r); + self.jump[a] = (1.0 - p_t) * p_r / n; + self.enter[a] = p_t * params.mu[a] / n; + } + } +} + +struct Engine<'a> { + panel: &'a RefPanel, + cm: &'a [f64], + target: &'a Bits, + params: &'a Params, + step: Step, + sums: Vec, +} + +impl Engine<'_> { + fn emission(&self, m: usize, h: usize) -> f64 { + if self.panel.allele(m, h) == self.target.get(m) { + 1.0 - self.params.epsilon + } else { + self.params.epsilon + } + } + + fn morgans(&self, m: usize) -> f64 { + (self.cm[m] - self.cm[m - 1]) / 100.0 + } + + /// Writes the forward values of site `m` into `out`, scaled to sum 1, + /// from those of site m-1 (`prev`, scaled to sum 1); the log of the + /// scale. + fn forward(&mut self, m: usize, prev: Option<&[f64]>, out: &mut [f64]) -> f64 { + let group = self.panel.group_all(); + let sizes = self.panel.sizes(); + match prev { + None => { + for (h, o) in out.iter_mut().enumerate() { + let g = group[h]; + *o = self.emission(0, h) * self.params.mu[g] / sizes[g] as f64; + } + } + Some(prev) => { + let d = self.morgans(m); + self.step.set(self.params, sizes, d); + self.sums.iter_mut().for_each(|s| *s = 0.0); + for (h, &p) in prev.iter().enumerate() { + self.sums[group[h]] += p; + } + let total: f64 = self.sums.iter().sum(); + for (a, s) in self.sums.iter_mut().enumerate() { + // Everything a state of group a receives that does not + // depend on its own previous value. + *s = self.step.jump[a] * *s + self.step.enter[a] * total; + } + for (h, o) in out.iter_mut().enumerate() { + let g = group[h]; + *o = self.emission(m, h) * (self.step.stay[g] * prev[h] + self.sums[g]); + } + } + } + let c: f64 = out.iter().sum(); + out.iter_mut().for_each(|o| *o /= c); + c.ln() + } +} + +/// The checkpoint spacing for `sites` sites: ceil(sqrt(sites)), at least 1. +pub fn checkpoint_block(sites: usize) -> usize { + sites.isqrt().max(1) + usize::from(sites.isqrt().pow(2) < sites) +} + +/// Runs forward-backward for `target` against `panel`, `cm` the genetic +/// position of each site, keeping the forward values every `block` sites +/// (`block` at least the number of sites keeps them all). +pub fn forward_backward( + panel: &RefPanel, + cm: &[f64], + target: &Bits, + params: &Params, + block: usize, +) -> Fb { + let sites = panel.sites(); + let hs = panel.haplotypes(); + let groups = panel.groups(); + assert!(sites > 0 && cm.len() == sites && target.len() == sites); + let k = block.clamp(1, sites); + let blocks = sites.div_ceil(k); + let mut e = Engine { + panel, + cm, + target, + params, + step: Step::new(groups), + sums: vec![0.0; groups], + }; + let mut stats = Stats::zero(groups); + + // Forward, keeping every k-th site. + let mut checkpoints = vec![0.0; blocks * hs]; + let (mut prev, mut cur) = (vec![0.0; hs], vec![0.0; hs]); + for m in 0..sites { + stats.loglik += e.forward(m, (m > 0).then_some(&prev[..]), &mut cur); + if m % k == 0 { + checkpoints[(m / k) * hs..(m / k + 1) * hs].copy_from_slice(&cur); + } + std::mem::swap(&mut prev, &mut cur); + } + drop((prev, cur)); + + // Backward, one block at a time. + let group = panel.group_all().to_vec(); + let sizes = panel.sizes().to_vec(); + let mut buf = vec![0.0; k * hs]; + let mut loaded = usize::MAX; + let mut beta = vec![1.0 / hs as f64; hs]; + let mut posterior = vec![0.0; sites * groups]; + let mut post = vec![0.0; groups]; + let mut s_alpha = vec![0.0; groups]; + let mut g_beta = vec![0.0; groups]; + // The interval to the right of the current site, once its backward step + // is done: its K, its length and the scale beta was divided by. Its jump + // terms and its G stay in `step` and `g_beta` until the next backward + // step overwrites them, after they are read. + let mut pending: Option<(f64, f64, f64)> = None; + let mut step = Step::new(groups); + for m in (0..sites).rev() { + let b = m / k; + if b != loaded { + let start = b * k; + let len = k.min(sites - start); + buf[..hs].copy_from_slice(&checkpoints[b * hs..(b + 1) * hs]); + for i in 1..len { + let (done, rest) = buf.split_at_mut(i * hs); + e.forward(start + i, Some(&done[(i - 1) * hs..]), &mut rest[..hs]); + } + loaded = b; + } + let alpha = &buf[(m - b * k) * hs..(m - b * k + 1) * hs]; + + // The posterior at m. + post.iter_mut().for_each(|p| *p = 0.0); + s_alpha.iter_mut().for_each(|s| *s = 0.0); + let mut mism = 0.0; + for h in 0..hs { + let w = alpha[h] * beta[h]; + post[group[h]] += w; + s_alpha[group[h]] += alpha[h]; + if panel.allele(m, h) != target.get(m) { + mism += w; + } + } + let tot: f64 = post.iter().sum(); + for (a, p) in post.iter_mut().enumerate() { + *p /= tot; + stats.ancestry[a] += *p; + } + posterior[m * groups..(m + 1) * groups].copy_from_slice(&post); + stats.sites += 1.0; + stats.mismatches += mism / tot; + + // The interval from m to m+1: its expected events and jumps. + if let Some((kk, d, scale)) = pending.take() { + // The sum over both ends of alpha_m P e beta_{m+1}. + let z = scale * tot; + stats.events += kk / z; + for a in 0..groups { + stats.jumps[a] += step.jump[a] * s_alpha[a] * g_beta[a] / z; + stats.exposure[a] += d * post[a]; + } + stats.morgans += d; + } + + // The backward step from m to m-1. + if m > 0 { + let d = (cm[m] - cm[m - 1]) / 100.0; + step.set(params, &sizes, d); + g_beta.iter_mut().for_each(|g| *g = 0.0); + for (h, bh) in beta.iter_mut().enumerate() { + *bh *= e.emission(m, h); + g_beta[group[h]] += *bh; + } + let kk: f64 = (0..groups).map(|a| step.enter[a] * g_beta[a]).sum(); + for (h, bh) in beta.iter_mut().enumerate() { + let a = group[h]; + *bh = step.stay[a] * *bh + step.jump[a] * g_beta[a] + kk; + } + let scale: f64 = beta.iter().sum(); + beta.iter_mut().for_each(|bh| *bh /= scale); + pending = Some((kk, d, scale)); + } + } + Fb { posterior, stats } +} diff --git a/rust/crates/og-admix/tests/anc_paint_engine.rs b/rust/crates/og-admix/tests/anc_paint_engine.rs new file mode 100644 index 000000000..af3b9052a --- /dev/null +++ b/rust/crates/og-admix/tests/anc_paint_engine.rs @@ -0,0 +1,647 @@ +//! Truth tests of the painting engine (`og_admix::paint`): +//! +//! - a two-group chromosome of 2,000 sites with one breakpoint is painted +//! with the breakpoint within 0.5 cM and a bp accuracy of at least 0.98, +//! and the same check fails when the emission is set to 0.5; +//! - forward-backward equals a brute-force O(H^2) model on 30 sites and 12 +//! haplotypes within 1e-9, and the checkpointed pass equals the one that +//! keeps every site within 1e-12; +//! - the peak memory of a 22-chromosome painting stays under 1 GB, and the +//! checkpoints keep a long chromosome far below what full storage takes. +//! The 1 GB check is a smoke check: this genome peaks far under it, so it +//! cannot go red at this size. The memory evidence is the long-chromosome +//! test, whose planted-red run (full storage) does go red; +//! - two runs, on 1 and on 4 threads, give the same bytes. +//! +//! Memory is the resident memory Linux reports (/proc/self/status); on +//! another system those two checks only run the painting. +//! +//! The simulator of `og ancestry-fine simulate` writes unphased genotypes, +//! and the engine paints phased haplotypes, so these tests build their +//! phased haplotypes with the same RNG and map. + +use og_admix::map::GeneticMap; +use og_admix::paint::{ + Bits, ChromInput, Options, Params, RefPanel, checkpoint_block, forward_backward, paint, + write_params, +}; +use og_admix::panel::words; +use og_admix::rng::Rng; +use std::sync::Mutex; + +/// The tests run one at a time, so a peak belongs to one test. +static ONE_AT_A_TIME: Mutex<()> = Mutex::new(()); + +fn lock() -> std::sync::MutexGuard<'static, ()> { + ONE_AT_A_TIME.lock().unwrap_or_else(|e| e.into_inner()) +} + +/// A line `: N kB` of /proc/self/status, in bytes. +#[cfg(target_os = "linux")] +fn status_bytes(key: &str) -> usize { + let text = std::fs::read_to_string("/proc/self/status").expect("/proc/self/status"); + let line = text + .lines() + .find(|l| l.starts_with(key)) + .unwrap_or_else(|| panic!("no {key} in /proc/self/status")); + let kb: usize = line[key.len()..] + .trim() + .trim_end_matches("kB") + .trim() + .parse() + .expect("a number of kB"); + kb * 1024 +} + +/// The peak resident memory of the process while `f` runs, and how far it +/// rose above the resident memory before (Linux: VmHWM of +/// /proc/self/status, reset through /proc/self/clear_refs). `None` on a +/// system without them; CI runs on Linux, where they must work. +fn peak_of(f: impl FnOnce() -> T) -> (T, Option<(usize, usize)>) { + #[cfg(target_os = "linux")] + { + std::fs::write("/proc/self/clear_refs", "5").expect("reset the peak RSS"); + let before = status_bytes("VmRSS:"); + let out = f(); + let peak = status_bytes("VmHWM:"); + (out, Some((peak, peak.saturating_sub(before)))) + } + #[cfg(not(target_os = "linux"))] + { + eprintln!("no /proc on this system: memory not measured"); + (f(), None) + } +} + +const PLANTED: bool = cfg!(feature = "planted-red"); + +/// A haplotype made of pieces of `founders`, switching to another founder +/// at `switch_per_site` per site, with each allele flipped at `noise`. +fn mosaic(rng: &mut Rng, founders: &[Vec], switch_per_site: f64, noise: f64) -> Vec { + let sites = founders[0].len(); + let mut f = rng.below(founders.len() as u64) as usize; + (0..sites) + .map(|m| { + if rng.uniform() < switch_per_site { + f = rng.below(founders.len() as u64) as usize; + } + founders[f][m] ^ u8::from(rng.uniform() < noise) + }) + .collect() +} + +/// A simulated population: `groups` groups of `founders` founder +/// haplotypes each, at `sites` sites, whose allele frequencies drift apart +/// from a shared one by up to 0.25. +fn founders(rng: &mut Rng, groups: usize, founders: usize, sites: usize) -> Vec>> { + let base: Vec = (0..sites).map(|_| 0.1 + 0.8 * rng.uniform()).collect(); + (0..groups) + .map(|_| { + let freq: Vec = base + .iter() + .map(|p| (p + 0.5 * (rng.uniform() - 0.5)).clamp(0.02, 0.98)) + .collect(); + (0..founders) + .map(|_| freq.iter().map(|&p| u8::from(rng.uniform() < p)).collect()) + .collect() + }) + .collect() +} + +/// A reference panel of `per_group` mosaic haplotypes of each group. +fn panel_of(rng: &mut Rng, pop: &[Vec>], per_group: usize) -> RefPanel { + let sites = pop[0][0].len(); + let haps: Vec<(usize, Vec)> = pop + .iter() + .enumerate() + .flat_map(|(g, f)| { + (0..per_group) + .map(|_| (g, mosaic(rng, f, 0.01, 0.005))) + .collect::>() + }) + .collect(); + let mut panel = RefPanel::new(haps.iter().map(|(g, _)| *g).collect(), pop.len()).unwrap(); + let mut row = vec![0u64; words(haps.len())]; + for m in 0..sites { + row.iter_mut().for_each(|w| *w = 0); + for (h, (_, a)) in haps.iter().enumerate() { + row[h / 64] |= u64::from(a[m]) << (h % 64); + } + panel.push_site(&row); + } + panel +} + +/// cM of each site of a chromosome of `sites` sites 1 kb apart, through +/// a map of 1 cM per Mb. +fn map_cm(sites: usize) -> Vec { + let map = GeneticMap::from_markers(vec![(0, 0.0), (1_000_000_000, 1000.0)]).unwrap(); + (0..sites) + .map(|m| map.cm_at(1_000 * (m as i64 + 1))) + .collect() +} + +// ---- Truth: one breakpoint ---- + +const SITES: usize = 2_000; +const BREAK: usize = 1_000; + +struct Truth { + chrom: ChromInput, + /// The true group of each site, per haplotype. + truth: [Vec; 2], +} + +/// Two groups A (0) and B (1). Haplotype 0 copies A up to site 1,000 and B +/// after; haplotype 1 is B throughout. +fn one_breakpoint() -> Truth { + let mut rng = Rng::stream(20261119, "anc-paint-engine/one-breakpoint"); + let pop = founders(&mut rng, 2, 4, SITES); + let panel = panel_of(&mut rng, &pop, 30); + let a = mosaic(&mut rng, &pop[0], 0.01, 0.005); + let b = mosaic(&mut rng, &pop[1], 0.01, 0.005); + let hap0: Vec = (0..SITES) + .map(|m| if m < BREAK { a[m] } else { b[m] }) + .collect(); + let hap1 = mosaic(&mut rng, &pop[1], 0.01, 0.005); + Truth { + chrom: ChromInput { + name: "chr1".into(), + cm: map_cm(SITES), + panel, + targets: vec![Bits::from_alleles(&hap0), Bits::from_alleles(&hap1)], + }, + truth: [ + (0..SITES).map(|m| usize::from(m >= BREAK)).collect(), + vec![1; SITES], + ], + } +} + +/// The fixture Q of the continental projection: a quarter A. +fn fixture_q() -> Vec { + vec![0.25, 0.75] +} + +/// Paints the truth chromosome from `start` with `rounds` EM rounds and +/// checks the result: bp accuracy at least 0.98 and a called breakpoint +/// within 0.5 cM of the true one. +fn paint_and_score(t: &Truth, start: Params, rounds: usize) -> Result<(), String> { + let p = paint( + std::slice::from_ref(&t.chrom), + start, + &Options { threads: 2, rounds }, + ) + .map_err(|e| e.0)?; + let pos = |m: usize| 1_000 * (m as u64 + 1); + let (mut right, mut all) = (0u64, 0u64); + for (h, hap) in p.chroms[0].haplotypes.iter().enumerate() { + for m in 0..SITES - 1 { + let bp = pos(m + 1) - pos(m); + all += bp; + if hap.calls[m] == t.truth[h][m] { + right += bp; + } + } + } + let accuracy = right as f64 / all as f64; + let calls = &p.chroms[0].haplotypes[0].calls; + let breaks: Vec = (1..SITES) + .filter(|&m| calls[m] != calls[m - 1]) + .map(|m| (t.chrom.cm[m - 1] + t.chrom.cm[m]) / 2.0) + .collect(); + let true_cm = (t.chrom.cm[BREAK - 1] + t.chrom.cm[BREAK]) / 2.0; + let nearest = breaks + .iter() + .map(|b| (b - true_cm).abs()) + .fold(f64::INFINITY, f64::min); + eprintln!( + "bp accuracy {accuracy}, nearest called breakpoint {nearest} cM off, {} EM rounds, T {}, epsilon {}, mu {:?}", + p.rounds, p.params.generations, p.params.epsilon, p.params.mu + ); + if accuracy < 0.98 { + return Err(format!("bp accuracy {accuracy}, below 0.98")); + } + if nearest > 0.5 { + return Err(format!( + "no called breakpoint within 0.5 cM of {true_cm} cM (called: {breaks:?})" + )); + } + Ok(()) +} + +#[test] +fn paints_one_breakpoint_within_half_a_cm() { + let _g = lock(); + let t = one_breakpoint(); + let mut start = Params::initial( + fixture_q(), + t.chrom.panel.sizes(), + og_admix::paint::DEFAULT_NE, + ); + if PLANTED { + // The red control: an emission that says nothing. + start.epsilon = 0.5; + } + let rounds = if PLANTED { 0 } else { 5 }; + paint_and_score(&t, start, rounds).unwrap(); +} + +#[test] +fn an_emission_of_one_half_fails_the_breakpoint_check() { + let _g = lock(); + let t = one_breakpoint(); + let mut start = Params::initial( + fixture_q(), + t.chrom.panel.sizes(), + og_admix::paint::DEFAULT_NE, + ); + start.epsilon = 0.5; + let got = paint_and_score(&t, start, 0); + assert!(got.is_err(), "the check passed with no information"); +} + +// ---- Exactness: brute force and checkpoints ---- + +/// A small random case: groups of 5, 4 and 3 haplotypes, `sites` sites at +/// uneven distances (some 0), and parameters where every term matters. +fn small_case(seed: u64, sites: usize, sizes: &[usize]) -> (RefPanel, Vec, Bits, Params) { + let mut rng = Rng::new(seed); + let group: Vec = sizes + .iter() + .enumerate() + .flat_map(|(g, &n)| std::iter::repeat_n(g, n)) + .collect(); + // Interleave the groups, so a group is not one run of haplotypes. + let mut order: Vec = (0..group.len()).collect(); + for i in (1..order.len()).rev() { + order.swap(i, rng.below(i as u64 + 1) as usize); + } + let group: Vec = order.iter().map(|&i| group[i]).collect(); + let hs = group.len(); + let mut panel = RefPanel::new(group, sizes.len()).unwrap(); + let mut row = vec![0u64; words(hs)]; + for _ in 0..sites { + row.iter_mut().for_each(|w| *w = 0); + for h in 0..hs { + row[h / 64] |= u64::from(rng.uniform() < 0.4) << (h % 64); + } + panel.push_site(&row); + } + let mut cm = vec![0.0]; + for m in 1..sites { + let step = if m % 7 == 3 { 0.0 } else { 1.2 * rng.uniform() }; + cm.push(cm[m - 1] + step); + } + let target = Bits::from_alleles( + &(0..sites) + .map(|_| u8::from(rng.uniform() < 0.5)) + .collect::>(), + ); + let mut mu: Vec = sizes.iter().map(|_| 0.2 + rng.uniform()).collect(); + let total: f64 = mu.iter().sum(); + mu.iter_mut().for_each(|x| *x /= total); + let params = Params { + mu, + generations: 40.0, + epsilon: 0.07, + rho: sizes.iter().map(|_| 20.0 + 300.0 * rng.uniform()).collect(), + }; + (panel, cm, target, params) +} + +/// The same model with its full H x H transition matrix: the group +/// posteriors per site, the log-likelihood and the expected events and +/// jumps. +struct Brute { + posterior: Vec, + loglik: f64, + events: f64, + jumps: Vec, +} + +// Written index by index, as the equations read. +#[allow(clippy::needless_range_loop)] +fn brute_force(panel: &RefPanel, cm: &[f64], target: &Bits, p: &Params) -> Brute { + let hs = panel.haplotypes(); + let a_n = panel.groups(); + let sites = panel.sites(); + let g = |h: usize| panel.group_of(h); + let n = |a: usize| panel.sizes()[a] as f64; + let e = |m: usize, h: usize| { + if panel.allele(m, h) == target.get(m) { + 1.0 - p.epsilon + } else { + p.epsilon + } + }; + // trans[m][i][j], with the event and jump parts apart. + let parts = |m: usize| { + let d = (cm[m] - cm[m - 1]) / 100.0; + let pt = 1.0 - (-p.generations * d).exp(); + let mut full = vec![vec![0.0; hs]; hs]; + let mut event = vec![vec![0.0; hs]; hs]; + let mut jump = vec![vec![0.0; hs]; hs]; + for i in 0..hs { + for j in 0..hs { + let (a, b) = (g(i), g(j)); + let pr = 1.0 - (-p.rho[a] * d).exp(); + let ev = pt * p.mu[b] / n(b); + let ju = if a == b { (1.0 - pt) * pr / n(a) } else { 0.0 }; + let st = if i == j { (1.0 - pt) * (1.0 - pr) } else { 0.0 }; + event[i][j] = ev; + jump[i][j] = ju; + full[i][j] = ev + ju + st; + } + } + (full, event, jump) + }; + let mut alpha = vec![vec![0.0; hs]; sites]; + let mut loglik = 0.0; + for h in 0..hs { + alpha[0][h] = p.mu[g(h)] / n(g(h)) * e(0, h); + } + let c: f64 = alpha[0].iter().sum(); + alpha[0].iter_mut().for_each(|x| *x /= c); + loglik += c.ln(); + for m in 1..sites { + let (full, _, _) = parts(m); + for j in 0..hs { + alpha[m][j] = (0..hs).map(|i| alpha[m - 1][i] * full[i][j]).sum::() * e(m, j); + } + let c: f64 = alpha[m].iter().sum(); + alpha[m].iter_mut().for_each(|x| *x /= c); + loglik += c.ln(); + } + let mut beta = vec![vec![1.0; hs]; sites]; + for m in (0..sites - 1).rev() { + let (full, _, _) = parts(m + 1); + for i in 0..hs { + beta[m][i] = (0..hs) + .map(|j| full[i][j] * e(m + 1, j) * beta[m + 1][j]) + .sum(); + } + let c: f64 = beta[m].iter().sum(); + beta[m].iter_mut().for_each(|x| *x /= c); + } + let mut posterior = vec![0.0; sites * a_n]; + for m in 0..sites { + let tot: f64 = (0..hs).map(|h| alpha[m][h] * beta[m][h]).sum(); + for h in 0..hs { + posterior[m * a_n + g(h)] += alpha[m][h] * beta[m][h] / tot; + } + } + let (mut events, mut jumps) = (0.0, vec![0.0; a_n]); + for m in 1..sites { + let (full, event, jump) = parts(m); + let w = + |i: usize, j: usize, t: &[Vec]| alpha[m - 1][i] * t[i][j] * e(m, j) * beta[m][j]; + let mut z = 0.0; + for i in 0..hs { + for j in 0..hs { + z += w(i, j, &full); + } + } + for i in 0..hs { + for j in 0..hs { + events += w(i, j, &event) / z; + jumps[g(i)] += w(i, j, &jump) / z; + } + } + } + Brute { + posterior, + loglik, + events, + jumps, + } +} + +#[test] +fn forward_backward_equals_the_brute_force_model() { + let _g = lock(); + for seed in [1u64, 2, 3] { + let (panel, cm, target, params) = small_case(seed, 30, &[5, 4, 3]); + assert_eq!(panel.haplotypes(), 12); + let want = brute_force(&panel, &cm, &target, ¶ms); + let mut block = checkpoint_block(30); + if PLANTED { + // The red control: the engine with another model. + block = 30; + } + let mut model = params.clone(); + if PLANTED { + model.rho[0] *= 1.01; + } + let got = forward_backward(&panel, &cm, &target, &model, block); + for (i, (x, y)) in got.posterior.iter().zip(&want.posterior).enumerate() { + assert!( + (x - y).abs() <= 1e-9, + "seed {seed}: posterior {i}: {x} against the brute force {y}" + ); + } + assert!( + (got.stats.loglik - want.loglik).abs() <= 1e-9, + "seed {seed}: loglik {} against {}", + got.stats.loglik, + want.loglik + ); + assert!( + (got.stats.events - want.events).abs() <= 1e-9, + "seed {seed}: events {} against {}", + got.stats.events, + want.events + ); + for a in 0..3 { + assert!( + (got.stats.jumps[a] - want.jumps[a]).abs() <= 1e-9, + "seed {seed}: jumps of group {a}: {} against {}", + got.stats.jumps[a], + want.jumps[a] + ); + } + } +} + +#[test] +fn checkpoints_give_what_full_storage_gives() { + let _g = lock(); + let (panel, cm, target, params) = small_case(7, 500, &[20, 12, 8]); + let full = forward_backward(&panel, &cm, &target, ¶ms, 500); + for block in [checkpoint_block(500), 1, 7, 64, 499] { + let block = if PLANTED { block + 1 } else { block }; + let got = forward_backward(&panel, &cm, &target, ¶ms, block); + let mut model = params.clone(); + if PLANTED { + model.epsilon += 1e-6; + } + let got = if PLANTED { + forward_backward(&panel, &cm, &target, &model, block) + } else { + got + }; + for (i, (x, y)) in got.posterior.iter().zip(&full.posterior).enumerate() { + assert!( + (x - y).abs() <= 1e-12, + "block {block}: posterior {i}: {x} against {y}" + ); + } + assert!((got.stats.loglik - full.stats.loglik).abs() <= 1e-12); + assert!((got.stats.events - full.stats.events).abs() <= 1e-12); + assert!((got.stats.mismatches - full.stats.mismatches).abs() <= 1e-12); + } +} + +// ---- Memory and determinism ---- + +/// A genome of 22 chromosomes, three groups of 40 reference haplotypes and +/// one target person. +fn genome() -> Vec { + (1..=22) + .map(|c| { + let mut rng = Rng::stream(20261119, &format!("anc-paint-engine/chr{c}")); + let sites = 600 + 20 * c; + let pop = founders(&mut rng, 3, 4, sites); + let panel = panel_of(&mut rng, &pop, 40); + let a = mosaic(&mut rng, &pop[c % 3], 0.01, 0.005); + let b = mosaic(&mut rng, &pop[(c + 1) % 3], 0.01, 0.005); + let cut = sites / 3; + let hap0: Vec = (0..sites) + .map(|m| if m < cut { a[m] } else { b[m] }) + .collect(); + let hap1 = mosaic(&mut rng, &pop[(c + 2) % 3], 0.01, 0.005); + ChromInput { + name: format!("chr{c}"), + cm: map_cm(sites), + panel, + targets: vec![Bits::from_alleles(&hap0), Bits::from_alleles(&hap1)], + } + }) + .collect() +} + +/// Every byte of a painting: params.tsv, then each haplotype's posteriors +/// and calls. +fn bytes(chroms: &[ChromInput], threads: usize) -> Vec { + let start = Params::initial( + vec![0.3, 0.3, 0.4], + chroms[0].panel.sizes(), + og_admix::paint::DEFAULT_NE, + ); + let p = paint(chroms, start, &Options { threads, rounds: 5 }).unwrap(); + let mut out = Vec::new(); + write_params(&mut out, &p, &["A".into(), "B".into(), "C".into()]).unwrap(); + for c in &p.chroms { + out.extend_from_slice(c.name.as_bytes()); + for h in &c.haplotypes { + for x in &h.posterior { + out.extend_from_slice(&x.to_le_bytes()); + } + out.extend(h.calls.iter().map(|&a| a as u8)); + } + } + out +} + +/// The 1 GB bound is a smoke check (this genome peaks at a few MB); the +/// memory evidence is [`checkpoints_keep_a_long_chromosome_small`]. +#[test] +fn a_22_chromosome_painting_stays_under_1_gb_and_repeats_byte_for_byte() { + let _g = lock(); + let chroms = genome(); + let (one, peak) = peak_of(|| bytes(&chroms, 1)); + if let Some((peak, _)) = peak { + eprintln!("peak resident memory {peak} bytes"); + assert!(peak < 1 << 30, "peak {peak} bytes, 1 GB or more"); + } + let four = bytes(&chroms, 4); + let mut again = bytes(&chroms, 4); + if PLANTED { + // The red control: one bit of one posterior differs. + let last = again.len() - 1; + again[last] ^= 1; + } + assert!(one == four, "1 and 4 threads gave different bytes"); + assert!(four == again, "two runs gave different bytes"); + let text = + String::from_utf8_lossy(&one[..one.iter().position(|&b| b == b'c').unwrap()]).into_owned(); + assert!( + text.starts_with("#parameter\tgroup\tvalue\nT\t.\t"), + "{text}" + ); +} + +#[test] +fn checkpoints_keep_a_long_chromosome_small() { + let _g = lock(); + // 40,000 sites and 400 haplotypes: keeping every site's forward values + // takes 40,000 x 400 x 8 = 128 MB. + let (panel, cm, target, params) = small_case(11, 40_000, &[150, 150, 100]); + let full_alpha = 40_000 * 400 * 8; + let bound = full_alpha / 16; + let block = if PLANTED { + 40_000 + } else { + checkpoint_block(40_000) + }; + let (_, peak) = peak_of(|| forward_backward(&panel, &cm, &target, ¶ms, block)); + let Some((_, rise)) = peak else { return }; + assert!( + rise < bound, + "memory rose {rise} bytes with checkpoints, not below {bound}" + ); + // The control: keeping every site goes over the bound. + let (_, full) = peak_of(|| forward_backward(&panel, &cm, &target, ¶ms, 40_000)); + let (_, full_rise) = full.expect("measured above"); + eprintln!("memory rose {rise} bytes with checkpoints, {full_rise} keeping every site"); + assert!( + full_rise > bound, + "full storage rose {full_rise} bytes, the bound {bound} would not see it" + ); +} + +#[test] +fn bad_inputs_stop_with_a_reason() { + let _g = lock(); + let t = one_breakpoint(); + let ok = Params::initial(fixture_q(), t.chrom.panel.sizes(), 10_000.0); + let run = |c: &ChromInput, p: Params, threads: usize| { + paint(std::slice::from_ref(c), p, &Options { threads, rounds: 0 }) + .map(|_| ()) + .map_err(|e| e.0) + }; + let mut bad = ok.clone(); + bad.mu = vec![0.5, 0.6]; + assert!(run(&t.chrom, bad, 1).unwrap_err().contains("sum to")); + let mut bad = ok.clone(); + bad.epsilon = 0.6; + assert!(run(&t.chrom, bad, 1).unwrap_err().contains("epsilon")); + let mut c = t.chrom.clone(); + c.cm[5] = c.cm[4] - 1.0; + assert!( + run(&c, ok.clone(), 1) + .unwrap_err() + .contains("never go down") + ); + let mut c = t.chrom.clone(); + c.targets[1] = Bits::from_alleles(&[0, 1]); + assert!( + run(&c, ok.clone(), 1) + .unwrap_err() + .contains("target haplotype 1") + ); + let mut c = t.chrom.clone(); + c.targets.clear(); + assert!( + run(&c, ok.clone(), 1) + .unwrap_err() + .contains("no target haplotype") + ); + assert!(run(&t.chrom, ok, 0).unwrap_err().contains("thread")); + assert!( + RefPanel::new(vec![0, 0, 2], 3) + .unwrap_err() + .0 + .contains("group 1") + ); +} diff --git a/rust/crates/og-chip/src/report.rs b/rust/crates/og-chip/src/report.rs index 7027aa31d..b6a7f58bf 100644 --- a/rust/crates/og-chip/src/report.rs +++ b/rust/crates/og-chip/src/report.rs @@ -10,10 +10,14 @@ //! //! Statuses, in the order they are tested: //! - `likely_germline`: VAF [`GERMLINE_VAF`] or more (an inherited variant -//! sits near 50% or 100%, and a tumour-only call cannot tell); +//! sits near 50% or 100%, and a tumour-only call cannot tell it from a +//! large clone); //! - `filtered`: FilterMutectCalls did not pass it; //! - `low_support`: fewer than [`MIN_ALT_READS`] reads with the change; -//! - `chip`: in the table's classes; +//! - `low_vaf`: VAF under [`CHIP_MIN_VAF`], the 2% that defines CHIP; +//! - `chip`: in the table's classes. The note says it is a possible finding, +//! not a diagnosis, and adds a germline-fit sentence when its reads fit an +//! inherited heterozygous variant ([`fits_inherited`]); //! - `other_change`: a protein change outside them. //! //! A base counts once per gene, even when the depth file lists it twice. @@ -39,8 +43,10 @@ //! [`CALLABLE_DEPTH`] reads or more, and the share where a clone at the //! stated limit shows its reads. //! -//! The calls table is the Python's, byte for byte; the depth table and the -//! summary line differ on purpose since the per-base limit (issue #411). +//! The calls table differs from the Python's on purpose since issue #411: +//! the 2% floor, the notes of `chip` and `likely_germline` rows, and the +//! ASXL1 row of the table. The depth table and the summary line differ on +//! purpose since the per-base limit. use crate::binom::{detection_limit_over, finite_mean, readable_at}; use crate::prepare::{attr, columns}; @@ -55,8 +61,42 @@ use std::collections::{BTreeSet, HashMap}; /// At or above this VAF a call is read as a possible inherited variant. pub const GERMLINE_VAF: f64 = 0.35; -/// CHIP is defined from a VAF of 2% (Steensma et al. 2015, PMID 25931582). +/// CHIP is defined from a VAF of 2% (Steensma et al. 2015, PMID 25931582): +/// a call under it is `low_vaf`, not counted. pub const CHIP_MIN_VAF: f64 = 0.02; +/// A `chip` call whose alt reads are this likely or more under an inherited +/// heterozygous variant (one-sided, `P(X <= alt)` with `X ~ Binomial(depth, +/// 0.5)`) gets the germline-fit note: 9 or 10 of 30 reads fit, 6 of 46 do +/// not. +pub const GERMLINE_FIT_P: f64 = 0.01; +/// What a `chip` row's note starts with: the step finds a possible clone, +/// it does not diagnose CHIP. +pub const CHIP_LABEL: &str = "possible clonal haematopoiesis (not a diagnosis)"; + +/// `P(X <= alt)` for `X ~ Binomial(depth, 0.5)`, summed in log space so a +/// deep base neither overflows nor underflows. 1 when `alt >= depth`. +pub fn het_lower_tail(alt: u64, depth: u64) -> f64 { + if alt >= depth { + return 1.0; + } + let n = depth as f64; + // ln P(X = i), from ln P(X = 0) = n ln(1/2) by the ratio (n - i) / (i + 1). + let mut l = n * 0.5f64.ln(); + let mut logs = Vec::with_capacity(alt as usize + 1); + for i in 0..=alt { + logs.push(l); + l += ((n - i as f64) / (i as f64 + 1.0)).ln(); + } + let top = logs.iter().copied().fold(f64::NEG_INFINITY, f64::max); + let sum: f64 = logs.iter().map(|x| (x - top).exp()).sum(); + (top + sum.ln()).exp().min(1.0) +} + +/// Whether `alt` of `depth` reads fit an inherited heterozygous variant: +/// [`het_lower_tail`] at [`GERMLINE_FIT_P`] or more. +pub fn fits_inherited(alt: u64, depth: u64) -> bool { + depth > 0 && het_lower_tail(alt, depth) >= GERMLINE_FIT_P +} /// The calls table's columns. pub const OUT_COLUMNS: [&str; 15] = [ @@ -427,7 +467,7 @@ pub fn classify( ( "likely_germline", format!( - "VAF {}: near an inherited 50% or 100%, not counted", + "VAF {}: at or above the 35% cut, where an inherited variant (near 50% or 100%) and a large clone look the same without a matched normal sample; not counted", fixed(v, 2) ), ) @@ -438,8 +478,27 @@ pub fn classify( "low_support", format!("{alt_reads} reads with the change, under {MIN_ALT_READS}"), ) + } else if let Some(v) = vaf.filter(|v| *v < CHIP_MIN_VAF) { + ( + "low_vaf", + format!( + "VAF {}: under the 2% VAF that defines CHIP, not counted", + fixed(v, 3) + ), + ) } else if !cls.is_empty() { - ("chip", why) + let mut note = format!("{CHIP_LABEL}: {why}"); + // The reads the table shows: alt_reads of the depth column. + if let Some(d) = depth.filter(|d| d.is_finite() && *d >= 1.0) + && alt_reads >= 0 + && fits_inherited(alt_reads as u64, d as u64) + { + note.push_str(&format!( + "; {alt_reads} of {} reads also fit an inherited heterozygous variant", + d as u64 + )); + } + ("chip", note) } else { ("other_change", why) }; @@ -834,10 +893,22 @@ pub fn report(files: &Files, sample: &str) -> Result { write_atomic(&files.out, tsv(&OUT_COLUMNS, &rows).as_bytes())?; write_atomic(&files.depth_out, tsv(&DEPTH_COLUMNS, &depth).as_bytes())?; let n = rows.iter().filter(|r| r[12] == "chip").count(); + let fit = rows + .iter() + .filter(|r| r[12] == "chip" && r[14].contains("also fit an inherited")) + .count(); let other = rows.len() - n; let s = |k: usize| if k == 1 { "" } else { "s" }; + let fit = if fit == 0 { + String::new() + } else { + format!( + "{fit} of them also fit{} an inherited variant; ", + if fit == 1 { "s" } else { "" } + ) + }; Ok(format!( - "{sample}: {n} CHIP call{} in {} genes ({other} other protein change{} listed, not counted)\n{summary}\n", + "{sample}: {n} CHIP call{} in {} genes (possible clonal haematopoiesis, not a diagnosis; {fit}{other} other protein change{} listed, not counted)\n{summary}\n", s(n), table.len(), s(other) diff --git a/rust/crates/og-chip/tests/i411_chip_classify.rs b/rust/crates/og-chip/tests/i411_chip_classify.rs new file mode 100644 index 000000000..b4c1dc92c --- /dev/null +++ b/rust/crates/og-chip/tests/i411_chip_classify.rs @@ -0,0 +1,323 @@ +//! Issue #411, the CHIP classes and statuses of `og chip report`. +//! +//! Before the fix: +//! - a call under the 2% VAF that defines CHIP still read `chip`, though +//! the step and its doc said CHIP starts at 2%; +//! - a passing call whose reads fit an inherited heterozygous variant as +//! well as a clone (10 of 30 reads, under the 35% cut) read `chip` with +//! nothing to say so, and the summary line counted it like any other; +//! - a `chip` row and the summary line named the result CHIP, a clinical +//! category that needs a blood count and a doctor, with no word that it +//! is a possible finding only; +//! - ASXL1 counted a truncating change in any exon, where the CHIP studies +//! count the ones in its last two exons (12 and 13 of the MANE Select +//! transcript). + +use std::collections::HashMap; +use std::fs; +use std::path::PathBuf; +use std::sync::atomic::{AtomicUsize, Ordering}; + +static N: AtomicUsize = AtomicUsize::new(0); + +const TABLE: &str = concat!( + env!("CARGO_MANIFEST_DIR"), + "/../../../assets/chip_genes.tsv" +); +const DNMT3A: &str = "ENST00000321117"; +const ASXL1: &str = "ENST00000375687"; +/// ASXL1's MANE Select exons in Ensembl 116 (chr20, + strand). +const ASXL1_EXONS: [(u64, u64); 13] = [ + (32_358_331, 32_358_832), + (32_366_384, 32_366_466), + (32_367_727, 32_367_729), + (32_369_015, 32_369_123), + (32_428_128, 32_428_248), + (32_428_325, 32_428_422), + (32_429_338, 32_429_431), + (32_429_901, 32_430_053), + (32_431_321, 32_431_484), + (32_431_583, 32_431_679), + (32_432_880, 32_432_985), + (32_433_284, 32_433_917), + (32_434_432, 32_439_319), +]; + +fn gff() -> String { + let mut s = "##gff-version 3\n".to_owned(); + s += "chr2\tensembl\tgene\t25234000\t25240300\t.\t-\t.\tID=gene:DNMT3A;Name=DNMT3A\n"; + s += &format!( + "chr2\tensembl\tmRNA\t25234000\t25240300\t.\t-\t.\tID=transcript:{DNMT3A};Parent=gene:DNMT3A;transcript_id={DNMT3A}\n" + ); + s += &format!( + "chr2\tensembl\texon\t25234000\t25234500\t.\t-\t.\tParent=transcript:{DNMT3A};rank=23\n###\n" + ); + s += "chr20\tensembl\tgene\t32358331\t32439319\t.\t+\t.\tID=gene:ASXL1;Name=ASXL1\n"; + s += &format!( + "chr20\tensembl\tmRNA\t32358331\t32439319\t.\t+\t.\tID=transcript:{ASXL1};Parent=gene:ASXL1;transcript_id={ASXL1}\n" + ); + for (i, (a, b)) in ASXL1_EXONS.iter().enumerate() { + s += &format!( + "chr20\tensembl\texon\t{a}\t{b}\t.\t+\t.\tParent=transcript:{ASXL1};rank={}\n", + i + 1 + ); + } + s + "###\n" +} + +/// One bcftools query line: a call with its reads. +fn line( + chrom: &str, + pos: u64, + csq: &str, + gene: &str, + tx: &str, + aa: &str, + (ad, af, dp): (&str, &str, &str), +) -> String { + format!( + "{chrom}\t{pos}\tC\tT\tPASS\t{csq}|{gene}|{tx}|protein_coding|+|{aa}|{pos}C>T\t{ad}\t{af}\t{dp}\n" + ) +} + +/// DNMT3A R882H with these reads. +fn r882(ad: &str, af: &str, dp: &str) -> String { + line( + "chr2", + 25_234_373, + "missense", + "DNMT3A", + DNMT3A, + "882R>882H", + (ad, af, dp), + ) +} + +/// `og chip report` on the calls: its stdout and its rows by column. +fn report(calls: &str) -> (String, Vec>) { + let n = N.fetch_add(1, Ordering::Relaxed); + let dir: PathBuf = + std::env::temp_dir().join(format!("og-chip-classify-{}-{n}", std::process::id())); + let _ = fs::remove_dir_all(&dir); + fs::create_dir_all(&dir).unwrap(); + let put = |f: &str, body: &str| { + let p = dir.join(f); + fs::write(&p, body).unwrap(); + p.to_str().unwrap().to_owned() + }; + let gff = put("chip.gff3", &gff()); + let bed = put( + "chip.bed", + "chr2\t25233990\t25234510\tDNMT3A\nchr20\t32434421\t32439319\tASXL1\n", + ); + let calls = put("calls.tsv", calls); + let depth = put("depth.tsv", ""); + let out = dir.join("S_chip.tsv").to_str().unwrap().to_owned(); + let dout = dir.join("S_chip_depth.tsv").to_str().unwrap().to_owned(); + let args: Vec = [ + "--genes", + TABLE, + "--gff", + &gff, + "--bed", + &bed, + "--calls", + &calls, + "--depth", + &depth, + "--sample", + "S", + "--out", + &out, + "--depth-out", + &dout, + ] + .iter() + .map(|s| (*s).to_owned()) + .collect(); + let (mut so, mut se) = (Vec::new(), Vec::new()); + let code = og_chip::cli("report", &args, &mut so, &mut se); + assert_eq!(code, 0, "{}", String::from_utf8_lossy(&se)); + let text = fs::read_to_string(&out).unwrap(); + let mut lines = text.lines(); + let head: Vec<&str> = lines.next().unwrap().split('\t').collect(); + let rows = lines + .map(|l| { + head.iter() + .zip(l.split('\t')) + .map(|(k, v)| ((*k).to_owned(), v.to_owned())) + .collect() + }) + .collect(); + let _ = fs::remove_dir_all(&dir); + (String::from_utf8(so).unwrap(), rows) +} + +fn one(calls: &str) -> HashMap { + let (_, mut rows) = report(calls); + assert_eq!(rows.len(), 1, "{rows:?}"); + rows.remove(0) +} + +#[test] +fn red_first_a_call_under_2_percent_is_not_counted() { + // 1% of 600 reads: 6 reads, enough support, but under the 2% of CHIP. + let r = one(&r882("594,6", "0.010", "600")); + assert_eq!(r["status"], "low_vaf", "{r:?}"); + assert_eq!(r["class"], "missense", "the class still says what it is"); + assert!(r["note"].contains("under the 2% VAF"), "{r:?}"); + // Just under and at the floor. + assert_eq!(one(&r882("589,11", "0.019", "600"))["status"], "low_vaf"); + assert_eq!(one(&r882("588,12", "0.020", "600"))["status"], "chip"); + // The VAF from AD when AF is missing: 10 of 1000 reads is 1%. + assert_eq!(one(&r882("990,10", ".", "1000"))["status"], "low_vaf"); + let (out, _) = report(&r882("594,6", "0.010", "600")); + assert!(out.starts_with("S: 0 CHIP calls "), "{out}"); +} + +#[test] +fn red_first_a_call_that_fits_an_inherited_variant_keeps_chip_with_a_note() { + // 10 of 30 reads: P(X <= 10) is 0.049 for a heterozygous variant. + let r = one(&r882("20,10", "0.333", "30")); + assert_eq!(r["status"], "chip", "no new status: {r:?}"); + assert!( + r["note"].contains("10 of 30 reads also fit an inherited heterozygous variant"), + "{r:?}" + ); + // 9 of 30 reads: 0.021, still a fit. + let r = one(&r882("21,9", "0.300", "30")); + assert_eq!(r["status"], "chip"); + assert!(r["note"].contains("9 of 30 reads also fit"), "{r:?}"); + // 6 of 46 reads: 0.0000009, a clone; and 8 of 40: 0.00011. + for (ad, af, dp) in [("40,6", "0.130", "46"), ("32,8", "0.200", "40")] { + let r = one(&r882(ad, af, dp)); + assert_eq!(r["status"], "chip"); + assert!(!r["note"].contains("inherited"), "{r:?}"); + } + // The summary line counts the calls that fit apart. + let calls = r882("20,10", "0.333", "30") + + &line( + "chr2", + 25_234_374, + "missense", + "DNMT3A", + DNMT3A, + "882R>882C", + ("40,6", "0.130", "46"), + ); + let (out, rows) = report(&calls); + assert_eq!(rows.len(), 2); + assert!( + out.starts_with("S: 2 CHIP calls in 13 genes (possible clonal haematopoiesis, not a diagnosis; 1 of them also fits an inherited variant; 0 other protein changes listed, not counted)\n"), + "{out}" + ); + let (out, _) = report(&r882("40,6", "0.130", "46")); + assert!( + !out.contains("fits an inherited"), + "only when one fits: {out}" + ); +} + +#[test] +fn red_first_a_chip_row_says_it_is_a_possible_finding_not_a_diagnosis() { + let r = one(&r882("40,6", "0.130", "46")); + assert_eq!(r["status"], "chip"); + assert_eq!( + r["note"], + "possible clonal haematopoiesis (not a diagnosis): hotspot R882" + ); + let (out, _) = report(&r882("40,6", "0.130", "46")); + assert!( + out.starts_with( + "S: 1 CHIP call in 13 genes (possible clonal haematopoiesis, not a diagnosis; " + ), + "{out}" + ); +} + +#[test] +fn a_call_at_35_percent_or_more_says_why_it_is_left_out() { + let r = one(&r882("20,19", "0.48", "39")); + assert_eq!(r["status"], "likely_germline"); + assert!( + r["note"].starts_with("VAF 0.48: at or above the 35% cut") + && r["note"].contains("not counted"), + "{r:?}" + ); +} + +#[test] +fn red_first_asxl1_counts_truncating_changes_in_its_last_two_exons() { + let table = fs::read_to_string(TABLE).unwrap(); + let row: Vec<&str> = table + .lines() + .find(|l| l.starts_with("ASXL1\t")) + .unwrap() + .split('\t') + .collect(); + assert_eq!(&row[1..3], ["exons:12-13", "none"], "{row:?}"); + let asxl1 = |pos: u64, csq: &str, aa: &str| { + one(&line( + "chr20", + pos, + csq, + "ASXL1", + ASXL1, + aa, + ("40,6", "0.130", "46"), + )) + }; + // G646fs (c.1934dupG), the ASXL1 hotspot, in exon 13. + let r = asxl1(32_434_638, "frameshift", "645G>645GX"); + assert_eq!( + (r["status"].as_str(), r["exon"].as_str()), + ("chip", "13"), + "{r:?}" + ); + let r = asxl1(32_433_500, "stop_gained", "500R>500*"); + assert_eq!( + (r["status"].as_str(), r["exon"].as_str()), + ("chip", "12"), + "{r:?}" + ); + // A stop in exon 5 is listed, not counted. + let r = asxl1(32_428_200, "stop_gained", "120R>120*"); + assert_eq!( + (r["status"].as_str(), r["exon"].as_str()), + ("other_change", "5"), + "{r:?}" + ); + assert!(r["note"].contains("the table counts exons 12-13"), "{r:?}"); +} + +#[test] +fn the_germline_fit_is_a_binomial_tail_at_half() { + use og_chip::report::{fits_inherited, het_lower_tail}; + let near = |a: f64, b: f64| (a - b).abs() < 1e-4; + assert!( + near(het_lower_tail(10, 30), 0.04937), + "{}", + het_lower_tail(10, 30) + ); + assert!( + near(het_lower_tail(9, 30), 0.02139), + "{}", + het_lower_tail(9, 30) + ); + assert!( + near(het_lower_tail(15, 30), 0.57223), + "{}", + het_lower_tail(15, 30) + ); + assert_eq!(het_lower_tail(30, 30), 1.0); + // Deep runs stay finite: 2^-5000 underflows a plain product. + let deep = het_lower_tail(2400, 5000); + assert!(deep.is_finite() && deep > 0.0 && deep < 0.01, "{deep}"); + assert!( + near(het_lower_tail(2500, 5000), 0.50564), + "{}", + het_lower_tail(2500, 5000) + ); + assert!(fits_inherited(10, 30) && fits_inherited(5, 20)); + assert!(!fits_inherited(6, 46) && !fits_inherited(12, 60) && !fits_inherited(0, 0)); +} diff --git a/rust/crates/og-dev/src/build/callability.rs b/rust/crates/og-dev/src/build/callability.rs index d7ce4dece..a222307e3 100644 --- a/rust/crates/og-dev/src/build/callability.rs +++ b/rust/crates/og-dev/src/build/callability.rs @@ -442,7 +442,10 @@ pub fn build(work: &Path, repo: &Path) -> Result<(String, String), BuildError> { # 'no finding' there needs a reading of its own. Step 16b measures each gene on chr1-22, X and Y; the\n\ # report lists the ones it could not read. Written by scripts/ci/build-callability.sh, which says how the\n\ # rows and the owners are chosen; rebuild it there, do not edit it by hand. start is 0-based and end\n\ - # 1-based, as in a BED file; an ALT-only gene has its ALT scaffold as chrom and '.' as start and end.\n", + # 1-based, as in a BED file; an ALT-only gene has its ALT scaffold as chrom and '.' as start and end.\n\ + # Sources and terms: GIAB CMRG v1.00 and genome stratifications v3.6, from NIST, not subject to\n\ + # US copyright (notice and changes: assets/licences/NIST-GIAB-NOTICE.txt); GENCODE 50, open\n\ + # access; HGNC ids and the NCBI GRCh38 assembly report, no restriction on use.\n", ); let _ = writeln!(text, "# {summary}."); text.push_str("gene\thgnc_id\tchrom\tstart\tend\treasons\towner\n"); @@ -584,6 +587,37 @@ mod tests { assert!(text.contains(&format!("\n# {summary}.\n"))); } + #[test] + fn the_header_names_each_source_and_its_terms() { + let dir = std::env::temp_dir().join(format!("og-callability-terms-{}", std::process::id())); + let (work, repo) = fixture(&dir); + let (text, _) = build(&work, &repo).unwrap(); + fs::remove_dir_all(&dir).unwrap(); + let header: String = text + .lines() + .take_while(|l| l.starts_with("# ")) + .map(|l| &l[2..]) + .collect::>() + .join(" "); + for want in [ + "GIAB CMRG v1.00 and genome stratifications v3.6, from NIST, not subject to US copyright", + "(notice and changes: assets/licences/NIST-GIAB-NOTICE.txt)", + "GENCODE 50, open access", + "HGNC ids and the NCBI GRCh38 assembly report, no restriction on use", + ] { + assert!( + header.contains(want), + "{want:?} not in the header: {header}" + ); + } + let notice = fs::read_to_string(concat!( + env!("CARGO_MANIFEST_DIR"), + "/../../../assets/licences/NIST-GIAB-NOTICE.txt" + )) + .unwrap(); + assert!(notice.contains("works of NIST employees are not subject to copyright protection")); + } + #[test] fn a_cmrg_gene_with_no_gencode_gene_stops_the_build() { let dir = std::env::temp_dir().join(format!("og-callability-cmrg-{}", std::process::id())); diff --git a/rust/crates/og-dev/src/build/sv_rules.rs b/rust/crates/og-dev/src/build/sv_rules.rs index 7004f02b7..c1d8e8b68 100644 --- a/rust/crates/og-dev/src/build/sv_rules.rs +++ b/rust/crates/og-dev/src/build/sv_rules.rs @@ -400,7 +400,10 @@ pub fn build(work: &Path) -> Result<(String, String), BuildError> { let mut text = String::from( "# assets/sv_rule_regions.tsv: the GRCh38 regions where og sv postfilter overrides AnnotSV's class 4\n\ # or 5. Written by scripts/ci/build-sv-rule-regions.sh, which says how each rule's rows are chosen;\n\ - # rebuild it there, do not edit it by hand. start is 0-based and end 1-based, as in a BED file.\n", + # rebuild it there, do not edit it by hand. start is 0-based and end 1-based, as in a BED file.\n\ + # Sources and terms: the TRExplorer catalog, Copyright (c) 2024 Broad Institute, MIT licence\n\ + # (assets/licences/TRExplorer-LICENSE.txt); GENCODE, open access; HGNC and the NCBI assembly\n\ + # regions, no restriction on use.\n", ); text.push_str(&format!( "# {summary}.\n#chrom\tstart\tend\trule\taction\tname\tsource\n" @@ -566,7 +569,7 @@ mod tests { fixture(&dir, false); let (text, summary) = build(&dir).unwrap(); fs::remove_dir_all(&dir).unwrap(); - let body: Vec<&str> = text.lines().skip(4).collect(); + let body: Vec<&str> = text.lines().skip_while(|l| l.starts_with("# ")).collect(); assert_eq!( body, [ @@ -587,6 +590,37 @@ mod tests { assert!(text.contains("\n# Rows: gene_alias 2, ig_tr_locus 2, mhc 1, tandem_repeat 2.\n")); } + #[test] + fn the_header_names_each_source_and_its_terms() { + let dir = std::env::temp_dir().join(format!("og-svrules-terms-{}", std::process::id())); + fixture(&dir, false); + let (text, _) = build(&dir).unwrap(); + fs::remove_dir_all(&dir).unwrap(); + let header: String = text + .lines() + .take_while(|l| l.starts_with("# ")) + .map(|l| &l[2..]) + .collect::>() + .join(" "); + for want in [ + "TRExplorer catalog, Copyright (c) 2024 Broad Institute, MIT licence", + "(assets/licences/TRExplorer-LICENSE.txt)", + "GENCODE, open access", + "HGNC and the NCBI assembly regions, no restriction on use", + ] { + assert!( + header.contains(want), + "{want:?} not in the header: {header}" + ); + } + let notice = fs::read_to_string(concat!( + env!("CARGO_MANIFEST_DIR"), + "/../../../assets/licences/TRExplorer-LICENSE.txt" + )) + .unwrap(); + assert!(notice.starts_with("MIT License\n\nCopyright (c) 2024 Broad Institute\n")); + } + #[test] fn a_par_pseudogene_keeps_its_chrx_span_whichever_record_comes_first() { let dir = std::env::temp_dir().join(format!("og-svrules-par-{}", std::process::id())); diff --git a/rust/crates/og-dev/src/contract.rs b/rust/crates/og-dev/src/contract.rs index 71e52cf3a..eb7e6e0c7 100644 --- a/rust/crates/og-dev/src/contract.rs +++ b/rust/crates/og-dev/src/contract.rs @@ -16,6 +16,12 @@ //! required columns (tsv, csv), INFO/FORMAT/FILTER fields (vcf) or //! top-level keys (json). `--observe` also lists every file under //! `DIR/S` with what it has. +//! - `--baseline FILE`: the contract of the last release, against this one +//! ([`check_baseline`]): every stable row of FILE still has a row here, +//! still stable; a stable file keeps its format, every leg that wrote it +//! and every field it required. New rows, and changes to experimental and +//! internal rows, are free. Guard's `rust` job runs it against the newest +//! 1.x release tag. //! //! Exit 0 when nothing is broken, 1 when something is (or the contract is //! malformed: `ERROR: …`), 2 on a usage error. `--repo` defaults to the @@ -44,7 +50,7 @@ use std::io::{self, BufRead, Read, Write}; use std::path::Path; use std::sync::LazyLock; -const USAGE: &str = "usage: og dev contract [--contract CONTRACT] [--repo REPO] [--static] [--outputs OUTPUTS]\n [--leg {bash,nextflow}] [--sample SAMPLE] [--observe]\n"; +const USAGE: &str = "usage: og dev contract [--contract CONTRACT] [--repo REPO] [--static] [--baseline BASELINE]\n [--outputs OUTPUTS] [--leg {bash,nextflow}] [--sample SAMPLE] [--observe]\n"; const COLUMNS: [&str; 9] = [ "kind", @@ -714,6 +720,99 @@ fn check_static(repo: &str, rows: &[Row]) -> Result, String> { Ok(problems) } +// ---------------------------------------------------------------- the release side + +/// The legs a file row's `legs` cell names. +fn legs_of(legs: &str) -> &'static [&'static str] { + match legs { + "both" => &["bash", "nextflow"], + "bash" => &["bash"], + "nextflow" => &["nextflow"], + _ => &[], + } +} + +fn required(r: &Row) -> Vec<&str> { + if r.required == "-" { + Vec::new() + } else { + r.required.split(',').collect() + } +} + +/// What `rows` broke of `base`, the contract of the last release. Every +/// stable row of the release still has a row of the same kind and name, and +/// one of them is stable. A stable file row is still written by every leg +/// that wrote it, and each stable row of it that covers one of those legs +/// keeps the format and every required field. The `step`, `process` and +/// `e2e` cells say where the code and the tests stand, not what is promised, +/// so they may change. +pub fn check_baseline(base: &[Row], rows: &[Row]) -> Vec { + let mut problems = Vec::new(); + for b in base.iter().filter(|r| r.stability == Stability::Stable) { + let k = b.kind.word(); + let same: Vec<&Row> = rows + .iter() + .filter(|r| r.kind == b.kind && r.name == b.name) + .collect(); + let Some(first) = same.first() else { + problems.push(format!( + "BREAKING: the stable {k} {} (baseline line {}) has no row in the contract: removed or renamed since the release", + b.name, b.line + )); + continue; + }; + let stable: Vec<&Row> = same + .iter() + .copied() + .filter(|r| r.stability == Stability::Stable) + .collect(); + if stable.is_empty() { + let now = match first.stability { + Stability::Experimental => "experimental", + _ => "internal", + }; + problems.push(format!( + "BREAKING: the stable {k} {} (baseline line {}) is {now} now (contract line {}): a stable row stays stable until 2.0", + b.name, b.line, first.line + )); + continue; + } + if b.kind != Kind::File { + continue; + } + let was = legs_of(&b.legs); + for leg in was { + if !stable.iter().any(|r| legs_of(&r.legs).contains(leg)) { + problems.push(format!( + "BREAKING: the stable file {} (baseline line {}, legs {}) is no longer written by the {leg} leg", + b.name, b.line, b.legs + )); + } + } + let want = required(b); + for r in stable + .iter() + .filter(|r| legs_of(&r.legs).iter().any(|l| was.contains(l))) + { + if r.format != b.format { + problems.push(format!( + "BREAKING: the stable file {} (contract line {}) is {}, it was {} at the release (baseline line {})", + r.name, r.line, r.format, b.format, b.line + )); + } + let have = required(r); + for f in want.iter().filter(|f| !have.contains(f)) { + problems.push(format!( + "BREAKING: the stable file {} (contract line {}) no longer requires {f}, which the release promised (baseline line {})", + r.name, r.line, b.line + )); + } + } + } + problems +} + // ---------------------------------------------------------------- the run side /// The lines of a plain or gzip file, invalid UTF-8 replaced. @@ -970,6 +1069,7 @@ struct Args { contract: Option, repo: Option, static_: bool, + baseline: Option, outputs: Option, leg: Option, sample: Option, @@ -998,6 +1098,7 @@ fn parse(args: &[String]) -> Result, String> { "-h" | "--help" => return Ok(None), "--contract" => a.contract = Some(value(flag)?), "--repo" => a.repo = Some(value(flag)?), + "--baseline" => a.baseline = Some(value(flag)?), "--outputs" => a.outputs = Some(value(flag)?), "--sample" => a.sample = Some(value(flag)?), "--leg" => { @@ -1015,8 +1116,8 @@ fn parse(args: &[String]) -> Result, String> { _ => return Err(format!("unrecognized arguments: {arg}")), } } - if !a.static_ && a.outputs.is_none() { - return Err("give --static or --outputs".to_owned()); + if !a.static_ && a.outputs.is_none() && a.baseline.is_none() { + return Err("give --static, --baseline or --outputs".to_owned()); } if a.outputs.is_some() && (a.leg.is_none() || a.sample.is_none()) { return Err("--outputs needs --leg and --sample".to_owned()); @@ -1068,6 +1169,31 @@ pub fn cli(args: &[String], out: &mut dyn Write, err: &mut dyn Write) -> u8 { } } } + if let Some(path) = &a.baseline { + let base = match read_contract(path) { + Ok(r) => r, + Err(e) => { + let _ = writeln!(out, "ERROR: baseline: {e}"); + return 1; + } + }; + let mut p = check_baseline(&base, &rows); + let n = base + .iter() + .filter(|r| r.stability == Stability::Stable) + .count(); + let _ = writeln!( + out, + "baseline: {n} stable rows of {path} checked, {} problems", + p.len() + ); + if n == 0 { + p.push(format!( + "the baseline {path} has no stable row: the check checked nothing" + )); + } + problems.extend(p); + } if let (Some(dir), Some(leg), Some(sample)) = (&a.outputs, &a.leg, &a.sample) { let (n, mut p) = check_outputs(&rows, dir, leg, sample, a.observe, out); let _ = writeln!( diff --git a/rust/crates/og-dev/src/demo/mod.rs b/rust/crates/og-dev/src/demo/mod.rs index 2d48168dc..f13b40f23 100644 --- a/rust/crates/og-dev/src/demo/mod.rs +++ b/rust/crates/og-dev/src/demo/mod.rs @@ -21,7 +21,8 @@ //! `og pgx cpic-report` (steps 36 and 27), `og prs table` (25), //! `og qc sample` and `og qc sex-loss` (33), `og ancestry-fine report` //! (26b), `og paraphase table` (35b), `og couple screen` (39), -//! `og traits table` (42) and `og ancient report` (44). The other tables are +//! `og traits table` (42), `og ancient report` (44) and +//! `og locityper report` (53). The other tables are //! written in their writers' columns, with the values those writers give for //! the made-up inputs named in each function. Each part lives in the file of //! its report chapter: [`qc`], [`clinical`], [`clinical_clinvar`], [`pgx`], diff --git a/rust/crates/og-dev/src/demo/pgx.rs b/rust/crates/og-dev/src/demo/pgx.rs index c00deb5ae..d196ae62a 100644 --- a/rust/crates/og-dev/src/demo/pgx.rs +++ b/rust/crates/og-dev/src/demo/pgx.rs @@ -3,7 +3,7 @@ //! step 36 passed their consensus on, step 27's CPIC tables, and the //! Locityper second opinion (step 53). -use super::{Ctx, Rng, Scratch, arg, copy, put, read, versions_env}; +use super::{Ctx, Rng, Scratch, arg, copy, put, put_gz, read, versions_env}; use pycompat::json::{self, Dump, Value}; use std::collections::HashMap; @@ -372,11 +372,11 @@ fn stale(ann: &Value, changed: &HashMap) -> bool { }) } -/// Step 53: what `og locityper report` writes for a made-up Locityper run -/// that called every locus of `assets/locityper_loci.bed` with two HPRC -/// panel haplotypes, made-up qualities and read counts, and passed the -/// authors' filter (no warning, a weighted distance under 30, few -/// unexplained reads). +/// Step 53: `og locityper report` over a made-up Locityper run that called +/// every locus of `assets/locityper_loci.bed` with two HPRC panel +/// haplotypes, made-up qualities and read counts, no warning and a small +/// weighted distance. So the HLA and KIR loci pass the authors' filter, and +/// the others (CYP2D6, FCGR) read "uncalibrated", as a real run says. pub fn locityper(ctx: &Ctx, rng: &mut Rng) -> Result<(), String> { let panel = [ "HG00438.1", @@ -386,34 +386,40 @@ pub fn locityper(ctx: &Ctx, rng: &mut Rng) -> Result<(), String> { "NA18906.1", "NA19240.2", ]; - let mut out = String::from( - "locus\tregion\tstatus\tgenotype\thaplotype_1\thaplotype_2\tquality\ttotal_reads\tunexplained_reads\tweighted_distance\twarnings\tfilter\treason\n", - ); - let bed = read(&ctx.asset("assets/locityper_loci.bed"))?; - for line in bed.lines() { + let bed = ctx.asset("assets/locityper_loci.bed"); + let tmp = Scratch::new("locityper")?; + for line in read(&bed)?.lines() { if line.trim().is_empty() || line.starts_with('#') { continue; } - let c: Vec<&str> = line.split('\t').collect(); - let [chrom, start, end, name, ..] = c[..] else { + let Some(name) = line.split('\t').nth(3) else { return Err(format!("assets/locityper_loci.bed: short row {line:?}")); }; - let start: i64 = start - .parse() - .map_err(|_| format!("assets/locityper_loci.bed: start {start:?}"))?; let haps = rng.sample_idx(panel.len(), 2); let (h1, h2) = (panel[haps[0]], panel[haps[1]]); let quality = rng.uniform(25.0, 60.0); let total = rng.int(800, 4000); let unexplained = rng.int(0, 30); let dist = rng.uniform(0.1, 3.0); - out.push_str(&format!( - "{name}\t{chrom}:{}-{end}\tcalled\t{h1},{h2}\t{h1}\t{h2}\t{quality:.1}\t{total}\t{unexplained}\t{dist:.3}\t.\tpass\t.\n", - start + 1 - )); + let locus = tmp.join(&format!("loci/{name}")); + put_gz( + &locus.join("res.json.gz"), + &format!( + "{{\"genotype\": \"{h1},{h2}\", \"quality\": {quality:.1}, \"total_reads\": {total}, \"unexpl_reads\": {unexplained}, \"weight_dist\": {dist:.3}, \"warnings\": []}}" + ), + )?; + put(&locus.join("success"), "")?; } - put( - &ctx.path(&format!("locityper/{}_locityper.tsv", ctx.sample)), - &out, - ) + let out = ctx.path(&format!("locityper/{}_locityper.tsv", ctx.sample)); + std::fs::create_dir_all(ctx.path("locityper")).map_err(|e| e.to_string())?; + ctx.og(&[ + "locityper", + "report", + "--gt-dir", + arg(&tmp.0), + "--loci", + arg(&bed), + "--out", + arg(&out), + ]) } diff --git a/rust/crates/og-dev/tests/repo.rs b/rust/crates/og-dev/tests/repo.rs index ad44bc082..48ea28761 100644 --- a/rust/crates/og-dev/tests/repo.rs +++ b/rust/crates/og-dev/tests/repo.rs @@ -14,7 +14,14 @@ //! a renamed file and an unreadable gzip are each refused and named; an //! experimental row is never enforced; an empty folder fails. //! 3. A contract with a row listed twice or a bad stability is refused. -//! 4. The report-only check passes on this checkout and names both cDNA +//! 4. Against a release's contract (`--baseline`, this checkout's standing +//! in for it): a stable output renamed in the code and in its row passes +//! the static check and fails here; a removed stable param or tool, a +//! stable row made experimental or internal, another format, a dropped +//! required column and a dropped leg each fail; a new row, a new leg, a +//! new required column, an `e2e` or `process` change and any change to +//! an experimental row pass; a baseline with no stable row fails. +//! 5. The report-only check passes on this checkout and names both cDNA //! checks; dropping a process from the report-only list fails naming //! it; a second consumer makes a process a feeder; a stale KEEP_STOP //! name fails; a `//` inside a string and a nested brace in the strategy @@ -310,6 +317,210 @@ fn contract_controls_are_refused() { } } +// ---------------------------------------------------------------- the release baseline + +/// The contract with `change` applied to its lines, the cells of each split +/// on tabs; `tag` names the copy. +fn contract_edit(tmp: &Tmp, tag: &str, change: impl Fn(&mut Vec>)) -> PathBuf { + let path = tmp.0.join(format!("{tag}.tsv")); + let mut lines: Vec> = fs::read_to_string(contract_path()) + .unwrap() + .lines() + .map(|l| l.split('\t').map(str::to_owned).collect()) + .collect(); + let before = lines.clone(); + change(&mut lines); + assert!(lines != before, "{tag}: the change changed nothing"); + let text: Vec = lines.iter().map(|c| c.join("\t")).collect(); + fs::write(&path, text.join("\n") + "\n").unwrap(); + path +} + +/// The line of `kind` row `name`. +fn row_mut<'a>(lines: &'a mut [Vec], kind: &str, name: &str) -> &'a mut Vec { + lines + .iter_mut() + .find(|c| c.len() > 1 && c[0] == kind && c[1] == name) + .unwrap_or_else(|| panic!("no {kind} row {name}")) +} + +fn drop_row(lines: &mut Vec>, kind: &str, name: &str) { + let n = lines.len(); + lines.retain(|c| !(c.len() > 1 && c[0] == kind && c[1] == name)); + assert_eq!(lines.len(), n - 1, "no {kind} row {name}"); +} + +const ROH: &str = "{sample}/roh/{sample}_roh_summary.txt"; +const HITS: &str = "{sample}/clinvar/{sample}_clinvar_hits.tsv"; + +#[test] +fn the_contract_keeps_its_own_baseline() { + let (rc, out) = contract(&["--repo", &s(&repo()), "--baseline", &s(&contract_path())]); + assert!( + rc == 0 + && has( + &out, + r"baseline: \d{2,} stable rows of .* checked, 0 problems" + ), + "{out}" + ); +} + +/// The red-first control: a stable output renamed in the code and in its row +/// in one change passes the static check, which reads only this checkout, +/// and fails against the release's contract. +#[test] +fn a_stable_output_renamed_with_its_row_fails_against_the_baseline() { + let tmp = Tmp::new("baseline-roh"); + let d = code_copy(&tmp); + edit( + &d.join("modules/local/roh/main.nf"), + "path(\"*_roh_summary.txt\")", + "path(\"*_roh_segments.txt\")", + ); + let c = contract_edit(&tmp, "renamed", |l| { + row_mut(l, "file", ROH)[1] = "{sample}/roh/{sample}_roh_segments.txt".to_owned(); + }); + let (rc, out) = contract(&["--static", "--repo", &s(&d), "--contract", &s(&c)]); + assert!(rc == 0 && out.contains(" 0 problems"), "{out}"); + let base = s(&contract_path()); + let (rc, out) = contract(&[ + "--static", + "--repo", + &s(&d), + "--contract", + &s(&c), + "--baseline", + &base, + ]); + assert!( + rc == 1 + && has( + &out, + r"FAIL BREAKING: the stable file \{sample\}/roh/\{sample\}_roh_summary\.txt \(baseline line \d+\) has no row in the contract" + ) + && out.matches("FAIL ").count() == 1, + "{out}" + ); +} + +#[test] +fn baseline_controls_are_refused() { + type Change = fn(&mut Vec>); + let cases: [(&str, Change, &str); 7] = [ + ( + "a stable param removed with its row", + |l| drop_row(l, "param", "intervals"), + r"BREAKING: the stable param intervals \(baseline line \d+\) has no row in the contract", + ), + ( + "a stable file made experimental", + |l| row_mut(l, "file", ROH)[6] = "experimental".to_owned(), + r"BREAKING: the stable file \{sample\}/roh/\{sample\}_roh_summary\.txt \(baseline line \d+\) is experimental now \(contract line \d+\)", + ), + ( + "a stable switch made internal", + |l| row_mut(l, "switch", "SKIP_TRIM")[6] = "internal".to_owned(), + r"BREAKING: the stable switch SKIP_TRIM \(baseline line \d+\) is internal now", + ), + ( + "a stable file of another format", + |l| row_mut(l, "file", ROH)[5] = "csv".to_owned(), + r"BREAKING: the stable file \{sample\}/roh/\{sample\}_roh_summary\.txt \(contract line \d+\) is csv, it was tsv at the release", + ), + ( + "a required column dropped", + |l| { + let r = row_mut(l, "file", HITS); + r[8] = r[8].replace(",clnsig,", ","); + }, + r"BREAKING: the stable file \{sample\}/clinvar/\{sample\}_clinvar_hits\.tsv \(contract line \d+\) no longer requires clnsig", + ), + ( + "a leg dropped (both to nextflow)", + |l| row_mut(l, "file", HITS)[4] = "nextflow".to_owned(), + r"BREAKING: the stable file \{sample\}/clinvar/\{sample\}_clinvar_hits\.tsv \(baseline line \d+, legs both\) is no longer written by the bash leg", + ), + ( + "a stable tool removed with its row", + |l| drop_row(l, "tool", "pharmcat"), + r"BREAKING: the stable tool pharmcat \(baseline line \d+\) has no row in the contract", + ), + ]; + let base = s(&contract_path()); + for (desc, change, want) in cases { + let tmp = Tmp::new("baseline"); + let c = contract_edit(&tmp, "changed", change); + let (rc, out) = contract(&["--contract", &s(&c), "--baseline", &base]); + assert!( + rc == 1 && has(&out, want) && out.matches("FAIL ").count() == 1, + "{desc}: rc={rc}: {out}" + ); + } +} + +#[test] +fn what_the_baseline_allows() { + type Change = fn(&mut Vec>); + let cases: [(&str, Change); 6] = [ + ("a new stable row", |l| { + l.push( + "file\t{sample}/new/{sample}_new.tsv\t-\t-\tbash\ttsv\tstable\t-\t-" + .split('\t') + .map(str::to_owned) + .collect(), + ) + }), + ("a leg added (nextflow to both)", |l| { + row_mut(l, "file", ROH)[4] = "both".to_owned() + }), + ("a new required column", |l| { + row_mut(l, "file", HITS)[8].push_str(",new_column") + }), + ("an e2e cell and a process changed", |l| { + let r = row_mut(l, "file", HITS); + r[7] = "-".to_owned(); + r[3] = "OTHER".to_owned(); + }), + ("an experimental row removed", |l| { + drop_row(l, "file", "{sample}/bloodtype/{sample}_bloodtype.tsv") + }), + ("an experimental row made stable", |l| { + row_mut(l, "file", "{sample}/bloodtype/{sample}_bloodtype.tsv")[6] = "stable".to_owned() + }), + ]; + let base = s(&contract_path()); + for (desc, change) in cases { + let tmp = Tmp::new("baseline-ok"); + let c = contract_edit(&tmp, "changed", change); + let (rc, out) = contract(&["--contract", &s(&c), "--baseline", &base]); + assert!( + rc == 0 && out.contains(" 0 problems"), + "{desc}: rc={rc}: {out}" + ); + } +} + +#[test] +fn a_baseline_that_checks_nothing_or_does_not_parse_fails() { + let tmp = Tmp::new("baseline-bad"); + let empty = tmp.0.join("empty.tsv"); + fs::write( + &empty, + "kind\tname\tstep\tprocess\tlegs\tformat\tstability\te2e\trequired\n", + ) + .unwrap(); + let (rc, out) = contract(&["--repo", &s(&repo()), "--baseline", &s(&empty)]); + assert!( + rc == 1 && out.contains("has no stable row: the check checked nothing"), + "{out}" + ); + let bad = tmp.0.join("bad.tsv"); + fs::write(&bad, "not a contract\n").unwrap(); + let (rc, out) = contract(&["--repo", &s(&repo()), "--baseline", &s(&bad)]); + assert!(rc == 1 && out.contains("ERROR: baseline: "), "{out}"); +} + #[test] fn pedigree_is_a_declared_param() { let config = fs::read_to_string(repo().join("nextflow.config")).unwrap(); diff --git a/rust/crates/og-filters/src/refblock.rs b/rust/crates/og-filters/src/refblock.rs index 69f1894e5..ad5954cc3 100644 --- a/rust/crates/og-filters/src/refblock.rs +++ b/rust/crates/og-filters/src/refblock.rs @@ -15,6 +15,13 @@ //! lowest over the span. A summary goes to stderr; exit 2 on unreadable //! input. //! +//! The same floor holds for every record the filter passes on: a reference +//! call (GT all 0, a one-base block record or a `RefCall`) with GQ below +//! `--min-gq`, or no GQ, is left out, so PharmCAT reads the position as +//! missing instead of a confident 0/0 (issue #411, pgx-07). A variant call +//! passes whatever its GQ. stderr counts them and names those at PharmCAT +//! positions. +//! //! Fixes against the Python, each with a golden in `tests/parity`: //! - when the expanded stream had a record at a filled position that was //! not a one-base reference block, the Python wrote that record and then @@ -91,6 +98,9 @@ pub struct Targets { chroms: Vec<(String, Vec)>, index: HashMap, pub count: usize, + /// Every PharmCAT position, one base or longer: its gene (`?` without + /// one). + genes: HashMap<(String, i128), String>, } impl Targets { @@ -121,6 +131,7 @@ pub fn read_positions(path: &str) -> Result { chroms: Vec::new(), index: HashMap::new(), count: 0, + genes: HashMap::new(), }; let mut number = 0; for line in lines_of(path)? { @@ -134,13 +145,18 @@ pub fn read_positions(path: &str) -> Result { continue; } let ref_ = c[3]; - if crate::chars(ref_) == 1 && c[4].split(',').all(|a| crate::chars(a) == 1) { - continue; - } let gene = c .get(7) .and_then(|info| info.split(';').find_map(|kv| kv.strip_prefix("PX="))) .unwrap_or_default(); + if let Ok(pos) = pycompat::num::parse_int(c[1]) { + t.genes + .entry((c[0].to_owned(), pos)) + .or_insert_with(|| if gene.is_empty() { "?" } else { gene }.to_owned()); + } + if crate::chars(ref_) == 1 && c[4].split(',').all(|a| crate::chars(a) == 1) { + continue; + } let start = int_at(path, number, "POS", c[1])?; let len = i128::try_from(crate::chars(ref_)).unwrap_or(i128::MAX); let target = Target { @@ -187,6 +203,26 @@ pub fn block(alt: &str, filter: &str, gt: &str, gq: Option, min_gq: i128) } } +/// Whether a record is a reference call (GT all 0, one sample) below +/// `min_gq`, or without a GQ: not confident enough to reach PharmCAT as 0/0. +/// A record without a sample column or a GT is not a reference call. +pub fn weak_reference(line: &str, min_gq: i128) -> bool { + let c: Vec<&str> = line.trim_end_matches(['\n', '\r']).split('\t').collect(); + let (Some(keys), Some(vals)) = (c.get(8), c.get(9)) else { + return false; + }; + let fmt: HashMap<&str, &str> = keys.split(':').zip(vals.split(':')).collect(); + let Some(gt) = fmt.get("GT") else { + return false; + }; + if !gt.split(['/', '|']).all(|a| a == "0") { + return false; + } + fmt.get("GQ") + .and_then(|g| pycompat::num::parse_int(g).ok()) + .is_none_or(|gq| gq < min_gq) +} + /// What the gVCF shows over one target. #[derive(Debug, Clone)] struct Coverage { @@ -360,12 +396,16 @@ struct Fill { label: String, } -/// What [`run`] wrote: the labels of the records it filled, and the -/// positions where it kept the stream's own record instead. +/// What [`run`] wrote: the labels of the records it filled, the positions +/// where it kept the stream's own record instead, and the reference calls +/// below the GQ floor it left out (how many, and the labels of those at +/// PharmCAT positions). #[derive(Debug, Default)] pub struct Outcome { pub filled: Vec, pub kept: Vec, + pub weak: usize, + pub weak_at: Vec, } /// Fills the expanded VCF from `input` into `out`. @@ -488,6 +528,15 @@ pub fn run( // kept instead of it, so one position never gets two records. continue; } + if weak_reference(&line, min_gq) { + // A reference call below the floor: left out, so PharmCAT reads + // the position as missing, as it reads a ./. block. + outcome.weak += 1; + if let Some(gene) = targets.genes.get(&(c[0].to_owned(), key.1)) { + outcome.weak_at.push(format!("{gene} {}:{}", c[0], key.1)); + } + continue; + } out.write_all(line.as_bytes()).map_err(w)?; open_line = !line.ends_with('\n'); kept_key = Some(key); @@ -529,6 +578,17 @@ pub fn cli(argv: &[String]) -> u8 { "{PREFIX}: {} of {n} PharmCAT positions longer than one base called 0/0 from reference blocks with GQ >= {min_gq}{list}; the others stay as the gVCF has them (a variant call, or missing)", o.filled.len() ); + if o.weak > 0 { + let at = if o.weak_at.is_empty() { + "; none at a PharmCAT position".to_owned() + } else { + format!("; at PharmCAT positions: {}", o.weak_at.join(", ")) + }; + eprintln!( + "{PREFIX}: {} reference calls with GQ below {min_gq} (or none) left out, so PharmCAT reads them as missing{at}", + o.weak + ); + } 0 } Err(e) => { diff --git a/rust/crates/og-filters/tests/i411_refblock_gq.rs b/rust/crates/og-filters/tests/i411_refblock_gq.rs new file mode 100644 index 000000000..734a4f44e --- /dev/null +++ b/rust/crates/og-filters/tests/i411_refblock_gq.rs @@ -0,0 +1,214 @@ +//! A low-quality reference call never reaches PharmCAT as a confident 0/0 +//! (issue #411, pgx-07; floor D10). +//! +//! Step 07 expands the gVCF's reference blocks into one record per base and +//! `og pgx refblock-fill` passes that stream on to PharmCAT. Before this fix +//! the GQ 20 floor held only for the 0/0 records the filter writes itself at +//! positions longer than one base: a one-base block, or a DeepVariant +//! `RefCall`, with GQ 5 at CYP2C19 rs4244285 (the *2 position) passed through +//! as 0/0, and PharmCAT read the sample as confidently not *2. Now every +//! reference call (GT all 0) below the floor, or without a GQ, is left out +//! of the stream, so PharmCAT reads the position as missing. A variant call +//! passes whatever its GQ: the floor is for reference calls only. + +use og_filters::refblock::{MIN_GQ, Outcome, run}; + +const HEADER: &str = "##fileformat=VCFv4.2\n\ +##INFO=\n\ +##FORMAT=\n\ +##FORMAT=\n\ +##FORMAT=\n\ +##contig=\n\ +#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT\tS1\n"; + +/// PharmCAT's positions: CYP2C19 *2 (one base) and *17 (one base), and a +/// CYP2C9 deletion (two bases), as in its positions file. +const POSITIONS: &str = "##fileformat=VCFv4.2\n\ +#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT\tPharmCAT\n\ +chr10\t94761900\trs12248560\tC\tT\t.\tPASS\tPX=CYP2C19\tGT\t0/0\n\ +chr10\t94781859\trs4244285\tG\tA\t.\tPASS\tPX=CYP2C19\tGT\t0/0\n\ +chr10\t94942205\trs1\tCT\tC\t.\tPASS\tPX=CYP2C9\tGT\t0/0\n"; + +const RS4244285: &str = "chr10\t94781859"; + +struct Run { + out: String, + outcome: Outcome, +} + +/// The verb on `records` (the gVCF's records over the region, as step 07 +/// writes them with `bcftools view -R`) and `stream` (the expanded records +/// on stdin), with `min_gq`. +fn fill(records: &str, stream: &str, min_gq: i128) -> Run { + let dir = std::env::temp_dir().join(format!( + "og-i411-refblock-gq-{}-{}", + std::process::id(), + std::thread::current() + .name() + .unwrap_or("t") + .replace("::", "-") + )); + std::fs::create_dir_all(&dir).unwrap(); + let positions = dir.join("positions.vcf"); + let gvcf = dir.join("gvcf.vcf"); + std::fs::write(&positions, POSITIONS).unwrap(); + std::fs::write(&gvcf, format!("{HEADER}{records}")).unwrap(); + let mut out = Vec::new(); + let (_, outcome) = run( + positions.to_str().unwrap(), + gvcf.to_str().unwrap(), + min_gq, + format!("{HEADER}{stream}").as_bytes(), + &mut out, + ) + .unwrap(); + std::fs::remove_dir_all(&dir).unwrap(); + Run { + out: String::from_utf8(out).unwrap(), + outcome, + } +} + +/// The one record the output holds at rs4244285, if any. +fn at_rs4244285(out: &str) -> Option { + let found: Vec<&str> = out + .lines() + .filter(|l| l.starts_with(&format!("{RS4244285}\t"))) + .collect(); + assert!(found.len() <= 1, "one record at most: {found:?}"); + found.first().map(|l| (*l).to_owned()) +} + +/// A one-base reference block over rs4244285 with `gq`: the gVCF record and +/// what `bcftools convert --gvcf2vcf | bcftools view --trim-alt-alleles` +/// makes of it. +fn one_base_block(gq: u32) -> (String, String) { + ( + format!("{RS4244285}\t.\tG\t<*>\t0\t.\tEND=94781859\tGT:GQ:MIN_DP\t0/0:{gq}:3\n"), + format!("{RS4244285}\t.\tG\t.\t0\t.\t.\tGT:GQ:MIN_DP\t0/0:{gq}:3\n"), + ) +} + +#[test] +fn red_first_a_gq_5_block_at_rs4244285_is_a_no_call() { + let (records, stream) = one_base_block(5); + let r = fill(&records, &stream, MIN_GQ); + assert_eq!( + at_rs4244285(&r.out), + None, + "a one-base block with GQ 5 at CYP2C19 rs4244285 must not reach PharmCAT as 0/0" + ); +} + +#[test] +fn a_gq_25_block_at_rs4244285_stays_0_0() { + let (records, stream) = one_base_block(25); + let r = fill(&records, &stream, MIN_GQ); + assert_eq!( + at_rs4244285(&r.out).as_deref(), + Some(stream.trim_end()), + "a block with GQ 25 is confident reference and passes unchanged" + ); + assert_eq!(r.outcome.weak, 0); + assert!(r.outcome.weak_at.is_empty()); +} + +#[test] +fn the_floor_is_d10s_20_and_follows_min_gq() { + for (gq, min_gq, kept) in [ + (20, MIN_GQ, true), + (19, MIN_GQ, false), + (25, 30, false), + (30, 30, true), + ] { + let (records, stream) = one_base_block(gq); + let r = fill(&records, &stream, min_gq); + assert_eq!( + at_rs4244285(&r.out).is_some(), + kept, + "GQ {gq} with --min-gq {min_gq}: kept {kept}" + ); + } + assert_eq!(MIN_GQ, 20, "the shared floor D10"); +} + +#[test] +fn refcall_records_take_the_same_floor() { + // DeepVariant's RefCall: a candidate it called reference, GT 0/0, its ALT + // trimmed to . by --trim-alt-alleles. + for (gq, kept) in [(8, false), (30, true)] { + let records = + format!("{RS4244285}\t.\tG\tA,<*>\t0\tRefCall\t.\tGT:GQ:MIN_DP\t0/0:{gq}:3\n"); + let stream = format!("{RS4244285}\t.\tG\t.\t0\tRefCall\t.\tGT:GQ:MIN_DP\t0/0:{gq}:3\n"); + let r = fill(&records, &stream, MIN_GQ); + assert_eq!( + at_rs4244285(&r.out).is_some(), + kept, + "a RefCall with GQ {gq}: kept {kept}" + ); + } +} + +#[test] +fn other_reference_calls_without_confidence_are_left_out() { + for (what, sample) in [ + ("haploid, GQ 5", "0:5:3"), + ("phased, GQ 5", "0|0:5:3"), + ("no GQ value", "0/0:.:3"), + ] { + let stream = format!("{RS4244285}\t.\tG\t.\t0\t.\t.\tGT:GQ:MIN_DP\t{sample}\n"); + let r = fill("", &stream, MIN_GQ); + assert_eq!(at_rs4244285(&r.out), None, "{what}: left out"); + } + let stream = format!("{RS4244285}\t.\tG\t.\t0\t.\t.\tGT:MIN_DP\t0/0:3\n"); + let r = fill("", &stream, MIN_GQ); + assert_eq!(at_rs4244285(&r.out), None, "no GQ field: left out"); +} + +#[test] +fn variant_calls_and_no_sample_lines_pass_whatever_the_gq() { + for sample in ["0/1:5:3", "1/1:3:3", "1:2:3"] { + let stream = format!("{RS4244285}\t.\tG\tA\t10\tPASS\t.\tGT:GQ:MIN_DP\t{sample}\n"); + let r = fill("", &stream, MIN_GQ); + assert_eq!( + at_rs4244285(&r.out).as_deref(), + Some(stream.trim_end()), + "a variant call {sample} passes unchanged" + ); + } +} + +#[test] +fn the_outcome_counts_them_and_names_pharmcat_positions() { + // A GQ 5 block over three bases: rs4244285 and the two after it. + let records = format!("{RS4244285}\t.\tG\t<*>\t0\t.\tEND=94781861\tGT:GQ:MIN_DP\t0/0:5:3\n"); + let stream: String = (94_781_859..=94_781_861) + .map(|p| format!("chr10\t{p}\t.\tN\t.\t0\t.\t.\tGT:GQ:MIN_DP\t0/0:5:3\n")) + .collect(); + let r = fill(&records, &stream, MIN_GQ); + assert_eq!( + r.out.lines().filter(|l| !l.starts_with('#')).count(), + 0, + "all three left out" + ); + assert_eq!(r.outcome.weak, 3); + assert_eq!(r.outcome.weak_at, vec!["CYP2C19 chr10:94781859".to_owned()]); +} + +#[test] +fn a_low_gq_block_inside_a_multi_base_span_still_fills_nothing() { + // The CYP2C9 deletion at 94942205 (CT): a GQ 5 block over both bases. No + // 0/0 is written for it, and its one-base records are left out too. + let records = "chr10\t94942200\t.\tA\t<*>\t0\t.\tEND=94942210\tGT:GQ:MIN_DP\t0/0:5:3\n"; + let stream: String = (94_942_200..=94_942_210) + .map(|p| format!("chr10\t{p}\t.\tN\t.\t0\t.\t.\tGT:GQ:MIN_DP\t0/0:5:3\n")) + .collect(); + let r = fill(records, &stream, MIN_GQ); + assert!(r.outcome.filled.is_empty(), "nothing filled"); + assert_eq!( + r.out.lines().filter(|l| !l.starts_with('#')).count(), + 0, + "no record reaches PharmCAT" + ); + assert_eq!(r.outcome.weak_at, vec!["CYP2C9 chr10:94942205".to_owned()]); +} diff --git a/rust/crates/og-filters/tests/port_tests_pgx_refblock.rs b/rust/crates/og-filters/tests/port_tests_pgx_refblock.rs index 31f326f98..0744e299c 100644 --- a/rust/crates/og-filters/tests/port_tests_pgx_refblock.rs +++ b/rust/crates/og-filters/tests/port_tests_pgx_refblock.rs @@ -282,15 +282,28 @@ fn the_fixture_fills_five_and_leaves_four() { filled_keys.iter().all(|k| at.get(k) == Some(&1)), "one record at each filled position (the one-base record is replaced)" ); + // The GQ 10 block's one-base records are reference calls below the GQ + // 20 floor: left out, so PharmCAT reads them as missing (issue #411, + // pgx-07; tests/i411_refblock_gq.rs). + let weak = |r: &Vec| r[9].starts_with("0/0:10:"); let kept: Vec<&Vec> = inp .iter() - .filter(|r| !filled_keys.contains(&key(r))) + .filter(|r| !filled_keys.contains(&key(r)) && !weak(r)) .collect(); let passed: Vec<&Vec> = outr.iter().filter(|r| r[7] != "PGX_REFBLOCK").collect(); assert_eq!( passed, kept, "every other record passes unchanged and in order" ); + assert!( + inp.iter().any(&weak) && !outr.iter().any(weak), + "the GQ 10 block reaches the stream and is left out of the output" + ); + assert!( + err.contains("reference calls with GQ below 20 (or none) left out") + && err.contains("CYP2C9 chr10:94949161"), + "stderr counts them and names the PharmCAT position among them: {err}" + ); assert!( at.contains_key(&("chr2".to_owned(), 233_760_234)) && at.contains_key(&("chr2".to_owned(), 233_760_235)), diff --git a/rust/crates/og-fresh/src/lookups.rs b/rust/crates/og-fresh/src/lookups.rs index 14511e2a8..2716725f2 100644 --- a/rust/crates/og-fresh/src/lookups.rs +++ b/rust/crates/og-fresh/src/lookups.rs @@ -2,13 +2,14 @@ //! image and digest sections. Each lookup returns its report row and a //! typed answer ([`Found`]); a lookup that cannot answer is an error. -use crate::http::Fetch; +use crate::http::{Body, Fetch, Request, Want}; use crate::pins::{Pins, hla_db_release, setting, vep_cache_template}; use crate::registry::{Registry, split_image}; use crate::version::{change_kind, max_by, newer_tags, ver}; use crate::{ DbRow, Found, Lookup, LookupError, Upstream, array, failed, field, need_str, opt_field, string, }; +use indexmap::IndexMap; use pycompat::json::Value; use regex::Regex; use std::collections::BTreeSet; @@ -731,6 +732,504 @@ pub fn cyrius(c: &Ctx<'_>) -> Lookup { }) } +// The curated PGx tables. Each row of assets/pgx_contraindications.tsv, +// assets/pgx_inhibitors.tsv and assets/pgx_genes.tsv was copied by hand from +// a source that can change under it: a CPIC level moves, a label is +// withdrawn, the FDA reclassifies an inhibitor, pypgx gains a copy-number +// model. These lookups compare every row with its source now. A row that no +// longer agrees is `drift` (a warning in the issue, not an error); a source +// that does not answer, or answers empty, is an error as everywhere here. + +/// The CPIC API's pairs of one gene (the `Pair_source` of a row). +pub const CPIC_PAIRS: &str = "https://api.cpicpgx.org/v1/pair_view?genesymbol=eq."; +/// One DailyMed label's version history, by its set id. +pub const DAILYMED_HISTORY: &str = "https://dailymed.nlm.nih.gov/dailymed/services/v2/spls/"; +/// The FDA's table of clinical CYP inhibitors (the `Class_source` of the +/// inhibitor rows). +pub const FDA_CYP_TABLE: &str = "https://www.fda.gov/drugs/drug-interactions-labeling/healthcare-professionals-fdas-examples-drugs-interact-cyp-enzymes-and-transporter-systems"; + +/// The rows of a curated table under `assets/` beside `versions.env`, by +/// column name. `#` lines are comments; the first other line is the header. +pub fn curated(c: &Ctx<'_>, name: &str, need: &[&str]) -> Lookup>> { + let path = c + .versions + .parent() + .unwrap_or_else(|| Path::new("")) + .join("assets") + .join(name); + let text = std::fs::read_to_string(&path) + .map_err(|e| LookupError::Failed(format!("cannot read {}: {e}", path.display())))?; + let mut lines = text + .lines() + .filter(|l| !l.starts_with('#') && !l.trim().is_empty()); + let Some(header) = lines.next() else { + return failed(format!("{name}: no header")); + }; + let header: Vec<&str> = header.split('\t').collect(); + if let Some(miss) = need.iter().find(|n| !header.contains(n)) { + return Err(LookupError::Shape(format!("{name} has no {miss} column"))); + } + let rows: Vec> = lines + .map(|l| { + header + .iter() + .zip(l.split('\t')) + .map(|(h, v)| ((*h).to_owned(), v.trim().to_owned())) + .collect() + }) + .collect(); + if rows.is_empty() { + return failed(format!("{name}: no rows")); + } + Ok(rows) +} + +fn col<'a>(row: &'a IndexMap, name: &str) -> &'a str { + row.get(name).map_or("", String::as_str) +} + +/// The report row of a table check: `current` with `agree` when nothing +/// drifted, else `drift` with each difference. Both name the `source` +/// compared with. +fn table_row( + item: &str, + pinned: String, + source: &str, + agree: &str, + drift: &[String], + todo: &str, +) -> Found { + let upstream = if drift.is_empty() { + format!("{source}: {agree}") + } else { + format!( + "{source}: {} difference(s): {}", + drift.len(), + drift.join("; ") + ) + }; + Found { + row: DbRow { + item: item.into(), + pinned, + upstream, + state: if drift.is_empty() { "current" } else { "drift" }.into(), + todo: if drift.is_empty() { + String::new() + } else { + todo.into() + }, + }, + upstream: Upstream::ReportOnly, + } +} + +/// `assets/pgx_contraindications.tsv` against the CPIC API (the pair, its +/// level, still provisional) and DailyMed (the label the note quotes is +/// still published). +pub fn pgx_contraindications(c: &Ctx<'_>) -> Lookup { + let rows = curated( + c, + "pgx_contraindications.tsv", + &["Gene", "Drug", "CPIC_level", "Label_source"], + )?; + let mut drift = vec![]; + let mut pairs: IndexMap> = IndexMap::new(); + let mut labels: IndexMap = IndexMap::new(); + static SETID: LazyLock = LazyLock::new(|| re(r"setid=([0-9A-Fa-f-]{36})\b")); + for row in &rows { + let (gene, drug, level) = (col(row, "Gene"), col(row, "Drug"), col(row, "CPIC_level")); + if !pairs.contains_key(gene) { + let body = c.fetch.json(&format!("{CPIC_PAIRS}{gene}"))?; + let list = array(&body, &format!("CPIC pairs of {gene}"))?; + // An empty answer cannot tell a dropped gene from an outage. + if list.is_empty() { + return failed(format!("CPIC pairs of {gene}: empty")); + } + pairs.insert(gene.to_owned(), list.to_vec()); + } + let found = pairs[gene].iter().find(|p| { + matches!(opt_field(p, "drugname"), Ok(Some(Value::Str(d))) if d.eq_ignore_ascii_case(drug)) + }); + let Some(pair) = found else { + drift.push(format!("{gene} {drug}: CPIC no longer lists the pair")); + continue; + }; + let up = need_str(pair, "cpiclevel", &format!("CPIC level of {gene} {drug}"))?; + if up != level { + drift.push(format!( + "{gene} {drug}: CPIC level {up}, the table says {level}" + )); + } + if !matches!(opt_field(pair, "provisional")?, Some(Value::Bool(true))) { + drift.push(format!( + "{gene} {drug}: no longer provisional in CPIC (a guideline: PharmCAT may call the gene)" + )); + } + let Some(setid) = SETID + .captures(col(row, "Label_source")) + .map(|m| m[1].to_owned()) + else { + return Err(LookupError::Shape(format!( + "{gene} {drug}: Label_source has no DailyMed setid" + ))); + }; + let live = match labels.get(&setid) { + Some(l) => *l, + None => { + let body = c + .fetch + .json(&format!("{DAILYMED_HISTORY}{setid}/history.json"))?; + let history = match opt_field(&body, "data")? { + Some(d) => opt_field(d, "history")?, + None => return failed(format!("DailyMed label {setid}: empty")), + }; + // An empty history is a withdrawn label; no history, or one + // that is not a list, is an answer this does not know. + let Some(Value::Array(h)) = history else { + return Err(LookupError::Shape(format!( + "DailyMed label {setid}: history is not a list" + ))); + }; + let live = !h.is_empty(); + labels.insert(setid.clone(), live); + live + } + }; + if !live { + drift.push(format!( + "{gene} {drug}: DailyMed no longer publishes label {setid}" + )); + } + } + Ok(table_row( + "Drug warnings for disease genes (assets/pgx_contraindications.tsv, step 27)", + format!("{} rows, CPIC levels and FDA labels", rows.len()), + &format!("the CPIC API and DailyMed ({} label(s))", labels.len()), + "every pair at the same level and provisional, every label published", + &drift, + "Read the CPIC pair and the label again, then fix, move or drop the row in \ + assets/pgx_contraindications.tsv (its date and Note too) and rerun step 27.", + )) +} + +/// `name` of the FDA table as a medication list names it: lower case, no +/// footnote marks, no markup. +fn fda_cell(raw: &str) -> String { + static SUP: LazyLock = LazyLock::new(|| re(r"(?s).*?")); + static TAG: LazyLock = LazyLock::new(|| re(r"(?s)<[^>]*>")); + let t = SUP.replace_all(raw, ""); + let t = TAG.replace_all(&t, " "); + let t = t.replace(" ", " ").replace("&", "&"); + t.split_whitespace() + .collect::>() + .join(" ") + .to_lowercase() +} + +/// The CYP enzymes of an FDA table cell (`2C19; 2D6 strong inhibitor`). +fn fda_genes(cell: &str) -> Vec { + static G: LazyLock = LazyLock::new(|| re(r"(?i)\b(1A2|2B6|2C8|2C9|2C19|2D6|3A)\b")); + G.captures_iter(cell).map(|m| m[1].to_uppercase()).collect() +} + +/// The FDA table's enzyme name for a table gene: CYP3A4 and CYP3A5 are its +/// `3A`. +fn fda_gene(gene: &str) -> String { + let g = gene.trim_start_matches("CYP"); + if g.starts_with("3A") { + "3A".into() + } else { + g.to_owned() + } +} + +/// One substance of the FDA table with its strong and moderate CYP +/// inhibitions as `(enzyme, strength)`. +pub type FdaRow = (String, Vec<(String, &'static str)>); + +/// The FDA table: (its date, each substance with its strong and moderate +/// CYP inhibitions as `(enzyme, strength)`). +pub fn fda_inhibitors(html: &str) -> Lookup<(Option, Vec)> { + static TABLE: LazyLock = LazyLock::new(|| re(r#"(?s)summary="Table 1\."(.*?)"#)); + static TD: LazyLock = LazyLock::new(|| re(r"(?s)]*>(.*?)")); + static DATE: LazyLock = + LazyLock::new(|| re(r#"(?s)Content current as of.{0,300}?datetime="(\d{4}-\d{2}-\d{2})"#)); + let Some(table) = TABLE.captures(html) else { + return Err(LookupError::Shape( + "the FDA page has no Table 1 of substrates, inhibitors and inducers".into(), + )); + }; + let mut out = vec![]; + for tr in table[1].split(" = TD.captures_iter(tr).map(|m| fda_cell(&m[1])).collect(); + if cells.len() < 3 || cells[0].is_empty() { + continue; + } + let mut inh = vec![]; + for (cell, strength) in [(&cells[1], "strong"), (&cells[2], "moderate")] { + inh.extend(fda_genes(cell).into_iter().map(|g| (g, strength))); + } + out.push((cells[0].clone(), inh)); + } + if out.is_empty() { + return failed("the FDA table of CYP inhibitors: empty"); + } + Ok((DATE.captures(html).map(|m| m[1].to_owned()), out)) +} + +/// The parts of a substance of the FDA table: `lopinavir and ritonavir` is +/// lopinavir and ritonavir. +fn fda_parts(name: &str) -> Vec<&str> { + name.split(" and ") + .map(|p| p.trim_matches(|ch: char| !ch.is_alphanumeric())) + .filter(|p| !p.is_empty()) + .collect() +} + +/// The newest Wayback Machine capture the FDA table may be read from when +/// fda.gov refuses the host, in days. An older copy is an error: a check on +/// a stale copy is not a check. +pub const FDA_CAPTURE_MAX_AGE_DAYS: i64 = 92; + +/// The FDA table's page, and where it came from (empty: fda.gov itself). +/// fda.gov answers HTTP 404 to GitHub's runners, so when it refuses, the +/// newest Wayback Machine capture of the page is read instead, and the row +/// says so with the capture's date. +pub fn fda_page(c: &Ctx<'_>) -> Lookup<(String, String)> { + let direct = Request::get(FDA_CYP_TABLE, Want::Text) + .header("Accept", "text/html,application/xhtml+xml") + .header("Accept-Language", "en-US,en;q=0.9"); + let refused = match c.fetch.request(&direct) { + Ok((Body::Text(t), _)) => return Ok((t, String::new())), + Ok(_) => return Err(LookupError::Shape(format!("{FDA_CYP_TABLE}: no text body"))), + Err(e) => e, + }; + let fallback = || -> Lookup<(String, String)> { + let body = c.fetch.json(&format!( + "https://archive.org/wayback/available?url={FDA_CYP_TABLE}" + ))?; + let closest = match opt_field(&body, "archived_snapshots")? { + Some(s) => opt_field(s, "closest")?, + None => None, + }; + let Some(closest) = closest else { + return failed("no Wayback Machine capture of the FDA table"); + }; + if !matches!(opt_field(closest, "available")?, Some(Value::Bool(true))) + || need_str(closest, "status", "the capture's status")? != "200" + { + return failed("the newest Wayback Machine capture of the FDA table is not a page"); + } + let ts = need_str(closest, "timestamp", "the capture's timestamp")?; + let when: jiff::civil::Date = ts + .get(..8) + .and_then(|d| jiff::civil::Date::strptime("%Y%m%d", d).ok()) + .ok_or_else(|| LookupError::Shape(format!("capture timestamp {ts:?}")))?; + let today = c.now.to_zoned(jiff::tz::TimeZone::UTC).date(); + let age = i64::from((today - when).get_days()); + if age > FDA_CAPTURE_MAX_AGE_DAYS { + return failed(format!( + "the newest Wayback Machine capture of the FDA table is {age} days old" + )); + } + let html = c + .fetch + .text(&format!("https://web.archive.org/web/{ts}/{FDA_CYP_TABLE}"))?; + Ok(( + html, + format!( + ", read from the Wayback Machine capture of {} (fda.gov refused this host)", + when.strftime("%Y-%m-%d") + ), + )) + }; + // Keep "did not answer" as it is: the pull-request dry run warns on it. + fallback().map_err(|e| { + let both = format!("{refused}; and {e}"); + if e.is_unreachable() { + LookupError::Unreachable(both) + } else { + LookupError::Failed(both) + } + }) +} + +/// `assets/pgx_inhibitors.tsv` against the FDA's table of CYP inhibitors: +/// every row's class, and every strong or moderate inhibitor of a gene the +/// table covers (strong only for CYP3A) that has no row. +pub fn pgx_inhibitors(c: &Ctx<'_>) -> Lookup { + let rows = curated(c, "pgx_inhibitors.tsv", &["Drug", "Gene", "Strength"])?; + let (html, via) = fda_page(c)?; + let (date, fda) = fda_inhibitors(&html)?; + let strength_of = |names: &[&FdaRow], g: &str| { + let s: Vec<&str> = names + .iter() + .flat_map(|(_, inh)| inh.iter().filter(|(e, _)| e == g).map(|(_, s)| *s)) + .collect(); + if s.contains(&"strong") { + Some("strong") + } else if s.contains(&"moderate") { + Some("moderate") + } else { + None + } + }; + let mut drift = vec![]; + for row in &rows { + let (drug, gene, ours) = (col(row, "Drug"), col(row, "Gene"), col(row, "Strength")); + // Its own rows and the ritonavir-boosted combinations it is part + // of: a partner row takes the combination's class (indinavir alone + // is no strong inhibitor; indinavir and ritonavir is). + let named: Vec<_> = fda + .iter() + .filter(|(n, _)| fda_parts(n).contains(&drug)) + .collect(); + if named.is_empty() { + drift.push(format!("{drug} {gene}: not in the FDA table")); + continue; + } + match strength_of(&named, &fda_gene(gene)) { + Some(s) if s == ours => {} + Some(s) => drift.push(format!( + "{drug} {gene}: the FDA says {s}, the table says {ours}" + )), + None => drift.push(format!( + "{drug} {gene}: the FDA no longer lists it as a strong or moderate inhibitor" + )), + } + } + // What the table covers: strong and moderate inhibitors of CYP2D6, + // CYP2C19, CYP2C9 and CYP2B6, strong inhibitors of CYP3A. + let has = |drug: &str, g: &str| { + rows.iter() + .any(|r| col(r, "Drug") == drug && fda_gene(col(r, "Gene")) == g) + }; + for (name, inh) in &fda { + let first = fda_parts(name).first().copied().unwrap_or(name.as_str()); + for (g, s) in inh { + let covered = matches!(g.as_str(), "2D6" | "2C19" | "2C9" | "2B6") + || (g == "3A" && *s == "strong"); + if covered && !has(name, g) && !has(first, g) { + drift.push(format!( + "{name}: the FDA lists a {s} CYP{g} inhibitor the table has no row for" + )); + } + } + } + Ok(table_row( + "Drug interactions (assets/pgx_inhibitors.tsv, step 27)", + format!("{} rows, FDA classes", rows.len()), + &format!( + "the FDA table{}{via}", + date.map(|d| format!(" (current as of {d})")) + .unwrap_or_default() + ), + "every row classed the same, no inhibitor the table lacks", + &drift, + "Read the FDA table again, then fix, add or drop the rows in assets/pgx_inhibitors.tsv \ + (and the date in its header) and rerun step 27 with a medication list.", + )) +} + +/// The fields of one CSV line; a quoted field may hold commas. +fn csv_fields(line: &str) -> Vec { + let (mut out, mut cur, mut quoted) = (vec![], String::new(), false); + for ch in line.chars() { + match ch { + '"' => quoted = !quoted, + ',' if !quoted => out.push(std::mem::take(&mut cur)), + _ => cur.push(ch), + } + } + out.push(cur); + out +} + +/// `assets/pgx_genes.tsv` against the gene table of pypgx's newest release: +/// every row is a pypgx gene, and the bam rows are exactly the genes with a +/// copy-number model (SV=TRUE). tests/test_pypgx_genes.sh checks the same +/// at the pinned version; this says when a newer pypgx moves it. +pub fn pgx_genes(c: &Ctx<'_>) -> Lookup { + let rows = curated(c, "pgx_genes.tsv", &["gene", "mode"])?; + let latest = need_str( + &c.fetch.github("/repos/sbslee/pypgx/releases/latest")?, + "tag_name", + "pypgx latest release", + )?; + let csv = c.fetch.text(&format!( + "{RAW}/sbslee/pypgx/{latest}/pypgx/api/data/gene-table.csv" + ))?; + let mut lines = csv.lines().filter(|l| !l.trim().is_empty()); + let header = csv_fields(lines.next().unwrap_or("")); + let (Some(gi), Some(si)) = ( + header.iter().position(|h| h == "Gene"), + header.iter().position(|h| h == "SV"), + ) else { + return Err(LookupError::Shape(format!( + "pypgx {latest} gene-table.csv has no Gene or SV column" + ))); + }; + let mut sv: indexmap::IndexMap = indexmap::IndexMap::new(); + for l in lines { + let f = csv_fields(l); + let (Some(g), Some(s)) = (f.get(gi), f.get(si)) else { + return Err(LookupError::Shape(format!( + "pypgx {latest} gene-table.csv: a row without Gene or SV" + ))); + }; + let model = match s.as_str() { + "TRUE" => true, + "FALSE" => false, + other => { + return Err(LookupError::Shape(format!( + "pypgx {latest} gene-table.csv: {g} has SV {other:?}, not TRUE or FALSE" + ))); + } + }; + sv.insert(g.clone(), model); + } + if sv.is_empty() { + return failed(format!("pypgx {latest} gene-table.csv: empty")); + } + let mut drift = vec![]; + for row in &rows { + let (gene, mode) = (col(row, "gene"), col(row, "mode")); + match sv.get(gene) { + None => drift.push(format!("{gene}: not in pypgx {latest}'s gene table")), + Some(false) if mode == "bam" => drift.push(format!( + "{gene}: a bam row, but pypgx {latest} has no copy-number model for it" + )), + _ => {} + } + } + for (gene, has_sv) in &sv { + if *has_sv + && !rows + .iter() + .any(|r| col(r, "gene") == gene && col(r, "mode") == "bam") + { + drift.push(format!( + "{gene}: pypgx {latest} has a copy-number model, but it is not a bam row" + )); + } + } + let bam = rows.iter().filter(|r| col(r, "mode") == "bam").count(); + Ok(table_row( + "pypgx genes (assets/pgx_genes.tsv, step 32)", + format!( + "{} genes, {bam} bam (pypgx {})", + rows.len(), + c.pins.get("PYPGX_BUNDLE_VERSION").unwrap_or("?") + ), + &format!("pypgx {latest}'s gene table"), + "every row a pypgx gene, the bam rows exactly its copy-number models", + &drift, + "When PYPGX_IMAGE moves to this pypgx, change the rows of assets/pgx_genes.tsv \ + with it (tests/test_pypgx_genes.sh checks them at the pin) and rerun step 32.", + )) +} + /// A lookup by its report name. pub type LookupFn = fn(&Ctx<'_>) -> Lookup; @@ -751,6 +1250,9 @@ pub const DATABASES: &[(&str, LookupFn)] = &[ ("Cyrius", cyrius), ("Parascopy data", parascopy_data), ("gnomAD constraint", gnomad), + ("PGx contraindications table", pgx_contraindications), + ("PGx inhibitors table", pgx_inhibitors), + ("PGx genes table", pgx_genes), ]; /// One image of the images section. @@ -871,4 +1373,46 @@ mod tests { assert!(http_date("not a date").is_none()); assert_eq!(line_of("25.10.4"), "25.10"); } + + /// fda.gov refuses GitHub's runners, so the pull-request dry run always + /// reads the Wayback Machine. When that does not answer either, the error + /// must stay "did not answer", or `--unreachable-warns` cannot warn. + #[test] + fn an_fda_table_nobody_answers_for_is_unreachable() { + struct Down(crate::http::GitHub); + impl Fetch for Down { + fn github_api(&self) -> &crate::http::GitHub { + &self.0 + } + fn request(&self, req: &Request<'_>) -> Lookup<(Body, crate::http::Headers)> { + Err(LookupError::Unreachable(format!("{}: no answer", req.url))) + } + } + struct NoRegistry; + impl Registry for NoRegistry { + fn list_tags(&self, _: &str, _: &str) -> Lookup> { + Ok(vec![]) + } + fn manifest_digest(&self, _: &str, _: &str, _: &str) -> Lookup { + Ok(String::new()) + } + } + let down = Down(crate::http::GitHub { + api: "https://api.github.invalid".into(), + token: None, + }); + let pins = Pins::parse(""); + let c = Ctx { + fetch: &down, + registry: &NoRegistry, + pins: &pins, + versions: Path::new("/nonexistent"), + setup: Path::new("/nonexistent"), + common: Path::new("/nonexistent"), + now: jiff::Timestamp::now(), + }; + let e = fda_page(&c).unwrap_err(); + assert!(e.is_unreachable(), "{e}"); + assert!(e.to_string().contains("archive.org"), "{e}"); + } } diff --git a/rust/crates/og-fresh/src/selftest.rs b/rust/crates/og-fresh/src/selftest.rs index dc77661f7..b422ec01b 100644 --- a/rust/crates/og-fresh/src/selftest.rs +++ b/rust/crates/og-fresh/src/selftest.rs @@ -316,6 +316,117 @@ pub fn data_rows( ) } +/// The curated PGx table rows (contraindications, inhibitors, pypgx genes) +/// on planted tables and stubbed answers: (state, upstream) of each, and +/// the number of errors. +pub fn pgx_rows(answers: Vec<(&'static str, Option)>) -> (Vec<(String, String)>, usize) { + let stub = Stub::new(answers); + let scratch = Scratch::new().expect("a private scratch folder"); + let d = scratch.path(); + let versions = d.join("versions.env"); + let _ = std::fs::write(&versions, "PYPGX_BUNDLE_VERSION=\"0.26.0\"\n"); + let _ = std::fs::create_dir(d.join("assets")); + let _ = std::fs::write( + d.join("assets/pgx_contraindications.tsv"), + "# a comment\nGene\tDrug\tNames\tCPIC_level\tNote\tPair_source\tLabel_source\tReport_if\n\ + POLG\tvalproic acid\tvalproic\tA\tn\thttps://api.cpicpgx.org/v1/pair_view?genesymbol=eq.POLG\t\ + https://dailymed.nlm.nih.gov/dailymed/drugInfo.cfm?setid=08a65cf4-7749-4ceb-6895-8f4805e2b01f\tany\n", + ); + let _ = std::fs::write( + d.join("assets/pgx_inhibitors.tsv"), + "Drug\tGene\tStrength\tActivity_score_factor\tClass_source\tRule_source\n\ + bupropion\tCYP2D6\tstrong\t0\tx\tx\n\ + lopinavir\tCYP3A4\tstrong\t-\tx\t-\n", + ); + let _ = std::fs::write( + d.join("assets/pgx_genes.tsv"), + "gene\tmode\tcallable_without_alt\talt_contig\tsecond_caller\tpharmcat_outside_call\n\ + CYP2D6\tbam\tyes\t.\tcyrius\tyes\nCYP2C9\tvcf\tyes\t.\tpharmcat\tno\n", + ); + let pins = Pins::parse("PYPGX_BUNDLE_VERSION=\"0.26.0\"\n"); + let reg = FakeRegistry { + tags: |_| vec![], + digests: |_| String::new(), + asked: Mutex::new(vec![]), + }; + let ctx = Ctx { + fetch: &stub, + registry: ®, + pins: &pins, + versions: &versions, + setup: Path::new("/nonexistent"), + common: Path::new("/nonexistent"), + now: jiff::Timestamp::now(), + }; + let mut r = Report::default(); + for (what, f) in [ + ( + "PGx contraindications table", + lookups::pgx_contraindications as lookups::LookupFn, + ), + ("PGx inhibitors table", lookups::pgx_inhibitors), + ("PGx genes table", lookups::pgx_genes), + ] { + match f(&ctx) { + Ok(found) => r.db_rows.push(found.row), + Err(e) => r.db_error(what, &e), + } + } + drop(scratch); + ( + r.db_rows + .into_iter() + .map(|x| (x.state, x.upstream)) + .collect(), + r.errors.len(), + ) +} + +/// The CPIC API's answer for the planted POLG row. +fn cpic(level: &str, provisional: bool) -> Option { + Some(Body::Json(Value::Array(vec![ + obj(vec![ + ("drugname", s("divalproex sodium")), + ("cpiclevel", s("A")), + ("provisional", Value::Bool(true)), + ]), + obj(vec![ + ("drugname", s("valproic acid")), + ("cpiclevel", s(level)), + ("provisional", Value::Bool(provisional)), + ]), + ]))) +} + +/// DailyMed's version history of a label, empty when it is withdrawn. +fn dailymed(live: bool) -> Option { + let history = if live { + vec![obj(vec![("spl_version", Value::Int(3))])] + } else { + vec![] + }; + Some(Body::Json(obj(vec![( + "data", + obj(vec![("history", Value::Array(history))]), + )]))) +} + +/// The FDA page with its Table 1: one row per (substance, strong cell, +/// moderate cell). +fn fda(rows: &[(&str, &str, &str)]) -> Option { + let mut html = String::from( + "

Content current as of:

\ + ", + ); + for (name, strong, moderate) in rows { + html += &format!( + "" + ); + } + html += "
DrugStrgModWK
{name}1{strong}{moderate}1A2  weak  inhibitor
"; + text(&html) +} + fn text(t: &str) -> Option { Some(Body::Text(t.into())) } @@ -607,6 +718,178 @@ pub fn run(out: &mut dyn Write) -> u8 { &format!("an answer without the release is an error row for each of the five ({st:?})"), ); + // The curated PGx tables against their sources, on planted tables: the + // same answer is current, a changed one is drift naming the row, and an + // empty or unreadable answer is an error row. + let agree = || { + vec![ + ("api.cpicpgx.org", cpic("A", true)), + ("dailymed.nlm.nih.gov", dailymed(true)), + // Asked only when fda.gov refuses; before it, as their URLs + // name fda.gov too. + ("archive.org/wayback/available", None), + ("web.archive.org/web/", None), + ( + "fda.gov", + fda(&[ + ("bupropion", "2D6  strong  inhibitor", " "), + ("lopinavir", " ", " "), + ("lopinavir and ritonavir", "3A strong inhibitor", " "), + ("aprepitant", " ", "3A  moderate  inhibitor"), + ]), + ), + ( + "api.github.invalid", + Some(Body::Json(obj(vec![("tag_name", s("0.27.0"))]))), + ), + ( + "gene-table.csv", + text("Gene,Target,Exons,SV\nCYP2D6,TRUE,\"1,2\",TRUE\nCYP2C9,TRUE,\"3,4\",FALSE\n"), + ), + ] + }; + let (rows, e) = pgx_rows(agree()); + check( + rows.iter().all(|(st, _)| st == "current") + && rows.len() == 3 + && e == 0 + && rows[1] + .1 + .starts_with("the FDA table (current as of 2026-05-29): "), + &format!( + "PGx tables: rows that agree with CPIC, DailyMed, the FDA and pypgx are current ({rows:?})" + ), + ); + let mut drifted = agree(); + drifted[0].1 = cpic("B", true); + drifted[4].1 = fda(&[ + ("bupropion", " ", "2D6 moderate inhibitor"), + ("lopinavir and ritonavir", "3A strong inhibitor", " "), + ("newdrug", "2C19 strong inhibitor", " "), + ]); + drifted[6].1 = + text("Gene,Target,Exons,SV\nCYP2D6,TRUE,\"1,2\",TRUE\nCYP2C9,TRUE,\"3,4\",TRUE\n"); + let (rows, e) = pgx_rows(drifted); + let said = |rows: &[(String, String)], i: usize, what: &str| { + rows.get(i) + .is_some_and(|(st, up)| st == "drift" && up.contains(what)) + }; + check( + said( + &rows, + 0, + "POLG valproic acid: CPIC level B, the table says A", + ) && e == 0, + &format!( + "PGx tables: a planted row whose CPIC level moved from A to B is drift ({:?})", + rows.first() + ), + ); + check( + said( + &rows, + 1, + "the FDA table (current as of 2026-05-29): 2 difference(s): bupropion CYP2D6: the FDA says moderate, the table says strong", + ) && said( + &rows, + 1, + "newdrug: the FDA lists a strong CYP2C19 inhibitor", + ), + &format!( + "PGx tables: a reclassified inhibitor and a new one are drift ({:?})", + rows.get(1) + ), + ); + check( + said( + &rows, + 2, + "CYP2C9: pypgx 0.27.0 has a copy-number model, but it is not a bam row", + ), + &format!( + "PGx tables: a new pypgx copy-number model is drift ({:?})", + rows.get(2) + ), + ); + let mut gone = agree(); + gone[0].1 = cpic("A", false); + gone[1].1 = dailymed(false); + let (rows, _) = pgx_rows(gone); + check( + said(&rows, 0, "no longer provisional") + && said(&rows, 0, "DailyMed no longer publishes label"), + &format!( + "PGx tables: a pair with a guideline and a withdrawn label are drift ({:?})", + rows.first() + ), + ); + let mut broken = agree(); + broken[0].1 = Some(Body::Json(Value::Array(vec![]))); + broken[4].1 = text("no table"); + broken[6].1 = None; + let (rows, e) = pgx_rows(broken); + check( + rows.iter().all(|(st, _)| st == "ERROR") && e == 3, + &format!( + "PGx tables: an empty CPIC answer, an FDA page without its table and a missing gene table are errors ({rows:?})" + ), + ); + let mut odd = agree(); + odd[1].1 = Some(Body::Json(obj(vec![("data", obj(vec![]))]))); + odd[6].1 = text("Gene,Target,Exons,SV\nCYP2D6,TRUE,\"1,2\",TRUE\nCYP2C9,TRUE,\"3,4\",\n"); + let (rows, e) = pgx_rows(odd); + check( + rows.first().is_some_and(|(st, _)| st == "ERROR") + && rows.get(2).is_some_and(|(st, _)| st == "ERROR") + && e == 2, + &format!( + "PGx tables: a DailyMed answer without a history and an empty SV value are errors, not drift or current ({rows:?})" + ), + ); + // fda.gov refuses GitHub's runners: the newest Wayback Machine capture + // stands in, named in the row, unless it is too old. + let capture = |days_ago: i64| { + let when = jiff::Timestamp::now() + .to_zoned(jiff::tz::TimeZone::UTC) + .date() + .checked_sub(jiff::Span::new().days(days_ago)) + .expect("a date"); + let closest = obj(vec![ + ("available", Value::Bool(true)), + ("status", s("200")), + ( + "timestamp", + s(&format!("{}120000", when.strftime("%Y%m%d"))), + ), + ]); + let mut a = agree(); + a[2].1 = Some(Body::Json(obj(vec![( + "archived_snapshots", + obj(vec![("closest", closest)]), + )]))); + a[3].1 = a[4].1.take(); + a + }; + let (rows, e) = pgx_rows(capture(3)); + check( + rows.get(1).is_some_and(|(st, up)| { + st == "current" && up.contains("read from the Wayback Machine capture of") + }) && e == 0, + &format!( + "PGx tables: when fda.gov refuses, a recent Wayback Machine capture is read and named ({:?})", + rows.get(1) + ), + ); + let (rows, e) = pgx_rows(capture(lookups::FDA_CAPTURE_MAX_AGE_DAYS + 1)); + check( + rows.get(1).is_some_and(|(st, _)| st == "ERROR") && e == 1, + &format!( + "PGx tables: a Wayback Machine capture older than {} days is an error ({:?})", + lookups::FDA_CAPTURE_MAX_AGE_DAYS, + rows.get(1) + ), + ); + // 2. A fake server: an empty or truncated 200 must fail, and the issue // logic. let gh = Arc::new(Mutex::new(FakeGitHub::default())); diff --git a/rust/crates/og-render/src/sections/prs.rs b/rust/crates/og-render/src/sections/prs.rs index 7ac93adc1..c35e01535 100644 --- a/rust/crates/og-render/src/sections/prs.rs +++ b/rust/crates/og-render/src/sections/prs.rs @@ -28,6 +28,15 @@ pub const EFFECT_TEXT: &str = "Effect: the odds ratio (OR) or hazard ratio (HR) evaluation's unit (its PGS Catalog PPM page says which). It describes the score in that \ group, not your own risk, and is shown only for a group the score was evaluated in."; +/// The start of the line under the scores when every percentile was +/// withheld for an input that lists variants only (og summary collect's +/// `percentile_note`): the panel ran, so the no-panel line would be false. +pub const WITHHELD_TEXT: &str = "Percentile withheld: the input lists variants only, so each \ + scoring site it leaves out adds nothing to the sum, and the raw sum cannot be compared with \ + the reference panel's samples, whose genotypes are complete. Genotypes with a reference call \ + (0/0) at one genotyped position in five or more keep the percentile; a gVCF from step 3 or a \ + chip VCF usually has them."; + /// What a score, matched or total cell says when the summary has none: og /// summary collect writes null for a short row of pgsc_calc's table. pub const NOT_AVAILABLE: &str = "not available"; @@ -162,6 +171,16 @@ fn sex_note(rs: &[Value]) -> Result { )) } +/// Whether a score's percentile was withheld (its `percentile_note`). +fn withheld(rs: &[Value]) -> Result { + for r in rs { + if on(r, "percentile_note")?.is_some() { + return Ok(true); + } + } + Ok(false) +} + /// Whether the summary's table names evaluations (its Evaluated_In column). fn names_evaluations(rs: &[Value]) -> Result { for r in rs { @@ -178,6 +197,11 @@ pub fn note(d: &Value) -> Result { let rs = scores(d)?; let tail = chrx_note(&rs)? + &sex_note(&rs)?; if !get(d, "adjusted", PATH)?.is_some_and(truthy) { + if withheld(&rs)? { + return Ok(format!( + "{WITHHELD_TEXT} {PRS_ANCESTRY_NOTE} See docs/25-prs.md.{tail}" + )); + } return Ok(format!( "Raw score only: no ancestry reference panel was installed, so there is no percentile \ and the sum cannot be compared with anyone (scripts/setup.sh --ancestry-panel adds \ diff --git a/rust/crates/og-render/tests/ancestry_ystr.rs b/rust/crates/og-render/tests/ancestry_ystr.rs index 8fb6e3d0d..963b15c02 100644 --- a/rust/crates/og-render/tests/ancestry_ystr.rs +++ b/rust/crates/og-render/tests/ancestry_ystr.rs @@ -158,7 +158,7 @@ fn read_panel(path: &str) -> Vec { .collect() } -const FORMAT: &str = "GT:GB:Q:PQ:DP:DSNP:PSNP:PDP:GLDIFF:DSTUTTER:DFLANKINDEL"; +const FORMAT: &str = "GT:GB:Q:PQ:DP:DSNP:PSNP:PDP:GLDIFF:DSTUTTER:DFLANKINDEL:MALLREADS"; /// One HipSTR call: GT, GB, Q, DP, DSTUTTER, DFLANKINDEL. type Call = [&'static str; 6]; @@ -177,7 +177,7 @@ fn good(gb: &'static str) -> Call { } /// A HipSTR VCF with these records (by HipSTR region name), each written at -/// its region's start. +/// its region's start; every read shows the called length (MALLREADS). fn vcf(d: &Path, records: &[(&str, Call)], samples: &[&str]) -> PathBuf { let panel = read_panel(&panel_path()); let mut lines = vec![ @@ -195,7 +195,12 @@ fn vcf(d: &Path, records: &[(&str, Call)], samples: &[&str]) -> PathBuf { .find(|x| x.5 == *name) .map(|x| (x.0.clone(), x.1)) .unwrap_or_else(|| panic!("no panel region is named {name}")); - let cell = format!("{gt}:{gb}:{q}:{q}:{dp}:0:0|0:{dp}|0:.:{st}:{fl}"); + let all = if *gb == "." { + ".".to_owned() + } else { + format!("{gb}|{dp}") + }; + let cell = format!("{gt}:{gb}:{q}:{q}:{dp}:0:0|0:{dp}|0:.:{st}:{fl}:{all}"); let mut row = vec![ c, (s - 1).to_string(), @@ -492,7 +497,11 @@ fn counts_are_reference_copies_plus_the_length_difference() { ("DYS19/DYS394", GOOD), ], ); - assert_eq!(cell(&o, "DYS19", "count"), "16", "a reference call"); + assert_eq!( + cell(&o, "DYS19", "count"), + "15", + "a reference call, on FamilyTreeDNA's scale (16 copies, offset -1)" + ); assert_eq!(cell(&o, "DYS393", "count"), "13", "GB +4 at a 4-base motif"); assert_eq!(cell(&o, "DYS390", "count"), "22", "GB -8"); assert_eq!(cell(&o, "DYS391", "count"), "11.2", "a partial repeat"); @@ -501,7 +510,11 @@ fn counts_are_reference_copies_plus_the_length_difference() { "12.2", "GB -1 at a 3-base motif" ); - assert_eq!(cell(&o, "DYS449", "count"), "36", "the sum of its parts"); + assert_eq!( + cell(&o, "DYS449", "count"), + "29", + "the sum of its parts (15 + 21 copies) plus its offset -7" + ); assert_eq!( cell(&o, "DYS510", "count"), "26", @@ -513,7 +526,7 @@ fn counts_are_reference_copies_plus_the_length_difference() { cell(&o, "DYS510", "reads"), cell(&o, "DYS510", "note") ], - ["high", "20", "."] + ["high", "20", og_reports::ystr::REFERENCE_SCALE] ); for (m, bp) in [("DYS389II", 164), ("DYS448", 156)] { assert_eq!(cell(&o, m, "confidence"), "not callable", "{m}"); @@ -529,7 +542,8 @@ fn counts_are_reference_copies_plus_the_length_difference() { o.stdout ); let o = run_at(&d, &[("DYS389II", good("4"))], Some(250)); - assert_eq!(cell(&o, "DYS389II", "count"), "30"); + // 17 + 12 part copies, one repeat (GB 4), offset +1. + assert_eq!(cell(&o, "DYS389II", "count"), "31"); assert!(cell(&o, "DYS389II", "note").contains("covers DYS389I")); let off = d.join("offset_panel.tsv"); diff --git a/rust/crates/og-render/tests/prs_withheld.rs b/rust/crates/og-render/tests/prs_withheld.rs new file mode 100644 index 000000000..ac3b16d5d --- /dev/null +++ b/rust/crates/og-render/tests/prs_withheld.rs @@ -0,0 +1,60 @@ +//! A run with the ancestry panel whose input lists variants only: og prs +//! table withholds every percentile and says why in `percentile_note`, so +//! the summary has no percentile and `adjusted` is false. Both reports must +//! say the percentile was withheld, not that no panel was installed. A run +//! without the panel (no note on any score) keeps the no-panel line. + +use std::path::Path; + +use og_render::model::Summary; +use og_render::{html, text}; + +const WITHHELD: &str = "Percentile withheld: the input lists variants only"; +const NO_PANEL: &str = "no ancestry reference panel was installed"; + +/// The golden summary with every percentile gone and `adjusted` false; its +/// T2D score keeps its note when `note` is set. +fn raw(note: bool) -> Summary { + let p = Path::new(env!("CARGO_MANIFEST_DIR")) + .join("../../../tests/parity/golden/summary-collect/all/all.json"); + let mut j = std::fs::read_to_string(p).unwrap(); + for (from, to) in [ + ("\"adjusted\": true", "\"adjusted\": false"), + ("\"percentile\": \"75\"", "\"percentile\": \"\""), + ] { + assert_eq!(j.matches(from).count(), 1, "{from}"); + j = j.replace(from, to); + } + if !note { + let from = "\"percentile_note\": \"percentile withheld: the input lists variants only\""; + assert_eq!(j.matches(from).count(), 1); + j = j.replace(from, "\"percentile_note\": \"\""); + } + Summary::parse(&j).unwrap() +} + +#[test] +fn a_withheld_percentile_is_not_called_a_missing_panel() { + let s = raw(true); + let txt = text::report(&s).unwrap(); + let page = html::report(&s).unwrap(); + for r in [&txt, &page] { + assert!(r.contains(WITHHELD), "{r}"); + assert!(!r.contains(NO_PANEL), "{r}"); + assert!( + !r.contains("scripts/setup.sh --ancestry-panel adds it"), + "{r}" + ); + } +} + +#[test] +fn no_note_keeps_the_no_panel_line() { + let s = raw(false); + let txt = text::report(&s).unwrap(); + let page = html::report(&s).unwrap(); + for r in [&txt, &page] { + assert!(r.contains(&format!("Raw score only: {NO_PANEL}")), "{r}"); + assert!(!r.contains(WITHHELD), "{r}"); + } +} diff --git a/rust/crates/og-reports/src/locityper.rs b/rust/crates/og-reports/src/locityper.rs index c61f82505..2e11e47b8 100644 --- a/rust/crates/og-reports/src/locityper.rs +++ b/rust/crates/og-reports/src/locityper.rs @@ -16,6 +16,11 @@ //! 2025, Zenodo 15879519 README): no warning, a weighted distance of 30 or //! less, and fewer than 1000 or fewer than 20% unexplained reads. //! +//! The authors calibrated that filter on HLA and KIR loci only. At an HLA +//! (`HLA-...`) or KIR (`KIR...`) locus the filter reads pass or fail. At any +//! other locus (CYP2D6, FCGR) it reads "uncalibrated", never a pass, and +//! the reason says what the rule alone would give there. +//! //! A locus Locityper did not finish is "not called", never a genotype. Exit //! 1 only when the BED cannot be read. //! @@ -134,11 +139,34 @@ fn warnings_of(res: &Value) -> Result, String> { } } -/// The authors' filter: pass, or fail with the reasons. +/// The authors' filter: pass, or fail with the reasons; at a locus they +/// did not calibrate it on, uncalibrated with the reasons the rule alone +/// gives (none when it would pass). #[derive(Debug, Clone, PartialEq, Eq)] pub enum Filter { Pass, Fail(Vec), + Uncalibrated(Vec), +} + +/// The start of the reason of an uncalibrated locus. +pub const UNCALIBRATED: &str = "the authors calibrated this filter on HLA and KIR loci only"; + +/// Whether the authors calibrated their filter on this locus: an HLA gene +/// (`HLA-DRB1`, `HLA-DQB1`) or the KIR cluster or a KIR gene (`KIR`, +/// `KIR2DL1`). Their benchmark covered those and nothing else. +pub fn calibrated(locus: &str) -> bool { + locus.starts_with("HLA-") || locus.starts_with("KIR") +} + +/// The filter of `locus`: the authors' rule where they calibrated it, +/// "uncalibrated" elsewhere. +fn filter_at(locus: &str, res: &Value, warns: &[String]) -> Filter { + match judge(res, warns) { + f if calibrated(locus) => f, + Filter::Fail(why) | Filter::Uncalibrated(why) => Filter::Uncalibrated(why), + Filter::Pass => Filter::Uncalibrated(Vec::new()), + } } fn judge(res: &Value, warns: &[String]) -> Filter { @@ -224,6 +252,17 @@ impl LocusRow { let (f, why) = match filter { Filter::Pass => ("pass", None), Filter::Fail(w) => ("fail", Some(w.join("; "))), + Filter::Uncalibrated(w) if w.is_empty() => ( + "uncalibrated", + Some(format!("{UNCALIBRATED}; by its rule alone it passes")), + ), + Filter::Uncalibrated(w) => ( + "uncalibrated", + Some(format!( + "{UNCALIBRATED}; by its rule alone it fails: {}", + w.join("; ") + )), + ), }; vec![ locus.clone(), @@ -317,7 +356,7 @@ pub fn row_for(name: &str, region: &str, gt_dir: &str, exit_code: i64) -> LocusR Ok(w) => w, Err(e) => return not_called(format!("res.json.gz cannot be read: {e}")), }; - let filter = judge(&res, &warnings); + let filter = filter_at(name, &res, &warnings); let get = |k| pycompat::value::get(&res, k).ok().flatten(); LocusRow::Called { locus: name.into(), @@ -385,8 +424,25 @@ fn report(gt_dir: &str, loci: &str, exit_code: i64, out: &str) -> Outcome { ) }) .count(); + let uncalibrated = rows + .iter() + .filter(|r| { + matches!( + r, + LocusRow::Called { + filter: Filter::Uncalibrated(_), + .. + } + ) + }) + .count(); + let outside = if uncalibrated > 0 { + format!(", {uncalibrated} uncalibrated (outside HLA and KIR)") + } else { + String::new() + }; Ok(format!( - "{called} of {} loci called, {pass} pass the authors' filter\n", + "{called} of {} loci called, {pass} pass the authors' filter{outside}\n", rows.len() )) } diff --git a/rust/crates/og-reports/src/mei.rs b/rust/crates/og-reports/src/mei.rs index 23ec79728..155661d09 100644 --- a/rust/crates/og-reports/src/mei.rs +++ b/rust/crates/og-reports/src/mei.rs @@ -18,8 +18,12 @@ //! (AnnotSV's table of the `annotsv-input` VCF) its genes, location, benign //! allele frequency and ACMG class. `--out-sites`: every row of the catalog //! with its status: `seen` (an insertion of the same element inside the -//! window), `not seen` (none, with a mean depth of at least 10 over the -//! window), or `not callable`. +//! 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, +//! or no call there and a mean under 10, zero included: too few reads to +//! tell). //! //! `annotsv-input` writes the calls the table lists as the VCF AnnotSV //! reads (``, `SVTYPE=INS`, `END=POS`, and the ID the table is @@ -400,20 +404,24 @@ fn site_status( let shown = crate::fixed(mean, 1); let calls = by_chrom.get(chrom.as_str()).map_or(&[][..], Vec::as_slice); let first = calls.partition_point(|c| c.pos < lo); - let hit = calls[first..] + let here: Vec<&Call> = calls[first..] .iter() .take_while(|c| c.pos <= hi) - .find(|c| c.element.name() == site[5]); - if let Some(c) = hit { + .filter(|c| c.element.name() == site[5]) + .copied() + .collect(); + let named = |c: &Call| { let cop = if c.copies == "1" { "y" } else { "ies" }; - return Ok([ - "seen".into(), - shown, - format!( - "{}:{} {} {} cop{cop} {}", - c.chrom, c.pos, c.subfamily, c.copies, c.filter - ), - ]); + format!( + "{}:{} {} {} cop{cop} {}", + c.chrom, c.pos, c.subfamily, c.copies, c.filter + ) + }; + if let Some(c) = here.iter().find(|c| c.filter == "PASS") { + return Ok(["seen".into(), shown, named(c)]); + } + if let Some(c) = here.first() { + return Ok([format!("call filtered out ({})", c.filter), shown, named(c)]); } if mean < MIN_DEPTH { return Ok(["not callable".into(), shown, ".".into()]); diff --git a/rust/crates/og-reports/src/ystr.rs b/rust/crates/og-reports/src/ystr.rs index 1f47390ed..7d25a96d5 100644 --- a/rust/crates/og-reports/src/ystr.rs +++ b/rust/crates/og-reports/src/ystr.rs @@ -18,9 +18,17 @@ //! reference copies (halves rounded up) plus GB / motif length, by floor //! division, so GB -2 on 11 copies of a 4 bp motif is `10.2` (ten repeats //! and two bases). Parts are summed; a span marker is one region; the -//! panel's offset is added last. Confidence: high (HipSTR's haploid filters -//! pass and 10 reads or more), low (the note says which filter failed), no -//! call, not callable. +//! panel's offset is added last, which puts the count on FamilyTreeDNA's +//! scale. A marker with no offset keeps the reference's scale, and its note +//! says so. Confidence: high (HipSTR's haploid filters pass, 10 reads or +//! more, and at least 70% of the reads show the called length), low (the +//! note says which test failed), no call, not callable. +//! +//! The read support comes from MALLREADS, HipSTR's most likely length per +//! read. HipSTR's own filters allow 15% of the reads with stutter and 15% +//! with a flank indel, so a clean call has at least 70% of its reads at the +//! called length. A call whose record has no MALLREADS is not high: nothing +//! shows that its reads agree. //! //! What changes on purpose: a motif length under 1, reference copies that //! are negative or not finite, and an order that is not a whole number are @@ -38,6 +46,11 @@ const MIN_Q: f64 = 0.9; const MAX_STUTTER: f64 = 0.15; const MAX_FLANK: f64 = 0.15; const FLANK: i128 = 10; +/// The share of reads that must show the called length for a high call. +const MIN_SUPPORT: f64 = 0.7; +/// The note of a count with no offset to FamilyTreeDNA's scale. +pub const REFERENCE_SCALE: &str = + "on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker"; pub const TSV_COLUMNS: [&str; 10] = [ "order", @@ -390,6 +403,16 @@ fn part_call(fmt: &HashMap) -> Result { if dp < MIN_READS { problems.push(format!("{dp} reads, fewer than {MIN_READS}")); } + match read_support(get("MALLREADS"), bp) { + None => { + problems.push("no per-read lengths (MALLREADS) to show that the reads agree".to_owned()) + } + Some((at, all)) if (at as f64) < MIN_SUPPORT * all as f64 => problems.push(format!( + "{at} of {all} reads show the called length, fewer than {}%", + (MIN_SUPPORT * 100.0).round() + )), + Some(_) => {} + } Ok(PartCall { bp, dp, @@ -400,6 +423,24 @@ fn part_call(fmt: &HashMap) -> Result { }) } +/// MALLREADS (`bp|reads;bp|reads`): the reads at length `bp` and all the +/// reads; `None` when the field is missing, empty or unreadable. +fn read_support(field: Option<&str>, bp: i128) -> Option<(i128, i128)> { + let (mut at, mut all) = (0i128, 0i128); + for item in field?.split(';') { + let (len, n) = item.split_once('|')?; + let (len, n) = (crate::int(len)?, crate::int(n)?); + if n < 0 { + return None; + } + all += n; + if len == bp { + at += n; + } + } + (all > 0).then_some((at, all)) +} + /// Python's `divmod` on ints: the quotient rounded down. fn divmod(a: i128, b: i128) -> (i128, i128) { let (mut q, mut r) = (a / b, a % b); @@ -535,6 +576,10 @@ pub fn marker_row( ); } row[3] = count_text(ref_sum, bp_sum, period, m.offset); + let mut notes = notes; + if m.offset.is_none() { + notes.push(REFERENCE_SCALE.to_owned()); + } row[4] = if problems.is_empty() { "high" } else { "low" }.into(); row[5] = dps.iter().min().map_or(String::new(), ToString::to_string); row[6] = sts.iter().max().map_or(String::new(), ToString::to_string); @@ -675,30 +720,74 @@ mod tests { #[test] fn part_calls() { let f = |s: &str| -> HashMap { - s.split(';') + s.split(',') .map(|kv| { let (k, v) = kv.split_once('=').unwrap(); (k.into(), v.into()) }) .collect() }; - let p = part_call(&f("GT=1;GB=-4;Q=0.95;DP=30;DSTUTTER=6;DFLANKINDEL=0")).unwrap(); + let p = part_call(&f( + "GT=1,GB=-4,Q=0.95,DP=30,DSTUTTER=6,DFLANKINDEL=0,MALLREADS=-4|24;0|6", + )) + .unwrap(); assert_eq!(p.problems, ["6 of 30 reads with stutter"]); - let p = part_call(&f("GT=1;GB=0;Q=0.5;DP=5;DSTUTTER=0;DFLANKINDEL=0")).unwrap(); + let p = part_call(&f( + "GT=1,GB=0,Q=0.5,DP=5,DSTUTTER=0,DFLANKINDEL=0,MALLREADS=0|5", + )) + .unwrap(); assert_eq!( p.problems, ["posterior 0.5 below 0.9", "5 reads, fewer than 10"] ); + let clean = "GT=1,GB=4,Q=0.99,DP=20,DSTUTTER=0,DFLANKINDEL=0"; + assert!( + part_call(&f(&format!("{clean},MALLREADS=4|14;0|6"))) + .unwrap() + .problems + .is_empty() + ); assert_eq!( - part_call(&f("GT=.;GB=.;FILTER=LowQ")).err().unwrap(), + part_call(&f("GT=.,GB=.,FILTER=LowQ")).err().unwrap(), "HipSTR made no genotype (LowQ)" ); assert_eq!( - part_call(&f("GT=0/1;GB=0/4")).err().unwrap(), + part_call(&f("GT=0/1,GB=0/4")).err().unwrap(), "two lengths on the Y chromosome (GB 0/4)" ); - assert_eq!(part_call(&f("GT=0;GB=x")).err().unwrap(), "unreadable GB x"); + assert_eq!(part_call(&f("GT=0,GB=x")).err().unwrap(), "unreadable GB x"); assert!(py_min(&[f64::NAN, 0.5]).is_nan()); + } + + /// Red first: every read-quality filter passes, yet most reads show + /// another length, so the call is not high. + #[test] + fn red_first_read_quality_alone_is_not_high() { + let f = |s: &str| -> HashMap { + s.split(',') + .map(|kv| { + let (k, v) = kv.split_once('=').unwrap(); + (k.into(), v.into()) + }) + .collect() + }; + let clean = "GT=1,GB=4,Q=0.99,DP=20,DSTUTTER=0,DFLANKINDEL=0"; + assert_eq!( + part_call(&f(&format!("{clean},MALLREADS=4|13;0|7"))) + .unwrap() + .problems, + ["13 of 20 reads show the called length, fewer than 70%"] + ); + assert_eq!( + part_call(&f(clean)).unwrap().problems, + ["no per-read lengths (MALLREADS) to show that the reads agree"] + ); + assert_eq!(read_support(Some("4|14;0|6"), 4), Some((14, 20))); + assert_eq!(read_support(Some("-4|3;0|15"), 0), Some((15, 18))); + assert_eq!(read_support(Some("."), 0), None); + assert_eq!(read_support(Some("0|0"), 0), None); + assert_eq!(read_support(Some("0|-1;4|5"), 4), None); + assert_eq!(read_support(None, 0), None); assert_eq!(py_min(&[0.5, f64::NAN]), 0.5); } } diff --git a/rust/crates/og-reports/tests/i411_locityper_uncalibrated.rs b/rust/crates/og-reports/tests/i411_locityper_uncalibrated.rs new file mode 100644 index 000000000..a3cae4f5d --- /dev/null +++ b/rust/crates/og-reports/tests/i411_locityper_uncalibrated.rs @@ -0,0 +1,195 @@ +//! `og locityper report`: the authors' filter reads pass or fail only at +//! the HLA and KIR loci they calibrated it on. At CYP2D6 and FCGR it reads +//! "uncalibrated", never a green pass, and the reason says what the rule +//! alone would give there. +//! +//! Red first: before the fix a clean CYP2D6 call read "pass" and a far +//! one "fail", the same as at HLA-DQB1. + +use std::fs; +use std::io::Write as _; +use std::num::NonZero; +use std::path::PathBuf; + +/// The five loci of `assets/locityper_loci.bed`. +const BED: &str = "# the shipped loci +chr1\t161506761\t161681047\tFCGR +chr6\t32484347\t32593538\tHLA-DRB1 +chr6\t32652603\t32669077\tHLA-DQB1 +chr19\t54723153\t54868521\tKIR +chr22\t42122284\t42152960\tCYP2D6 +"; + +/// A clean call: no warning, weighted distance 0.2, 12 of 900 reads +/// unexplained. +const CLEAN: &str = r#"{"genotype": "HG00733.1,NA19240.2", "quality": 27.8, "total_reads": 900, "unexpl_reads": 12, "weight_dist": 0.2, "options": 120, "dist_type": "edit"}"#; +/// The same call with a weighted distance of 31.5, above the authors' 30. +const FAR: &str = r#"{"genotype": "HG00733.1,NA19240.2", "quality": 27.8, "total_reads": 900, "unexpl_reads": 12, "weight_dist": 31.5, "options": 120, "dist_type": "edit"}"#; + +struct Dir(PathBuf); + +impl Dir { + fn new(name: &str) -> Dir { + let p = + std::env::temp_dir().join(format!("og-i411-locityper-{name}-{}", std::process::id())); + let _ = fs::remove_dir_all(&p); + fs::create_dir_all(&p).unwrap(); + Dir(p) + } + + fn p(&self, s: &str) -> String { + self.0.join(s).to_str().unwrap().to_owned() + } +} + +impl Drop for Dir { + fn drop(&mut self) { + let _ = fs::remove_dir_all(&self.0); + } +} + +/// `res.json.gz` and `success` of one locus, as Locityper 1.7.14 writes +/// them. +fn locus(root: &str, name: &str, json: &str) { + let d = PathBuf::from(root).join("loci").join(name); + fs::create_dir_all(&d).unwrap(); + let mut w = og_io::bgzf::Writer::new(Vec::new(), NonZero::new(1).unwrap()).unwrap(); + w.write_all(json.as_bytes()).unwrap(); + fs::write(d.join("res.json.gz"), w.finish().unwrap()).unwrap(); + fs::write(d.join("success"), "").unwrap(); +} + +/// The verb on the five loci, each with `json(locus)`: (stdout, rows as +/// (locus, filter, reason)). +fn report(d: &Dir, json: fn(&str) -> &'static str) -> (String, Vec<[String; 3]>) { + let bed = d.p("loci.bed"); + fs::write(&bed, BED).unwrap(); + let root = d.p("gt"); + for name in ["FCGR", "HLA-DRB1", "HLA-DQB1", "KIR", "CYP2D6"] { + locus(&root, name, json(name)); + } + let out = d.p("out.tsv"); + let args: Vec = ["--gt-dir", &root, "--loci", &bed, "--out", &out] + .iter() + .map(|s| (*s).to_owned()) + .collect(); + let (mut o, mut e) = (Vec::new(), Vec::new()); + let code = og_reports::locityper::cli(Some("report"), &args, &mut o, &mut e); + assert_eq!(code, 0, "{}", String::from_utf8_lossy(&e)); + let text = fs::read_to_string(&out).unwrap(); + let mut lines = text.lines(); + let head: Vec<&str> = lines.next().unwrap().split('\t').collect(); + let col = |n: &str| head.iter().position(|h| *h == n).unwrap(); + let (f, r) = (col("filter"), col("reason")); + let rows = lines + .map(|l| { + let c: Vec<&str> = l.split('\t').collect(); + assert_eq!(c.len(), 13, "{l}"); + [c[0].to_owned(), c[f].to_owned(), c[r].to_owned()] + }) + .collect(); + (String::from_utf8(o).unwrap(), rows) +} + +fn filters(rows: &[[String; 3]]) -> Vec<(&str, &str)> { + rows.iter() + .map(|r| (r[0].as_str(), r[1].as_str())) + .collect() +} + +#[test] +fn red_first_a_clean_cyp2d6_call_reads_uncalibrated_not_pass() { + let d = Dir::new("clean"); + let (stdout, rows) = report(&d, |_| CLEAN); + assert_eq!( + filters(&rows), + [ + ("FCGR", "uncalibrated"), + ("HLA-DRB1", "pass"), + ("HLA-DQB1", "pass"), + ("KIR", "pass"), + ("CYP2D6", "uncalibrated"), + ] + ); + for r in rows.iter().filter(|r| r[1] == "pass") { + assert_eq!(r[2], ".", "{r:?}"); + } + for r in rows.iter().filter(|r| r[1] == "uncalibrated") { + assert_eq!( + r[2], + "the authors calibrated this filter on HLA and KIR loci only; by its rule alone it passes", + "{r:?}" + ); + } + assert_eq!( + stdout, + "5 of 5 loci called, 3 pass the authors' filter, 2 uncalibrated (outside HLA and KIR)\n" + ); +} + +#[test] +fn a_far_call_fails_at_hla_and_kir_and_reads_uncalibrated_elsewhere() { + let d = Dir::new("far"); + let (stdout, rows) = report(&d, |_| FAR); + assert_eq!( + filters(&rows), + [ + ("FCGR", "uncalibrated"), + ("HLA-DRB1", "fail"), + ("HLA-DQB1", "fail"), + ("KIR", "fail"), + ("CYP2D6", "uncalibrated"), + ] + ); + for r in &rows { + let why = "weighted distance 31.50 is above 30"; + if r[1] == "fail" { + assert_eq!(r[2], why, "{r:?}"); + } else { + assert_eq!( + r[2], + format!( + "the authors calibrated this filter on HLA and KIR loci only; by its rule alone it fails: {why}" + ), + "{r:?}" + ); + } + } + assert_eq!( + stdout, + "5 of 5 loci called, 0 pass the authors' filter, 2 uncalibrated (outside HLA and KIR)\n" + ); +} + +#[test] +fn hla_and_kir_loci_by_name() { + use og_reports::locityper::calibrated; + for l in ["HLA-DRB1", "HLA-DQB1", "HLA-A", "KIR", "KIR2DL1"] { + assert!(calibrated(l), "{l}"); + } + for l in ["CYP2D6", "FCGR", "FCGR3A", "C4", "LPA", "hla-a", "HLA", ""] { + assert!(!calibrated(l), "{l}"); + } +} + +#[test] +fn only_hla_and_kir_calls_count_as_passing() { + // With every locus clean, HLA-DQB1 alone passes: the CYP2D6 row adds + // nothing to the pass count. + let d = Dir::new("mixed"); + let (stdout, rows) = report(&d, |l| if l == "HLA-DQB1" { CLEAN } else { FAR }); + assert_eq!( + filters(&rows), + [ + ("FCGR", "uncalibrated"), + ("HLA-DRB1", "fail"), + ("HLA-DQB1", "pass"), + ("KIR", "fail"), + ("CYP2D6", "uncalibrated"), + ] + ); + assert!( + stdout.starts_with("5 of 5 loci called, 1 pass the authors' filter, 2 uncalibrated"), + "{stdout}" + ); +} diff --git a/rust/crates/og-reports/tests/i411_mei_seen_pass.rs b/rust/crates/og-reports/tests/i411_mei_seen_pass.rs new file mode 100644 index 000000000..a16b1b138 --- /dev/null +++ b/rust/crates/og-reports/tests/i411_mei_seen_pass.rs @@ -0,0 +1,174 @@ +//! `og mei report` (step 50): what makes a known disease insertion site +//! "seen" (#411 sv-33, sv-34). +//! +//! MEGAnE writes every insertion it identifies, with its own filter result +//! in FILTER: `PASS`, or flags such as `LC` (low confidence). A call that +//! 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". +//! +//! 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 +//! reads the sites table `report` writes. + +use og_reports::mei::{Files, report}; +use std::collections::HashMap; +use std::fs; +use std::path::PathBuf; + +const HEAD: &str = "##fileformat=VCFv4.1 +##ALT= +#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT\tS +"; + +const SITES: &str = "gene\tchrom\tstart\tend\tsite\telement\tinheritance\tcondition\tclinvar\tpmid +FKTN\tchr9\t105639156\t105640156\t105639656\tSVA\tautosomal recessive\tFukuyama congenital muscular dystrophy\t3199\t9690476 +TAF1\tchrX\t71439993\t71440993\t71440493\tSVA\tX-linked\tX-linked dystonia-parkinsonism\t9862\t29474918 +"; + +/// 30x over both windows (30030 bases summed over 1001). +const DEPTH_30X: &str = + "chr9\t105639155\t105640156\tFKTN\t30030\t200\nchrX\t71439992\t71440993\tTAF1\t30030\t200\n"; + +/// An SVA call MEGAnE identified (MEPRED=PASS), one copy, with this FILTER. +fn sva(chrom: &str, pos: u64, filter: &str) -> String { + format!( + "{chrom}\t{pos}\t.\tN\t\t.\t{filter}\tSVTYPE=Retroposon/SVA;MEPRED=PASS;MEI_rpos={};MEI=SVA_F,1/1500,+/+;CN_conf=H\tCN\t1\n", + pos + 8 + ) +} + +struct Dir(PathBuf); + +impl Dir { + fn new(tag: &str) -> Dir { + let d = std::env::temp_dir().join(format!("og-i411-mei-{}-{tag}", std::process::id())); + let _ = fs::remove_dir_all(&d); + fs::create_dir_all(&d).unwrap(); + Dir(d) + } + fn p(&self, n: &str) -> String { + self.0.join(n).to_str().unwrap().to_owned() + } + fn put(&self, n: &str, t: &str) -> String { + fs::write(self.p(n), t).unwrap(); + self.p(n) + } +} + +impl Drop for Dir { + fn drop(&mut self) { + let _ = fs::remove_dir_all(&self.0); + } +} + +type Row = HashMap; + +/// The sites table, one map per catalog row, keyed by gene. +fn sites(tag: &str, records: &[String], depth: &str) -> HashMap { + let d = Dir::new(tag); + let f = Files { + vcf: &d.put("m.vcf", &format!("{HEAD}{}", records.concat())), + sites: &d.put("sites.tsv", SITES), + depth: &d.put("depth.tsv", depth), + annotsv: None, + out_calls: &d.p("calls.tsv"), + out_sites: &d.p("sites_out.tsv"), + }; + report("S", &f).unwrap(); + let text = fs::read_to_string(d.p("sites_out.tsv")).unwrap(); + let mut lines = text.lines(); + let head: Vec<&str> = lines.next().unwrap().split('\t').collect(); + lines + .map(|l| { + let row: Row = head + .iter() + .map(|h| (*h).to_owned()) + .zip(l.split('\t').map(str::to_owned)) + .collect(); + (row["gene"].clone(), row) + }) + .collect() +} + +fn status(rows: &HashMap, gene: &str) -> (String, String) { + (rows[gene]["status"].clone(), rows[gene]["call"].clone()) +} + +/// Red first: an SVA call at the FKTN site that MEGAnE flagged LC is not +/// "seen". The site says the call was filtered out, and why, and still +/// names the call. +#[test] +fn red_first_a_filtered_call_is_not_seen() { + let rows = sites("lc", &[sva("chr9", 105_639_660, "LC")], DEPTH_30X); + assert_eq!( + status(&rows, "FKTN"), + ( + "call filtered out (LC)".to_owned(), + "chr9:105639660 SVA_F 1 copy LC".to_owned() + ) + ); + assert_eq!(status(&rows, "TAF1").0, "not seen"); +} + +/// Red first: a filtered call at a thin window still names the call; it +/// does not hide behind "not callable". +#[test] +fn red_first_a_filtered_call_at_low_depth() { + let thin = "chr9\t105639155\t105640156\tFKTN\t5005\t30\n"; + let rows = sites("lc-thin", &[sva("chr9", 105_639_660, "LC")], thin); + assert_eq!(status(&rows, "FKTN").0, "call filtered out (LC)"); + assert_eq!(rows["FKTN"]["mean_depth"], "5.0"); +} + +/// A PASS call wins over a filtered one in the same window, whichever +/// comes first. +#[test] +fn a_pass_call_in_the_window_is_seen() { + let rows = sites( + "pass-and-lc", + &[ + sva("chr9", 105_639_400, "LC"), + sva("chr9", 105_639_660, "PASS"), + ], + DEPTH_30X, + ); + assert_eq!( + status(&rows, "FKTN"), + ( + "seen".to_owned(), + "chr9:105639660 SVA_F 1 copy PASS".to_owned() + ) + ); + // A PASS call at low depth is still seen: the call is the evidence. + let thin = "chr9\t105639155\t105640156\tFKTN\t5005\t30\n"; + let rows = sites("pass-thin", &[sva("chr9", 105_639_660, "PASS")], thin); + assert_eq!(status(&rows, "FKTN").0, "seen"); +} + +/// Without a call, zero depth, or no bedcov line at all, is "not callable" +/// with no call, never "not seen". +#[test] +fn zero_depth_is_not_callable() { + 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"] { + assert_eq!( + [ + rows[gene]["status"].as_str(), + &rows[gene]["mean_depth"], + &rows[gene]["call"] + ], + ["not callable", "0.0", "."], + "{gene}" + ); + } + let rows = sites("no-line", &[], ""); + assert_eq!(status(&rows, "FKTN").0, "not callable"); + 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"); +} diff --git a/rust/crates/og-reports/tests/i411_ystr_ftdna_scale.rs b/rust/crates/og-reports/tests/i411_ystr_ftdna_scale.rs new file mode 100644 index 000000000..67d7e0018 --- /dev/null +++ b/rust/crates/og-reports/tests/i411_ystr_ftdna_scale.rs @@ -0,0 +1,215 @@ +//! Step 45's counts are on FamilyTreeDNA's scale where a published counting +//! rule exists. +//! +//! A HipSTR VCF that calls every region of `assets/ystr_panel.tsv` at the +//! reference length (GB 0, every read at that length) is the GRCh38 +//! reference itself, so `og y str-report` must give the reference's +//! FamilyTreeDNA counts. `REFERENCE` holds them: the GRCh38 chrY sequence of +//! each marker counted by its NIST STRBase repeat structure (the panel's +//! motif column), which FamilyTreeDNA follows for these markers, and for +//! Y-GATA-H4 ISOGG's FamilyTreeDNA-NIST conversion (one less than NIST). +//! For example DYS19 is `[TCTA]12 CCTA [TCTA]3` there: FamilyTreeDNA counts +//! the TCTA blocks, 15, while HipSTR's region holds 16 repeat units. DYS449 +//! is `[TTTC]15 N50 [TTTC]14`, 29, while HipSTR's two parts hold 36 units. +//! DYS389II is `[TAGA]9 [CAGA]3 N48 [TAGA]13 [CAGA]5`, 30, while its span's +//! two parts round to 17 + 12 copies. +//! +//! The reads are 250 bp long here, so DYS389II and DYS448 (over 150 bp) are +//! counted too. + +use og_reports::y::cli; +use std::collections::BTreeMap; +use std::path::{Path, PathBuf}; + +/// Marker, FamilyTreeDNA count of the GRCh38 reference. +const REFERENCE: [(&str, &str); 24] = [ + ("DYS393", "12"), + ("DYS390", "24"), + ("DYS19", "15"), + ("DYS391", "11"), + ("DYS389I", "12"), + ("DYS392", "13"), + ("DYS389II", "30"), + ("DYS458", "16"), + ("DYS448", "19"), + ("DYS449", "29"), + ("DYS460", "10"), + ("Y-GATA-H4", "11"), + ("DYS456", "15"), + ("DYS576", "17"), + ("DYS570", "17"), + ("DYS438", "12"), + ("DYS481", "22"), + ("DYS505", "12"), + ("DYS549", "13"), + ("DYS522", "10"), + ("DYS533", "12"), + ("DYS635", "23"), + ("DYS643", "11"), + ("DYS461", "12"), +]; + +fn panel() -> String { + Path::new(env!("CARGO_MANIFEST_DIR")) + .join("../../../assets/ystr_panel.tsv") + .display() + .to_string() +} + +/// A scratch folder, removed when the test ends. +struct Tmp(PathBuf); + +impl Drop for Tmp { + fn drop(&mut self) { + let _ = std::fs::remove_dir_all(&self.0); + } +} + +fn tmp(tag: &str) -> Tmp { + let nanos = std::time::SystemTime::now() + .duration_since(std::time::UNIX_EPOCH) + .unwrap() + .as_nanos(); + let d = std::env::temp_dir().join(format!("og-i411-ystr-{tag}-{}-{nanos}", std::process::id())); + std::fs::create_dir(&d).unwrap(); + Tmp(d) +} + +fn og(verb: &str, args: &[String]) -> (u8, String) { + let (mut out, mut err) = (Vec::new(), Vec::new()); + let code = cli(Some(verb), args, &mut out, &mut err); + (code, String::from_utf8(err).unwrap()) +} + +/// Every region of the panel called with this GB, from 20 reads that all +/// show it, then the table by marker: the count, the confidence and the note. +fn reference_table(d: &Path, gb: &str) -> BTreeMap { + let s = |p: &Path| p.display().to_string(); + let bed = d.join("regions.bed"); + let (code, err) = og( + "str-bed", + &["--panel".into(), panel(), "--out".into(), s(&bed)], + ); + assert_eq!(code, 0, "{err}"); + let mut vcf = String::from( + "##fileformat=VCFv4.1\n#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT\tS1\n", + ); + for l in std::fs::read_to_string(&bed).unwrap().lines() { + let c: Vec<&str> = l.split('\t').collect(); + let pos: i64 = c[1].parse().unwrap(); + vcf += &format!( + "{}\t{}\t{}\tA\t.\t.\tPASS\tPERIOD={}\tGT:GB:Q:DP:DSTUTTER:DFLANKINDEL:MALLREADS\t0:{gb}:0.99:20:0:0:{gb}|20\n", + c[0], + pos - 1, + c[5], + c[3] + ); + } + let v = d.join("calls.vcf"); + std::fs::write(&v, vcf).unwrap(); + let (tsv, csv) = (d.join("o.tsv"), d.join("o.csv")); + let (code, err) = og( + "str-report", + &[ + "--panel".into(), + panel(), + "--vcf".into(), + s(&v), + "--tsv".into(), + s(&tsv), + "--csv".into(), + s(&csv), + "--read-length".into(), + "250".into(), + ], + ); + assert_eq!(code, 0, "{err}"); + let text = std::fs::read_to_string(&tsv).unwrap(); + text.lines() + .skip(1) + .map(|l| { + let c: Vec<&str> = l.split('\t').collect(); + (c[2].to_owned(), [c[3].into(), c[4].into(), c[9].into()]) + }) + .collect() +} + +/// The panel rows: marker and offset cell. +fn offsets() -> Vec<(String, String)> { + std::fs::read_to_string(panel()) + .unwrap() + .lines() + .filter(|l| !l.starts_with('#') && !l.starts_with("order\t")) + .map(|l| { + let c: Vec<&str> = l.split('\t').collect(); + (c[2].to_owned(), c[6].to_owned()) + }) + .collect() +} + +/// Red first: before the offsets, DYS19 read 16 and DYS449 36. +#[test] +fn the_reference_reads_familytreedna_s_counts() { + let d = tmp("ref"); + let t = reference_table(&d.0, "0"); + for (m, want) in REFERENCE { + assert_eq!( + [t[m][0].as_str(), t[m][1].as_str()], + [want, "high"], + "{m}: the GRCh38 reference on FamilyTreeDNA's scale" + ); + } + for (m, _) in REFERENCE { + assert!( + !t[m][2].contains(og_reports::ystr::REFERENCE_SCALE), + "{m}: a count on FamilyTreeDNA's scale does not say otherwise" + ); + } +} + +/// An offset no published count backs is a guess: every marker with one is +/// in `REFERENCE`, and every called marker without one says that its count +/// is on the reference's scale. +#[test] +fn every_offset_is_checked_and_every_other_count_says_its_scale() { + let checked: Vec<&str> = REFERENCE.iter().map(|(m, _)| *m).collect(); + let rows = offsets(); + let with: Vec<&str> = rows + .iter() + .filter(|(_, o)| o != ".") + .map(|(m, _)| m.as_str()) + .collect(); + let mut a = with.clone(); + let mut b = checked.clone(); + a.sort_unstable(); + b.sort_unstable(); + assert_eq!(a, b, "the markers with an offset are the checked ones"); + + let d = tmp("scale"); + let t = reference_table(&d.0, "0"); + for (m, o) in &rows { + let [count, conf, note] = &t[m]; + if conf == "not callable" { + continue; + } + assert!(!count.is_empty(), "{m}: called"); + assert_eq!( + o == ".", + note.contains(og_reports::ystr::REFERENCE_SCALE), + "{m}: offset {o}, note {note}" + ); + } +} + +/// A change in the reads moves the count from the reference's FamilyTreeDNA +/// count: one repeat more at every 4-base marker. +#[test] +fn a_change_counts_from_the_familytreedna_reference() { + let d = tmp("plus"); + let t = reference_table(&d.0, "4"); + assert_eq!(t["DYS19"][0], "16"); + assert_eq!(t["DYS393"][0], "13"); + assert_eq!(t["Y-GATA-H4"][0], "12"); + // DYS449's two parts each gain a repeat: 29 + 2. + assert_eq!(t["DYS449"][0], "31"); +} diff --git a/rust/crates/og-reports/tests/optin_locityper.rs b/rust/crates/og-reports/tests/optin_locityper.rs index aecdf3832..8aeaa0e9e 100644 --- a/rust/crates/og-reports/tests/optin_locityper.rs +++ b/rust/crates/og-reports/tests/optin_locityper.rs @@ -158,12 +158,14 @@ fn table(text: &str) -> Vec { .collect() } -/// The verb on CYP2D6 alone: its row. +/// The verb on HLA-DQB1 alone, a locus the authors calibrated their +/// filter on: its row. (CYP2D6 and FCGR read "uncalibrated", tested in +/// `i411_locityper_uncalibrated.rs`.) fn og_row(d: &Dir, n: usize, body: Body, success: bool, exit_code: i64) -> Row { let root = d.p(&format!("c{n}")); - gt_dir(&root, "CYP2D6", body, success); + gt_dir(&root, "HLA-DQB1", body, success); let bed = d.p(&format!("c{n}.bed")); - fs::write(&bed, "chr22\t42122284\t42152960\tCYP2D6\n").unwrap(); + fs::write(&bed, "chr6\t32652603\t32669077\tHLA-DQB1\n").unwrap(); let out = d.p(&format!("c{n}.tsv")); let (code, _, err) = og(&[ "--gt-dir", @@ -383,16 +385,16 @@ fn the_cli_writes_a_row_per_bed_locus_in_order() { let bed = d.p("loci.bed"); fs::write(&bed, BED).unwrap(); let root = d.p("gt"); - gt_dir(&root, "CYP2D6", Body::Res(res()), true); gt_dir( &root, - "HLA-DQB1", + "CYP2D6", Body::Res(Res { wd: Some("50"), ..res() }), true, ); + gt_dir(&root, "HLA-DQB1", Body::Res(res()), true); let out = d.p("cli.tsv"); let (code, stdout, err) = og(&[ "--gt-dir", @@ -414,7 +416,10 @@ fn the_cli_writes_a_row_per_bed_locus_in_order() { assert_eq!(lines[1][1], "chr6:32652604-32669077"); let st: Vec<&str> = lines[1..].iter().map(|r| r[2]).collect(); assert_eq!(st, ["called", "called", "not called"]); - assert!(stdout.contains("2 of 3 loci called, 1 pass"), "{stdout}"); + assert!( + stdout.contains("2 of 3 loci called, 1 pass the authors' filter, 1 uncalibrated"), + "{stdout}" + ); let bad = d.p("bad.bed"); fs::write(&bad, "chr6\tx\t10\tA\n").unwrap(); let (code, _, err) = og(&["--gt-dir", &root, "--loci", &bad, "--out", &d.p("bad.tsv")]); diff --git a/rust/crates/og-steps/src/longread.rs b/rust/crates/og-steps/src/longread.rs index f3dcb97bf..ed501097b 100644 --- a/rust/crates/og-steps/src/longread.rs +++ b/rust/crates/og-steps/src/longread.rs @@ -1,13 +1,551 @@ //! `og longread clair3-model`: the Clair3 model that matches the basecaller -//! of a long-read sample. +//! of an Oxford Nanopore sample. //! -//! Not ported yet: until its unit of the 1.0.0 plan lands, the verb says so -//! on stderr and exits 2, before reading any argument. +//! Clair3 has one model per pore, basecaller accuracy and basecaller model +//! version. A model trained on other basecalls still runs and still writes a +//! VCF, but every call is less accurate, and nothing in the output says so. +//! So step 03e never assumes a basecaller: it reads the basecaller model +//! from the BAM's `@RG` `DS` field (`basecall_model=...`, which Dorado writes +//! and step 02b carries), or takes it from `BASECALL_MODEL`, maps it here to +//! a model directory, and stops when no model matches or the image lacks it. +//! `CLAIR3_MODEL` still names a model directory outright. +//! +//! The verb runs inside the Clair3 image, so it checks the directory on the +//! filesystem it sees, and lists the image's models when it stops. +//! +//! `--basecaller-only` prints the basecaller model of a BAM's header (step +//! 02b reads an unaligned BAM's this way) and maps nothing. +use std::collections::BTreeSet; use std::io::Write; +use std::path::Path; + +use crate::paraphase::bam_header; + +const USAGE: &str = "usage: og longread clair3-model [--bam BAM] [--basecaller NAME] [--model DIR] [--models-dir DIR] [--basecaller-only] + Prints the Clair3 model directory for an ONT sample. --model (CLAIR3_MODEL) + wins; else --basecaller (BASECALL_MODEL); else the basecall_model= of the + BAM's @RG DS fields. Exit 1 when no model fits or the directory is missing. + --basecaller-only prints the BAM's basecaller model (nothing when none). +"; + +/// The Clair3 model directory name for a basecaller model name, or `None` +/// when Clair3 has no model for it. +/// +/// Dorado names a model `dna_r10.4.1_e8.2_400bps_sup@v5.0.0`; Clair3 names +/// the matching one `r1041_e82_400bps_sup_v500`, one digit per version part. +/// R9.4.1 basecalls (Dorado `dna_r9.4.1_e8_sup@v3.3`, Guppy +/// `dna_r9.4.1_450bps_sup`) take Clair3's two R9.4.1 models, trained on +/// Guppy 5 SUP and on Guppy 3.6/4.2 HAC. Fast basecalls, RNA, other pores +/// and other speeds have no Clair3 model. +pub fn clair3_model_for(basecaller: &str) -> Option { + let name = basecaller.trim(); + let name = name.strip_prefix("dna_").unwrap_or(name); + let (config, version) = match name.split_once('@') { + Some((c, v)) => (c, Some(v)), + None => (name, None), + }; + if let Some(rest) = config.strip_prefix("r10.4.1_e8.2_400bps_") { + let accuracy = match rest { + "sup" | "hac" => rest, + _ => return None, + }; + let digits = version_digits(version?)?; + return Some(format!("r1041_e82_400bps_{accuracy}_v{digits}")); + } + if let Some(rest) = config.strip_prefix("r9.4.1_") { + // e8_sup, 450bps_sup, 450bps_hac_prom: the pore's speed and the + // Guppy "prom" suffix do not change which Clair3 model fits. + let words: Vec<&str> = rest.split('_').collect(); + if words.contains(&"sup") { + return Some("r941_prom_sup_g5014".to_owned()); + } + if words.contains(&"hac") { + return Some("r941_prom_hac_g360+g422".to_owned()); + } + } + None +} + +/// `v5.0.0` -> `500`, `v4.1.0` -> `410`, `v5.0` -> `500`: one digit per +/// part, as Clair3's directory names have them. `None` for anything else. +fn version_digits(version: &str) -> Option { + let parts: Vec<&str> = version.strip_prefix('v')?.split('.').collect(); + if !(2..=3).contains(&parts.len()) { + return None; + } + let mut digits = String::new(); + for p in &parts { + if p.len() != 1 || !p.bytes().all(|b| b.is_ascii_digit()) { + return None; + } + digits.push_str(p); + } + if parts.len() == 2 { + digits.push('0'); + } + Some(digits) +} + +/// The distinct `basecall_model=` values of the header's `@RG` `DS` +/// fields, sorted, and how many read groups name none. +pub fn basecallers(header: &str) -> (Vec, usize) { + let mut found = BTreeSet::new(); + let mut unnamed = 0; + for line in header.split('\n').filter(|l| l.starts_with("@RG\t")) { + let mut named = false; + for tag in line.trim_end_matches('\r').split('\t').skip(1) { + let Some(ds) = tag.strip_prefix("DS:") else { + continue; + }; + for word in ds.split(' ') { + if let Some(v) = word.strip_prefix("basecall_model=") + && !v.is_empty() + { + found.insert(v.to_owned()); + named = true; + } + } + } + if !named { + unnamed += 1; + } + } + (found.into_iter().collect(), unnamed) +} + +/// The one basecaller model of every read group of the header; `None` +/// when no read group names one. Read groups that name different models, +/// or some that name one and some none, are an error: one Clair3 model +/// cannot be chosen for the whole BAM from them. +pub fn bam_basecaller(header: &str) -> Result, String> { + let (found, unnamed) = basecallers(header); + match found.as_slice() { + [] => Ok(None), + [one] if unnamed == 0 => Ok(Some(one.clone())), + [one] => Err(format!( + "{unnamed} read group(s) name no basecaller model while others name {one}, so the model of every read is not known" + )), + many => Err(format!( + "the read groups name more than one basecaller model ({}), and one Clair3 model cannot fit them all", + many.join(", ") + )), + } +} + +/// The directories under `dir`, sorted; empty when it cannot be read. +fn models_in(dir: &str) -> Vec { + let Ok(entries) = std::fs::read_dir(dir) else { + return Vec::new(); + }; + let mut names: Vec = entries + .flatten() + .filter(|e| e.path().is_dir()) + .map(|e| e.file_name().to_string_lossy().into_owned()) + .collect(); + names.sort(); + names +} + +#[derive(Default)] +struct Opts { + bam: Option, + basecaller: Option, + model: Option, + models_dir: Option, + basecaller_only: bool, +} + +fn parse(args: &[String]) -> Result { + let mut o = Opts::default(); + let mut it = args.iter(); + while let Some(a) = it.next() { + let (key, inline) = match a.split_once('=') { + Some((k, v)) if k.starts_with("--") => (k, Some(v.to_owned())), + _ => (a.as_str(), None), + }; + let slot = match key { + "--basecaller-only" if inline.is_none() => { + o.basecaller_only = true; + continue; + } + "--bam" => &mut o.bam, + "--basecaller" => &mut o.basecaller, + "--model" => &mut o.model, + "--models-dir" => &mut o.models_dir, + _ => return Err(format!("unrecognized arguments: {a}")), + }; + let value = match inline { + Some(v) => v, + None => it + .next() + .ok_or_else(|| format!("argument {key}: expected one argument"))? + .clone(), + }; + *slot = Some(value); + } + Ok(o) +} + +/// `og longread clair3-model ARGS`: the model directory on stdout, or the +/// reason on stderr and exit 1 (2 for a usage error). +pub fn clair3_model_cli(args: &[String], out: &mut dyn Write, err: &mut dyn Write) -> u8 { + if args.iter().any(|a| a == "-h" || a == "--help") { + let _ = out.write_all(USAGE.as_bytes()); + return 0; + } + let o = match parse(args) { + Ok(o) => o, + Err(msg) => { + let _ = write!(err, "{USAGE}"); + let _ = writeln!(err, "og longread clair3-model: error: {msg}"); + return 2; + } + }; + match run(&o) { + Ok(Some(line)) => { + let _ = writeln!(out, "{line}"); + 0 + } + Ok(None) => 0, + Err(msg) => { + let _ = writeln!(err, "ERROR: {msg}"); + 1 + } + } +} + +fn run(o: &Opts) -> Result, String> { + let bam = o.bam.as_deref().unwrap_or("the BAM"); + let from_bam = || -> Result, String> { + match &o.bam { + Some(path) => bam_basecaller(&bam_header(path).map_err(|e| e.0)?) + .map_err(|e| format!("{bam}: {e}")), + None => Ok(None), + } + }; + if o.basecaller_only { + if o.bam.is_none() { + return Err("--basecaller-only needs --bam".to_owned()); + } + return from_bam(); + } + let models_dir = o.models_dir.as_deref().unwrap_or("/opt/models"); + let available = || { + let names = models_in(models_dir); + if names.is_empty() { + format!("no model directory found under {models_dir}") + } else { + format!("models in {models_dir}: {}", names.join(" ")) + } + }; + let (path, why) = if let Some(model) = o.model.as_deref().filter(|m| !m.is_empty()) { + (model.to_owned(), "set by CLAIR3_MODEL".to_owned()) + } else { + let (basecaller, source) = if let Some(b) = + o.basecaller.as_deref().filter(|b| !b.is_empty()) + { + (b.to_owned(), "BASECALL_MODEL") + } else { + match from_bam() { + Ok(Some(one)) => (one, "the BAM's read group"), + Ok(None) => { + return Err(format!( + "{bam} names no basecaller model (no basecall_model= in an @RG DS field), so the Clair3 model cannot be chosen. Set BASECALL_MODEL to the Dorado model the reads were basecalled with (for example dna_r10.4.1_e8.2_400bps_sup@v5.0.0), or CLAIR3_MODEL to a model directory; {}.", + available() + )); + } + Err(e) => { + return Err(format!( + "{e}. Set CLAIR3_MODEL to the model directory to use, or BASECALL_MODEL; {}.", + available() + )); + } + } + }; + let Some(dir) = clair3_model_for(&basecaller) else { + return Err(format!( + "Clair3 has no model for the basecaller model {basecaller} (from {source}). Clair3 models exist for R10.4.1 400 bps HAC and SUP and for R9.4.1 HAC and SUP basecalls, not for fast ones. Set CLAIR3_MODEL to a model directory if you know which fits; {}.", + available() + )); + }; + ( + format!("{}/{dir}", models_dir.trim_end_matches('/')), + format!("basecaller {basecaller}, from {source}"), + ) + }; + if !Path::new(&path).is_dir() { + return Err(format!( + "the Clair3 model {path} ({why}) is not in the image. Set CLAIR3_MODEL to a model directory that exists; {}.", + available() + )); + } + Ok(Some(path)) +} + +#[cfg(test)] +mod tests { + use super::*; + + fn model(b: &str) -> Option { + clair3_model_for(b) + } + + #[test] + fn r10_sup_and_hac_map_by_version() { + for (basecaller, want) in [ + ( + "dna_r10.4.1_e8.2_400bps_sup@v4.1.0", + "r1041_e82_400bps_sup_v410", + ), + ( + "dna_r10.4.1_e8.2_400bps_hac@v4.1.0", + "r1041_e82_400bps_hac_v410", + ), + ( + "dna_r10.4.1_e8.2_400bps_sup@v4.3.0", + "r1041_e82_400bps_sup_v430", + ), + ( + "dna_r10.4.1_e8.2_400bps_sup@v5.0.0", + "r1041_e82_400bps_sup_v500", + ), + ( + "dna_r10.4.1_e8.2_400bps_hac@v5.0.0", + "r1041_e82_400bps_hac_v500", + ), + ( + "dna_r10.4.1_e8.2_400bps_sup@v5.2.0", + "r1041_e82_400bps_sup_v520", + ), + ( + "dna_r10.4.1_e8.2_400bps_hac@v5.2.0", + "r1041_e82_400bps_hac_v520", + ), + ( + "dna_r10.4.1_e8.2_400bps_hac@v6.0.0", + "r1041_e82_400bps_hac_v600", + ), + ( + "dna_r10.4.1_e8.2_400bps_sup@v6.0.0", + "r1041_e82_400bps_sup_v600", + ), + ("r10.4.1_e8.2_400bps_sup@v5.0", "r1041_e82_400bps_sup_v500"), + ( + " dna_r10.4.1_e8.2_400bps_sup@v5.0.0\n", + "r1041_e82_400bps_sup_v500", + ), + ] { + assert_eq!(model(basecaller).as_deref(), Some(want), "{basecaller}"); + } + } + + #[test] + fn r9_maps_to_the_two_r9_models() { + for (basecaller, want) in [ + ("dna_r9.4.1_e8_sup@v3.3", "r941_prom_sup_g5014"), + ("dna_r9.4.1_e8_sup@v3.6", "r941_prom_sup_g5014"), + ("dna_r9.4.1_450bps_sup", "r941_prom_sup_g5014"), + ("dna_r9.4.1_450bps_sup_prom", "r941_prom_sup_g5014"), + ("dna_r9.4.1_e8_hac@v3.3", "r941_prom_hac_g360+g422"), + ("dna_r9.4.1_450bps_hac_prom", "r941_prom_hac_g360+g422"), + ] { + assert_eq!(model(basecaller).as_deref(), Some(want), "{basecaller}"); + } + } + + #[test] + fn unknown_basecallers_map_to_nothing() { + for basecaller in [ + "", + "dna_r10.4.1_e8.2_400bps_fast@v5.0.0", + "dna_r9.4.1_e8_fast@v3.4", + "dna_r10.4.1_e8.2_260bps_sup@v4.0.0", + "dna_r10.4.1_e8.2_400bps_sup", + "dna_r10.4.1_e8.2_400bps_sup@v10.0.0", + "dna_r10.4.1_e8.2_400bps_sup@5.0.0", + "dna_r10.4.1_e8.2_400bps_sup@v5", + "rna004_130bps_sup@v5.0.0", + "dna_r10.4.1_e8.2_400bps_sup_v500", + "hifi_revio", + ] { + assert_eq!(model(basecaller), None, "{basecaller:?}"); + } + } + + #[test] + fn basecallers_come_from_rg_ds_only() { + let header = "@HD\tVN:1.6\n\ + @RG\tID:a\tPL:ONT\tDS:runid=x basecall_model=dna_r10.4.1_e8.2_400bps_sup@v5.0.0 modbase_models=m\n\ + @RG\tID:b\tDS:basecall_model=dna_r10.4.1_e8.2_400bps_sup@v5.0.0\r\n\ + @PG\tID:p\tDS:basecall_model=not_a_read_group\n\ + @CO\tbasecall_model=comment\n"; + assert_eq!( + basecallers(header), + (vec!["dna_r10.4.1_e8.2_400bps_sup@v5.0.0".to_owned()], 0) + ); + assert_eq!( + bam_basecaller(header), + Ok(Some("dna_r10.4.1_e8.2_400bps_sup@v5.0.0".to_owned())) + ); + let two = "@RG\tID:a\tDS:basecall_model=x@v1.0.0\n@RG\tID:b\tDS:basecall_model=y@v1.0.0\n"; + assert_eq!(basecallers(two).0.len(), 2); + assert!(bam_basecaller(two).is_err()); + assert_eq!(basecallers("@RG\tID:a\tPL:ONT\n"), (Vec::new(), 1)); + assert_eq!(bam_basecaller("@RG\tID:a\tPL:ONT\n"), Ok(None)); + assert_eq!(bam_basecaller("@HD\tVN:1.6\n"), Ok(None)); + // One read group named, one not: the other's reads may be from any + // basecaller, so no model is inferred. + let partial = "@RG\tID:a\tDS:basecall_model=x@v1.0.0\n@RG\tID:b\tDS:runid=r2\n"; + assert_eq!(basecallers(partial), (vec!["x@v1.0.0".to_owned()], 1)); + let e = bam_basecaller(partial).unwrap_err(); + assert!( + e.contains("1 read group(s) name no basecaller model"), + "{e}" + ); + } + + fn scratch(name: &str) -> std::path::PathBuf { + let d = std::env::temp_dir().join(format!("og-longread-{name}-{}", std::process::id())); + let _ = std::fs::remove_dir_all(&d); + std::fs::create_dir_all(d.join("r1041_e82_400bps_sup_v500")).unwrap(); + std::fs::create_dir_all(d.join("hifi_revio")).unwrap(); + d + } + + /// A BAM holding only a header: BGZF is gzip, which the reader takes. + fn bam(dir: &Path, name: &str, header: &str) -> String { + use std::io::Write as _; + let mut raw = b"BAM\x01".to_vec(); + raw.extend_from_slice(&i32::try_from(header.len()).unwrap().to_le_bytes()); + raw.extend_from_slice(header.as_bytes()); + raw.extend_from_slice(&0i32.to_le_bytes()); + let path = dir.join(name); + let mut gz = flate2::write::GzEncoder::new( + std::fs::File::create(&path).unwrap(), + flate2::Compression::default(), + ); + gz.write_all(&raw).unwrap(); + gz.finish().unwrap(); + path.to_string_lossy().into_owned() + } + + fn cli(args: &[&str]) -> (u8, String, String) { + let args: Vec = args.iter().map(|s| (*s).to_owned()).collect(); + let (mut out, mut err) = (Vec::new(), Vec::new()); + let code = clair3_model_cli(&args, &mut out, &mut err); + ( + code, + String::from_utf8(out).unwrap(), + String::from_utf8(err).unwrap(), + ) + } + + #[test] + fn the_cli_picks_checks_and_refuses() { + let d = scratch("cli"); + let models = d.to_string_lossy().into_owned(); + let with = bam( + &d, + "with.bam", + "@RG\tID:a\tDS:basecall_model=dna_r10.4.1_e8.2_400bps_sup@v5.0.0\n", + ); + let (code, out, _) = cli(&["--bam", &with, "--models-dir", &models]); + assert_eq!(code, 0); + assert_eq!(out, format!("{models}/r1041_e82_400bps_sup_v500\n")); + + // BASECALL_MODEL wins over the BAM, and a missing directory stops. + let (code, out, err) = cli(&[ + "--bam", + &with, + "--basecaller", + "dna_r10.4.1_e8.2_400bps_hac@v4.1.0", + "--models-dir", + &models, + ]); + assert_eq!((code, out.as_str()), (1, "")); + assert!(err.contains("r1041_e82_400bps_hac_v410"), "{err}"); + assert!(err.contains("is not in the image"), "{err}"); + assert!( + err.contains("hifi_revio r1041_e82_400bps_sup_v500"), + "{err}" + ); + + // CLAIR3_MODEL wins over both, and is checked too. + let own = format!("{models}/hifi_revio"); + let (code, out, _) = cli(&[ + "--bam", + &with, + "--basecaller", + "x", + "--model", + &own, + "--models-dir", + &models, + ]); + assert_eq!((code, out), (0, format!("{own}\n"))); + let (code, _, err) = cli(&["--model", "/no/such/model", "--models-dir", &models]); + assert_eq!(code, 1); + assert!(err.contains("CLAIR3_MODEL"), "{err}"); + + // No basecaller anywhere, and a fast basecaller: both stop. + let without = bam(&d, "without.bam", "@RG\tID:a\tPL:ONT\n"); + let (code, _, err) = cli(&["--bam", &without, "--models-dir", &models]); + assert_eq!(code, 1); + assert!( + err.contains("BASECALL_MODEL") && err.contains("CLAIR3_MODEL"), + "{err}" + ); + let (code, _, err) = cli(&[ + "--basecaller", + "dna_r10.4.1_e8.2_400bps_fast@v5.0.0", + "--models-dir", + &models, + ]); + assert_eq!(code, 1); + assert!(err.contains("has no model"), "{err}"); + + // --basecaller-only prints what the header names, or nothing. + let (code, out, _) = cli(&["--bam", &with, "--basecaller-only"]); + assert_eq!( + (code, out.as_str()), + (0, "dna_r10.4.1_e8.2_400bps_sup@v5.0.0\n") + ); + let (code, out, _) = cli(&["--bam", &without, "--basecaller-only"]); + assert_eq!((code, out.as_str()), (0, "")); + + // A BAM with one read group named and one not: no model is inferred, + // in either mode, but BASECALL_MODEL still decides. + let partial = bam( + &d, + "partial.bam", + "@RG\tID:a\tDS:basecall_model=dna_r10.4.1_e8.2_400bps_sup@v5.0.0\n@RG\tID:b\tPL:ONT\n", + ); + let (code, out, err) = cli(&["--bam", &partial, "--models-dir", &models]); + assert_eq!((code, out.as_str()), (1, "")); + assert!( + err.contains("name no basecaller model while others name"), + "{err}" + ); + let (code, out, _) = cli(&["--bam", &partial, "--basecaller-only"]); + assert_eq!((code, out.as_str()), (1, "")); + let (code, out, _) = cli(&[ + "--bam", + &partial, + "--basecaller", + "dna_r10.4.1_e8.2_400bps_sup@v5.0.0", + "--models-dir", + &models, + ]); + assert_eq!( + (code, out), + (0, format!("{models}/r1041_e82_400bps_sup_v500\n")) + ); -/// `og longread clair3-model ARGS`: not ported yet, so one line on stderr and exit 2. -pub fn clair3_model_cli(_args: &[String], _out: &mut dyn Write, err: &mut dyn Write) -> u8 { - let _ = writeln!(err, "og longread clair3-model: not ported yet"); - 2 + // A usage error is exit 2. + let (code, _, err) = cli(&["--og-scaffold-probe"]); + assert_eq!(code, 2); + assert!(err.contains("unrecognized arguments"), "{err}"); + let _ = std::fs::remove_dir_all(&d); + } } diff --git a/rust/crates/og-steps/src/traits.rs b/rust/crates/og-steps/src/traits.rs index 0bf6a38b0..16098ad04 100644 --- a/rust/crates/og-steps/src/traits.rs +++ b/rust/crates/og-steps/src/traits.rs @@ -735,6 +735,82 @@ fn read_phased(path: &str, wanted: &HashSet) -> Result { } Ok(out) } +/// The two haplotypes of a key that is one diplotype (`a/b`). An empty key +/// or several diplotypes (`a/b|c/d`, whose reading already says what phase +/// would decide) give `None`. +fn assumed_copies<'a>(r: &'a Rule, key: &str) -> Option<(&'a Hap, &'a Hap)> { + if key.is_empty() || key.contains('|') { + return None; + } + let (a, b) = key.split_once('/')?; + let hap = |n: &str| r.haps.iter().find(|h| h.name == n); + Some((hap(a)?, hap(b)?)) +} +/// "x and y", or "x, y and z". +fn join_and(items: &[String]) -> String { + match items { + [] => String::new(), + [one] => one.clone(), + [rest @ .., last] => format!("{} and {last}", rest.join(", ")), + } +} +/// Where the changed alleles (the alt of each heterozygous site) sit, given +/// the alleles of one copy: the other copy carries the rest. +fn placement(r: &Rule, het: &[usize], copy: &[String]) -> String { + let alt = |i: &usize| format!("{} {}", r.sites[*i].row["rsid"], r.sites[*i].row["alt"]); + let (on, off): (Vec, Vec) = het + .iter() + .partition(|i| copy[**i] == r.sites[**i].row["alt"]); + let all = join_and(&het.iter().map(alt).collect::>()); + if on.is_empty() || off.is_empty() { + format!("{all} sit on one copy") + } else if het.len() == 2 { + format!("{all} sit on different copies") + } else { + format!( + "{} sit on one copy and {} on the other", + join_and(&on.iter().map(alt).collect::>()), + join_and(&off.iter().map(alt).collect::>()) + ) + } +} +/// The reading when read-backed phase puts the alleles on copies the rule +/// does not describe, where the genotypes alone read `label`. +fn phased_apart( + r: &Rule, + het: &[usize], + copies: [(&Vec, Option); 2], + label: &str, +) -> String { + let rs: Vec<_> = r.sites.iter().map(|s| s.row["rsid"].as_str()).collect(); + let name = |(h, n): (&Vec, Option)| { + n.map_or_else( + || format!("{} at {}", h.join(","), rs.join(", ")), + |n| r.haps[n].name.clone(), + ) + }; + let changed = copies + .iter() + .filter(|(h, _)| h.iter().zip(&r.sites).any(|(a, s)| a == &s.row["alt"])) + .count(); + let unknown = copies.iter().filter(|(_, n)| n.is_none()).count(); + format!( + "Read-backed phase shows that {}: the copies are {} and {}{}. This rule does not describe {}, so the pair is not read; without phase these genotypes would read {label}.", + placement(r, het, copies[0].0), + name(copies[0]), + name(copies[1]), + if changed == 1 { + ", so one copy is changed and the other is not" + } else { + "" + }, + if unknown == 1 { + "that copy" + } else { + "those copies" + } + ) +} fn rule_line(r: &Rule, gt: &Genotypes, phased: Option<&Phased>) -> Row { let g: Vec<_> = r.sites.iter().map(|s| genotype(s, gt)).collect(); let rs: Vec<_> = r.sites.iter().map(|s| s.row["rsid"].as_str()).collect(); @@ -830,34 +906,86 @@ fn rule_line(r: &Rule, gt: &Genotypes, phased: Option<&Phased>) -> Row { } else { "not_needed" }; + let het: Vec<_> = g + .iter() + .enumerate() + .filter(|(_, g)| g.alleles[0] != g.alleles[1]) + .map(|(i, _)| i) + .collect(); + // The two copies read-backed phase gives, when one phase block holds + // every heterozygous site; the homozygous sites are on both copies. + let from_reads = || -> Option<(Vec, Vec)> { + let calls: Vec<_> = het + .iter() + .map(|i| phased.and_then(|p| p.get(&r.sites[*i].key()))) + .collect::>()?; + if !calls.iter().all(|v| v.2 == calls[0].2) { + return None; + } + let mut h1: Vec<_> = g.iter().map(|g| g.alleles[0].clone()).collect(); + let mut h2: Vec<_> = g.iter().map(|g| g.alleles[1].clone()).collect(); + for (i, c) in het.iter().zip(calls) { + h1[*i] = c.0.clone(); + h2[*i] = c.1.clone(); + } + Some((h1, h2)) + }; + let why = if phased.is_some() { + "no read or read pair covered them together" + } else { + "no phasing ran (no BAM, or phasing failed)" + }; + let mut caveat = String::new(); let key = if r.meta["needs_phase"] == "no" { - allowed(r, &g.iter().map(|g| g.alleles.clone()).collect::>()).join("|") + let key = allowed(r, &g.iter().map(|g| g.alleles.clone()).collect::>()).join("|"); + // One diplotype read without phase from two or more heterozygous + // sites assumes which alleles share a copy: read-backed phase checks + // it, and without it the reading says what it assumes. + let assumed = assumed_copies(r, &key); + match (het.len() >= 2, assumed) { + (true, Some((a, b))) => match from_reads() { + Some((h1, h2)) => { + phase = "read_backed"; + let n1 = r.haps.iter().position(|h| h.alleles == h1); + let n2 = r.haps.iter().position(|h| h.alleles == h2); + if let (Some(x), Some(y)) = (n1, n2) { + format!("{}/{}", r.haps[x.min(y)].name, r.haps[x.max(y)].name) + } else { + let label = r + .combos + .iter() + .rev() + .find(|c| c.key == key) + .map_or(key.as_str(), |c| c.label.as_str()); + return finish( + out, + phase, + ".", + Status::OtherHaplotype, + phased_apart(r, &het, [(&h1, n1), (&h2, n2)], label), + ); + } + } + None => { + caveat = format!( + " Phase unknown: this reading assumes {} (the copies {} and {}); {why}, so that is not checked.", + placement(r, &het, &a.alleles), + a.name, + b.name + ); + key + } + }, + _ => key, + } } else { - let het: Vec<_> = g - .iter() - .enumerate() - .filter(|(_, g)| g.alleles[0] != g.alleles[1]) - .map(|(i, _)| i) - .collect(); let mut h1: Vec<_> = g.iter().map(|g| g.alleles[0].clone()).collect(); let mut h2: Vec<_> = g.iter().map(|g| g.alleles[1].clone()).collect(); if het.len() >= 2 { - let calls: Option> = het - .iter() - .map(|i| phased.and_then(|p| p.get(&r.sites[*i].key()))) - .collect(); - if let Some(calls) = calls.filter(|c| c.iter().all(|v| v.2 == c[0].2)) { - for (i, c) in het.iter().zip(calls) { - h1[*i] = c.0.clone(); - h2[*i] = c.1.clone(); - } + if let Some((p1, p2)) = from_reads() { + (h1, h2) = (p1, p2); phase = "read_backed"; } else { - let why = if phased.is_some() { - "no read or read pair covered them together" - } else { - "no phasing ran (no BAM, or phasing failed)" - }; return finish( out, "unphased", @@ -900,7 +1028,13 @@ fn rule_line(r: &Rule, gt: &Genotypes, phased: Option<&Phased>) -> Row { .rev() .find(|c| !key.is_empty() && c.key == key) { - Some(c) => finish(out, phase, &c.label, Status::Called, c.reading.clone()), + Some(c) => finish( + out, + phase, + &c.label, + Status::Called, + format!("{}{caveat}", c.reading), + ), None => finish( out, phase, @@ -923,7 +1057,7 @@ fn stage_tsv(path: &str, columns: &[&str], rows: &[Row]) -> Result { } fn phase_vcf(path: &str, sample: &str, rules: &[Rule], gt: &Genotypes) -> Result { let mut sites = BTreeMap::new(); - for r in rules.iter().filter(|r| r.meta["needs_phase"] == "yes") { + for r in rules { let calls: Option> = r .sites .iter() @@ -932,6 +1066,17 @@ fn phase_vcf(path: &str, sample: &str, rules: &[Rule], gt: &Genotypes) -> Result (g.status == Status::Called).then_some(g) }) .collect(); + // A rule that reads without phase sends its sites only when the + // genotypes read one diplotype that assumes which alleles share a + // copy: read-backed phase then checks that assumption. + let calls = calls.filter(|c| { + r.meta["needs_phase"] == "yes" + || assumed_copies( + r, + &allowed(r, &c.iter().map(|g| g.alleles.clone()).collect::>()).join("|"), + ) + .is_some() + }); if let Some(calls) = calls { let het: Vec<_> = r .sites @@ -1457,6 +1602,154 @@ mod tests { let gt = genotypes(r, &[0, 0, 0]); assert_eq!(rule_line(r, >, None)["phase"], "not_needed"); } + /// A rule read without phase (HFE, SERPINA1, GC, CAD9p21, MAPT) that + /// gets one diplotype from two heterozygous sites assumes which alleles + /// share a copy. Unphased, the reading says so; read-backed phase in one + /// block confirms it, or puts the alleles on copies the rule does not + /// describe and the pair is not read. + #[test] + fn a_double_heterozygote_read_without_phase_says_what_it_assumes() { + let (_, rules) = assets(); + let rule = |id: &str| rules.iter().find(|r| r.id == id).unwrap(); + // Phase of each site: 0|1 puts the alt on the second copy. + let phased = |r: &Rule, gts: &[&str], ps: [&str; 2]| -> Phased { + r.sites + .iter() + .zip(gts) + .zip(ps) + .map(|((s, gt), ps)| { + let (a, b) = gt.split_once('|').unwrap(); + let base = |i: &str| s.row[if i == "1" { "alt" } else { "ref" }].clone(); + (s.key(), (base(a), base(b), ps.to_owned())) + }) + .collect() + }; + for (id, label, place) in [ + ( + "HFE", + "C282Y/H63D", + "sit on different copies (the copies C282Y and H63D)", + ), + ( + "SERPINA1", + "PiSZ", + "sit on different copies (the copies S and Z)", + ), + ( + "GC", + "Gc1S/Gc2", + "sit on different copies (the copies Gc1S and Gc2)", + ), + ( + "CAD9p21", + "one risk copy", + "sit on one copy (the copies nonrisk and risk)", + ), + ("MAPT", "H1/H2", "sit on one copy (the copies H1 and H2)"), + ] { + let r = rule(id); + let gt = genotypes(r, &[1, 1]); + let plain = r.combos.iter().find(|c| c.label == label).unwrap(); + let line = rule_line(r, >, None); + assert_eq!( + (&line["status"][..], &line["result"][..], &line["phase"][..]), + ("called", label, "not_used"), + "{id}" + ); + assert!(line["reading"].starts_with(&plain.reading), "{id}"); + assert!( + line["reading"].contains("Phase unknown"), + "{id}: {}", + line["reading"] + ); + assert!(line["reading"].contains(place), "{id}: {}", line["reading"]); + assert!(line["reading"].contains("no phasing ran"), "{id}"); + let rs = &r.sites; + assert!( + line["reading"].contains(&format!( + "{} {} and {} {}", + rs[0].row["rsid"], rs[0].row["alt"], rs[1].row["rsid"], rs[1].row["alt"] + )), + "{id}: {}", + line["reading"] + ); + // Phased as the reading assumes: the plain reading, no caveat. + let same = if place.contains("different") { + ["1|0", "0|1"] + } else { + ["1|0", "1|0"] + }; + let other = if place.contains("different") { + ["1|0", "1|0"] + } else { + ["1|0", "0|1"] + }; + let line = rule_line(r, >, Some(&phased(r, &same, ["5", "5"]))); + assert_eq!( + (&line["status"][..], &line["result"][..], &line["phase"][..]), + ("called", label, "read_backed"), + "{id}" + ); + assert_eq!(line["reading"], plain.reading, "{id}"); + // Two phase blocks are no phase: the caveat stays. + let line = rule_line(r, >, Some(&phased(r, &same, ["5", "6"]))); + assert_eq!(line["phase"], "not_used", "{id}"); + assert!(line["reading"].contains("no read or read pair"), "{id}"); + // Phased the other way: not the assumed pair, not read. + let line = rule_line(r, >, Some(&phased(r, &other, ["5", "5"]))); + assert_eq!( + (&line["status"][..], &line["result"][..], &line["phase"][..]), + ("other_haplotype", ".", "read_backed"), + "{id}" + ); + assert!(line["reading"].contains("not read"), "{id}"); + assert!( + line["reading"].contains(&format!("would read {label}.")), + "{id}: {}", + line["reading"] + ); + // One heterozygous site assumes nothing. + for choices in [[1, 0], [0, 1], [2, 1], [1, 2]] { + let line = rule_line(r, &genotypes(r, &choices), None); + assert!( + !line["reading"].contains("Phase unknown"), + "{id} {choices:?}" + ); + } + } + // HFE with C282Y and H63D on one copy: one copy changed, the other wt. + let r = rule("HFE"); + let line = rule_line( + r, + &genotypes(r, &[1, 1]), + Some(&phased(r, &["0|1", "0|1"], ["5", "5"])), + ); + assert_eq!( + line["reading"], + "Read-backed phase shows that rs1800562 A and rs1799945 G sit on one copy: the copies \ + are wt and A,G at rs1800562, rs1799945, so one copy is changed and the other is not. \ + This rule does not describe that copy, so the pair is not read; without phase these \ + genotypes would read C282Y/H63D." + ); + // APOE's double heterozygote line already names the other pair. + let apoe = rule("APOE"); + let line = rule_line(apoe, &genotypes(apoe, &[1, 1]), None); + assert_eq!(line["result"], "e2/e4"); + assert!(!line["reading"].contains("Phase unknown")); + // WhatsHap gets the two HFE sites, not APOE's. + let scratch = Scratch::new(); + let path = scratch.put("phase", ""); + let mut gt = genotypes(r, &[1, 1]); + gt.extend(genotypes(apoe, &[1, 1])); + assert_eq!(phase_vcf(&path, "S", &rules, >).unwrap(), 2); + let text = std::fs::read_to_string(&path).unwrap(); + assert!(text.contains("rs1800562") && text.contains("rs1799945")); + assert!(!text.contains("rs429358")); + assert_eq!( + phase_vcf(&path, "S", &rules, &genotypes(r, &[1, 2])).unwrap(), + 0 + ); + } /// The call floor (decision D10): a site whose GQ is below 20, or whose /// record the caller filtered, is not read. GQ 20, a missing GQ and /// DeepVariant's RefCall stay readable. 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 3081543d3..e45290cbd 100644 --- a/rust/crates/og-summary/src/collect/group_c/repeats.rs +++ b/rust/crates/og-summary/src/collect/group_c/repeats.rs @@ -1,10 +1,13 @@ //! Step 09 (ExpansionHunter) and 9b (Stranger, the RFC1 and other motif //! counts): every locus with its counts, how well each allele was sized, -//! Stranger's grade, the intermediate zone, and what the counts of CFTR's -//! TG and poly-T tracts and UGT1A1's TA repeat mean. +//! Stranger's grade, the intermediate zone, the reduced-penetrance range, +//! and what the counts of CFTR's TG and poly-T tracts and UGT1A1's TA +//! repeat mean. use super::super::model::State; -use super::util::{Obj, bin_rows, cells, count, get_default, s, strs, table, vcf_lines}; +use super::util::{ + Obj, asset_rows, bin_rows, cells, count, get_default, s, strs, table, vcf_lines, +}; use super::{Ctx, Out}; use indexmap::IndexMap; use pycompat::json::Value; @@ -76,11 +79,37 @@ fn str_int(x: &str) -> Option { crate::int(x).ok() } -/// One allele's sizing from ExpansionHunter's SO, ADSP and REPCI fields. -fn allele_sizing(so: &str, adsp: &str, ci: &str, cn: &str, path_min: Option) -> Sizing { +/// The reads behind one allele: ExpansionHunter's ADSP, ADFL and ADIR. +struct Reads<'a> { + spanning: &'a str, + flanking: &'a str, + in_repeat: &'a str, +} + +impl Reads<'_> { + /// No spanning and no flanking read, and at least one in-repeat read: + /// the estimate rests on reads made only of repeat, so the allele is + /// longer than a read, whatever SO says. + fn in_repeat_only(&self) -> bool { + let zero = |x: &str| str_int(x) == Some(0); + zero(self.spanning) && zero(self.flanking) && str_int(self.in_repeat).is_some_and(|n| n > 0) + } +} + +/// One allele's sizing from ExpansionHunter's SO, read counts and REPCI. +fn allele_sizing( + so: &str, + reads: &Reads<'_>, + ci: &str, + cn: &str, + path_min: Option, +) -> Sizing { let Some(n) = str_int(cn) else { return Sizing::NoCall; }; + if reads.in_repeat_only() { + return Sizing::InRepeat; + } match so { "" | "." => return Sizing::Unknown, "FLANKING" => return Sizing::FlankingOnly, @@ -92,7 +121,7 @@ fn allele_sizing(so: &str, adsp: &str, ci: &str, cn: &str, path_min: Option) -> Result>, Str Ok(out) } +/// A range of reduced penetrance of `assets/str_penetrance_ranges.tsv`. +struct Penetrance { + locus: String, + min: i128, + max: i128, + label: String, + citation: String, +} + +/// `assets/str_penetrance_ranges.tsv`. An assets folder without it (a +/// staged copy of some tables) labels nothing; a table that is there but +/// cannot be read, has no row, or has a range whose min is above its max +/// makes the section unreadable. +fn penetrance(c: &Ctx<'_>) -> Result, String> { + const NAME: &str = "str_penetrance_ranges.tsv"; + let rows = match asset_rows(c.assets, NAME) { + Ok(r) => r, + Err(e) if e.starts_with(&format!("{NAME} is not in ")) => return Ok(Vec::new()), + Err(e) => return Err(e), + }; + let cell = |r: &pycompat::csv::DictRow, k: &str| -> Result { + r.get(k) + .flatten() + .map(str::to_owned) + .ok_or_else(|| super::util::key_error(k)) + }; + let num = |r: &pycompat::csv::DictRow, k: &str| -> Result { + crate::int(&cell(r, k)?).map_err(|e| super::super::sections::py_error("ValueError", &e)) + }; + // A table with no row (a header alone, whatever its columns) labels + // nothing, so it is as broken as one with a bad row. + if rows.is_empty() { + return Err(super::super::sections::py_error( + "ValueError", + &format!("{NAME} has no range"), + )); + } + rows.iter() + .map(|r| { + let p = Penetrance { + locus: cell(r, "locus")?, + min: num(r, "min")?, + max: num(r, "max")?, + label: cell(r, "label")?, + citation: cell(r, "citation")?, + }; + if p.min > p.max { + return Err(super::super::sections::py_error( + "ValueError", + &format!("{NAME}: {} has min {} above max {}", p.locus, p.min, p.max), + )); + } + Ok(p) + }) + .collect() +} + fn mtime(p: &str) -> Result { pycompat::mtime::mtime(p).map_err(|e| super::util::os_note(&crate::os_error(&e, p))) } @@ -210,6 +296,7 @@ pub fn expansions(c: &Ctx<'_>) -> Out { return Ok(None); }; let ranges = ranges(c)?; + let penetrance = penetrance(c)?; let stp = st.as_ref().map(|f| f.path.as_str()); let rfc1 = match stp { Some(after) => { @@ -273,12 +360,24 @@ pub fn expansions(c: &Ctx<'_>) -> Out { } else { counts.clone() }; + let (sp, fl, ir) = ( + split_n(field("ADSP"), n), + split_n(field("ADFL"), n), + split_n(field("ADIR"), n), + ); let sizing: Vec = split_n(field("SO"), n) .iter() - .zip(split_n(field("ADSP"), n)) .zip(split_n(field("REPCI"), n)) .zip(cn_list) - .map(|(((so, ad), ci), cn)| allele_sizing(so, &ad, &ci, cn, path_min)) + .enumerate() + .map(|(i, ((so, ci), cn))| { + let reads = Reads { + spanning: &sp[i], + flanking: &fl[i], + in_repeat: &ir[i], + }; + allele_sizing(so, &reads, &ci, cn, path_min) + }) .collect(); let status: Vec<&str> = if st.is_some() { info.get("STR_STATUS") @@ -351,6 +450,16 @@ pub fn expansions(c: &Ctx<'_>) -> Out { } } } + // Stranger grades a count against two thresholds only, so a count of + // reduced penetrance reads as plain full_mutation or pre_mutation. + if let Some(p) = penetrance + .iter() + .find(|p| p.locus == rep && sized.iter().any(|c| p.min <= *c && *c <= p.max)) + { + item.put("penetrance", s(&format!("{}-{}", p.min, p.max))); + item.put("penetrance_label", s(&p.label)); + item.put("penetrance_citation", s(&p.citation)); + } let abnormal = status.iter().any(|x| *x != "normal"); if rep == "RFC1" && st.is_some() && abnormal { item.put( @@ -387,7 +496,13 @@ pub fn expansions(c: &Ctx<'_>) -> Out { for k in ["locus", "repeat_count", "status", "sizing"] { f.put(k, item.0[k].clone()); } - for k in ["rfc1_motif", "motif"] { + for k in [ + "penetrance", + "penetrance_label", + "penetrance_citation", + "rfc1_motif", + "motif", + ] { if let Some(v) = item.0.get(k) { f.put(k, v.clone()); } 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 59988dc59..fe87f046a 100644 --- a/rust/crates/og-summary/src/collect/group_c/tables.rs +++ b/rust/crates/og-summary/src/collect/group_c/tables.rs @@ -204,23 +204,26 @@ pub fn prs(c: &Ctx<'_>) -> Out { Some(Some(x)) => strs(x.split(';').filter(|x| !x.is_empty())), _ => Value::Null, }; - rows.push( - Obj::new() - .set("condition", get_default(r, "Condition", "")) - .set("pgs_id", get_default(r, "PGS_ID", "")) - .set("score", get_default(r, "Score_SUM", "")) - .set("matched", get_default(r, "Variants_Matched", "")) - .set("total", get_default(r, "Variants_Total", "")) - .set("chrx", get_default(r, "ChrX", "")) - .set("ambiguous", get_default(r, "Ambiguous", "")) - .set("applies_to", get_default(r, "Applies_To", "")) - .set("sex_check", get_default(r, "Sex_Check", "")) - .set("percentile", s(&pct)) - .set("group", group) - .set("evaluated_in", evaluated) - .set("effect", s(&or(r, "Effect", ""))) - .val(), - ); + let mut row = Obj::new() + .set("condition", get_default(r, "Condition", "")) + .set("pgs_id", get_default(r, "PGS_ID", "")) + .set("score", get_default(r, "Score_SUM", "")) + .set("matched", get_default(r, "Variants_Matched", "")) + .set("total", get_default(r, "Variants_Total", "")) + .set("chrx", get_default(r, "ChrX", "")) + .set("ambiguous", get_default(r, "Ambiguous", "")) + .set("applies_to", get_default(r, "Applies_To", "")) + .set("sex_check", get_default(r, "Sex_Check", "")) + .set("percentile", s(&pct)) + .set("group", group) + .set("evaluated_in", evaluated) + .set("effect", s(&or(r, "Effect", ""))); + // Why a panel run gave no percentile (og prs table --target writes + // the column): the input listed variants only. Older tables have none. + if r.get("Percentile_Note").is_some() { + row.put("percentile_note", s(&or(r, "Percentile_Note", ""))); + } + rows.push(row.val()); } let mut out = Obj::new() .set("scores", Value::Array(rows)) diff --git a/rust/crates/og-summary/src/collect/post.rs b/rust/crates/og-summary/src/collect/post.rs index 305bc87ac..eedb53084 100644 --- a/rust/crates/og-summary/src/collect/post.rs +++ b/rust/crates/og-summary/src/collect/post.rs @@ -10,6 +10,9 @@ //! - `not_run`: the steps whose section has no file; //! - `not_assessed`: what no step looked at, with the lines that depend on //! the polygenic scores, HBA1/HBA2, mobile elements, VNtyper and MoChA; +//! - `scope`: what part of the genome the run called, and the `partial` +//! mark on each genome-wide section of a run that called less, and on +//! each stale one, whose earlier run's scope is not known; //! - `recheck`: the last database re-check of the sample; //! - `new_since`: what changed since the previous run kept in `history/`. //! @@ -25,7 +28,7 @@ use super::group_c::Others; use super::model::{Section, State, Summary}; use super::sections::Data; -use super::{Folder, Input, declared, group_b, post_c, qc_declared, read_a, read_c, time}; +use super::{Folder, Input, declared, group_b, post_c, qc_declared, read_a, read_c, scan, time}; use og_runlog::{delta, files}; use pycompat::json::Value; use pycompat::value::truthy; @@ -101,6 +104,11 @@ const NOT_ASSESSED: [&str; 5] = [ const PRS_NOT_ADJUSTED: &str = "Polygenic score percentiles: no ancestry reference panel was used, so the scores are raw sums"; +/// Added in its place when the panel ran but every percentile was withheld, +/// because the input lists variants only (a score's `percentile_note`). +const PRS_WITHHELD: &str = "Polygenic score percentiles: the input lists variants only, so the \ +percentiles were withheld and the scores are raw sums"; + /// Added unless step 35's depth count (short reads) or step 35b /// (Paraphase, PacBio HiFi, both genes) made a call. const HBA_NOT_ASSESSED: &str = "HBA1/HBA2 copy number (alpha-thalassaemia deletions): neither step 35's read-depth count \ @@ -125,10 +133,19 @@ of the blood cells): step 51 (MoChA) did not assess this sample"; /// be read. pub fn collect(input: &Input) -> Result { let folder = Folder::open(input)?; + let vcf = folder + .index + .first(&[format!( + "vcf/{}.vcf.gz", + pycompat::mtime::escape(&input.sample) + )]) + .map(|rel| crate::join(&input.sample_dir, rel)); // Group a reads the sample VCF, the input that takes time, on its own - // thread; groups b and c read their sections meanwhile, one at a time, - // so the peak memory stays near the biggest section's. - let (a, b, mut c) = std::thread::scope(|scope| { + // thread, and so does the read of its contigs; groups b and c read + // their sections meanwhile, one at a time, so the peak memory stays + // near the biggest section's. + let (a, b, mut c, contigs) = std::thread::scope(|scope| { + let contigs = scope.spawn(|| vcf.as_deref().and_then(|p| scan::vcf_contigs(p).ok())); let a = scope.spawn(|| read_a(input, &folder)); let b = group_b::read(input, &folder); let c = read_c(input, &folder); @@ -145,8 +162,15 @@ pub fn collect(input: &Input) -> Result { .collect() }; let a = a.join().unwrap_or_else(|_| stopped(&super::model::GROUP_A)); - (a, b, c) + (a, b, c, contigs.join().ok().flatten()) }); + let intervals = folder + .manifest + .as_ref() + .and_then(|m| m.value("run", "intervals")) + .map(str::trim) + .filter(|v| !v.is_empty()) + .map(str::to_owned); let declared_sex = declared(input, &folder, qc_declared(&a)); post_c( input, @@ -189,6 +213,10 @@ pub fn collect(input: &Input) -> Result { .collect(), ), ); + if let Some(scope) = scope(contigs.as_deref(), intervals.as_deref()) { + mark_partial(m, &scope); + m.insert("scope".into(), scope); + } let dir = Path::new(&input.sample_dir); if let Some(r) = delta::read_recheck(&dir.join("recheck").join("state.json")) { m.insert("recheck".into(), Value::Object(r)); @@ -201,6 +229,92 @@ pub fn collect(input: &Input) -> Result { Ok(v) } +/// The sections whose result is a share, a sum or a placement over the +/// whole genome: a run over a part of it gives a different result that +/// reads the same. +pub const GENOME_WIDE: [&str; 6] = [ + "callability", + "prs", + "ancestry_fine", + "telomere", + "roh", + "archaic", +]; + +/// `scope`: what part of the genome the run called, from the contigs of +/// the sample VCF's records (`chr20` and `20` alike) and the intervals the +/// run manifest records (`run intervals`). `None` (no `scope` key) without a +/// sample VCF read to its end: the scope is then not known, and nothing +/// is marked. +/// +/// The run is partial when the calls cover fewer than the 22 autosomes, or +/// when the run was limited to intervals. chrX is recorded but makes no run +/// partial: the genome-wide sections read the autosomes. +fn scope(contigs: Option<&[String]>, intervals: Option<&str>) -> Option { + let names: Vec<&str> = contigs? + .iter() + .map(|c| c.strip_prefix("chr").unwrap_or(c)) + .collect(); + let autosomes: Vec = (1..=22) + .map(|i| i.to_string()) + .filter(|n| names.contains(&n.as_str())) + .map(|n| format!("chr{n}")) + .collect(); + let n = autosomes.len(); + let mark = if n < 22 { + Some(format!("partial: covers {n} of 22 autosomes")) + } else { + intervals.map(|i| format!("partial: limited to the run's intervals ({i})")) + }; + let mut out = indexmap::IndexMap::new(); + out.insert("autosomes_covered".to_owned(), Value::Int(n as i128)); + out.insert( + "autosomes".to_owned(), + Value::Array(autosomes.into_iter().map(Value::Str).collect()), + ); + out.insert("chrx".to_owned(), Value::Bool(names.contains(&"X"))); + out.insert( + "intervals".to_owned(), + intervals.map_or(Value::Null, |i| Value::Str(i.to_owned())), + ); + out.insert("partial".to_owned(), Value::Bool(mark.is_some())); + out.insert("mark".to_owned(), mark.map_or(Value::Null, Value::Str)); + Some(Value::Object(out)) +} + +/// The mark of a stale genome-wide section: its result is from an earlier +/// run, and that run's scope was not recorded. +const STALE_MARK: &str = "partial: not known, from an earlier run"; + +/// Adds a `partial` mark to the genome-wide sections. A result of this run +/// (ok) takes the scope's mark when the run was partial. A stale result is +/// from an earlier run, whose scope this run's VCF does not tell: it takes +/// `STALE_MARK` whatever this run covered, so it never reads as complete. +fn mark_partial(summary: &mut indexmap::IndexMap, scope: &Value) { + let mark = match at(Some(scope), "mark") { + Some(Value::Str(m)) => Some(m.clone()), + _ => None, + }; + let Some(Value::Object(sections)) = summary.get_mut("sections") else { + return; + }; + for key in GENOME_WIDE { + let Some(Value::Object(sec)) = sections.get_mut(key) else { + continue; + }; + let text = if is(sec.get("state"), "stale") { + Some(STALE_MARK.to_owned()) + } else if is(sec.get("state"), "ok") { + mark.clone() + } else { + None + }; + if let Some(text) = text { + sec.insert("partial".into(), Value::Str(text)); + } + } +} + /// What the post pass of group c needs from group b: the CPIC state, /// pypgx's CYP2D6 call and Cyrius's genotype and Filter. fn others(b: &[Section]) -> Others { @@ -262,7 +376,17 @@ fn not_assessed(sections: &[Section]) -> Vec<&'static str> { }; let mut out = NOT_ASSESSED.to_vec(); if !field("prs", "adjusted").is_some_and(truthy) { - out.push(PRS_NOT_ADJUSTED); + let withheld = match field("prs", "scores") { + Some(Value::Array(rows)) => rows + .iter() + .any(|r| at(Some(r), "percentile_note").is_some_and(truthy)), + _ => false, + }; + out.push(if withheld { + PRS_WITHHELD + } else { + PRS_NOT_ADJUSTED + }); } // Step 35b on a region subset (--paraphase_regions) may leave hba out. let hba_genes: Vec<&str> = match field("paralogs", "genes") { diff --git a/rust/crates/og-summary/src/collect/post/tests.rs b/rust/crates/og-summary/src/collect/post/tests.rs index 34d18cc61..aa0d6f7b5 100644 --- a/rust/crates/og-summary/src/collect/post/tests.rs +++ b/rust/crates/og-summary/src/collect/post/tests.rs @@ -114,6 +114,43 @@ fn an_empty_folder_lists_every_step_and_every_line() { assert_eq!(lines, expected); } +/// Step 25's table on a run with the panel: `note` is each score's +/// Percentile_Note, and no score has a percentile. +fn raw_prs(d: &Dir, notes: [&str; 2]) { + d.put( + "S/prs/S_prs_summary.tsv", + format!( + "Condition\tPGS_ID\tScore_SUM\tVariants_Matched\tVariants_Total\tMatched_Pct\t\ + Percentile\tAncestry_Group\tChrX\tAmbiguous\tApplies_To\tSex_Check\t\ + Percentile_Note\tInput\n\ + CAD\tPGS000018\t0.5\t100\t120\t83.3\tNA\tEUR\t0\t0\t\t\t{}\tvcf\n\ + T2D\tPGS000014\t0.1\t90\t100\t90.0\tNA\tEUR\t0\t0\t\t\t{}\tvcf\n", + notes[0], notes[1] + ), + ); +} + +#[test] +fn withheld_percentiles_are_not_called_a_missing_panel() { + let w = "percentile withheld: the input lists variants only"; + let d = Dir::new("post-prs-withheld"); + raw_prs(&d, [w, w]); + let v = summary(&d); + assert!(matches!( + at(&v, &["sections", "prs", "data", "adjusted"]), + Value::Bool(false) + )); + let lines = texts(at(&v, &["not_assessed"])); + assert!(lines.contains(&PRS_WITHHELD.to_owned()), "{lines:?}"); + assert!(!lines.contains(&PRS_NOT_ADJUSTED.to_owned()), "{lines:?}"); + // No note on any score: the panel was not used, the line says so. + let d = Dir::new("post-prs-no-panel"); + raw_prs(&d, ["", ""]); + let lines = texts(at(&summary(&d), &["not_assessed"])); + assert!(lines.contains(&PRS_NOT_ADJUSTED.to_owned()), "{lines:?}"); + assert!(!lines.contains(&PRS_WITHHELD.to_owned()), "{lines:?}"); +} + #[test] fn a_failed_step_says_so_under_not_run() { let d = Dir::new("post-failed"); diff --git a/rust/crates/og-summary/src/collect/scan.rs b/rust/crates/og-summary/src/collect/scan.rs index 26da7d11d..86239ff2f 100644 --- a/rust/crates/og-summary/src/collect/scan.rs +++ b/rust/crates/og-summary/src/collect/scan.rs @@ -119,6 +119,51 @@ impl FolderIndex { } } +/// The contigs of the sample VCF's records, each once, in the order first +/// seen: the part of the genome the run called. A record is what the +/// variant count reads as one, a line not starting with `#` with seven +/// cells or more; `\r\n` and a lone `\r` end a line too. An error is a file +/// that cannot be read to its end, whose contigs are then not known. +pub fn vcf_contigs(path: &str) -> Result, String> { + use std::io::BufRead; + let fail = |e: std::io::Error| { + format!( + "{}: {}", + crate::basename(path), + super::sections::gzip_message(&e) + ) + }; + let mut r = og_io::bgzf::open(path, og_io::bgzf::workers()).map_err(fail)?; + let mut seen: Vec> = Vec::new(); + let mut buf = Vec::with_capacity(1 << 16); + let mut record = |line: &[u8]| { + if line.first() == Some(&b'#') { + return; + } + let chrom = line.split(|&c| c == b'\t').next().unwrap_or(line); + // A sorted VCF repeats its last contig line after line. + if seen.last().is_some_and(|c| c == chrom) || seen.iter().any(|c| c == chrom) { + return; + } + if memchr::memchr_iter(b'\t', line).take(6).count() == 6 { + seen.push(chrom.to_vec()); + } + }; + loop { + buf.clear(); + if r.read_until(b'\n', &mut buf).map_err(fail)? == 0 { + break; + } + let line = buf.strip_suffix(b"\n").unwrap_or(&buf); + let line = line.strip_suffix(b"\r").unwrap_or(line); + line.split(|&c| c == b'\r').for_each(&mut record); + } + Ok(seen + .into_iter() + .map(|c| String::from_utf8_lossy(&c).into_owned()) + .collect()) +} + fn has_magic(s: &str) -> bool { s.contains(['*', '?', '[']) } @@ -235,6 +280,25 @@ mod tests { ); } + #[test] + fn vcf_contigs_are_the_records_contigs_once_in_order() { + let d = Dir::new("scan-contigs"); + let p = d.put_gz( + "S.vcf.gz", + "##contig=\n#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\n\ + chr22\t1\t.\tA\tG\t1\tPASS\nchr22\t2\t.\tA\tG\t1\tPASS\n\ + chr3\t1\t.\tA\tG\t1\r\nchr7\t1\t.\tA\tG\t1\tPASS\rchrX\t1\t.\tA\tG\t1\t.\n\ + chr9\t1\t.\tA\tG\t1\nchr22\t3\t.\tA\tG\t1\tPASS\n", + ); + // chr1 is only a header line; chr3 and chr9 have six cells. + assert_eq!(vcf_contigs(&p).unwrap(), ["chr22", "chr7", "chrX"]); + let empty = d.put_gz("E.vcf.gz", "#CHROM\n"); + assert!(vcf_contigs(&empty).unwrap().is_empty()); + let cut = d.put("C.vcf.gz", b"\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\x03"); + assert!(vcf_contigs(&cut).is_err()); + assert!(vcf_contigs(&d.path("none.vcf.gz")).is_err()); + } + #[test] fn a_missing_folder_is_empty() { let ix = FolderIndex::walk(Path::new("/nonexistent/og-summary-scan")); diff --git a/rust/crates/og-summary/src/prs.rs b/rust/crates/og-summary/src/prs.rs index 5e20ad875..59ab16d3a 100644 --- a/rust/crates/og-summary/src/prs.rs +++ b/rust/crates/og-summary/src/prs.rs @@ -16,10 +16,15 @@ //! left out. //! - pgsc_calc's zero-match and below-threshold exits become rows, not //! errors. +//! - A score matched against genotypes that list variants only loses its +//! percentile (see [`Genotypes`]): every site such an input leaves out +//! adds nothing to the sum, so the sum leans away from the panel's sums. //! //! The table's columns are [`COLUMNS`], with [`EFFECT_COLUMNS`] before -//! `Input` when any score has evaluations. Stdout has one line per score, -//! which the e2e cases read. +//! `Input` when any score has evaluations, and [`NOTE_COLUMN`] before +//! `Input` when the genotypes were given (`--target`). Stdout has one line +//! per score, which the e2e cases read, then the note on a variant-only +//! input. use crate::args::{self, Kind, Opt}; use crate::{basename, finish, float, is_file, join, text_lines, trunc, write_file}; @@ -50,6 +55,11 @@ pub const COLUMNS: [&str; 13] = [ ]; /// Written before Input when the score list names PGS Catalog evaluations. pub const EFFECT_COLUMNS: [&str; 2] = ["Evaluated_In", "Effect"]; +/// Written before Input when the genotypes pgsc_calc scored were given: +/// why a score has no percentile when the panel gave it one. +pub const NOTE_COLUMN: &str = "Percentile_Note"; +/// The note of a percentile withheld for an input that lists variants only. +pub const WITHHELD: &str = "percentile withheld: the input lists variants only"; /// Sex_Check of a sex-specific score. pub const SEX_APPLIES: &str = "applies"; @@ -58,7 +68,7 @@ pub const SEX_NOT_DECLARED: &str = "no sex declared"; const USAGE: &str = "usage: og prs table --sample S --results DIR --sampleset NAME --scores DIR --input-kind {gvcf,vcf} [--panel NAME] [--zero-matches] [--below-threshold LOG] [--sex {,male,female}] - --out F [--ancestry-out F] + [--target VCF] --out F [--ancestry-out F] "; const OPTS: &[Opt] = &[ @@ -71,6 +81,7 @@ const OPTS: &[Opt] = &[ Opt("--zero-matches", Kind::Flag, false), Opt("--below-threshold", Kind::Value, false), Opt("--sex", Kind::Choice(&["", "male", "female"]), false), + Opt("--target", Kind::Value, false), Opt("--out", Kind::Value, true), Opt("--ancestry-out", Kind::Value, false), ]; @@ -99,11 +110,77 @@ pub struct Inputs<'a> { pub sex: &'a str, /// pgsc_calc ran with an ancestry panel. pub panel: bool, + /// The genotypes pgsc_calc scored, when the caller gave them. + pub genotypes: Option, } -/// One row of the table: the 15 cells of [`COLUMNS`] with -/// [`EFFECT_COLUMNS`] before Input. -pub type TableRow = [String; 15]; +/// One row of the table: the 16 cells of [`COLUMNS`] with +/// [`EFFECT_COLUMNS`] and [`NOTE_COLUMN`] before Input. +pub type TableRow = [String; 16]; + +/// The called genotypes of the file pgsc_calc scored (the score positions, +/// and with a panel the panel's), and how many of them are reference calls. +/// +/// pgsc_calc drops a position the file leaves out from the score, so it adds +/// nothing to the sum, as if no effect allele were there. When the file +/// lists reference calls (genotypes from a gVCF, or a chip VCF: +/// scripts/chip-to-vcf.sh writes every probe), a missing position is one +/// that was not read, and the sum stays comparable. A variant-only VCF lists +/// none, so every site where the sample matches the reference is missing, +/// and a reference effect allele carried there adds nothing: its percentile +/// would sit among the panel's complete genotypes as if it were one of them. +/// The evidence is in the genotypes themselves, never in the input's name: a +/// gVCF with no reference blocks over the sites is as blind as a variant-only +/// VCF. +#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)] +pub struct Genotypes { + /// Records with a genotype whose every allele is called. + pub called: u64, + /// Of those, the records whose every allele is the reference (0/0, 0|0, 0). + pub hom_ref: u64, +} + +impl Genotypes { + /// Counts the first sample's GT of each record of a VCF, gzipped or not. + pub fn read(path: &str) -> Result { + let mut g = Genotypes::default(); + let mut lines = text_lines(path)?; + let mut line = String::new(); + while lines + .read_line(&mut line) + .map_err(|e| format!("{path}: {e}"))? + { + if line.starts_with('#') { + continue; + } + let f: Vec<&str> = line.trim_end_matches(['\n', '\r']).split('\t').collect(); + let (Some(format), Some(sample)) = (f.get(8), f.get(9)) else { + continue; + }; + let Some(k) = format.split(':').position(|k| k == "GT") else { + continue; + }; + let gt = sample.split(':').nth(k).unwrap_or(""); + let alleles: Vec<&str> = gt.split(['/', '|']).collect(); + if alleles.iter().any(|a| a.is_empty() || *a == ".") { + continue; + } + g.called += 1; + if alleles.iter().all(|a| *a == "0") { + g.hom_ref += 1; + } + } + Ok(g) + } + + /// Whether the file lists reference calls: at least one called site in + /// five is 0/0, the rule step 26b applies to the panel's sites. A gVCF + /// or a chip VCF gives most score positions as 0/0; a variant-only VCF + /// gives none. + pub fn lists_reference(&self) -> bool { + self.called > 0 && self.hom_ref.saturating_mul(5) >= self.called + } +} /// The ancestry rows of step 26: (key, value). pub type Ancestry = Vec<(String, String)>; @@ -463,6 +540,7 @@ pub fn table(i: &Inputs) -> Result<(Vec, Ancestry), String> { } } let below = matches!(i.outcome, Outcome::BelowThreshold(_)); + let variants_only = i.genotypes.is_some_and(|g| !g.lists_reference()); let mut rows = Vec::with_capacity(totals.len()); for (pid, (t, label)) in &totals { let m = matched.get(pid).copied().unwrap_or(0); @@ -481,6 +559,14 @@ pub fn table(i: &Inputs) -> Result<(Vec, Ancestry), String> { // sample in, and only when that group is one the score was evaluated in. let g = group.get(pid).map_or("NA", String::as_str); let p = pct.get(pid).map_or("NA", String::as_str); + // A percentile the panel gave goes when the genotypes list variants + // only; the note says why. A score of the other sex has none anyway. + let note = if variants_only && p != "NA" && !below && check != SEX_NOT_APPLICABLE { + WITHHELD + } else { + "" + }; + let p = if note.is_empty() { p } else { "NA" }; let eff = if check == SEX_NOT_APPLICABLE || p == "NA" || below { String::new() } else { @@ -498,6 +584,7 @@ pub fn table(i: &Inputs) -> Result<(Vec, Ancestry), String> { check.to_owned(), evaluated_in.join(";"), eff, + note.to_owned(), i.input_kind.to_owned(), ]; let head: [String; 8] = if below { @@ -583,6 +670,9 @@ fn line(r: &TableRow) -> String { if !r[13].is_empty() { extra.push_str(&format!(", effect in that group {}", r[13])); } + if !r[14].is_empty() { + extra.push_str(&format!(", {}", r[14])); + } if r[3] == "NA" { format!( " {} ({}): no sum, under pgsc_calc's minimum overlap ({}% of {} variants matched)", @@ -611,38 +701,47 @@ pub fn cli(argv: &[String], out: &mut impl Write, err: &mut impl Write) -> u8 { None if a.flag("--zero-matches") => Outcome::ZeroMatches, None => Outcome::Scored, }; - let inputs = Inputs { - results: a.text("--results"), - sampleset: a.text("--sampleset"), - scores: a.text("--scores"), - input_kind: a.text("--input-kind"), - outcome, - sex: a.text("--sex"), - panel: !a.text("--panel").is_empty(), - }; + let target = a.get("--target").filter(|t| !t.is_empty()); let mut run = || -> Result<(), String> { + let inputs = Inputs { + results: a.text("--results"), + sampleset: a.text("--sampleset"), + scores: a.text("--scores"), + input_kind: a.text("--input-kind"), + outcome, + sex: a.text("--sex"), + panel: !a.text("--panel").is_empty(), + genotypes: target.map(Genotypes::read).transpose()?, + }; let (rows, ancestry) = table(&inputs)?; - // A score list without evaluations gives the table its older columns. + // A score list without evaluations gives the table its older + // columns; a call without --target, the columns before the note. let evaluated = rows.iter().any(|r| !r[12].is_empty()); - let mut body = String::new(); - let cols: Vec<&str> = if evaluated { - COLUMNS[..12] - .iter() - .chain(&EFFECT_COLUMNS) - .chain(&COLUMNS[12..]) - .copied() - .collect() - } else { - COLUMNS.to_vec() + let noted = inputs.genotypes.is_some(); + let keep = |k: usize| match k { + 12 | 13 => evaluated, + 14 => noted, + _ => true, }; + let mut body = String::new(); + let cols: Vec<&str> = COLUMNS[..12] + .iter() + .chain(&EFFECT_COLUMNS) + .chain([&NOTE_COLUMN]) + .chain(&COLUMNS[12..]) + .enumerate() + .filter(|(k, _)| keep(*k)) + .map(|(_, c)| *c) + .collect(); body.push_str(&cols.join("\t")); body.push('\n'); for r in &rows { - let cells: Vec<&str> = if evaluated { - r.iter().map(String::as_str).collect() - } else { - r[..12].iter().chain(&r[14..]).map(String::as_str).collect() - }; + let cells: Vec<&str> = r + .iter() + .enumerate() + .filter(|(k, _)| keep(*k)) + .map(|(_, c)| c.as_str()) + .collect(); body.push_str(&cells.join("\t")); body.push('\n'); } @@ -668,6 +767,16 @@ pub fn cli(argv: &[String], out: &mut impl Write, err: &mut impl Write) -> u8 { for r in &rows { writeln!(out, "{}", line(r)).map_err(|e| e.to_string())?; } + if let Some(g) = inputs.genotypes.filter(|g| !g.lists_reference()) { + writeln!( + out, + "NOTE: hom-ref sites are absent from this input ({} of {} genotyped positions are \ + reference calls), so a missing site adds nothing to the sum and the sums are \ + biased; not comparable to published distributions, and no percentile is given", + g.hom_ref, g.called + ) + .map_err(|e| e.to_string())?; + } Ok(()) }; finish(run(), err) diff --git a/rust/crates/og-summary/src/prs/tests.rs b/rust/crates/og-summary/src/prs/tests.rs index 80f967297..3fe71cb0e 100644 --- a/rust/crates/og-summary/src/prs/tests.rs +++ b/rust/crates/og-summary/src/prs/tests.rs @@ -420,3 +420,227 @@ fn usage_errors_exit_2() { "{err}" ); } + +/// A one-sample VCF with these GT cells, one record each; gzipped as +/// step 25 and PRS_SCORE_SITES write it. +fn target(d: &Dir, name: &str, gts: &[&str]) -> String { + let mut body = String::from( + "##fileformat=VCFv4.2\n#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT\tS\n", + ); + for (k, gt) in gts.iter().enumerate() { + body.push_str(&format!( + "1\t{}\t.\tA\tG\t.\tPASS\t.\tGT:GQ\t{gt}:30\n", + k + 1 + )); + } + d.put_gz(name, &body) +} + +/// og prs table on the panel results of [`results`] and the scores of +/// [`two_scores`], for this input kind and genotypes. +fn with_target(d: &Dir, kind: &str, gts: Option<&[&str]>) -> (u8, String, Vec>) { + let pgs = two_scores(d); + results(d, "adj", true); + let (res, out) = (d.path("adj"), d.path("out.tsv")); + let t = gts.map(|g| target(d, "target.vcf.gz", g)); + let mut a = vec![ + "--sample", + "S", + "--sampleset", + "sample", + "--input-kind", + kind, + "--results", + &res, + "--scores", + &pgs, + "--panel", + "p", + "--out", + &out, + ]; + if let Some(t) = &t { + a.extend(["--target", t.as_str()]); + } + let (code, stdout, stderr) = run(cli, &a); + assert_eq!(stderr, ""); + let rows = std::fs::read_to_string(&out) + .unwrap() + .lines() + .map(|l| l.split('\t').map(str::to_owned).collect()) + .collect(); + (code, stdout, rows) +} + +/// The cell of `col` in row `k` (0 is the header). +fn cell<'a>(rows: &'a [Vec], k: usize, col: &str) -> &'a str { + let i = rows[0].iter().position(|c| c == col).unwrap(); + &rows[k][i] +} + +#[test] +fn a_variant_only_input_keeps_its_sum_and_loses_its_percentile() { + // What a variant-only VCF gives pgsc_calc: het and hom-alt calls only. + let d = Dir::new("prs-variants-only"); + let (code, stdout, rows) = with_target(&d, "vcf", Some(&["0/1", "1/1", "0|1", "1/1"])); + assert_eq!(code, 0); + let mut cols: Vec<&str> = COLUMNS[..12].to_vec(); + cols.extend(EFFECT_COLUMNS); + cols.extend([NOTE_COLUMN, "Input"]); + assert_eq!(rows[0], cols); + assert_eq!(cell(&rows, 1, "Score_SUM"), "1.25"); + assert_eq!(cell(&rows, 1, "Percentile"), "NA"); + assert_eq!(cell(&rows, 1, "Effect"), ""); + assert_eq!(cell(&rows, 1, NOTE_COLUMN), WITHHELD); + assert_eq!(cell(&rows, 1, "Input"), "vcf"); + // PGS000002 had no percentile to withhold. + assert_eq!(cell(&rows, 2, NOTE_COLUMN), ""); + assert!( + stdout.contains( + "sum 1.25, 2 of 3 variants matched (66.7%), percentile withheld: the input lists variants only\n" + ), + "{stdout}" + ); + assert!(!stdout.contains("percentile 94.4"), "{stdout}"); + assert!( + stdout.ends_with( + "NOTE: hom-ref sites are absent from this input (0 of 4 genotyped positions are \ + reference calls), so a missing site adds nothing to the sum and the sums are \ + biased; not comparable to published distributions, and no percentile is given\n" + ), + "{stdout}" + ); +} + +#[test] +fn a_chip_shaped_input_keeps_its_percentile() { + // scripts/chip-to-vcf.sh writes every probe: most are 0/0. + let d = Dir::new("prs-chip"); + let gts = ["0/0", "0/0", "0/1", "0/0", "1/1", "0/0", "./.", "0/0"]; + let (code, stdout, rows) = with_target(&d, "vcf", Some(>s)); + assert_eq!(code, 0); + assert_eq!(cell(&rows, 1, "Percentile"), "94.4"); + assert_eq!(cell(&rows, 1, "Effect"), "HR 1.53 (EUR, PPM000591)"); + assert_eq!(cell(&rows, 1, NOTE_COLUMN), ""); + assert_eq!(cell(&rows, 1, "Input"), "vcf"); + assert!(stdout.contains("percentile 94.4 among EUR"), "{stdout}"); + assert!( + !stdout.contains("NOTE:") && !stdout.contains("withheld"), + "{stdout}" + ); +} + +#[test] +fn the_genotypes_decide_never_the_input_kind() { + // A gVCF whose reference blocks miss every site is as blind as a + // variant-only VCF. + let d = Dir::new("prs-kind"); + let (_, _, rows) = with_target(&d, "gvcf", Some(&["0/1", "1/1"])); + assert_eq!(cell(&rows, 1, "Percentile"), "NA"); + assert_eq!(cell(&rows, 1, NOTE_COLUMN), WITHHELD); + let (_, _, rows) = with_target(&d, "gvcf", Some(&["0/0", "0/1"])); + assert_eq!(cell(&rows, 1, "Percentile"), "94.4"); + assert_eq!(cell(&rows, 1, NOTE_COLUMN), ""); + // Without --target there is no evidence and no note column: the table + // of older callers. + let (_, stdout, rows) = with_target(&d, "vcf", None); + assert_eq!(rows[0].len(), 15); + assert!(!rows[0].iter().any(|c| c == NOTE_COLUMN)); + assert_eq!(cell(&rows, 1, "Percentile"), "94.4"); + assert!(!stdout.contains("NOTE:"), "{stdout}"); +} + +#[test] +fn a_withheld_percentile_leaves_other_rows_alone() { + // No panel: nothing to withhold, but the note on the input stays. + let d = Dir::new("prs-raw-target"); + let pgs = two_scores(&d); + results(&d, "raw", false); + let res = d.path("raw"); + let t = target(&d, "target.vcf.gz", &["0/1"]); + let (code, stdout, _, rows) = go(&d, &["--results", &res, "--scores", &pgs, "--target", &t]); + assert_eq!(code, 0); + assert_eq!(cell(&rows, 1, "Percentile"), "NA"); + assert_eq!(cell(&rows, 1, NOTE_COLUMN), ""); + assert!( + stdout.contains("NOTE: hom-ref sites are absent"), + "{stdout}" + ); + // A score of the other sex says that, not the input's note. + let d = Dir::new("prs-sex-target"); + formatted( + &d, + "pgs", + "PGS000001", + "Prostate cancer", + 3, + "0\tleft out", + "male", + "", + ); + results(&d, "adj", true); + let (res, pgs) = (d.path("adj"), d.path("pgs")); + let t = target(&d, "target.vcf.gz", &["1/1"]); + let (_, _, _, rows) = go( + &d, + &[ + "--results", + &res, + "--scores", + &pgs, + "--panel", + "p", + "--sex", + "female", + "--target", + &t, + ], + ); + assert_eq!(cell(&rows, 1, "Sex_Check"), SEX_NOT_APPLICABLE); + assert_eq!(cell(&rows, 1, NOTE_COLUMN), ""); + // An unreadable target is an error, and no table. + std::fs::remove_file(d.path("out.tsv")).unwrap(); + let (code, _, err, rows) = go( + &d, + &[ + "--results", + &res, + "--scores", + &pgs, + "--target", + &d.path("none.vcf.gz"), + ], + ); + assert_eq!(code, 1); + assert!(err.contains("No such file or directory"), "{err}"); + assert!(rows.is_empty()); +} + +#[test] +fn genotypes_count_called_and_reference_calls() { + let d = Dir::new("prs-genotypes"); + let p = d.put( + "t.vcf", + "##fileformat=VCFv4.2\n#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT\tS\n\ + 1\t1\t.\tA\tG\t.\tPASS\t.\tGT\t0/0\n\ + 1\t2\t.\tA\tG\t.\tPASS\t.\tGQ:GT\t30:0|0\n\ + X\t3\t.\tA\tG\t.\tPASS\t.\tGT\t0\n\ + 1\t4\t.\tA\tG\t.\tPASS\t.\tGT\t0/1\n\ + 1\t5\t.\tA\tG\t.\tPASS\t.\tGT\t./.\n\ + 1\t6\t.\tA\tG\t.\tPASS\t.\tGT\t0/.\n\ + 1\t7\t.\tA\tG\t.\tPASS\t.\tGQ\t30\n\ + 1\t8\t.\tA\tG\t.\tPASS\t.\n\ + 1\t9\t.\tA\tG\t.\tPASS\t.\tGT\t1/2\r\n", + ); + assert_eq!( + Genotypes::read(&p).unwrap(), + Genotypes { + called: 5, + hom_ref: 3 + } + ); + // One called site in five as 0/0 is enough; fewer, or none called, is not. + let g = |called, hom_ref| Genotypes { called, hom_ref }.lists_reference(); + assert!(g(5, 1) && g(1, 1) && g(430_000, 300_000)); + assert!(!g(6, 1) && !g(4, 0) && !g(0, 0)); +} diff --git a/rust/crates/og-summary/src/qc.rs b/rust/crates/og-summary/src/qc.rs index fe63bb974..f3105e295 100644 --- a/rust/crates/og-summary/src/qc.rs +++ b/rust/crates/og-summary/src/qc.rs @@ -15,8 +15,12 @@ //! declared sex. //! - FREEMIX above `--freemix-warn` (default 0.03) warns. //! - A relatedness of 0.9 or more is the same person (a duplicate or a swap). +//! - FREEMIX is `uncertain` when VerifyBamID2 skipped its marker check or +//! kept fewer than [`MIN_CONTAMINATION_MARKERS`] markers. +//! - Identity is `uncertain` below [`MIN_IDENTITY_SITES`] informative sites, +//! and `not_checked` when no other sample was there to compare with. //! -//! The table is `key\tvalue` with 20 rows in a fixed order; `og qc +//! The table is `key\tvalue` with 25 rows in a fixed order; `og qc //! sex-loss` appends its `mosaic_*` rows afterwards. Each row is echoed on //! stdout as ` key: value`. @@ -31,11 +35,21 @@ use std::io::Write; pub const FREEMIX_WARN: f64 = 0.03; /// somalier relatedness at or above this: the same person. pub const SAME_PERSON: f64 = 0.9; +/// Informative sites (genotyped by somalier, or shared by a pair) below +/// which identity is `uncertain`: about one in 18 of somalier's 17,766 +/// sites. A whole genome at 30x genotypes most of them; a sliced, targeted +/// or very shallow BAM falls below the floor. +pub const MIN_IDENTITY_SITES: i128 = 1000; +/// Markers VerifyBamID2 kept below which FREEMIX is `uncertain`: five times +/// the 1,000 its own marker check asks for, and half of the 10% of the +/// 100,000-marker panel that check also asks for. +pub const MIN_CONTAMINATION_MARKERS: u64 = 5000; const USAGE: &str = "usage: og qc sample --sample S --somalier-samples F [--somalier-pairs F] [--somalier-id ID] [--selfsm F] [--declared-sex {male,female,}] [--freemix-warn X] - [--marker-check {passed,skipped,}] --out F + [--marker-check {passed,skipped,}] [--verifybamid2-markers N] + --out F "; const OPTS: &[Opt] = &[ @@ -55,6 +69,7 @@ const OPTS: &[Opt] = &[ Kind::Choice(&["passed", "skipped", ""]), false, ), + Opt("--verifybamid2-markers", Kind::Value, false), Opt("--out", Kind::Value, true), ]; @@ -168,6 +183,9 @@ pub struct Inputs<'a> { pub freemix_warn: f64, pub somalier_id: Option<&'a str>, pub marker_check: &'a str, + /// The markers VerifyBamID2 kept (its log's "N SNP markers remained + /// after sanity check"), when known. + pub markers: Option, } /// The sex check: its word in the table and the reason. @@ -305,23 +323,136 @@ pub fn table(i: &Inputs) -> Result, String> { ("verifybamid2_marker_check", i.marker_check.to_owned()), ]); let mut same = Vec::new(); + // Other samples compared on enough shared sites, and on too few. + let (mut compared, mut thin) = (0usize, 0usize); if let Some(pairs) = i.pairs_tsv.filter(|s| !s.is_empty()) { for r in read_rows(pairs)? { let (a, b) = (cell(&r, "sample_a"), cell(&r, "sample_b")); let rel = num(cell(&r, "relatedness")); - if (a == Some(sid) || b == Some(sid)) - && a != b - && let Some(rel) = rel.filter(|&x| x >= SAME_PERSON) - { - let other = if a == Some(sid) { b } else { a }; - same.push(format!("{} ({})", other.unwrap_or("None"), fixed(rel, 2))); + if (a == Some(sid) || b == Some(sid)) && a != b { + // `n`: the sites both samples have a genotype at. A pair + // with fewer, with no `n` column, or with no relatedness + // (nan: they share no site) is no comparison. + match (rel, num(cell(&r, "n"))) { + (Some(_), Some(n)) if n >= MIN_IDENTITY_SITES as f64 => compared += 1, + _ => thin += 1, + } + if let Some(rel) = rel.filter(|&x| x >= SAME_PERSON) { + let other = if a == Some(sid) { b } else { a }; + same.push(format!("{} ({})", other.unwrap_or("None"), fixed(rel, 2))); + } } } } out.push(("same_person_as", same.join(", "))); + let (confidence, confidence_why) = contamination_confidence(freemix, i.marker_check, i.markers); + let (identity, identity_why) = identity(sites, compared, thin); + out.extend([ + ( + "verifybamid2_markers", + i.markers.map_or_else(String::new, |m| m.to_string()), + ), + ("contamination_confidence", confidence.to_owned()), + ("contamination_confidence_reason", confidence_why), + ("identity", identity.to_owned()), + ("identity_reason", identity_why), + ]); Ok(out) } +/// How far FREEMIX can be trusted: `ok`, `uncertain`, or nothing when +/// VerifyBamID2 did not run; and why. +fn contamination_confidence( + freemix: Option, + marker_check: &str, + markers: Option, +) -> (&'static str, String) { + let floor = MIN_CONTAMINATION_MARKERS; + if freemix.is_none() { + return ("", String::new()); + } + match (marker_check, markers) { + // VerifyBamID2 keeps its check only for more than 1,000 markers + // that are also more than a tenth of the panel, so on the + // 100,000-marker panel a skipped check can follow a count above + // the floor: the reason names the check's rule, not the floor. + ("skipped", Some(m)) => ( + "uncertain", + format!( + "VerifyBamID2 skipped its marker check: its first run kept {m} markers, too few for that check (more than 1,000 and more than a tenth of the panel), so FREEMIX is a rough estimate" + ), + ), + ("skipped", None) => ( + "uncertain", + "VerifyBamID2 skipped its marker check: too few markers had reads (it needs more than 1,000 and more than a tenth of the panel)".to_owned(), + ), + (_, Some(m)) if m < floor => ( + "uncertain", + format!( + "FREEMIX rests on {m} markers; a firm estimate needs {}", + thousands(floor) + ), + ), + (_, Some(m)) => ("ok", format!("FREEMIX rests on {m} markers")), + ("passed", None) => ("ok", "VerifyBamID2's marker check passed".to_owned()), + (_, None) => ( + "uncertain", + "the number of markers FREEMIX rests on is not known".to_owned(), + ), + } +} + +/// Whether the reads were checked against another sample: `checked`, +/// `uncertain` (too few informative sites) or `not_checked` (nothing to +/// compare with); and why. `compared` counts the other samples of the +/// run with at least [`MIN_IDENTITY_SITES`] shared sites, `thin` the +/// others (fewer, unknown, or no relatedness). +fn identity(sites: i128, compared: usize, thin: usize) -> (&'static str, String) { + let floor = thousands(MIN_IDENTITY_SITES as u64); + if sites < MIN_IDENTITY_SITES { + return ( + "uncertain", + format!( + "somalier genotyped {sites} sites; telling one person from another needs {floor}" + ), + ); + } + if compared > 0 { + let s = if compared == 1 { "" } else { "s" }; + return ( + "checked", + format!( + "compared with {compared} other sample{s} of the run on {floor} or more shared sites" + ), + ); + } + if thin > 0 { + return ( + "uncertain", + format!( + "no other sample of the run is known to share {floor} or more genotyped sites with this one" + ), + ); + } + ( + "not_checked", + "no other sample in the somalier run to compare with: the sex check is the only identity check".to_owned(), + ) +} + +/// `n` with a comma between thousands: 5000 is `5,000`. +fn thousands(n: u64) -> String { + let d = n.to_string(); + let mut out = String::new(); + for (k, c) in d.chars().enumerate() { + if k > 0 && (d.len() - k).is_multiple_of(3) { + out.push(','); + } + out.push(c); + } + out +} + /// `og qc sample ARGS`: the exit code. pub fn cli(argv: &[String], out: &mut impl Write, err: &mut impl Write) -> u8 { let a = match args::parse(argv, OPTS) { @@ -347,6 +478,21 @@ pub fn cli(argv: &[String], out: &mut impl Write, err: &mut impl Write) -> u8 { } }, }; + let markers = match a.get("--verifybamid2-markers").filter(|s| !s.is_empty()) { + None => None, + Some(s) => match s.parse::() { + Ok(v) => Some(v), + Err(_) => { + let _ = write!(err, "{USAGE}"); + let _ = writeln!( + err, + "og qc sample: error: argument --verifybamid2-markers: invalid int value: {}", + crate::repr(s) + ); + return 2; + } + }, + }; let inputs = Inputs { sample: a.text("--sample"), samples_tsv: a.text("--somalier-samples"), @@ -356,6 +502,7 @@ pub fn cli(argv: &[String], out: &mut impl Write, err: &mut impl Write) -> u8 { freemix_warn, somalier_id: a.get("--somalier-id"), marker_check: a.text("--marker-check"), + markers, }; let mut run = || -> Result<(), String> { let rows = table(&inputs)?; diff --git a/rust/crates/og-summary/src/qc/tests.rs b/rust/crates/og-summary/src/qc/tests.rs index 2e361fd4a..5b43ab16c 100644 --- a/rust/crates/og-summary/src/qc/tests.rs +++ b/rust/crates/og-summary/src/qc/tests.rs @@ -195,6 +195,8 @@ fn the_table_byte_for_byte() { "male", "--marker-check", "passed", + "--verifybamid2-markers", + "3000", "--out", &out, ], @@ -204,7 +206,10 @@ fn the_table_byte_for_byte() { sex_check_reason\tdeclared male, somalier infers male\nsites_genotyped\t120\ndepth_at_sites\t30.0\n\ x_sites\t39\nx_het\t0\nx_hom_alt\t39\nx_depth_ratio\t0.50\ny_sites\t5\ny_depth_ratio\t0.47\n\ freemix\t0.0412\nfreemix_warn_above\t0.03\ncontamination\twarn\npanel_markers\t10000\n\ -verifybamid2_marker_check\tpassed\nsame_person_as\tT (0.95), U (0.99)\n"; +verifybamid2_marker_check\tpassed\nsame_person_as\tT (0.95), U (0.99)\n\ +verifybamid2_markers\t3000\ncontamination_confidence\tuncertain\n\ +contamination_confidence_reason\tFREEMIX rests on 3000 markers; a firm estimate needs 5,000\n\ +identity\tuncertain\nidentity_reason\tsomalier genotyped 120 sites; telling one person from another needs 1,000\n"; assert_eq!(d.read("out.tsv"), want); let echoed: String = want .lines() @@ -304,3 +309,221 @@ fn unreadable_inputs_exit_1_with_a_message() { assert!(err.contains("invalid float value: 'x'"), "{err}"); assert!(!std::path::Path::new(&out).exists()); } + +/// The verdict for `samples` (one row, sample S) with `pairs` and the +/// VerifyBamID2 inputs, as a map. +fn evidence( + samples: &str, + pairs: Option<&str>, + selfsm: bool, + marker_check: &str, + markers: Option, +) -> HashMap<&'static str, String> { + let d = Dir::new("qc-evidence"); + let s = d.put("s.samples.tsv", samples); + let p = pairs.map(|p| d.put("s.pairs.tsv", p)); + let sm = selfsm.then(|| { + d.put( + "s.selfSM", + "#SEQ_ID\tRG\tCHIP_ID\t#SNPS\t#READS\tAVG_DP\tFREEMIX\nS\tNA\tNA\t100000\t5000\t2.1\t0.0050\n", + ) + }); + let i = Inputs { + sample: "S", + samples_tsv: &s, + pairs_tsv: p.as_deref(), + selfsm: sm.as_deref(), + freemix_warn: FREEMIX_WARN, + marker_check, + markers, + ..Inputs::default() + }; + table(&i).unwrap().into_iter().collect() +} + +/// A somalier row for S with these genotype counts. +fn sites(hom_ref: u32, het: u32, hom_alt: u32) -> String { + samples(&MALE).replace( + "\t60\t40\t20\t", + &format!("\t{hom_ref}\t{het}\t{hom_alt}\t"), + ) +} + +const PAIRS: &str = "#sample_a\tsample_b\trelatedness\tibs0\tibs2\tn\n"; + +#[test] +fn identity_on_300_sites_is_uncertain() { + // 300 informative sites: a sliced or very shallow BAM. + let t = evidence(&sites(100, 120, 80), None, false, "", None); + assert_eq!(t["sites_genotyped"], "300"); + assert_eq!(t["identity"], "uncertain"); + assert_eq!( + t["identity_reason"], + "somalier genotyped 300 sites; telling one person from another needs 1,000" + ); + // Also with another sample on the run that shares many sites. + let pairs = format!("{PAIRS}S\tT\t0.02\t40\t300\t300\n"); + let t = evidence(&sites(100, 120, 80), Some(&pairs), false, "", None); + assert_eq!(t["identity"], "uncertain"); + // 999 is below the floor, 1,000 is at it. + let t = evidence(&sites(333, 333, 333), None, false, "", None); + assert_eq!(t["identity"], "uncertain"); + let t = evidence(&sites(334, 333, 333), None, false, "", None); + assert_eq!(t["identity"], "not_checked"); +} + +#[test] +fn identity_needs_another_sample_on_enough_shared_sites() { + let many = sites(5000, 6000, 4000); + // One sample alone: nothing to compare with. + let t = evidence(&many, None, false, "", None); + assert_eq!(t["identity"], "not_checked"); + assert!(t["identity_reason"].contains("no other sample"), "{t:?}"); + let t = evidence(&many, Some(PAIRS), false, "", None); + assert_eq!(t["identity"], "not_checked"); + // A pair that shares 12,000 sites is a comparison; one of 300 is not. + let pairs = format!("{PAIRS}S\tT\t0.02\t40\t300\t12000\nU\tS\t0.5\t0\t300\t300\n"); + let t = evidence(&many, Some(&pairs), false, "", None); + assert_eq!(t["identity"], "checked"); + assert_eq!( + t["identity_reason"], + "compared with 1 other sample of the run on 1,000 or more shared sites" + ); + let pairs = format!("{PAIRS}U\tS\t0.97\t0\t300\t300\nS\tV\t0.1\t0\t300\t999\n"); + let t = evidence(&many, Some(&pairs), false, "", None); + assert_eq!(t["identity"], "uncertain"); + assert_eq!( + t["identity_reason"], + "no other sample of the run is known to share 1,000 or more genotyped sites with this one" + ); + // The same-person flag still shows; the identity row says it is thin. + assert_eq!(t["same_person_as"], "U (0.97)"); + // A pair that shares no site: somalier writes nan and n 0. + let pairs = format!("{PAIRS}S\tT\tnan\t0\t0\t0\n"); + let t = evidence(&many, Some(&pairs), false, "", None); + assert_eq!(t["identity"], "uncertain"); + // An older pairs table without n: the shared sites are not known. + let pairs = "#sample_a\tsample_b\trelatedness\nS\tT\t0.1\nS\tU\t0.2\nS\tS\t1.0\n"; + let t = evidence(&many, Some(pairs), false, "", None); + assert_eq!(t["identity"], "uncertain"); + // Two pairs on enough shared sites, and a self pair that does not count. + let pairs = format!( + "{PAIRS}S\tT\t0.1\t9\t300\t15000\nU\tS\t0.2\t9\t300\t1000\nS\tS\t1.0\t0\t300\t15000\n" + ); + let t = evidence(&many, Some(&pairs), false, "", None); + assert_eq!( + (t["identity"].as_str(), t["identity_reason"].as_str()), + ( + "checked", + "compared with 2 other samples of the run on 1,000 or more shared sites" + ) + ); +} + +#[test] +fn contamination_on_fewer_than_5000_markers_is_uncertain() { + let many = sites(5000, 6000, 4000); + // The marker check passed, yet only 4,999 markers were kept. + let t = evidence(&many, None, true, "passed", Some(4999)); + assert_eq!(t["contamination"], "ok"); + assert_eq!(t["verifybamid2_markers"], "4999"); + assert_eq!(t["contamination_confidence"], "uncertain"); + assert_eq!( + t["contamination_confidence_reason"], + "FREEMIX rests on 4999 markers; a firm estimate needs 5,000" + ); + let t = evidence(&many, None, true, "passed", Some(5000)); + assert_eq!( + ( + t["contamination_confidence"].as_str(), + t["contamination_confidence_reason"].as_str() + ), + ("ok", "FREEMIX rests on 5000 markers") + ); + // Relaxed mode: uncertain whatever the count. + for markers in [Some(320), Some(8000), None] { + let t = evidence(&many, None, true, "skipped", markers); + assert_eq!(t["contamination_confidence"], "uncertain", "{markers:?}"); + let why = &t["contamination_confidence_reason"]; + assert!( + why.starts_with("VerifyBamID2 skipped its marker check"), + "{t:?}" + ); + // The check needs more than 1,000 markers and a tenth of the + // panel, so it can skip above the 5,000 floor: the reason must + // not set the count against that floor. + assert!(!why.contains("5,000"), "{t:?}"); + assert!(why.contains("more than a tenth of the panel"), "{t:?}"); + } + let t = evidence(&many, None, true, "skipped", Some(8000)); + assert_eq!( + t["contamination_confidence_reason"], + "VerifyBamID2 skipped its marker check: its first run kept 8000 markers, too few for that check (more than 1,000 and more than a tenth of the panel), so FREEMIX is a rough estimate" + ); + // A passed check with no count: VerifyBamID2's own floor held. + let t = evidence(&many, None, true, "passed", None); + assert_eq!(t["contamination_confidence"], "ok"); + assert_eq!(t["verifybamid2_markers"], ""); + // Neither the check nor the count known. + let t = evidence(&many, None, true, "", None); + assert_eq!(t["contamination_confidence"], "uncertain"); + // VerifyBamID2 did not run: no confidence either way. + let t = evidence(&many, None, false, "", Some(320)); + assert_eq!( + ( + t["contamination"].as_str(), + t["contamination_confidence"].as_str(), + t["contamination_confidence_reason"].as_str() + ), + ("not_run", "", "") + ); +} + +#[test] +fn the_markers_option() { + let d = Dir::new("qc-markers"); + let samples = d.put("s.tsv", samples(&MALE)); + let selfsm = d.put("s.selfSM", "#SEQ_ID\tFREEMIX\nS\t0.001\n"); + let out = d.path("o.tsv"); + let go = |m: &str| { + run( + cli, + &[ + "--sample", + "S", + "--somalier-samples", + &samples, + "--selfsm", + &selfsm, + "--marker-check", + "passed", + "--verifybamid2-markers", + m, + "--out", + &out, + ], + ) + }; + // Empty: the log had no count. + let (code, stdout, _) = go(""); + assert_eq!(code, 0); + assert!( + stdout.contains(" verifybamid2_markers: \n contamination_confidence: ok\n"), + "{stdout}" + ); + let (code, _, stderr) = go("many"); + assert_eq!(code, 2); + assert!( + stderr.contains("argument --verifybamid2-markers: invalid int value: 'many'"), + "{stderr}" + ); +} + +#[test] +fn thousands_has_commas() { + assert_eq!(thousands(0), "0"); + assert_eq!(thousands(999), "999"); + assert_eq!(thousands(1000), "1,000"); + assert_eq!(thousands(17766), "17,766"); + assert_eq!(thousands(1234567), "1,234,567"); +} diff --git a/rust/crates/og-summary/tests/i411_run_scope.rs b/rust/crates/og-summary/tests/i411_run_scope.rs new file mode 100644 index 000000000..768169f57 --- /dev/null +++ b/rust/crates/og-summary/tests/i411_run_scope.rs @@ -0,0 +1,307 @@ +//! What part of the genome a run covered (`scope` in summary.json), and the +//! partial mark on each genome-wide section of a run that covered less. +//! +//! A run on a part of the genome (`--intervals`, a sliced VCF or BAM) gives +//! ROH, archaic, ancestry, PRS, callability and telomere results that read +//! as whole-genome results. The collector reads the contigs of the sample +//! VCF's records, writes them as `scope`, and marks each of those sections +//! "partial: covers N of 22 autosomes" when fewer than 22 are there. + +use og_summary::collect::{Group, Input, post}; +use pycompat::json::Value; +use std::fs; +use std::io::Write; +use std::path::PathBuf; + +const REPO: &str = concat!(env!("CARGO_MANIFEST_DIR"), "/../../.."); + +/// The sections whose result is a share or a sum over the whole genome. +const GENOME_WIDE: [&str; 6] = [ + "callability", + "prs", + "ancestry_fine", + "telomere", + "roh", + "archaic", +]; + +struct Dir(PathBuf); + +impl Dir { + fn new(tag: &str) -> Dir { + let d = std::env::temp_dir().join(format!("og-run-scope-{}-{tag}", std::process::id())); + let _ = fs::remove_dir_all(&d); + fs::create_dir_all(&d).unwrap(); + Dir(d) + } + fn path(&self) -> String { + self.0.to_str().unwrap().to_owned() + } + fn put(&self, rel: &str, body: &[u8]) { + let p = self.0.join(rel); + fs::create_dir_all(p.parent().unwrap()).unwrap(); + fs::write(&p, body).unwrap(); + } + fn put_gz(&self, rel: &str, text: &str) { + let mut e = flate2::write::GzEncoder::new(Vec::new(), flate2::Compression::fast()); + e.write_all(text.as_bytes()).unwrap(); + self.put(rel, &e.finish().unwrap()); + } +} + +impl Drop for Dir { + fn drop(&mut self) { + let _ = fs::remove_dir_all(&self.0); + } +} + +fn collect(dir: &Dir) -> Value { + post::collect(&Input { + sample: "S".into(), + sample_dir: dir.path(), + declared_sex: None, + assets: format!("{REPO}/assets"), + group: Group::All, + tables: format!("{REPO}/bin"), + }) + .unwrap() +} + +fn get<'a>(v: &'a Value, key: &str) -> Option<&'a Value> { + match v { + Value::Object(m) => m.get(key), + _ => None, + } +} + +fn at<'a>(v: &'a Value, path: &[&str]) -> &'a Value { + path.iter().fold(v, |v, k| { + get(v, k).unwrap_or_else(|| panic!("no {k} in {v:?}")) + }) +} + +fn st(v: &Value) -> &str { + match v { + Value::Str(s) => s, + _ => panic!("not a string: {v:?}"), + } +} + +/// A sample folder whose sample VCF has records on `contigs`, with a result +/// in each genome-wide section, as the steps write them. +fn folder(tag: &str, contigs: &[&str]) -> Dir { + let d = Dir::new(tag); + let mut vcf = String::from( + "##fileformat=VCFv4.2\n#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT\tS\n", + ); + for (i, c) in contigs.iter().enumerate() { + for pos in [1_000_000, 2_000_000] { + vcf.push_str(&format!( + "{c}\t{}\t.\tA\tG\t50\tPASS\t.\tGT\t0/1\n", + pos + i + )); + } + } + d.put_gz("vcf/S.vcf.gz", &vcf); + // Step 11: bcftools roh's sites and one run on each chromosome called. + let mut roh = String::from("# ST\n# RG\n"); + for c in contigs { + roh.push_str(&format!("ST\tS\t{c}\t1000000\t1\t50\n")); + } + roh.push_str(&format!( + "RG\tS\t{}\t1000000\t7000000\t6000001\t9\t50\n", + contigs[0] + )); + d.put("vcf/S_roh.txt", roh.as_bytes()); + // Step 16b: the catalog's genes on the chromosomes the BAM has. + let catalog = fs::read_to_string(format!("{REPO}/assets/callability_genes.tsv")).unwrap(); + let mut bed = String::from("#chrom\tstart\tend\tregion\t10X\n"); + for line in catalog.lines().filter(|l| !l.starts_with('#')).skip(1) { + let f: Vec<&str> = line.split('\t').collect(); + let plain = f[2].trim_start_matches("chr"); + if f[3] != "." && contigs.iter().any(|c| c.trim_start_matches("chr") == plain) { + let (a, b): (i64, i64) = (f[3].parse().unwrap(), f[4].parse().unwrap()); + bed.push_str(&format!("{}\t{a}\t{b}\t{}\t{}\n", f[2], f[0], b - a)); + } + } + d.put_gz("mosdepth/S_callability.bed.gz", &bed); + d.put( + "prs/S_prs_summary.tsv", + b"Condition\tPGS_ID\tScore_SUM\tVariants_Matched\tVariants_Total\tPercentile\n\ + Coronary artery disease\tPGS000018\t0.5\t10\t100\tNA\n", + ); + d.put( + "ancestry_fine/S_ancestry_fine.tsv", + b"level\tcode\tgroup\tfraction\tse\tlow\thigh\ncontinent\tEUR\tEurope\t1.0\t0.01\t0.98\t1.0\n", + ); + d.put( + "telomere/S/S/S_summary.tsv", + b"PID\tsample\ttotal_reads\tread_lengths\tintratel_reads\ttel_content\nS\ttumor\t1000\t150\t10\t12.5\n", + ); + d.put( + "archaic/S_archaic.tsv", + b"key\tvalue\npopulation\tEUR\nneanderthal_segments\t3\nneanderthal_bp\t300000\n\ + denisovan_segments\t0\ndenisovan_bp\t0\nanalysed_bp\t1000000\n\ + neanderthal_percent\t1.5\ndenisovan_percent\t0.0\n", + ); + d +} + +fn autosomes() -> Vec { + (1..=22).map(|i| format!("chr{i}")).collect() +} + +#[test] +fn a_run_on_chr20_and_chr22_is_partial_in_every_genome_wide_section() { + let d = folder("two", &["chr20", "chr22"]); + let v = collect(&d); + let scope = at(&v, &["scope"]); + assert_eq!(at(scope, &["autosomes_covered"]), &Value::Int(2)); + assert_eq!( + at(scope, &["autosomes"]), + &Value::Array(vec![Value::Str("chr20".into()), Value::Str("chr22".into())]) + ); + assert_eq!(at(scope, &["chrx"]), &Value::Bool(false)); + assert_eq!(at(scope, &["intervals"]), &Value::Null); + assert_eq!(at(scope, &["partial"]), &Value::Bool(true)); + assert_eq!( + st(at(scope, &["mark"])), + "partial: covers 2 of 22 autosomes" + ); + for key in GENOME_WIDE { + let sec = at(&v, &["sections", key]); + assert_eq!(st(at(sec, &["state"])), "ok", "{key}: {sec:?}"); + assert_eq!( + st(at(sec, &["partial"])), + "partial: covers 2 of 22 autosomes", + "{key}" + ); + } + // A section about the calls themselves, not a share of the genome. + let variants = at(&v, &["sections", "variants"]); + assert_eq!(st(at(variants, &["state"])), "ok"); + assert!(get(variants, "partial").is_none()); +} + +#[test] +fn a_whole_genome_run_carries_no_partial_mark() { + let mut names = autosomes(); + names.push("chrX".into()); + let plain: Vec = names.iter().map(|c| c[3..].to_owned()).collect(); + for (tag, names) in [("chr", &names), ("plain", &plain)] { + let contigs: Vec<&str> = names.iter().map(String::as_str).collect(); + let d = folder(tag, &contigs); + let v = collect(&d); + let scope = at(&v, &["scope"]); + assert_eq!(at(scope, &["autosomes_covered"]), &Value::Int(22), "{tag}"); + assert_eq!( + at(scope, &["autosomes"]), + &Value::Array(autosomes().into_iter().map(Value::Str).collect()), + "{tag}" + ); + assert_eq!(at(scope, &["chrx"]), &Value::Bool(true), "{tag}"); + assert_eq!(at(scope, &["partial"]), &Value::Bool(false), "{tag}"); + assert_eq!(at(scope, &["mark"]), &Value::Null, "{tag}"); + for key in GENOME_WIDE { + let sec = at(&v, &["sections", key]); + assert_eq!(st(at(sec, &["state"])), "ok", "{tag} {key}: {sec:?}"); + assert!(get(sec, "partial").is_none(), "{tag} {key}"); + } + } +} + +#[test] +fn intervals_the_run_manifest_records_make_a_whole_genome_run_partial() { + let names = autosomes(); + let contigs: Vec<&str> = names.iter().map(String::as_str).collect(); + let d = folder("intervals", &contigs); + d.put( + "run_manifest.tsv", + b"run\tintervals\tchr1:1-1000000 chr2:1-1000000\n", + ); + let v = collect(&d); + let scope = at(&v, &["scope"]); + assert_eq!(at(scope, &["autosomes_covered"]), &Value::Int(22)); + assert_eq!( + st(at(scope, &["intervals"])), + "chr1:1-1000000 chr2:1-1000000" + ); + assert_eq!(at(scope, &["partial"]), &Value::Bool(true)); + let mark = "partial: limited to the run's intervals (chr1:1-1000000 chr2:1-1000000)"; + assert_eq!(st(at(scope, &["mark"])), mark); + for key in GENOME_WIDE { + assert_eq!(st(at(&v, &["sections", key, "partial"])), mark, "{key}"); + } +} + +#[test] +fn without_a_readable_sample_vcf_no_scope_is_written_and_nothing_is_marked() { + let d = folder("novcf", &["chr20"]); + fs::remove_file(d.0.join("vcf/S.vcf.gz")).unwrap(); + let v = collect(&d); + assert!(get(&v, "scope").is_none()); + for key in GENOME_WIDE { + assert!( + get(at(&v, &["sections", key]), "partial").is_none(), + "{key}" + ); + } + // A VCF cut off mid-stream is no scope either: its contigs are unknown. + let d = folder("badvcf", &["chr20"]); + d.put("vcf/S.vcf.gz", b"\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\x03"); + let v = collect(&d); + assert!(get(&v, "scope").is_none()); +} + +/// Marks the ROH result (step 11) as from an earlier run: the run started +/// after every file was written, and step 11 failed in it. +fn roh_from_an_earlier_run(d: &Dir) { + let started = std::time::SystemTime::now() + .duration_since(std::time::UNIX_EPOCH) + .unwrap() + .as_secs() + + 86_400; + let mut status = format!("meta\tstarted_epoch\t{started}\n"); + for step in og_summary::collect::model::RUN_ALL_STEPS { + let result = if *step == "11" { + "failed (exit 1)" + } else { + "ok" + }; + status.push_str(&format!("step\t{step}\t{result}\n")); + } + d.put("logs/run_status.tsv", status.as_bytes()); +} + +#[test] +fn a_stale_genome_wide_result_never_reads_as_complete() { + // A whole-genome run whose ROH step failed shows the ROH result of an + // earlier run. That run's scope was not recorded: it may have been a + // chr22-only run, so the mark says the scope is not known. + let names = autosomes(); + let contigs: Vec<&str> = names.iter().map(String::as_str).collect(); + for (tag, contigs, mark) in [ + ("stale-whole", contigs.clone(), None), + ( + "stale-two", + vec!["chr20", "chr22"], + Some("partial: covers 2 of 22 autosomes"), + ), + ] { + let d = folder(tag, &contigs); + roh_from_an_earlier_run(&d); + let v = collect(&d); + let roh = at(&v, &["sections", "roh"]); + assert_eq!(st(at(roh, &["state"])), "stale", "{tag}: {roh:?}"); + assert_eq!( + st(at(roh, &["partial"])), + "partial: not known, from an earlier run", + "{tag}" + ); + for key in GENOME_WIDE.iter().filter(|k| **k != "roh") { + let sec = at(&v, &["sections", key]); + assert_eq!(st(at(sec, &["state"])), "ok", "{tag} {key}: {sec:?}"); + assert_eq!(get(sec, "partial").map(st), mark, "{tag} {key}"); + } + } +} diff --git a/rust/crates/og-summary/tests/i411_str_htt_penetrance.rs b/rust/crates/og-summary/tests/i411_str_htt_penetrance.rs new file mode 100644 index 000000000..b1b24fba2 --- /dev/null +++ b/rust/crates/og-summary/tests/i411_str_htt_penetrance.rs @@ -0,0 +1,364 @@ +//! Step 09's repeat counts as `og summary collect` reads them. +//! +//! 1. HTT 36 to 39 CAG is the reduced-penetrance range (GeneReviews: +//! Huntington Disease). Stranger grades it with the catalog's pathogenic +//! minimum alone, so 37 reads as plain `full_mutation` under STRchive's +//! thresholds. A sized HTT allele in that range carries the range, its +//! label and its citation from `assets/str_penetrance_ranges.tsv`. +//! 2. An allele whose ExpansionHunter estimate rests on in-repeat reads only +//! (ADSP and ADFL 0, ADIR above 0) is longer than a read: it is +//! `in_repeat`, not sized, whatever its SO field says. Its point estimate +//! must never earn a range label. + +use og_summary::collect::{Group, Input, collect}; +use pycompat::json::Value; +use std::fs; +use std::path::PathBuf; + +const HEAD: &str = + "##fileformat=VCFv4.2\n#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT\tS\n"; +const FMT: &str = "GT:SO:REPCN:REPCI:ADSP:ADFL:ADIR:LC"; + +struct Dir(PathBuf); + +impl Dir { + fn new(tag: &str) -> Dir { + let p = std::env::temp_dir().join(format!( + "og-summary-i411-str-{tag}-{}-{:?}", + std::process::id(), + std::thread::current().id() + )); + let _ = fs::remove_dir_all(&p); + fs::create_dir_all(&p).unwrap(); + Dir(p) + } + + fn path(&self, name: &str) -> String { + self.0.join(name).display().to_string() + } + + fn put(&self, name: &str, body: &str) { + let p = self.0.join(name); + fs::create_dir_all(p.parent().unwrap()).unwrap(); + fs::write(p, body).unwrap(); + } +} + +impl Drop for Dir { + fn drop(&mut self) { + let _ = fs::remove_dir_all(&self.0); + } +} + +/// One ExpansionHunter record with Stranger's INFO fields. The counts are +/// invented. +fn rec(locus: &str, so: &str, cn: &str, ci: &str, ad: [&str; 3], st: &str) -> String { + format!( + "chr4\t3074877\t.\tC\t\t.\tPASS\tEND=3074940;REPID={locus};VARID={locus};\ + STR_STATUS={st};STR_NORMAL_MAX=26;STR_PATHOLOGIC_MIN=36\t{FMT}\t\ + 0/1:{so}:{cn}:{ci}:{}:{}:{}:30.0\n", + ad[0], ad[1], ad[2] + ) +} + +const ASSETS: &str = concat!(env!("CARGO_MANIFEST_DIR"), "/../../../assets"); + +/// The expansions section for one ExpansionHunter VCF that Stranger graded, +/// with the assets folder `assets` (`None`: one written in the scratch +/// folder, holding `table` as the penetrance table when given). +fn section(tag: &str, records: &str, assets: Option<&str>, table: Option<&str>) -> Value { + let d = Dir::new(tag); + let vcf = format!("{HEAD}{records}"); + d.put("S/expansion_hunter/S_eh.vcf", &vcf); + d.put("S/expansion_hunter/S_eh_stranger.vcf", &vcf); + d.put("assets/README", "a staged assets folder\n"); + if let Some(t) = table { + d.put("assets/str_penetrance_ranges.tsv", t); + } + let input = Input { + sample: "S".into(), + sample_dir: d.path("S"), + declared_sex: None, + assets: assets.map_or_else(|| d.path("assets"), str::to_owned), + group: Group::C, + tables: concat!(env!("CARGO_MANIFEST_DIR"), "/../../../bin").into(), + }; + let v = collect(&input).unwrap().to_json(); + at(&v, &["sections", "expansions"]).clone() +} + +/// The expansions section's loci by name, with the repository's assets. +fn loci(tag: &str, records: &str) -> Vec<(String, Value)> { + let sec = section(tag, records, Some(ASSETS), None); + assert_eq!(at(&sec, &["state"]), &Value::Str("ok".into()), "{sec:?}"); + match at(&sec, &["data", "loci"]) { + Value::Array(xs) => xs + .iter() + .map(|x| (text(at(x, &["locus"])).to_owned(), x.clone())) + .collect(), + other => panic!("loci: {other:?}"), + } +} + +fn locus<'a>(ls: &'a [(String, Value)], name: &str) -> &'a Value { + &ls.iter() + .find(|(k, _)| k == name) + .unwrap_or_else(|| panic!("no {name}")) + .1 +} + +fn at<'a>(v: &'a Value, path: &[&str]) -> &'a Value { + path.iter().fold(v, |v, k| match v { + Value::Object(m) => m.get(*k).unwrap_or_else(|| panic!("no {k} in {v:?}")), + _ => panic!("{k} of {v:?}"), + }) +} + +fn get<'a>(v: &'a Value, k: &str) -> Option<&'a Value> { + match v { + Value::Object(m) => m.get(k), + _ => None, + } +} + +fn text(v: &Value) -> &str { + match v { + Value::Str(s) => s, + _ => panic!("not a text: {v:?}"), + } +} + +const SPAN2: &str = "SPANNING/SPANNING"; + +#[test] +fn htt_37_reads_reduced_penetrance() { + let ls = loci( + "htt37", + &rec( + "HTT", + SPAN2, + "17/37", + "17-17/37-37", + ["12/9", "0/0", "0/0"], + "normal,full_mutation", + ), + ); + let htt = locus(&ls, "HTT"); + assert_eq!(text(at(htt, &["sizing"])), "sized", "{htt:?}"); + assert_eq!(text(at(htt, &["penetrance"])), "36-39", "{htt:?}"); + assert!( + text(at(htt, &["penetrance_label"])).starts_with("reduced penetrance"), + "{htt:?}" + ); + assert!( + text(at(htt, &["penetrance_citation"])).contains("NBK1305"), + "{htt:?}" + ); + // Stranger's own grade stays as it wrote it. + assert_eq!(text(at(htt, &["status"])), "normal,full_mutation"); +} + +#[test] +fn the_flagged_list_carries_the_penetrance_range() { + let d = Dir::new("flagged"); + let vcf = format!( + "{HEAD}{}", + rec( + "HTT", + SPAN2, + "20/38", + "20-20/38-38", + ["10/8", "0/0", "0/0"], + "normal,full_mutation" + ) + ); + d.put("S/expansion_hunter/S_eh.vcf", &vcf); + d.put("S/expansion_hunter/S_eh_stranger.vcf", &vcf); + let input = Input { + sample: "S".into(), + sample_dir: d.path("S"), + declared_sex: None, + assets: ASSETS.into(), + group: Group::C, + tables: concat!(env!("CARGO_MANIFEST_DIR"), "/../../../bin").into(), + }; + let v = collect(&input).unwrap().to_json(); + let flagged = match at(&v, &["sections", "expansions", "data", "flagged"]) { + Value::Array(xs) => xs.clone(), + other => panic!("{other:?}"), + }; + assert_eq!(flagged.len(), 1, "{flagged:?}"); + assert_eq!(text(at(&flagged[0], &["penetrance"])), "36-39"); +} + +#[test] +fn the_ends_of_the_range_and_their_neighbours() { + for (cn, want) in [ + ("20/35", None), + ("20/36", Some("36-39")), + ("20/39", Some("36-39")), + ("20/40", None), + ] { + let (a, b) = cn.split_once('/').unwrap(); + let ls = loci( + &format!("ends-{b}"), + &rec( + "HTT", + SPAN2, + cn, + &format!("{a}-{a}/{b}-{b}"), + ["10/8", "0/0", "0/0"], + "normal", + ), + ); + let htt = locus(&ls, "HTT"); + assert_eq!(get(htt, "penetrance").map(text), want, "{cn}: {htt:?}"); + // The keys come together or not at all. + assert_eq!(get(htt, "penetrance_label").is_some(), want.is_some()); + assert_eq!(get(htt, "penetrance_citation").is_some(), want.is_some()); + } +} + +#[test] +fn only_a_sized_allele_earns_the_label_and_only_at_its_locus() { + // A low-confidence 37 (one spanning read), and 37 at another locus. + let ls = loci( + "unsized37", + &(rec( + "HTT", + SPAN2, + "17/37", + "17-17/37-37", + ["10/1", "0/0", "0/0"], + "normal,full_mutation", + ) + &rec( + "ATXN1", + SPAN2, + "17/37", + "17-17/37-37", + ["10/8", "0/0", "0/0"], + "normal", + )), + ); + let htt = locus(&ls, "HTT"); + assert_eq!(text(at(htt, &["sizing"])), "low_confidence"); + assert!(get(htt, "penetrance").is_none(), "{htt:?}"); + assert!(get(locus(&ls, "ATXN1"), "penetrance").is_none()); +} + +#[test] +fn an_allele_of_in_repeat_reads_only_is_not_sized() { + // No SO value, and SO=FLANKING, on an allele that only in-repeat reads + // support: each is longer than a read. The first allele has spanning + // reads (sized, or unknown where SO is empty). + for (so, want) in [ + (".", "unknown/in_repeat"), + ("SPANNING/.", "sized/in_repeat"), + ("SPANNING/FLANKING", "sized/in_repeat"), + ] { + let ls = loci( + &format!("irr-{}", so.replace(['/', '.'], "_")), + &rec( + "HTT", + so, + "17/37", + "17-17/37-60", + ["12/0", "0/0", "0/14"], + "normal,full_mutation", + ), + ); + let htt = locus(&ls, "HTT"); + assert_eq!(text(at(htt, &["allele_sizing"])), want, "{so}: {htt:?}"); + assert_eq!(text(at(htt, &["sizing"])), "in_repeat", "{so}"); + // The point estimate 37 of an unsized allele earns no label. + assert!(get(htt, "penetrance").is_none(), "{so}: {htt:?}"); + assert_eq!(text(at(htt, &["zone"])), "", "{so}"); + } +} + +#[test] +fn spanning_or_flanking_reads_keep_the_allele_as_it_was() { + // Reads beside the in-repeat ones: the IRR rule does not fire. + let ls = loci( + "not-irr", + &(rec( + "HTT", + ".", + "17/37", + "17-17/37-37", + ["12/3", "0/0", "0/14"], + "normal,full_mutation", + ) + &rec( + "ATXN1", + "SPANNING/FLANKING", + "17/50", + "17-17/40-60", + ["12/0", "0/4", "0/14"], + "normal", + ) + &rec( + "DMPK", + SPAN2, + "5/12", + "5-5/12-12", + ["12/9", "0/0", "0/0"], + "normal", + )), + ); + assert_eq!( + text(at(locus(&ls, "HTT"), &["allele_sizing"])), + "unknown/unknown" + ); + assert_eq!( + text(at(locus(&ls, "ATXN1"), &["allele_sizing"])), + "sized/flanking_only" + ); + assert_eq!( + text(at(locus(&ls, "DMPK"), &["allele_sizing"])), + "sized/sized" + ); +} + +#[test] +fn a_broken_table_is_refused_and_a_missing_one_labels_nothing() { + let htt37 = rec( + "HTT", + SPAN2, + "17/37", + "17-17/37-37", + ["12/9", "0/0", "0/0"], + "normal,full_mutation", + ); + let head = "locus\tmin\tmax\tlabel\tcitation\n"; + let state = |tag: &str, table: Option<&str>| { + let sec = section(tag, &htt37, None, table); + (text(at(&sec, &["state"])).to_owned(), sec) + }; + // A good table in a staged folder: the control for the three below. + let good = format!("# a comment\n{head}HTT\t36\t39\treduced\tGeneReviews\n"); + let (st, sec) = state("good", Some(&good)); + assert_eq!(st, "ok", "{sec:?}"); + let loci = match at(&sec, &["data", "loci"]) { + Value::Array(xs) => xs.clone(), + other => panic!("{other:?}"), + }; + assert_eq!(text(at(&loci[0], &["penetrance"])), "36-39"); + // Inverted bounds, a header alone, and a header without the columns. + for (tag, table) in [ + ( + "inverted", + format!("{head}HTT\t39\t36\treduced\tGeneReviews\n"), + ), + ("header", head.to_owned()), + ("columns", "locus\tmin\n".to_owned()), + ] { + let (st, sec) = state(tag, Some(&table)); + assert_eq!(st, "unreadable", "{tag}: {sec:?}"); + } + // No table in the staged folder: the section reads, with no label. + let (st, sec) = state("missing", None); + assert_eq!(st, "ok", "{sec:?}"); + match at(&sec, &["data", "loci"]) { + Value::Array(xs) => assert!(get(&xs[0], "penetrance").is_none(), "{sec:?}"), + other => panic!("{other:?}"), + } +} diff --git a/rust/og/tests/port_demo_sample.rs b/rust/og/tests/port_demo_sample.rs index 1bf2cb2d0..1c371f9ba 100644 --- a/rust/og/tests/port_demo_sample.rs +++ b/rust/og/tests/port_demo_sample.rs @@ -145,6 +145,34 @@ fn demo_001_feeds_every_section_and_the_check_catches_a_missing_one() { let _ = std::fs::remove_dir_all(&root); } +#[test] +fn the_demo_step_53_table_reads_uncalibrated_outside_hla_and_kir() { + use og_reports::locityper::{UNCALIBRATED, calibrated}; + let root = dir("locityper"); + demo(&root, &[]); + let table = text(&root.join("DEMO-001/locityper/DEMO-001_locityper.tsv")); + let mut lines = table.lines(); + let head: Vec<&str> = lines.next().unwrap().split('\t').collect(); + let col = |name: &str| head.iter().position(|c| *c == name).unwrap(); + let (locus, filter, reason) = (col("locus"), col("filter"), col("reason")); + let mut seen = (0, 0); + for line in lines { + let c: Vec<&str> = line.split('\t').collect(); + if calibrated(c[locus]) { + seen.0 += 1; + assert_eq!((c[filter], c[reason]), ("pass", "."), "{line}"); + } else { + seen.1 += 1; + assert_eq!(c[filter], "uncalibrated", "{line}"); + assert!(c[reason].starts_with(UNCALIBRATED), "{line}"); + } + } + // assets/locityper_loci.bed holds HLA and KIR loci and two others + // (CYP2D6, FCGR), so both branches ran. + assert!(seen.0 > 0 && seen.1 > 0, "{seen:?}"); + let _ = std::fs::remove_dir_all(&root); +} + #[test] fn the_same_seed_writes_the_same_bytes() { let (a, b, c) = (dir("seed-a"), dir("seed-b"), dir("seed-c")); diff --git a/scripts/02b-alignment-longread.sh b/scripts/02b-alignment-longread.sh index 6d835d5b8..fa16f1812 100755 --- a/scripts/02b-alignment-longread.sh +++ b/scripts/02b-alignment-longread.sh @@ -9,6 +9,12 @@ # PLATFORM=ont -> Oxford Nanopore (minimap2 preset: map-ont) # PLATFORM=hifi -> PacBio HiFi/CCS (minimap2 preset: map-hifi) # +# ONT: the basecaller model goes into the BAM's @RG DS field +# (DS:basecall_model=...), where step 03e reads it to pick the Clair3 model. +# It comes from BASECALL_MODEL (e.g. dna_r10.4.1_e8.2_400bps_sup@v5.0.0; +# needed for FASTQ input), else from the unaligned BAM's own @RG DS, which +# Dorado writes. +# # Runtime: ~1-3 hours for 30X long-read WGS depending on read length and throughput. # # The BAM is written under a temporary name, indexed and checked with samtools @@ -98,12 +104,41 @@ if [ -z "$INPUT_FILE" ] || [ ! -f "$INPUT_FILE" ]; then exit 1 fi +# The basecaller model, for step 03e. Read only for ONT: HiFi has one Clair3 +# model and no basecaller choice that changes it. +BASECALLER="" +[ "$PLATFORM" != ont ] || BASECALLER="${BASECALL_MODEL:-}" +case "$BASECALLER" in + *[!A-Za-z0-9._@+-]*) + echo "ERROR: BASECALL_MODEL holds characters a basecaller model name never has: '${BASECALLER}'" >&2 + exit 2 ;; +esac +if [ "$PLATFORM" = ont ] && [ -z "$BASECALLER" ] && [[ "$REAL_INPUT" == *.bam ]]; then + BASECALLER=$(run_in --cpus 1 --memory 1g -v "${PGP_ROOT}/bin:/pgp-bin:ro" "$SAMTOOLS_IMAGE" \ + /pgp-bin/og longread clair3-model --basecaller-only --bam "/genome/${REAL_INPUT#"${REAL_GENOME}/"}") \ + || { echo "NOTE: the basecaller model of the unaligned BAM could not be read (see above)." >&2; BASECALLER=""; } + # The header value goes into the minimap2 -R string too: same character rule, + # but a bad header is not the user's input, so warn and drop it. + case "$BASECALLER" in + *[!A-Za-z0-9._@+-]*) + echo "WARNING: ignoring a basecall_model in the BAM header with characters a model name never has: '${BASECALLER}'" >&2 + BASECALLER="" ;; + esac +fi +RG_DS="" +if [ -n "$BASECALLER" ]; then + RG_DS="\tDS:basecall_model=${BASECALLER}" +elif [ "$PLATFORM" = ont ]; then + echo "NOTE: no basecaller model known (set BASECALL_MODEL); step 03e will then need BASECALL_MODEL or CLAIR3_MODEL." +fi + echo "=== Long-read Alignment: ${SAMPLE} ===" echo "Platform: ${PLATFORM} (minimap2 preset: ${MM2_PRESET})" echo "Input: ${INPUT_FILE}" echo "Reference: ${REF}" echo "Output: ${OUTPUT_DIR}/" echo "Threads: ${THREADS}" +[ -z "$BASECALLER" ] || echo "Basecaller model: ${BASECALLER}" # Validate reference exists if [ ! -f "$REF" ]; then @@ -146,7 +181,7 @@ _align_and_sort() { "$MINIMAP2_IMAGE" \ minimap2 -t "${THREADS}" -a -x "${MM2_PRESET}" \ --MD -Y \ - -R "@RG\tID:${SAMPLE}\tSM:${SAMPLE}\tPL:${RG_PLATFORM}\tLB:${SAMPLE}" \ + -R "@RG\tID:${SAMPLE}\tSM:${SAMPLE}\tPL:${RG_PLATFORM}\tLB:${SAMPLE}${RG_DS}" \ "$@" \ "${REF_FASTA_C}" \ "$reads" \ diff --git a/scripts/03e-clair3.sh b/scripts/03e-clair3.sh index 66a6af801..a5b47bd1e 100755 --- a/scripts/03e-clair3.sh +++ b/scripts/03e-clair3.sh @@ -8,10 +8,17 @@ # Usage: PLATFORM=ont|hifi ./scripts/03e-clair3.sh [male|female] # # Set PLATFORM to select the appropriate model: -# PLATFORM=ont -> ONT R10.4.1 model (r1041_e82_400bps_sup_v500) # PLATFORM=hifi -> PacBio HiFi/Revio model (hifi_revio) +# PLATFORM=ont -> the model of the reads' basecaller: og longread +# clair3-model maps the basecall_model= of the BAM's @RG +# DS field (Dorado writes it, step 02b carries it) or +# BASECALL_MODEL (e.g. dna_r10.4.1_e8.2_400bps_sup@v5.0.0) +# to a model directory of the image. With no basecaller, +# one Clair3 has no model for, or a model the image +# lacks, the step stops and lists the image's models: a +# model trained on other basecalls degrades every call. # CLAIR3_MODEL overrides the model path inside the image (e.g. -# /opt/models/r1041_e82_400bps_sup_v520 for newer Dorado basecalls). +# /opt/models/r1041_e82_400bps_sup_v520); for ONT it is still checked. # Sex: `male` calls chrX and chrY haploid outside the pseudoautosomal regions # (Clair3 --gender male with assets/par_grch38.bed); `female` leaves chrY # out and calls chrX diploid; no sex calls both diploid. @@ -40,12 +47,7 @@ OUTPUT_DIR="${SAMPLE_DIR}/vcf_clair3" # Select model path based on platform case "$PLATFORM" in - ont) - MODEL_PATH="${CLAIR3_MODEL:-/opt/models/r1041_e82_400bps_sup_v500}" - ;; - hifi) - MODEL_PATH="${CLAIR3_MODEL:-/opt/models/hifi_revio}" - ;; + ont|hifi) ;; *) echo "ERROR: PLATFORM must be 'ont' or 'hifi', got '${PLATFORM}'" >&2 exit 1 @@ -54,7 +56,6 @@ esac echo "=== Clair3 Variant Calling: ${SAMPLE} ===" echo "Platform: ${PLATFORM}" -echo "Model: ${MODEL_PATH}" echo "Input BAM: ${BAM}" echo "Reference: ${REF}" echo "Output: ${OUTPUT_DIR}/" @@ -71,6 +72,19 @@ done mkdir -p "$OUTPUT_DIR" +if [ "$PLATFORM" = hifi ]; then + MODEL_PATH="${CLAIR3_MODEL:-/opt/models/hifi_revio}" +else + # Inside the Clair3 image, so the check sees the image's /opt/models. + MODEL_ARGS=(--bam "/genome/${SAMPLE}/${ALIGN_DIR}/${SAMPLE}_sorted.bam" --models-dir /opt/models) + [ -z "${BASECALL_MODEL:-}" ] || MODEL_ARGS+=(--basecaller "$BASECALL_MODEL") + [ -z "${CLAIR3_MODEL:-}" ] || MODEL_ARGS+=(--model "$CLAIR3_MODEL") + MODEL_PATH=$(run_in --cpus 1 --memory 1g -v "${PGP_ROOT}/bin:/pgp-bin:ro" "$CLAIR3_IMAGE" \ + /pgp-bin/og longread clair3-model "${MODEL_ARGS[@]}") \ + || { echo "ERROR: no Clair3 model chosen (see above); Clair3 did not run." >&2; exit 1; } +fi +echo "Model: ${MODEL_PATH}" + # --gender exists from Clair3 v2.0.3 on; male also gets the PAR BED, so the # pseudoautosomal regions stay diploid. SEX_ARGS=() diff --git a/scripts/04b-gridss.sh b/scripts/04b-gridss.sh index cbf1d6ca9..0a15566ee 100755 --- a/scripts/04b-gridss.sh +++ b/scripts/04b-gridss.sh @@ -1,10 +1,15 @@ #!/usr/bin/env bash # GRIDSS — Assembly-based structural variant caller # Input: sorted BAM + GRCh38 reference (with BWA index) -# Output: VCF with BND-notation breakpoints in $GENOME_DIR//sv_gridss/ +# Output, in $GENOME_DIR//sv_gridss/: +# _gridss.vcf.gz every GRIDSS call, as breakends (SVTYPE=BND) +# _gridss.high.vcf.gz the calls GRIDSS rates high confidence: +# QUAL >= 1000 with assembly support on both +# sides (INFO/AS > 0 and INFO/RAS > 0), and its .tbi # -# GRIDSS excels at complex rearrangements that Manta/Delly miss. -# Output is BND notation — use the SV consensus merge (step 22) for integration. +# GRIDSS excels at complex rearrangements that Manta/Delly miss. Its calls are +# left out of the SV consensus (step 22): nothing here turns its breakend pairs +# into DEL, DUP or INV events, so SURVIVOR cannot count them as one caller. # # HEAVY: Requires 31 GB JVM heap, 8 threads, and ~50 GB intermediate disk space. # Expected runtime: 4-8 hours for 30X WGS. @@ -20,6 +25,38 @@ SAMPLE_DIR="${GENOME_DIR}/${SAMPLE}" BAM="${SAMPLE_DIR}/${ALIGN_DIR}/${SAMPLE}_sorted.bam" REF="$REF_FASTA" OUTPUT_DIR="${SAMPLE_DIR}/sv_gridss" +RAW="${OUTPUT_DIR}/${SAMPLE}_gridss.vcf.gz" +HIGH="${OUTPUT_DIR}/${SAMPLE}_gridss.high.vcf.gz" +# GRIDSS's own high-confidence rule: QUAL >= 1000 with assembly support on both +# sides of the breakpoint. Both breakends of a pair carry one QUAL, and each +# one's AS is the other's RAS, so the filter keeps or drops a pair together. +HIGH_EXPR='QUAL>=1000 && INFO/AS>0 && INFO/RAS>0' +require_image GRIDSS_IMAGE BCFTOOLS_IMAGE + +# write_high: write HIGH from RAW with HIGH_EXPR, and its index. RAW stays as +# GRIDSS wrote it. Cheap (seconds), so it runs again on every call. +write_high() { + rm -f "$HIGH" "${HIGH}.tbi" + run_in --cpus 1 --memory 2g "$BCFTOOLS_IMAGE" \ + bcftools view -i "$HIGH_EXPR" -Oz -o "$(cpath "$HIGH")" "$(cpath "$RAW")" + run_in --cpus 1 --memory 2g "$BCFTOOLS_IMAGE" bcftools index -f -t "$(cpath "$HIGH")" + if ! wrote_vcf "$HIGH"; then + echo "ERROR: bcftools wrote no ${HIGH}." >&2 + exit 1 + fi + local n_in n_out + n_in=$(run_in "$BCFTOOLS_IMAGE" bcftools view -H "$(cpath "$RAW")" | wc -l | tr -d ' ') + n_out=$(run_in "$BCFTOOLS_IMAGE" bcftools view -H "$(cpath "$HIGH")" | wc -l | tr -d ' ') + echo "High confidence: ${HIGH} (kept ${n_out} of ${n_in} breakend records: ${HIGH_EXPR})" +} + +# say_consensus: what step 22 does with these calls. +say_consensus() { + echo "" + echo "NOTE: GRIDSS calls are left out of the SV consensus (step 22). GRIDSS writes" + echo " each event as a pair of breakends (SVTYPE=BND), and nothing here turns a pair" + echo " into a DEL, DUP or INV. Read both files here directly." +} echo "=== GRIDSS: ${SAMPLE} ===" echo "BAM: ${BAM}" @@ -53,9 +90,11 @@ fi # Skip only a finished VCF (complete BGZF file with a VCF header); a file cut # short by a killed run is called again. -if have_output "${OUTPUT_DIR}/${SAMPLE}_gridss.vcf.gz"; then - echo "GRIDSS output already exists, skipping." +if have_output "$RAW"; then + echo "GRIDSS output already exists, skipping GRIDSS." echo "Delete to re-run: rm -rf ${OUTPUT_DIR}" + write_high + say_consensus exit 0 fi @@ -118,19 +157,15 @@ run_in --rw "$(dirname "$REF_FASTA")" -w "/genome/${SAMPLE}/sv_gridss" \ "${GRIDSS_IMAGE}" \ "${GRIDSS_ARGS[@]}" -if ! wrote_vcf "${OUTPUT_DIR}/${SAMPLE}_gridss.vcf.gz"; then - echo "ERROR: GRIDSS exited without a ${OUTPUT_DIR}/${SAMPLE}_gridss.vcf.gz." >&2 +if ! wrote_vcf "$RAW"; then + echo "ERROR: GRIDSS exited without a ${RAW}." >&2 echo " Its intermediate files are kept in ${OUTPUT_DIR}/work/ for a look." >&2 exit 1 fi rm -rf "${OUTPUT_DIR}/work" +write_high echo "=== GRIDSS complete ===" -echo "VCF: ${OUTPUT_DIR}/${SAMPLE}_gridss.vcf.gz" -echo "" -echo "NOTE: GRIDSS outputs BND-notation breakpoints. For standard SV types" -echo " (DEL/DUP/INV/INS), use the SV consensus merge step (22-survivor-merge.sh)" -echo " which converts and integrates calls from all SV callers." -echo "" -echo "Quality filtering: QUAL >= 1000 with assembly support (AS > 0 & RAS > 0)" -echo " is a good threshold for high-confidence calls." +echo "VCF: ${RAW}" +echo "High-confidence VCF: ${HIGH}" +say_consensus diff --git a/scripts/07-pharmacogenomics.sh b/scripts/07-pharmacogenomics.sh index f5ea70149..2c8166f38 100755 --- a/scripts/07-pharmacogenomics.sh +++ b/scripts/07-pharmacogenomics.sh @@ -40,7 +40,10 @@ done # count at a PharmCAT position whose REF or ALT is longer than one base (an # indel such as UGT1A1 *28); og pgx refblock-fill writes a 0/0 record # with PharmCAT's own alleles there when reference blocks with GQ >= 20 cover -# the whole REF span and no other record overlaps it. PharmCAT refuses a gVCF, +# the whole REF span and no other record overlaps it. The same GQ 20 floor +# holds for every reference call it passes on: a 0/0 record (a block or a +# DeepVariant RefCall) below GQ 20, or without a GQ, is left out, so PharmCAT +# reads that position as missing, not as a confident 0/0. PharmCAT refuses a gVCF, # by content and by a name with .g.vcf in it, so the expanded file has # neither. The PHARMCAT_PREPROCESS module does the same. GVCF="${OUTPUT_DIR}/${SAMPLE}.g.vcf.gz" diff --git a/scripts/16b-mosdepth.sh b/scripts/16b-mosdepth.sh index ca9de7b10..8e2deb421 100755 --- a/scripts/16b-mosdepth.sh +++ b/scripts/16b-mosdepth.sh @@ -51,6 +51,10 @@ mkdir -p "$OUTPUT_DIR" # more only, the bases at 10x or more per gene (the same command as the # MOSDEPTH module). The genes with no position on chr1-22, X or Y (ALT-only) # are left out of the BED; the report reads them from the table. +# No --fast-mode here: without it mosdepth counts the bases where the two mates +# of a pair overlap once, not twice, and does not count the bases of a deletion +# in the CIGAR. With it, a short-insert pair or a deletion lifts bases to 10x +# that fewer than 10 fragments read, and a gene reads as read when it was not. callability_pass() { local work="${OUTPUT_DIR}/callability.part" rm -rf "$work" @@ -63,7 +67,6 @@ callability_pass() { mosdepth \ --by "/genome/${SAMPLE}/mosdepth/callability.part/genes.bed" \ --mapq 20 \ - --fast-mode \ --no-per-base \ --threads "${THREADS}" \ --thresholds 10 \ @@ -92,7 +95,8 @@ fi # mosdepth flags: # --by 500 Window size for per-region coverage (500bp bins; WGS default) # --by Capture BED for on-target coverage (WES; set CAPTURE_BED env var) -# --fast-mode Use faster algorithm (does NOT skip per-base output by itself) +# --fast-mode Skip the CIGAR and the mate-overlap correction: faster, and fine +# for these depth summaries (the gene pass above runs without it) # --no-per-base Omit the large per-base BED (saves ~3-5 GB per WGS sample) # --threads Decompression threads (mosdepth uses 1 main + N decompression) # --thresholds Report fraction of bases at these coverage thresholds diff --git a/scripts/22-survivor-merge.sh b/scripts/22-survivor-merge.sh index 077a6e1e8..83a6d2ddb 100755 --- a/scripts/22-survivor-merge.sh +++ b/scripts/22-survivor-merge.sh @@ -11,8 +11,15 @@ # # Inputs, each used when it exists (two or more are needed): Manta (step 04), # Delly (19), CNVpytor (18), TIDDIT (04a) and Sniffles2 (04c). GRIDSS (04b) is -# left out: it reports every event as a pair of breakends (SVTYPE=BND), which -# never match the DEL, DUP and INV records of the other callers. +# left out: it reports every event as a pair of breakends (SVTYPE=BND), and +# nothing here turns a pair into one DEL, DUP or INV. SURVIVOR 1.0.7 counts BND +# as the same type as INV and TRA, so its breakends would pair with the other +# callers' inversions and translocations and count as votes for an event GRIDSS +# never typed. +# +# SUPP counts callers that agree, not independent proof: Manta and Delly both +# read split and paired reads, so they share alignment errors. AnnotSV (step 05) +# annotates the callers' own calls; the reports join SUPP onto them. set -euo pipefail SAMPLE=${1:?Usage: $0 } @@ -98,7 +105,7 @@ for c in "${CALLERS[@]}"; do USED+=("$name") done if [ -f "${S}/sv_gridss/${SAMPLE}_gridss.vcf.gz" ]; then - echo " [--] gridss: left out, its breakend (BND) records do not match the other callers' DEL, DUP and INV" + echo " [--] gridss: left out of the SV consensus: its breakend pairs (BND) are not turned into DEL, DUP or INV events" fi echo "" @@ -134,6 +141,8 @@ echo " Callers (SUPP_VEC order): ${USED[*]}" echo " Consensus SVs (2+ callers): ${COUNT}" echo " Output: ${OUT}" echo "============================================" +echo "SUPP is caller agreement, not validation: Manta and Delly read the same split and" +echo " paired reads. Annotate the callers' own calls (step 05), not this file." echo "By support (SUPP_VEC: one digit per caller above):" run_in "$BCFTOOLS_IMAGE" bcftools query -f '%INFO/SVTYPE\t%INFO/SUPP_VEC\n' "$(cpath "$OUT")" \ | sort | uniq -c | sort -rn | head -20 diff --git a/scripts/25-prs.sh b/scripts/25-prs.sh index 75d64df76..856f9e3f3 100755 --- a/scripts/25-prs.sh +++ b/scripts/25-prs.sh @@ -17,6 +17,12 @@ # 0/0 instead of a missing site. Without it, only your variant sites are # scored and the summary's Input column says vcf. # +# A site the genotypes leave out adds nothing to a score's sum. When under +# one in five of the genotyped positions is a reference call (0/0), the input +# lists variants only: each score keeps its raw sum, its percentile is +# withheld (Percentile_Note), and the step prints a NOTE. A chip VCF from +# chip-to-vcf.sh lists its reference calls and keeps its percentiles. +# # With the sample's sex, a score's chrX rows are scored too: pgsc_calc's # plink2 gets the sex with the genotypes. Without it they are left out (plink2 # refuses chrX without a sex), and the summary's ChrX column says so. @@ -389,7 +395,7 @@ run_in -v "${PGP_ROOT}/bin:/pgp-bin:ro" "$PYTHON_IMAGE" \ /pgp-bin/og prs table \ --sample "$SAMPLE" --results "$(cpath "${WORK}/results")" --sampleset "$SAMPLESET" \ --scores "$(cpath "${WORK}/scores")" --input-kind "$INPUT_KIND" --sex "$SEX" \ - ${ZERO[@]+"${ZERO[@]}"} ${ANC_ARGS[@]+"${ANC_ARGS[@]}"} --out "$(cpath "$RESULTS_FILE")" + --target "$(cpath "$TARGET")" ${ZERO[@]+"${ZERO[@]}"} ${ANC_ARGS[@]+"${ANC_ARGS[@]}"} --out "$(cpath "$RESULTS_FILE")" # This run's summary under its time too, so the next run keeps it; an earlier # summary of the same minute keeps its name and this one gets -2, -3... STAMP=$(date -r "$RESULTS_FILE" +%Y%m%d-%H%M) @@ -418,9 +424,6 @@ rm -rf "${WORK}/work" "${WORK}/.nextflow" if awk -F'\t' 'NR > 1 && $6 + 0 < 50 {found = 1} END {exit !found}' "$RESULTS_FILE"; then echo "WARNING: under half of a score's variants were genotyped; that sum is not comparable to published distributions." fi -if [ "$INPUT_KIND" = vcf ]; then - echo "NOTE: hom-ref sites are absent from this VCF, so the score is biased; not comparable to published distributions" -fi echo "" echo "============================================" @@ -436,9 +439,14 @@ echo "============================================" echo "" echo "IMPORTANT: a polygenic score is NOT diagnostic. It estimates relative genetic" echo "predisposition; lifestyle, environment and other genes are not captured." -if $USE_PANEL; then +if $USE_PANEL && awk -F'\t' 'NR == 1 {for (i = 1; i <= NF; i++) c[$i] = i; next} + c["Percentile"] && $c["Percentile"] != "NA" {found = 1} END {exit !found}' "$RESULTS_FILE"; then echo "The percentile compares your score with the reference samples whose genetic" echo "ancestry is most similar to yours. See docs/25-prs.md." +elif $USE_PANEL; then + echo "No percentile: the ancestry reference panel gave none for these scores (the" + echo "input lists variants only, or no score matched enough variants), so a raw sum" + echo "cannot be compared with anyone. See docs/25-prs.md." else echo "Raw score only: without the ancestry reference panel there is no percentile," echo "and a raw sum cannot be compared with anyone (scripts/setup.sh --ancestry-panel)." diff --git a/scripts/33-sample-qc.sh b/scripts/33-sample-qc.sh index 57bf921e4..d6b689d3e 100755 --- a/scripts/33-sample-qc.sh +++ b/scripts/33-sample-qc.sh @@ -24,7 +24,10 @@ # as a one-line pedigree (--ped), so its own table and MultiQC show it beside # the sex from the reads; the verdict is still the sex from the reads alone. FREEMIX above FREEMIX_WARN # (default 0.03) is a warning only: contamination makes calls less reliable, -# it does not make them someone else's. +# it does not make them someone else's. On thin evidence the table says so: +# FREEMIX from fewer than 5,000 markers, or with VerifyBamID2's marker check +# skipped, is uncertain, and so is identity from fewer than 1,000 somalier +# sites; with no other sample to compare, identity is not checked. # A data problem in the mosaic estimate (og qc sex-loss) never stops the step # either (a missing og binary does): # below about 10% of the cells nothing can be told at 30x, and above it the @@ -133,7 +136,9 @@ done # --- 2. VerifyBamID2: contamination ---------------------------------------------- # VerifyBamID2 refuses to estimate when fewer than 1,000 panel markers have # reads (a targeted or sliced BAM). Then it runs again without that check, -# and the table says the marker check was skipped. +# and the table says the marker check was skipped. Its check logs how many +# markers it kept ("N SNP markers remained after sanity check"); the run +# without the check does not, so the count comes from the first run's log. echo "" echo "--- VerifyBamID2" VB_OUT="/genome/${SAMPLE}/qc/verifybamid2/${SAMPLE}" @@ -148,7 +153,10 @@ vb2() { --NumThread "$THREADS" "$@" > "$VB_LOG" 2>&1 } SANITY_CHECK=passed -if ! vb2; then +VB_RC=0 +vb2 || VB_RC=$? +MARKERS=$(sed -n '/SNP markers remained after sanity check/{s/.* \([0-9][0-9]*\) SNP markers remained.*/\1/p;q;}' "$VB_LOG") +if [ "$VB_RC" -ne 0 ]; then if grep -q 'Insufficient Available markers' "$VB_LOG"; then SANITY_CHECK=skipped echo "Fewer than 1,000 panel markers have reads; running again without VerifyBamID2's marker check." @@ -177,6 +185,7 @@ run_in -v "${PGP_ROOT}/bin:/pgp-bin:ro" "$PYTHON_IMAGE" \ --declared-sex "$DECLARED_SEX" \ --freemix-warn "$FREEMIX_WARN" \ --marker-check "$SANITY_CHECK" \ + --verifybamid2-markers "$MARKERS" \ --out "/genome/${SAMPLE}/qc/${SAMPLE}_sample_qc.tsv" TABLE="${OUT}/${SAMPLE}_sample_qc.tsv" [ -s "$TABLE" ] || { echo "ERROR: no ${TABLE}" >&2; exit 1; } @@ -208,7 +217,10 @@ echo "Results: ${TABLE}" echo " somalier: ${OUT}/somalier/${SAMPLE}.samples.tsv, ${SAMPLE}.html" echo " VerifyBamID2: ${OUT}/verifybamid2/${SAMPLE}.selfSM" echo "" -echo "Contamination: FREEMIX $(val freemix) (VerifyBamID2's marker check ${SANITY_CHECK})" +echo "Contamination: FREEMIX $(val freemix) (VerifyBamID2's marker check ${SANITY_CHECK}, ${MARKERS:-an unknown number of} markers kept)" +if [ "$(val contamination_confidence)" = uncertain ]; then + echo " The estimate is uncertain: $(val contamination_confidence_reason)." +fi if [ "$(val contamination)" = warn ]; then echo "!!! FREEMIX $(val freemix) is above ${FREEMIX_WARN}: about $(awk -v f="$(val freemix)" 'BEGIN { printf "%d", f * 100 + 0.5 }')% of the reads may come" >&2 echo "!!! from another person. Calls, above all heterozygous ones, are less reliable; see docs/33-sample-qc.md." >&2 @@ -224,6 +236,7 @@ echo "Sex from the reads (somalier): $(val inferred_sex)" if [ -n "$(val same_person_as)" ]; then echo "!!! The same person as: $(val same_person_as)" >&2 fi +echo "Identity: $(val identity) ($(val identity_reason))" case "$(val sex_check)" in ok) echo " Declared sex: ${DECLARED_SEX}"; echo " Sex check: OK" ;; not_checked) echo " Sex check: not done ($(val sex_check_reason))" ;; diff --git a/scripts/49-chip.sh b/scripts/49-chip.sh index 72732ea05..f3507ca43 100755 --- a/scripts/49-chip.sh +++ b/scripts/49-chip.sh @@ -9,8 +9,10 @@ # step 29 are used when they are in GENOME_DIR/somatic/. bcftools csq names # each change on that transcript, and og chip (bin/og) keeps the changes in # the table's CHIP classes, leaves out the ones whose VAF looks inherited (35% -# and up) and states the detection limit at the sample's depth over the same -# exons. The same commands run in the Nextflow CHIP_* processes. +# and up) or is under the 2% that defines CHIP, notes the kept ones whose +# reads also fit an inherited variant, and states the detection limit at the +# sample's depth over the same exons. The same commands run in the Nextflow +# CHIP_* processes. # # Not a diagnosis: CHIP is common with age and most people with it never get # a blood cancer. A negative result does not rule out a clone smaller than the @@ -106,7 +108,7 @@ echo "[4/4] CHIP classes, germline exclusion and detection limit..." rm -f "${P}_pileup.tsv" "${P}_f1r2.tar.gz" "${P}_orientation.tar.gz" echo "" -echo "CHIP calls (${P}.tsv):" +echo "Possible CHIP calls, not a diagnosis (${P}.tsv):" awk -F'\t' 'NR > 1 && $13 == "chip" { printf " %-8s %-10s VAF %-6s %s/%s reads %s\n", $1, $7, $9, $10, $11, $15; n++ } END { if (!n) print " none" }' "${P}.tsv" echo "Not a diagnosis. docs/49-chip.md says what a call means and what to ask a haematologist." diff --git a/scripts/50-mei.sh b/scripts/50-mei.sh index b13392ddb..e7c219d5d 100755 --- a/scripts/50-mei.sh +++ b/scripts/50-mei.sh @@ -9,8 +9,9 @@ # the insertions it calls and reads a short catalog of insertions known to # 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, not seen, or not callable (too few reads -# there to tell). With AnnotSV's data in GENOME_DIR (annotsv_annotations/, as +# 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 +# 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 # that place, and AnnotSV's class (NA for every insertion: AnnotSV 3.5 scores @@ -27,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 / not seen / not callable +# mei/_mei_sites.tsv the catalog with seen / call filtered out / not seen / not callable # 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/e2e-case-paths.tsv b/scripts/ci/e2e-case-paths.tsv index bb38e9ff4..d7344bc7b 100644 --- a/scripts/ci/e2e-case-paths.tsv +++ b/scripts/ci/e2e-case-paths.tsv @@ -10,7 +10,10 @@ # runs, the base leg runs every base case. # A case runs on a pull request when one of its globs matches a changed path, # when its own file or one of its table rows changes, when a case that runs -# needs it, or when it is one of the smoke cases. A change to shared wiring +# needs it, or when it is one of the smoke cases. A change under rust/ (og's +# sources) runs every case with a glob that matches bin/og, so a case that +# runs og, itself or through a step, helper or module, lists bin/og. +# A change to shared wiring # (FULL in e2e-scope.sh: main.nf, the workflows, the config, the shared # library, the launcher, the alignment and calling steps, the fixture, the # e2e runner) runs every case. Every case needs a row, and every glob must @@ -55,15 +58,15 @@ archaic-ancestry-1 assets/pgs_scores.tsv bin/og bin/collect_summary.py modules/l bash-step-08-hla - bash-step-09-str assets/str_extra_loci.json assets/stub/db/catalog.json bin/og scripts/09-expansion-hunter.sh scripts/09b-stranger.sh scripts/ci/fake-docker/lib.sh bash-step-10-telomere scripts/10-telomere-hunter.sh scripts/ci/fake-docker/lib.sh scripts/setup.sh -bash-step-11-roh scripts/11-roh-analysis.sh scripts/ci/fake-docker/lib.sh +bash-step-11-roh scripts/11-roh-analysis.sh scripts/ci/fake-docker/lib.sh bin/og bash-step-14-imputation scripts/14-imputation-prep.sh scripts/ci/fake-docker/lib.sh bash-step-19-delly scripts/19-delly.sh scripts/ci/fake-docker/lib.sh scripts/setup.sh -bash-step-20-numt assets/callability_genes.tsv bin/collect_summary.py scripts/16b-mosdepth.sh scripts/20-mtoolbox.sh scripts/ci/fake-docker/lib.sh +bash-step-20-numt assets/callability_genes.tsv bin/collect_summary.py scripts/16b-mosdepth.sh scripts/20-mtoolbox.sh scripts/ci/fake-docker/lib.sh bin/og bash-step-bash42 assets/construct_variants.tsv bin/cpsr_sample_id bin/og scripts/03d-octopus.sh scripts/04a-tiddit.sh scripts/10-telomere-hunter.sh scripts/17-cpsr.sh scripts/19-delly.sh scripts/ci/fake-docker/lib.sh bloodtype-1 assets/bloodtype_markers.tsv bin/cn_loci.tsv bin/og modules/local/bloodtype/* modules/local/vcf_precheck/* scripts/41-bloodtype.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh bumps-drop-in-baseline scripts/ci/fake-docker/lib.sh callability-1-catalog assets/callability_genes.tsv assets/paralog_loci.tsv assets/pgx_genes.tsv bin/cn_loci.tsv bin/og scripts/ci/build-callability.sh scripts/ci/fake-docker/lib.sh scripts/ci/lib/fetch-pinned.sh -callability-2-genes assets/acmg_sf.tsv assets/callability_genes.tsv assets/carrier_genes.tsv assets/mito_confirmed.tsv assets/stub/sample.vcf.gz bin/collect_summary.py bin/render_report.py bin/results_index.py modules/local/html_report/* modules/local/mosdepth/* modules/local/vcf_precheck/* scripts/16b-mosdepth.sh scripts/24-html-report.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh +callability-2-genes assets/acmg_sf.tsv assets/callability_genes.tsv assets/carrier_genes.tsv assets/mito_confirmed.tsv assets/stub/sample.vcf.gz bin/collect_summary.py bin/render_report.py bin/results_index.py modules/local/html_report/* modules/local/mosdepth/* modules/local/vcf_precheck/* scripts/16b-mosdepth.sh scripts/24-html-report.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh bin/og chip-clonal-1 assets/chip_genes.tsv bin/og bin/render_report.py modules/local/chip/* modules/local/vcf_precheck/* rust/crates/og-dev/src/fixture.rs scripts/49-chip.sh scripts/ci/fake-docker/lib.sh scripts/setup.sh scripts/validate-setup.sh chip-mt-1-roundtrip assets/par_grch38.bed bin/og rust/crates/og-dev/src/fixture.rs scripts/40-export-consumer.sh scripts/chip-to-vcf.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh tests/fixtures/consumer_export/sites.tsv.gz ci-e2e-2-locityper assets/locityper_loci.bed bin/og scripts/53-locityper.sh scripts/setup.sh @@ -82,7 +85,7 @@ cn-report-1-tables assets/carrier_genes.tsv assets/par_grch38.bed bin/collect_su comphet-phasing-1-reads assets/construct_variants.tsv assets/stub/sample.bam assets/stub/sample.bam.bai bin/og modules/local/slivar/* modules/local/vcf_precheck/* modules/local/vep/* scripts/13-vep-annotation.sh scripts/31-slivar.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh rust/crates/og-dev/src/fixture.rs construct-scan-1-both assets/acmg_sf.tsv assets/callability_genes.tsv assets/carrier_genes.tsv assets/construct_variants.tsv assets/deep_intronic_sites.tsv assets/mito_confirmed.tsv assets/stub/sample.bam assets/stub/sample.bam.bai assets/stub/sample.vcf.gz bin/collect_summary.py bin/og bin/render_report.py bin/results_index.py modules/local/clinvar_screen/* modules/local/html_report/* modules/local/vcf_precheck/* scripts/06-clinvar-screen.sh scripts/24-html-report.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh consumer-export-1 assets/chip_genes.tsv assets/par_grch38.bed bin/og modules/local/chip/* modules/local/export_consumer/* modules/local/vcf_precheck/* scripts/40-export-consumer.sh scripts/49-chip.sh scripts/chip-to-vcf.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh tests/fixtures/consumer_export/sites.tsv.gz -containers-software-versions scripts/ci/fake-docker/lib.sh scripts/ci/gen-containers-config.sh +containers-software-versions scripts/ci/fake-docker/lib.sh scripts/ci/gen-containers-config.sh bin/og couple-carrier-1 assets/acmg_sf.tsv assets/callability_genes.tsv assets/carrier_genes.tsv assets/construct_variants.tsv assets/deep_intronic_sites.tsv assets/families.example.tsv assets/mito_confirmed.tsv assets/par_grch38.bed assets/paralog_loci.tsv assets/pedigree.example.tsv assets/pgx_genes.tsv assets/str_extra_loci.json assets/stub/db/catalog.json assets/stub/db/hla.dat assets/stub/db/kir.dat assets/stub/pedigree.tsv assets/stub/sample.bam assets/stub/sample.bam.bai assets/stub/sample.vcf.gz bin/cn_loci.tsv bin/collect_summary.py bin/family_report.py bin/og bin/render_report.py bin/results_index.py modules/local/clinvar_screen/* modules/local/couple/* modules/local/delly/* modules/local/expansion_hunter/* modules/local/hla_typing/* modules/local/html_report/* modules/local/parascopy/* modules/local/somalier/* modules/local/t1k_build/* modules/local/vcf_precheck/* scripts/06-clinvar-screen.sh scripts/08-hla-typing.sh scripts/09-expansion-hunter.sh scripts/19-delly.sh scripts/24-html-report.sh scripts/32-pypgx.sh scripts/33-sample-qc.sh scripts/35-paralogs.sh scripts/36-pgx-consensus.sh scripts/38-family.sh scripts/39-couple.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh couple-common-sv-1 assets/acmg_sf.tsv assets/callability_genes.tsv assets/carrier_genes.tsv assets/construct_variants.tsv assets/deep_intronic_sites.tsv assets/families.example.tsv assets/mito_confirmed.tsv assets/par_grch38.bed assets/pedigree.example.tsv assets/stub/pedigree.tsv assets/stub/sample.bam assets/stub/sample.bam.bai assets/stub/sample.vcf.gz bin/cn_loci.tsv bin/collect_summary.py bin/family_report.py bin/og bin/render_report.py bin/results_index.py modules/local/clinvar_screen/* modules/local/couple/* modules/local/delly/* modules/local/html_report/* modules/local/vcf_precheck/* scripts/06-clinvar-screen.sh scripts/19-delly.sh scripts/24-html-report.sh scripts/38-family.sh scripts/39-couple.sh scripts/ci/fake-docker/lib.sh scripts/setup.sh scripts/validate-setup.sh cpic-phenoconversion-1-medications assets/pgx_contraindications.tsv assets/pgx_genes.tsv assets/pgx_inhibitors.tsv bin/cn_loci.tsv bin/collect_summary.py bin/og modules/local/cpic_lookup/* modules/local/pharmcat/* modules/local/vcf_precheck/* scripts/07-pharmacogenomics.sh scripts/27-cpic-lookup.sh scripts/32-pypgx.sh scripts/36-pgx-consensus.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh @@ -93,7 +96,7 @@ families-file-1 assets/acmg_sf.tsv assets/callability_genes.tsv assets/carrier_g family-joint-1 assets/construct_variants.tsv assets/deep_intronic_sites.tsv assets/families.example.tsv assets/par_grch38.bed assets/pedigree.example.tsv assets/stub/pedigree.tsv assets/stub/sample.bam assets/stub/sample.bam.bai bin/collect_summary.py bin/family_report.py bin/og modules/local/align_minimap2/* modules/local/clinvar_screen/* modules/local/deepvariant/* modules/local/fastp/* modules/local/roh/* modules/local/somalier/* modules/local/vcf_precheck/* rust/crates/og-dev/src/fixture.rs scripts/01b-fastp-qc.sh scripts/06-clinvar-screen.sh scripts/11-roh-analysis.sh scripts/33-sample-qc.sh scripts/38-family.sh scripts/ci/check-images.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh fixitfelix-chr21-1 assets/callability_genes.tsv scripts/16b-mosdepth.sh scripts/ci/fake-docker/lib.sh scripts/setup.sh bin/og followups-ci-3-sv-rule-regions assets/sv_rule_regions.tsv bin/og scripts/ci/build-sv-rule-regions.sh scripts/ci/fake-docker/lib.sh scripts/ci/lib/fetch-pinned.sh -followups-clinvar-traits-1-rules-html assets/genotype_rules.tsv assets/traits.tsv bin/render_report.py scripts/42-traits.sh scripts/ci/check-rule-alleles.sh +followups-clinvar-traits-1-rules-html assets/genotype_rules.tsv assets/traits.tsv bin/render_report.py scripts/42-traits.sh scripts/ci/check-rule-alleles.sh bin/og followups-cn-1-couple-report assets/carrier_genes.tsv assets/par_grch38.bed assets/stub/pedigree.tsv bin/collect_summary.py bin/family_report.py bin/og bin/render_report.py bin/results_index.py modules/local/couple/* modules/local/html_report/* scripts/39-couple.sh scripts/ci/fake-docker/lib.sh followups-nf-1-nf-wiring assets/stub/* assets/test_samplesheet.csv assets/steps.tsv bin/collect_summary.py bin/render_report.py bin/results_index.py bin/run_state.py conf/test.config conf/test_all.config conf/containers.config modules/local/html_report/* modules/local/couple/* modules/local/parascopy/* modules/local/deepvariant/* modules/local/cpsr/* modules/local/clinvar_screen/* modules/local/locityper/* workflows/* tests/fixtures/consumer_export/sites.tsv.gz bin/og genome-lookup-1 bin/og scripts/ci/fake-docker/lib.sh scripts/owngenome-lookup.sh @@ -106,6 +109,7 @@ haplogroup-explore-1-files assets/callability_genes.tsv assets/live/index.html a hba-short-read-accuracy-1-nf-report assets/acmg_sf.tsv assets/callability_genes.tsv assets/carrier_genes.tsv assets/mito_confirmed.tsv assets/par_grch38.bed assets/stub/sample.vcf.gz bin/cn_loci.tsv bin/collect_summary.py bin/og bin/render_report.py bin/results_index.py modules/local/export_consumer/* modules/local/html_report/* modules/local/vcf_precheck/* scripts/24-html-report.sh scripts/40-export-consumer.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh tests/fixtures/consumer_export/sites.tsv.gz hla-second-caller-1-bash assets/pgx_genes.tsv assets/stub/db/hla.dat assets/stub/db/kir.dat bin/cn_loci.tsv bin/og bin/render_report.py scripts/08-hla-typing.sh scripts/24-html-report.sh scripts/32-pypgx.sh scripts/36-pgx-consensus.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh hla-second-caller-2-nextflow assets/acmg_sf.tsv assets/callability_genes.tsv assets/carrier_genes.tsv assets/mito_confirmed.tsv assets/pgx_genes.tsv assets/stub/db/hla.dat assets/stub/db/kir.dat assets/stub/sample.vcf.gz bin/cn_loci.tsv bin/collect_summary.py bin/og bin/render_report.py bin/results_index.py modules/local/hla_typing/* modules/local/html_report/* modules/local/pgx_consensus/* modules/local/pharmcat/* modules/local/t1k_build/* modules/local/vcf_precheck/* scripts/07-pharmacogenomics.sh scripts/08-hla-typing.sh scripts/21-cyrius.sh scripts/24-html-report.sh scripts/32-pypgx.sh scripts/36-pgx-consensus.sh scripts/ci/fake-docker/lib.sh scripts/cyrius-constraints.txt scripts/setup.sh scripts/validate-setup.sh +i411-callability-overlap-1-mates modules/local/mosdepth/* scripts/16b-mosdepth.sh scripts/lib/common.sh ibd-segments-1 assets/families.example.tsv assets/par_grch38.bed assets/pedigree.example.tsv assets/stub/pedigree.tsv bin/family_report.py bin/og rust/crates/og-dev/src/fixture.rs scripts/38-family.sh scripts/ci/fake-docker/lib.sh scripts/setup.sh live-server-1-weblog assets/live/* assets/viewer/index.html bin/live_results.py bin/og bin/owngenome_live.py bin/owngenome_live_results.py bin/render_report.py bin/run_state.py modules/local/roh/* modules/local/vcf_precheck/* rust/crates/og-dev/src/fixture.rs scripts/11-roh-analysis.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh lpa-1 assets/acmg_sf.tsv assets/callability_genes.tsv assets/carrier_genes.tsv assets/mito_confirmed.tsv assets/par_grch38.bed assets/stub/sample.vcf.gz bin/cn_loci.tsv bin/collect_summary.py bin/og bin/render_report.py bin/results_index.py modules/local/deepvariant/* modules/local/html_report/* modules/local/lpa/* modules/local/vcf_precheck/* scripts/24-html-report.sh scripts/46-lpa.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh @@ -115,7 +119,7 @@ mocha-1 assets/acmg_sf.tsv assets/callability_genes.tsv assets/carrier_genes.tsv mosaic-loy-lox-1 assets/callability_genes.tsv bin/collect_summary.py bin/og rust/crates/og-dev/src/fixture.rs scripts/16b-mosdepth.sh scripts/33-sample-qc.sh scripts/ci/fake-docker/lib.sh scripts/setup.sh nextflow-from-fastq-1-bash assets/callability_genes.tsv assets/construct_variants.tsv assets/deep_intronic_sites.tsv assets/pgs_scores.tsv assets/pgx_genes.tsv assets/stub/db/hla.dat assets/stub/db/kir.dat bin/cn_loci.tsv bin/collect_summary.py bin/og rust/crates/og-dev/src/fixture.rs scripts/01b-fastp-qc.sh scripts/06-clinvar-screen.sh scripts/07-pharmacogenomics.sh scripts/08-hla-typing.sh scripts/11-roh-analysis.sh scripts/16b-mosdepth.sh scripts/20-mtoolbox.sh scripts/25-prs.sh scripts/32-pypgx.sh scripts/36-pgx-consensus.sh scripts/ci/fake-docker/lib.sh scripts/ci/parity-diff.sh scripts/validate-setup.sh nextflow-from-fastq-2-nextflow assets/acmg_sf.tsv assets/callability_genes.tsv assets/carrier_genes.tsv assets/construct_variants.tsv assets/deep_intronic_sites.tsv assets/live/index.html assets/mito_confirmed.tsv assets/par_grch38.bed assets/pgs_scores.tsv assets/pgx_contraindications.tsv assets/pgx_genes.tsv assets/pgx_inhibitors.tsv assets/stub/db/hla.dat assets/stub/db/kir.dat assets/stub/sample.bam assets/stub/sample.bam.bai assets/stub/sample.vcf.gz assets/viewer/index.html bin/cn_loci.tsv bin/collect_summary.py bin/og bin/render_report.py bin/results_index.py modules/local/align_minimap2/* modules/local/clinvar_screen/* modules/local/cpic_lookup/* modules/local/cyrius/* modules/local/deepvariant/* modules/local/fastp/* modules/local/hla_typing/* modules/local/html_report/* modules/local/indexcov/* modules/local/mito_haplogroup/* modules/local/mito_variants/* modules/local/mosdepth/* modules/local/multiqc/* modules/local/pharmcat/* modules/local/prs/* modules/local/roh/* modules/local/t1k_build/* modules/local/telomere_hunter/* modules/local/vcf_precheck/* modules/local/vcfanno/* scripts/01b-fastp-qc.sh scripts/06-clinvar-screen.sh scripts/07-pharmacogenomics.sh scripts/08-hla-typing.sh scripts/10-telomere-hunter.sh scripts/11-roh-analysis.sh scripts/12-mito-haplogroup.sh scripts/16-indexcov.sh scripts/16b-mosdepth.sh scripts/20-mtoolbox.sh scripts/21-cyrius.sh scripts/24-html-report.sh scripts/25-prs.sh scripts/26-ancestry.sh scripts/27-cpic-lookup.sh scripts/28-multiqc.sh scripts/30-vcfanno.sh scripts/32-pypgx.sh scripts/36-pgx-consensus.sh scripts/ci/check-images.sh scripts/ci/fake-docker/lib.sh scripts/cyrius-constraints.txt scripts/validate-setup.sh -nextflow-from-fastq-3-sexcheck assets/callability_genes.tsv assets/live/index.html assets/viewer/index.html bin/collect_summary.py modules/local/indexcov/* modules/local/mosdepth/* modules/local/vcf_precheck/* scripts/16-indexcov.sh scripts/16b-mosdepth.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh +nextflow-from-fastq-3-sexcheck assets/callability_genes.tsv assets/live/index.html assets/viewer/index.html bin/collect_summary.py modules/local/indexcov/* modules/local/mosdepth/* modules/local/vcf_precheck/* scripts/16-indexcov.sh scripts/16b-mosdepth.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh bin/og nextflow-hardening-1-manta assets/par_grch38.bed assets/sv_rule_regions.tsv bin/collect_summary.py bin/family_report.py bin/og scripts/04-manta.sh scripts/05-annotsv.sh scripts/15-duphold.sh scripts/18-cnvpytor.sh scripts/19-delly.sh scripts/ci/fake-docker/lib.sh nextflow-hardening-2-nf assets/acmg_sf.tsv assets/callability_genes.tsv assets/carrier_genes.tsv assets/construct_variants.tsv assets/deep_intronic_sites.tsv assets/live/index.html assets/mito_confirmed.tsv assets/par_grch38.bed assets/pgx_genes.tsv assets/stub/sample.bam assets/stub/sample.bam.bai assets/stub/sample.vcf.gz assets/sv_rule_regions.tsv assets/viewer/index.html bin/cn_loci.tsv bin/collect_summary.py bin/family_report.py bin/og bin/render_report.py bin/results_index.py modules/local/clinvar_screen/* modules/local/delly/* modules/local/html_report/* modules/local/indexcov/* modules/local/manta/* modules/local/mito_haplogroup/* modules/local/mosdepth/* modules/local/pgx_consensus/* modules/local/pharmcat/* modules/local/pypgx/* modules/local/survivor_merge/* modules/local/telomere_hunter/* modules/local/vcf_precheck/* modules/local/vcfanno/* modules/local/y_haplogroup/* scripts/04-manta.sh scripts/05-annotsv.sh scripts/06-clinvar-screen.sh scripts/07-pharmacogenomics.sh scripts/10-telomere-hunter.sh scripts/12-mito-haplogroup.sh scripts/15-duphold.sh scripts/16-indexcov.sh scripts/16b-mosdepth.sh scripts/18-cnvpytor.sh scripts/19-delly.sh scripts/20-mtoolbox.sh scripts/21-cyrius.sh scripts/22-survivor-merge.sh scripts/24-html-report.sh scripts/30-vcfanno.sh scripts/32-pypgx.sh scripts/36-pgx-consensus.sh scripts/37-y-haplogroup.sh scripts/ci/fake-docker/lib.sh scripts/ci/parity-diff.sh scripts/cyrius-constraints.txt scripts/setup.sh scripts/validate-setup.sh nextflow-report-parity-1-sections assets/acmg_sf.tsv assets/callability_genes.tsv assets/carrier_genes.tsv assets/construct_variants.tsv assets/deep_intronic_sites.tsv assets/mito_confirmed.tsv assets/par_grch38.bed assets/pgx_genes.tsv assets/str_extra_loci.json assets/stub/db/catalog.json assets/stub/sample.bam assets/stub/sample.bam.bai assets/stub/sample.vcf.gz assets/sv_rule_regions.tsv bin/cn_loci.tsv bin/collect_summary.py bin/family_report.py bin/og bin/render_report.py bin/results_index.py modules/local/annotsv/* modules/local/clinvar_screen/* modules/local/expansion_hunter/* modules/local/export_consumer/* modules/local/html_report/* modules/local/mito_variants/* modules/local/pypgx/* modules/local/slivar/* modules/local/stranger/* modules/local/vcf_precheck/* modules/local/vep/* scripts/05-annotsv.sh scripts/06-clinvar-screen.sh scripts/09-expansion-hunter.sh scripts/09b-stranger.sh scripts/13-vep-annotation.sh scripts/15-duphold.sh scripts/16b-mosdepth.sh scripts/18-cnvpytor.sh scripts/19-delly.sh scripts/20-mtoolbox.sh scripts/24-html-report.sh scripts/31-slivar.sh scripts/32-pypgx.sh scripts/36-pgx-consensus.sh scripts/40-export-consumer.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh tests/fixtures/consumer_export/sites.tsv.gz @@ -138,43 +142,43 @@ pharmcat-indel-refblocks-1 bin/og scripts/07-pharmacogenomics.sh scripts/ci/fake pharmcat-mito-input-and-log-1-mtrnr1 bin/og scripts/07-pharmacogenomics.sh scripts/ci/fake-docker/lib.sh platelet-antigens-1 assets/bloodtype_markers.tsv bin/cn_loci.tsv bin/og scripts/41-bloodtype.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh prs-1-agreement assets/pgs_scores.tsv bin/collect_summary.py bin/og rust/crates/og-dev/src/fixture.rs scripts/25-prs.sh scripts/ci/fake-docker/lib.sh -prs-2-ancestry assets/pgs_scores.tsv bin/collect_summary.py bin/render_report.py scripts/25-prs.sh scripts/26-ancestry.sh scripts/ci/fake-docker/lib.sh scripts/setup.sh -prs-3-panel-measure assets/pgs_scores.tsv bin/collect_summary.py modules/local/prs/* modules/local/vcf_precheck/* scripts/25-prs.sh scripts/26-ancestry.sh scripts/ci/fake-docker/lib.sh scripts/setup.sh scripts/validate-setup.sh -prs-runopts-and-trace-1 assets/par_grch38.bed assets/pgs_scores.tsv bin/collect_summary.py modules/local/align_minimap2/* modules/local/deepvariant/* modules/local/fastp/* modules/local/prs/* modules/local/vcf_precheck/* scripts/01b-fastp-qc.sh scripts/25-prs.sh scripts/26-ancestry.sh scripts/ci/check-images.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh +prs-2-ancestry assets/pgs_scores.tsv bin/collect_summary.py bin/render_report.py scripts/25-prs.sh scripts/26-ancestry.sh scripts/ci/fake-docker/lib.sh scripts/setup.sh bin/og +prs-3-panel-measure assets/pgs_scores.tsv bin/collect_summary.py modules/local/prs/* modules/local/vcf_precheck/* scripts/25-prs.sh scripts/26-ancestry.sh scripts/ci/fake-docker/lib.sh scripts/setup.sh scripts/validate-setup.sh bin/og +prs-runopts-and-trace-1 assets/par_grch38.bed assets/pgs_scores.tsv bin/collect_summary.py modules/local/align_minimap2/* modules/local/deepvariant/* modules/local/fastp/* modules/local/prs/* modules/local/vcf_precheck/* scripts/01b-fastp-qc.sh scripts/25-prs.sh scripts/26-ancestry.sh scripts/ci/check-images.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh bin/og prs-scores-and-run-options-1-strand-sex assets/pgs_scores.tsv bin/collect_summary.py bin/og modules/local/prs/* modules/local/vcf_precheck/* rust/crates/og-dev/src/fixture.rs scripts/25-prs.sh scripts/26-ancestry.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh prs-scores-and-run-options-2-panel-chrx assets/pgs_scores.tsv bin/collect_summary.py bin/og rust/crates/og-dev/src/fixture.rs scripts/25-prs.sh scripts/ci/fake-docker/lib.sh scripts/setup.sh pypgx-cyp2d6-section-1-summary assets/pgx_genes.tsv bin/cn_loci.tsv bin/og scripts/32-pypgx.sh scripts/36-pgx-consensus.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh qc-1-sample-qc bin/collect_summary.py bin/og rust/crates/og-dev/src/fixture.rs scripts/28-multiqc.sh scripts/33-sample-qc.sh scripts/ci/fake-docker/lib.sh scripts/setup.sh qc-2-nextflow-sample-qc assets/acmg_sf.tsv assets/callability_genes.tsv assets/carrier_genes.tsv assets/families.example.tsv assets/live/index.html assets/mito_confirmed.tsv assets/par_grch38.bed assets/pedigree.example.tsv assets/pgx_contraindications.tsv assets/pgx_genes.tsv assets/pgx_inhibitors.tsv assets/stub/db/hla.dat assets/stub/db/kir.dat assets/stub/pedigree.tsv assets/stub/sample.vcf.gz assets/viewer/index.html bin/cn_loci.tsv bin/collect_summary.py bin/family_report.py bin/og bin/render_report.py bin/results_index.py modules/local/align_minimap2/* modules/local/cpic_lookup/* modules/local/deepvariant/* modules/local/fastp/* modules/local/hla_typing/* modules/local/html_report/* modules/local/indexcov/* modules/local/mito_haplogroup/* modules/local/mito_variants/* modules/local/mosdepth/* modules/local/pharmcat/* modules/local/pypgx/* modules/local/roh/* modules/local/somalier/* modules/local/t1k_build/* modules/local/telomere_hunter/* modules/local/vcf_precheck/* modules/local/verifybamid2/* scripts/01b-fastp-qc.sh scripts/07-pharmacogenomics.sh scripts/08-hla-typing.sh scripts/10-telomere-hunter.sh scripts/11-roh-analysis.sh scripts/12-mito-haplogroup.sh scripts/16-indexcov.sh scripts/16b-mosdepth.sh scripts/20-mtoolbox.sh scripts/24-html-report.sh scripts/27-cpic-lookup.sh scripts/32-pypgx.sh scripts/33-sample-qc.sh scripts/36-pgx-consensus.sh scripts/38-family.sh scripts/ci/check-images.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh -qc-3-cram assets/callability_genes.tsv bin/collect_summary.py modules/local/cram_archive/* modules/local/mosdepth/* modules/local/vcf_precheck/* scripts/16b-mosdepth.sh scripts/34-cram-archive.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh -reference-noalt scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh +qc-3-cram assets/callability_genes.tsv bin/collect_summary.py modules/local/cram_archive/* modules/local/mosdepth/* modules/local/vcf_precheck/* scripts/16b-mosdepth.sh scripts/34-cram-archive.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh bin/og +reference-noalt scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh bin/og report-followups-1-sections assets/acmg_sf.tsv assets/callability_genes.tsv assets/carrier_genes.tsv assets/genotype_rules.tsv assets/mito_confirmed.tsv assets/par_grch38.bed assets/str_extra_loci.json assets/stub/db/catalog.json assets/stub/sample.vcf.gz assets/sv_rule_regions.tsv assets/traits.tsv bin/collect_summary.py bin/family_report.py bin/og bin/render_report.py bin/results_index.py modules/local/annotsv/* modules/local/expansion_hunter/* modules/local/export_consumer/* modules/local/html_report/* modules/local/manta/* modules/local/traits/* modules/local/vcf_precheck/* scripts/04-manta.sh scripts/05-annotsv.sh scripts/09-expansion-hunter.sh scripts/15-duphold.sh scripts/18-cnvpytor.sh scripts/19-delly.sh scripts/24-html-report.sh scripts/40-export-consumer.sh scripts/42-traits.sh scripts/ci/fake-docker/lib.sh scripts/generate-report.sh scripts/validate-setup.sh tests/fixtures/consumer_export/sites.tsv.gz -report-sections-mito-roh-telomere-cnv-1-mito assets/callability_genes.tsv bin/collect_summary.py scripts/10-telomere-hunter.sh scripts/16b-mosdepth.sh scripts/20-mtoolbox.sh scripts/ci/fake-docker/lib.sh scripts/generate-report.sh scripts/validate-setup.sh +report-sections-mito-roh-telomere-cnv-1-mito assets/callability_genes.tsv bin/collect_summary.py scripts/10-telomere-hunter.sh scripts/16b-mosdepth.sh scripts/20-mtoolbox.sh scripts/ci/fake-docker/lib.sh scripts/generate-report.sh scripts/validate-setup.sh bin/og reports-and-pgx-correctness-clinical assets/construct_variants.tsv bin/og scripts/23-clinical-filter.sh scripts/31-slivar.sh scripts/ci/fake-docker/lib.sh reports-and-pgx-correctness-pgx assets/pgx_contraindications.tsv assets/pgx_genes.tsv assets/pgx_inhibitors.tsv bin/cn_loci.tsv bin/collect_summary.py bin/og scripts/27-cpic-lookup.sh scripts/32-pypgx.sh scripts/36-pgx-consensus.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh -reports-and-pgx-correctness-reports assets/stub/db/clinvar.vcf.gz assets/stub/db/hla.dat bin/collect_summary.py bin/render_report.py bin/write_manifest.sh scripts/24-html-report.sh scripts/ci/fake-docker/lib.sh scripts/generate-report.sh +reports-and-pgx-correctness-reports assets/stub/db/clinvar.vcf.gz assets/stub/db/hla.dat bin/collect_summary.py bin/render_report.py bin/write_manifest.sh scripts/24-html-report.sh scripts/ci/fake-docker/lib.sh scripts/generate-report.sh bin/og reports-and-pgx-correctness-revel scripts/30-vcfanno.sh scripts/ci/fake-docker/lib.sh run-all-launcher assets/acmg_sf.tsv assets/callability_genes.tsv assets/carrier_genes.tsv assets/construct_variants.tsv assets/deep_intronic_sites.tsv assets/mito_confirmed.tsv assets/par_grch38.bed assets/pgs_scores.tsv assets/pgx_contraindications.tsv assets/pgx_genes.tsv assets/pgx_inhibitors.tsv assets/stub/db/hla.dat assets/stub/db/kir.dat assets/stub/sample.bam assets/stub/sample.bam.bai assets/stub/sample.vcf.gz bin/cn_loci.tsv bin/collect_summary.py bin/og bin/render_report.py bin/results_index.py modules/local/align_minimap2/* modules/local/clinvar_screen/* modules/local/cpic_lookup/* modules/local/deepvariant/* modules/local/fastp/* modules/local/hla_typing/* modules/local/html_report/* modules/local/mito_haplogroup/* modules/local/mito_variants/* modules/local/mosdepth/* modules/local/multiqc/* modules/local/pharmcat/* modules/local/prs/* modules/local/roh/* modules/local/t1k_build/* modules/local/telomere_hunter/* modules/local/vcf_precheck/* modules/local/vcfanno/* modules/local/vep/* scripts/01b-fastp-qc.sh scripts/06-clinvar-screen.sh scripts/07-pharmacogenomics.sh scripts/08-hla-typing.sh scripts/10-telomere-hunter.sh scripts/11-roh-analysis.sh scripts/12-mito-haplogroup.sh scripts/13-vep-annotation.sh scripts/16b-mosdepth.sh scripts/20-mtoolbox.sh scripts/24-html-report.sh scripts/25-prs.sh scripts/26-ancestry.sh scripts/27-cpic-lookup.sh scripts/28-multiqc.sh scripts/30-vcfanno.sh scripts/32-pypgx.sh scripts/36-pgx-consensus.sh scripts/ci/check-images.sh scripts/ci/fake-docker/lib.sh scripts/ci/parity-diff.sh scripts/ownhealth-facts.sh scripts/validate-setup.sh -run-all-sample-qc-and-stale-index-1-index-times assets/par_grch38.bed modules/local/align_minimap2/* modules/local/deepvariant/* modules/local/fastp/* modules/local/roh/* modules/local/vcf_precheck/* scripts/01b-fastp-qc.sh scripts/11-roh-analysis.sh scripts/ci/check-images.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh +run-all-sample-qc-and-stale-index-1-index-times assets/par_grch38.bed modules/local/align_minimap2/* modules/local/deepvariant/* modules/local/fastp/* modules/local/roh/* modules/local/vcf_precheck/* scripts/01b-fastp-qc.sh scripts/11-roh-analysis.sh scripts/ci/check-images.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh bin/og screen-cpsr-sf-switch-1-stub assets/stub/sample.bam assets/stub/sample.bam.bai assets/stub/sample.vcf.gz assets/stub/sample.vcf.gz.tbi assets/stub/db/hla.dat assets/stub/db/kir.dat bin/cpsr_sample_id conf/test.config conf/test_all.config modules/local/cpsr/* modules/local/hla_typing/* modules/local/t1k_build/* modules/local/vcf_precheck/* workflows/clinical.nf setup-gencode-exons-and-nextflow-clip-check-1 assets/construct_variants.tsv assets/deep_intronic_sites.tsv assets/stub/sample.bam assets/stub/sample.bam.bai bin/og modules/local/clinvar_screen/* modules/local/vcf_precheck/* scripts/06-clinvar-screen.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh short-sample-id-stub assets/acmg_sf.tsv assets/callability_genes.tsv assets/carrier_genes.tsv assets/construct_variants.tsv assets/mito_confirmed.tsv assets/pgx_contraindications.tsv assets/pgx_genes.tsv assets/pgx_inhibitors.tsv assets/stub/db/hla.dat assets/stub/db/kir.dat assets/stub/sample.bam assets/stub/sample.bam.bai assets/stub/sample.vcf.gz assets/stub/sample.vcf.gz.tbi bin/cn_loci.tsv bin/collect_summary.py bin/cpsr_sample_id bin/og bin/render_report.py bin/results_index.py modules/local/cpic_lookup/* modules/local/cpsr/* modules/local/hla_typing/* modules/local/html_report/* modules/local/pharmcat/* modules/local/t1k_build/* modules/local/telomere_hunter/* modules/local/vcf_precheck/* scripts/07-pharmacogenomics.sh scripts/08-hla-typing.sh scripts/10-telomere-hunter.sh scripts/17-cpsr.sh scripts/24-html-report.sh scripts/27-cpic-lookup.sh scripts/32-pypgx.sh scripts/36-pgx-consensus.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh -single-source-lib-ownership scripts/11-roh-analysis.sh scripts/ci/fake-docker/lib.sh +single-source-lib-ownership scripts/11-roh-analysis.sh scripts/ci/fake-docker/lib.sh bin/og str-catalog-1-strchive assets/str_extra_loci.json assets/stub/db/catalog.json assets/stub/sample.bam assets/stub/sample.bam.bai bin/og modules/local/expansion_hunter/* modules/local/stranger/* modules/local/vcf_precheck/* scripts/09-expansion-hunter.sh scripts/09b-stranger.sh scripts/ci/fake-docker/lib.sh scripts/setup.sh scripts/validate-setup.sh rust/crates/og-dev/src/fixture.rs str-extra-repeats-1-readings assets/str_extra_loci.json bin/collect_summary.py bin/og bin/render_report.py bin/results_index.py modules/local/expansion_hunter/* modules/local/html_report/* scripts/09-expansion-hunter.sh scripts/24-html-report.sh scripts/ci/fake-docker/lib.sh scripts/generate-report.sh scripts/validate-setup.sh rust/crates/og-dev/src/fixture.rs sv-mito-telomere-steps-1-sv-merge scripts/22-survivor-merge.sh scripts/ci/fake-docker/lib.sh tests/fixtures/sv/cnvpytor.vcf.in tests/fixtures/sv/delly.vcf.in tests/fixtures/sv/manta.vcf.in -sv-mito-telomere-steps-2-mito assets/callability_genes.tsv bin/collect_summary.py scripts/12-mito-haplogroup.sh scripts/16b-mosdepth.sh scripts/20-mtoolbox.sh scripts/ci/fake-docker/lib.sh scripts/generate-report.sh +sv-mito-telomere-steps-2-mito assets/callability_genes.tsv bin/collect_summary.py scripts/12-mito-haplogroup.sh scripts/16b-mosdepth.sh scripts/20-mtoolbox.sh scripts/ci/fake-docker/lib.sh scripts/generate-report.sh bin/og sv-mito-telomere-steps-3-y-haplogroup assets/live/index.html assets/viewer/index.html bin/og scripts/16-indexcov.sh scripts/37-y-haplogroup.sh scripts/ci/fake-docker/lib.sh scripts/setup.sh sv-mito-telomere-steps-4-clinvar-tier bin/og scripts/23-clinical-filter.sh scripts/ci/fake-docker/lib.sh sv-mito-telomere-steps-5-giab scripts/benchmark-variants.sh scripts/ci/fake-docker/lib.sh sv-mito-telomere-steps-6-scatter scripts/03a-gatk-haplotypecaller.sh scripts/03b-freebayes.sh scripts/ci/fake-docker/lib.sh -traits-panel-1 assets/acmg_sf.tsv assets/callability_genes.tsv assets/carrier_genes.tsv assets/genotype_rules.tsv assets/mito_confirmed.tsv assets/stub/sample.vcf.gz assets/traits.tsv bin/collect_summary.py bin/render_report.py bin/results_index.py modules/local/html_report/* modules/local/traits/* modules/local/vcf_precheck/* rust/crates/og-dev/src/traits_sources.rs scripts/24-html-report.sh scripts/42-traits.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh -vcf-precheck-ref-spotcheck-1 assets/par_grch38.bed modules/local/align_minimap2/* modules/local/deepvariant/* modules/local/fastp/* modules/local/roh/* modules/local/vcf_precheck/* scripts/01b-fastp-qc.sh scripts/11-roh-analysis.sh scripts/ci/check-images.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh tests/fixtures/vcf/grch37_no_contigs.vcf +traits-panel-1 assets/acmg_sf.tsv assets/callability_genes.tsv assets/carrier_genes.tsv assets/genotype_rules.tsv assets/mito_confirmed.tsv assets/stub/sample.vcf.gz assets/traits.tsv bin/collect_summary.py bin/render_report.py bin/results_index.py modules/local/html_report/* modules/local/traits/* modules/local/vcf_precheck/* rust/crates/og-dev/src/traits_sources.rs scripts/24-html-report.sh scripts/42-traits.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh bin/og +vcf-precheck-ref-spotcheck-1 assets/par_grch38.bed modules/local/align_minimap2/* modules/local/deepvariant/* modules/local/fastp/* modules/local/roh/* modules/local/vcf_precheck/* scripts/01b-fastp-qc.sh scripts/11-roh-analysis.sh scripts/ci/check-images.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh tests/fixtures/vcf/grch37_no_contigs.vcf bin/og vendor-vcf-intake-1-bash bin/og scripts/07-pharmacogenomics.sh scripts/ci/fake-docker/lib.sh vendor-vcf-intake-2-nf-report assets/acmg_sf.tsv assets/callability_genes.tsv assets/carrier_genes.tsv assets/construct_variants.tsv assets/deep_intronic_sites.tsv assets/mito_confirmed.tsv assets/pgx_contraindications.tsv assets/pgx_genes.tsv assets/pgx_inhibitors.tsv assets/stub/sample.bam assets/stub/sample.bam.bai assets/stub/sample.vcf.gz bin/cn_loci.tsv bin/collect_summary.py bin/og bin/render_report.py bin/results_index.py modules/local/clinvar_screen/* modules/local/cpic_lookup/* modules/local/html_report/* modules/local/mito_haplogroup/* modules/local/mosdepth/* modules/local/multiqc/* modules/local/pharmcat/* modules/local/roh/* modules/local/vcf_precheck/* scripts/06-clinvar-screen.sh scripts/07-pharmacogenomics.sh scripts/11-roh-analysis.sh scripts/12-mito-haplogroup.sh scripts/16b-mosdepth.sh scripts/20-mtoolbox.sh scripts/24-html-report.sh scripts/27-cpic-lookup.sh scripts/28-multiqc.sh scripts/32-pypgx.sh scripts/36-pgx-consensus.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh vendor-vcf-intake-3-nf-stops assets/callability_genes.tsv assets/construct_variants.tsv assets/deep_intronic_sites.tsv assets/stub/sample.bam assets/stub/sample.bam.bai bin/collect_summary.py bin/og modules/local/clinvar_screen/* modules/local/mito_haplogroup/* modules/local/pharmcat/* modules/local/roh/* modules/local/vcf_precheck/* scripts/06-clinvar-screen.sh scripts/07-pharmacogenomics.sh scripts/11-roh-analysis.sh scripts/12-mito-haplogroup.sh scripts/16b-mosdepth.sh scripts/20-mtoolbox.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh vendor-vcf-intake-4-nf-header-clinvar assets/acmg_sf.tsv assets/callability_genes.tsv assets/carrier_genes.tsv assets/construct_variants.tsv assets/deep_intronic_sites.tsv assets/mito_confirmed.tsv assets/pgx_contraindications.tsv assets/pgx_genes.tsv assets/pgx_inhibitors.tsv assets/stub/sample.bam assets/stub/sample.bam.bai assets/stub/sample.vcf.gz bin/cn_loci.tsv bin/collect_summary.py bin/og bin/render_report.py bin/results_index.py modules/local/clinvar_screen/* modules/local/cpic_lookup/* modules/local/html_report/* modules/local/mito_haplogroup/* modules/local/pharmcat/* modules/local/roh/* modules/local/vcf_precheck/* scripts/06-clinvar-screen.sh scripts/07-pharmacogenomics.sh scripts/11-roh-analysis.sh scripts/12-mito-haplogroup.sh scripts/16b-mosdepth.sh scripts/20-mtoolbox.sh scripts/24-html-report.sh scripts/27-cpic-lookup.sh scripts/32-pypgx.sh scripts/36-pgx-consensus.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh -vendor-vcf-intake-5-docs scripts/ci/fake-docker/lib.sh +vendor-vcf-intake-5-docs bin/og scripts/ci/fake-docker/lib.sh viral-reads-1 bin/og modules/local/vcf_precheck/* modules/local/viral/* rust/crates/og-dev/src/fixture.rs scripts/47-viral.sh scripts/ci/fake-docker/lib.sh scripts/generate-report.sh scripts/setup.sh scripts/validate-setup.sh vntyper-1 assets/acmg_sf.tsv assets/callability_genes.tsv assets/carrier_genes.tsv assets/mito_confirmed.tsv assets/stub/sample.vcf.gz bin/collect_summary.py bin/og bin/render_report.py bin/results_index.py modules/local/html_report/* modules/local/vcf_precheck/* modules/local/vntyper/* scripts/24-html-report.sh scripts/52-vntyper.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh y-private-report-1-private-and-tree assets/live/index.html assets/viewer/index.html bin/collect_summary.py bin/og bin/render_report.py bin/results_index.py modules/local/html_report/* modules/local/y_haplogroup/* rust/crates/og-dev/src/fixture.rs scripts/16-indexcov.sh scripts/24-html-report.sh scripts/37-y-haplogroup.sh scripts/generate-report.sh scripts/ci/fake-docker/lib.sh scripts/setup.sh @@ -183,4 +187,4 @@ y-tree-current-1-placement assets/live/index.html assets/viewer/index.html bin/o rust-z2e-readers bin/og tests/e2e/lib.sh scripts/ci/image-smoke.sh scripts/ci/nf-trace-requests.tsv rust-c2b-traits assets/traits.tsv assets/genotype_rules.tsv bin/og modules/local/traits/* scripts/42-traits.sh qc-3-cram-checksum modules/local/cram_archive/* scripts/34-cram-archive.sh scripts/lib/common.sh -gvcf-pass-gate scripts/26b-ancestry-fine.sh modules/local/ancestry_fine/main.nf scripts/44-ancient.sh modules/local/ancient/main.nf scripts/25-prs.sh modules/local/prs/main.nf +gvcf-pass-gate scripts/26b-ancestry-fine.sh modules/local/ancestry_fine/main.nf scripts/44-ancient.sh modules/local/ancient/main.nf scripts/25-prs.sh modules/local/prs/main.nf bin/og diff --git a/scripts/ci/e2e-case-times.tsv b/scripts/ci/e2e-case-times.tsv index c122c0925..b773cf399 100644 --- a/scripts/ci/e2e-case-times.tsv +++ b/scripts/ci/e2e-case-times.tsv @@ -105,6 +105,7 @@ haplogroup-explore-1-files shard 59 - hba-short-read-accuracy-1-nf-report shard 111 - hla-second-caller-1-bash shard 482 - hla-second-caller-2-nextflow shard 188 hla-second-caller-1-bash +i411-callability-overlap-1-mates shard 40 - ibd-segments-1 shard 239 - live-server-1-weblog shard 18 - lpa-1 shard 42 - @@ -120,7 +121,7 @@ nextflow-hardening-2-nf shard 643 bash-step-19-delly,nextflow-hardening-1-manta nextflow-report-parity-1-sections shard 206 clinvar-clip-check-1,comphet-phasing-1-reads nf-wiring-1-report-tables shard 300 clinvar-clip-check-1 nf-wiring-2-sv-str-tools shard 900 - -output-contract-1-hg002 shard 30 - +output-contract-1-hg002 shard 30 bash-step-09-str paralog-catalog-1-gba shard 114 - paralog-checks-and-doc-fixes-1-hba shard 57 - paralog-rows-1 shard 316 - diff --git a/scripts/ci/e2e-scope.sh b/scripts/ci/e2e-scope.sh index c334f3baa..eb5a7f019 100755 --- a/scripts/ci/e2e-scope.sh +++ b/scripts/ci/e2e-scope.sh @@ -21,9 +21,11 @@ # `rows`). Nothing when no path is in the e2e scope. Every shard # case when a path is shared wiring (FULL below). Otherwise the # smoke cases, every case whose own file or table row changed, -# every case with a glob that matches a changed path, and the -# cases those need (the needs column of e2e-case-times.tsv, -# followed through). Base cases are never printed: whenever a case +# every case with a glob that matches a changed path, every case +# with a glob that matches bin/og when a path under rust/ (og's +# sources, OG_SOURCES below) changed, and the cases those need +# (the needs column of e2e-case-times.tsv, followed through). +# Base cases are never printed: whenever a case # runs, the base leg runs all of them. The reason for each pick # goes to stderr. # @@ -43,9 +45,8 @@ export LC_ALL=C # The paths the e2e cases exercise. A pull request that changes none of them # runs no case. The push paths of e2e.yml are the same list (e2e-plan checks). -SCOPE_DIRS=(scripts modules workflows bin conf assets tests/e2e .github/actions) +SCOPE_DIRS=(scripts modules workflows bin conf assets rust tests/e2e .github/actions) SCOPE_FILES=(tests/fixtures/VERSION main.nf nextflow.config nextflow_schema.json versions.env .github/workflows/e2e.yml - rust/crates/og-dev/src/fixture.rs rust/crates/og-dev/src/traits_sources.rs # The committed fixtures the cases read (their rows name them too). tests/fixtures/annotsv/class45.sh tests/fixtures/consumer_export/sites.tsv.gz tests/fixtures/families/stub_families.tsv tests/fixtures/pharmcat/refblocks.g.vcf tests/fixtures/sv/cnvpytor.vcf.in @@ -67,6 +68,11 @@ FULL=(main.nf nextflow.config nextflow_schema.json versions.env assets/steps.tsv # Nextflow pipeline from the fixture's FASTQ, and the parity check of the two. SMOKE=(nextflow-from-fastq-1-bash nextflow-from-fastq-2-nextflow) +# og's sources. The cases run og through bin/og, which runs the binary built +# from these, so a change here picks every case whose row has a glob that +# matches bin/og, as a change to bin/og itself does. +OG_SOURCES=('rust/*') + die() { echo "ERROR: $*" >&2; exit 1; } cases() { @@ -160,7 +166,7 @@ in_list() { } select_cases() { - local changed=$1 rowsf=${2:-/dev/null} p c globs g full="" inscope="" picked out gl + local changed=$1 rowsf=${2:-/dev/null} p c globs g full="" inscope="" og_src="" picked out gl [ -f "$changed" ] || die "select: no file ${changed}" [ -e "$rowsf" ] || die "select: no file ${rowsf}" check > /dev/null @@ -170,6 +176,7 @@ select_cases() { while IFS= read -r p; do [ -n "$p" ] || continue in_list "$p" "${scope_globs[@]}" && inscope=1 + [ -z "$og_src" ] && in_list "$p" "${OG_SOURCES[@]}" && og_src=$p if in_list "$p" "${FULL[@]}"; then full=$p; break; fi done < "$changed" [ -s "$rowsf" ] && inscope=1 @@ -199,6 +206,11 @@ select_cases() { if [[ $p == $g ]]; then printf '%s\truns %s\n' "$c" "$p"; continue 3; fi done done < "$changed" + [ -n "$og_src" ] || continue + for g in "${gl[@]}"; do + # shellcheck disable=SC2053 # g is a glob on purpose + if [[ bin/og == $g ]]; then printf '%s\truns og, built from %s\n' "$c" "$og_src"; continue 2; fi + done done < <(rows_of "$PATHS") ) # Keep only real cases outside the base stage, then add their needs. diff --git a/tests/demo/make_demo_sample.py b/tests/demo/make_demo_sample.py index 846ad70fb..b12892ddd 100755 --- a/tests/demo/make_demo_sample.py +++ b/tests/demo/make_demo_sample.py @@ -1408,8 +1408,9 @@ def vntyper(d): def locityper(d, rng): """Step 53: what og locityper report writes for a made-up Locityper run that called every locus of assets/locityper_loci.bed with two HPRC panel - haplotypes, made-up qualities and read counts, and passed the authors' - filter (no warning, a weighted distance under 30, few unexplained reads).""" + haplotypes, made-up qualities and read counts, no warning and a small + weighted distance: the HLA and KIR loci pass the authors' filter, the + others (CYP2D6, FCGR) read uncalibrated, as og locityper report says.""" panel = ["HG00438.1", "HG00733.2", "HG01891.1", "HG02257.2", "NA18906.1", "NA19240.2"] out = ["locus\tregion\tstatus\tgenotype\thaplotype_1\thaplotype_2\tquality\ttotal_reads\tunexplained_reads" "\tweighted_distance\twarnings\tfilter\treason\n"] @@ -1422,7 +1423,10 @@ def locityper(d, rng): quality, total = round(rng.uniform(25, 60), 1), rng.randint(800, 4000) unexpl, dist = rng.randint(0, 30), round(rng.uniform(0.1, 3), 3) out.append("\t".join([name, f"{chrom}:{int(start) + 1}-{end}", "called", ",".join(haps), *haps, - f"{quality:.1f}", str(total), str(unexpl), f"{dist:.3f}", ".", "pass", "."]) + "\n") + f"{quality:.1f}", str(total), str(unexpl), f"{dist:.3f}", ".", + *(("pass", ".") if name.startswith(("HLA-", "KIR")) else + ("uncalibrated", "the authors calibrated this filter on HLA and KIR loci " + "only; by its rule alone it passes"))]) + "\n") put(os.path.join(d, "locityper", f"{SAMPLE}_locityper.tsv"), "".join(out)) diff --git a/tests/e2e/chip-clonal-1.sh b/tests/e2e/chip-clonal-1.sh index 008f5ca8f..e19580aef 100755 --- a/tests/e2e/chip-clonal-1.sh +++ b/tests/e2e/chip-clonal-1.sh @@ -11,8 +11,10 @@ # and a read-support limit from each base's depth under 10% at about 60x, # with nearly every coding base of DNMT3A at 10 reads or more; # - the same reads with DNMT3A R882H (chr2:25234373 C>T) planted in every -# fifth read over it: a chip row R882H at a VAF near 20%. The reads as they -# are are the negative control of that check; +# fifth read over it: a chip row R882H at a VAF near 20%, whose note says it +# is a possible finding, not a diagnosis, and whose reads (a fifth of about +# 60) do not fit an inherited variant. The reads as they are are the +# negative control of that check; # - planted in every second read: likely_germline, not chip; # - both reports show the section and the planted call; # - the Nextflow CHIP_* processes on the planted reads merged into step 02's BAM @@ -63,6 +65,8 @@ sample() { } # row NAME POS: the chip table's row at POS, as status,protein_change,vaf row() { awk -F'\t' -v p="$2" '$3 == p {print $13 "," $7 "," $9}' "${G}/$1/chip/$1_chip.tsv" 2>/dev/null; } +# note NAME POS: the note of that row +note() { awk -F'\t' -v p="$2" '$3 == p {print $15}' "${G}/$1/chip/$1_chip.tsv" 2>/dev/null; } # depth NAME GENE COLUMN depth() { awk -F'\t' -v g="$2" -v k="$3" 'NR == 1 {for (i = 1; i <= NF; i++) c[$i] = i; next} $1 == g {print $c[k]}' \ @@ -98,10 +102,15 @@ check "DNMT3A has a share of bases at the stated limit ($(depth "$U" DNMT3A asse awk -v d="$(depth "$U" DNMT3A assessable_fraction)" 'BEGIN {exit !(d ~ /^[01]\.[0-9][0-9][0-9]$/ && d > 0)}' check "the step prints the read-support limit and that it is not a diagnosis" \ has 'Read-support limit \(median [0-9]+x.*does not rule one out\. Not a diagnosis\.' "$(cat "$STEP_LOG")" +check "the step's count says possible clonal haematopoiesis, not a diagnosis" \ + has ': [0-9]+ CHIP calls? in [0-9]+ genes \(possible clonal haematopoiesis, not a diagnosis; ' "$(cat "$STEP_LOG")" IFS=, read -r st pc vaf <<< "$(row "$P" "$R882")" check_eq "planted at a fifth: a chip row" "${st:-none}" chip check_eq "named R882H on DNMT3A's MANE transcript" "${pc:-none}" R882H check "its VAF is near 20% (${vaf:-none})" awk -v v="${vaf:-0}" 'BEGIN {exit !(v >= 0.10 && v <= 0.30)}' +check "its note says a possible finding, not a diagnosis ($(note "$P" "$R882"))" \ + has '^possible clonal haematopoiesis \(not a diagnosis\): hotspot R882' "$(note "$P" "$R882")" +check "a fifth of about 60 reads does not fit an inherited variant" lacks 'fit an inherited' "$(note "$P" "$R882")" check_eq "planted at a half: likely_germline, not chip" "$(row "$H" "$R882" | cut -d, -f1)" likely_germline check_eq "and the germline-looking call is not counted" \ "$(awk -F'\t' '$13 == "chip" && $3 == p' p="$R882" "${G}/${H}/chip/${H}_chip.tsv" 2>/dev/null | wc -l | tr -d ' ')" 0 diff --git a/tests/e2e/i411-callability-overlap-1-mates.sh b/tests/e2e/i411-callability-overlap-1-mates.sh new file mode 100755 index 000000000..aa0372fb4 --- /dev/null +++ b/tests/e2e/i411-callability-overlap-1-mates.sh @@ -0,0 +1,110 @@ +#!/usr/bin/env bash +# Step 16b's gene callability counts the two mates of a pair once where they +# overlap, on both paths, with the real mosdepth image. +# +# A made-up BAM on a 3,000-base chr20 holds three 10-base genes: +# TEST_OVERLAP 5 pairs whose mates both cover the gene: 5 fragments, so no +# base reaches 10x. With --fast-mode mosdepth counts each base +# twice, 10x, and the gene read as read. +# TEST_PAIRS 10 such pairs: 10 fragments, every base at 10x (control: the +# pass still counts each pair once, not zero times). +# TEST_DEL 10 single reads with a 10-base deletion over the gene: no read +# has a base there. With --fast-mode the deletion counted 10x. +# scripts/16b-mosdepth.sh (CALLABILITY_GENES) and the MOSDEPTH module, run alone +# through a one-line pipeline, must both write 0, 10 and 0 bases at 10x. A run +# of the same image with --fast-mode on the same BAM must write 10, 10 and 10, +# so the BAM does hold what the gene pass must not count twice. +. "$(dirname "$0")/lib.sh" + +command -v nextflow >/dev/null || { fail "nextflow is not on PATH"; finish; } + +S="${SAMPLE}-ovl" +SD="${GENOME_DIR}/${S}" +rm -rf "${SD:?}" +mkdir -p "${SD}/aligned" + +CAT="${CASE_TMP}/callability_genes.tsv" +{ + printf 'gene\thgnc_id\tchrom\tstart\tend\treasons\towner\n' + printf 'TEST_OVERLAP\tHGNC:0\tchr20\t1000\t1010\tsegdup\t.\n' + printf 'TEST_PAIRS\tHGNC:1\tchr20\t1500\t1510\tsegdup\t.\n' + printf 'TEST_DEL\tHGNC:2\tchr20\t2000\t2010\tsegdup\t.\n' +} > "$CAT" + +# The reads: 60-base mates 20 bases apart (insert 80), both over the gene, and +# 80-base reads with 40M10D40M whose deletion is the gene's 10 bases. +SAM="${SD}/aligned/in.sam" +s60=$(printf 'A%.0s' $(seq 60)); q60=$(printf 'I%.0s' $(seq 60)) +s80=$(printf 'A%.0s' $(seq 80)); q80=$(printf 'I%.0s' $(seq 80)) +{ + printf '@HD\tVN:1.6\tSO:unsorted\n@SQ\tSN:chr20\tLN:3000\n' + for i in 1 2 3 4 5; do + printf 'ov%s\t99\tchr20\t961\t60\t60M\t=\t981\t80\t%s\t%s\n' "$i" "$s60" "$q60" + printf 'ov%s\t147\tchr20\t981\t60\t60M\t=\t961\t-80\t%s\t%s\n' "$i" "$s60" "$q60" + done + for i in $(seq 10); do + printf 'pr%s\t99\tchr20\t1461\t60\t60M\t=\t1481\t80\t%s\t%s\n' "$i" "$s60" "$q60" + printf 'pr%s\t147\tchr20\t1481\t60\t60M\t=\t1461\t-80\t%s\t%s\n' "$i" "$s60" "$q60" + done + for i in $(seq 10); do + printf 'dl%s\t0\tchr20\t1961\t60\t40M10D40M\t*\t0\t0\t%s\t%s\n' "$i" "$s80" "$q80" + done +} > "$SAM" +docker run --rm --user "$(id -u):$(id -g)" -v "${GENOME_DIR}:/genome" -w /genome "$SAMTOOLS_IMAGE" sh -c \ + "samtools sort -o '${S}/aligned/${S}_sorted.bam' '${S}/aligned/in.sam' && samtools index '${S}/aligned/${S}_sorted.bam'" +BAM="${SD}/aligned/${S}_sorted.bam" +check "the made-up BAM and its index exist" test -s "${BAM}.bai" +check_eq "the made-up BAM holds 40 reads" "$(sam view -c "${S}/aligned/${S}_sorted.bam" 2>/dev/null)" 40 + +# at10 TABLE GENE: the gene's bases at 10x or more (column 10X of the table) +at10() { gzip -dc "$1" 2>/dev/null | awk -F'\t' -v g="$2" '$4 == g {print $5}'; } + +# --- the input: --fast-mode counts the overlap and the deletion ----------------------- +awk -F'\t' -v OFS='\t' 'NR > 1 {print $3, $4, $5, $1}' "$CAT" > "${SD}/fast.bed" +docker run --rm --user "$(id -u):$(id -g)" -v "${GENOME_DIR}:/genome" -w "/genome/${S}" "$MOSDEPTH_IMAGE" \ + mosdepth --by fast.bed --mapq 20 --fast-mode --no-per-base --thresholds 10 fast "aligned/${S}_sorted.bam" +F="${SD}/fast.thresholds.bed.gz" +check_eq "input: --fast-mode counts TEST_OVERLAP's 5 pairs as 10x" "$(at10 "$F" TEST_OVERLAP)" 10 +check_eq "input: --fast-mode counts TEST_DEL's deletion as 10x" "$(at10 "$F" TEST_DEL)" 10 +check_eq "input: --fast-mode counts TEST_PAIRS at 10x" "$(at10 "$F" TEST_PAIRS)" 10 + +# --- step 16b --------------------------------------------------------------------------- +CALLABILITY_GENES="$CAT" THREADS=2 run_step 16b-mosdepth.sh "$S" +check_step_exit 16b-mosdepth.sh +T="${SD}/mosdepth/${S}_callability.bed.gz" +echo "step 16b's table:"; gzip -dc "$T" 2>/dev/null +check_eq "bash: TEST_OVERLAP's 5 overlapping pairs reach 10x on no base" "$(at10 "$T" TEST_OVERLAP)" 0 +check_eq "bash: TEST_PAIRS's 10 pairs reach 10x on all 10 bases" "$(at10 "$T" TEST_PAIRS)" 10 +check_eq "bash: TEST_DEL's deleted bases reach 10x on no base" "$(at10 "$T" TEST_DEL)" 0 + +# --- the MOSDEPTH module ---------------------------------------------------------------- +NP="${CASE_TMP}/project" +rm -rf "$NP" "${CASE_TMP}/out" "${CASE_TMP}/work" +mkdir -p "$NP" +cat > "${NP}/main.nf" < "${NP}/nextflow.config" < "${CASE_TMP}/nf.log" 2>&1 +RC=$? +check_eq "nextflow run (MOSDEPTH) exits 0" "$RC" 0 +[ "$RC" = 0 ] || grep -E 'ERROR|Error executing process|Command error' -A 8 "${CASE_TMP}/nf.log" | head -40 +N="${CASE_TMP}/out/${S}/coverage/${S}_callability.bed.gz" +check_eq "Nextflow: TEST_OVERLAP's 5 overlapping pairs reach 10x on no base" "$(at10 "$N" TEST_OVERLAP)" 0 +check_eq "Nextflow: TEST_PAIRS's 10 pairs reach 10x on all 10 bases" "$(at10 "$N" TEST_PAIRS)" 10 +check_eq "Nextflow: TEST_DEL's deleted bases reach 10x on no base" "$(at10 "$N" TEST_DEL)" 0 +check_eq "MOSDEPTH's table is step 16b's" "$(gzip -dc "$N" 2>/dev/null | md5sum)" "$(gzip -dc "$T" 2>/dev/null | md5sum)" + +rm -rf "${SD:?}" +finish diff --git a/tests/e2e/output-contract-1-hg002.sh b/tests/e2e/output-contract-1-hg002.sh index c09effcbd..0bbdc15f3 100755 --- a/tests/e2e/output-contract-1-hg002.sh +++ b/tests/e2e/output-contract-1-hg002.sh @@ -1,7 +1,9 @@ #!/usr/bin/env bash # The 1.0 output contract (assets/output_contract.tsv) on the HG002 base outputs: every stable file # the bash steps and the Nextflow run (case 60) wrote is there under its contracted name, with its -# required columns, VCF fields and JSON keys. Red control: a copy of the Nextflow results with one +# required columns, VCF fields and JSON keys. The base leg runs no step 09b: Stranger's VCF comes +# from bash-step-09-str, which the needs column of scripts/ci/e2e-case-times.tsv puts first. +# Red control: a copy of the Nextflow results with one # column dropped and one file renamed must fail, naming both. . "$(dirname "$0")/lib.sh" diff --git a/tests/e2e/qc-1-sample-qc.sh b/tests/e2e/qc-1-sample-qc.sh index 349efa271..06f1d98d0 100755 --- a/tests/e2e/qc-1-sample-qc.sh +++ b/tests/e2e/qc-1-sample-qc.sh @@ -6,7 +6,9 @@ # somalier's chrX sites fall inside the slices, too few for a sex call, so # the step says it could not check the sex and goes on, also when male is # declared: somalier's table then carries male as the pedigree's sex, -# which the verdict does not take for a call; +# which the verdict does not take for a call. VerifyBamID2 keeps a few +# hundred markers there, so FREEMIX reads uncertain, with the count +# taken from the log of its first run; # - sex: with sites at the slice's own chrX calls (case 21; HG002 is male, # so somalier sees them homozygous), declared female stops the step, # somalier's own table shows the pedigree's female next to the male it @@ -70,6 +72,16 @@ check_eq "contamination verdict" "$(tval "$T" contamination)" ok check_eq "VerifyBamID2's marker check was skipped (the slices hold fewer than 1,000 markers)" \ "$(tval "$T" verifybamid2_marker_check)" skipped check "the log says why it ran again" has 'Fewer than 1,000 panel markers have reads' "$(cat "$STEP_LOG")" +MK=$(tval "$T" verifybamid2_markers) +check "VerifyBamID2's first run logged the markers it kept (${MK:-none})" above "$MK" 0 +check "fewer than the 1,000 its check asks for (${MK:-none})" below "$MK" 1000 +check_eq "so FREEMIX is uncertain" "$(tval "$T" contamination_confidence)" uncertain +check "and the step says so" has 'The estimate is uncertain: VerifyBamID2 skipped its marker check' "$(cat "$STEP_LOG")" +# One sample: identity is uncertain below 1,000 somalier sites, else not checked. +SITES_N=$(tval "$T" sites_genotyped) +WANT_ID=not_checked +below "$SITES_N" 1000 && WANT_ID=uncertain +check_eq "identity from ${SITES_N:-no} somalier sites and no other sample" "$(tval "$T" identity)" "$WANT_ID" check_eq "no declared sex: somalier's pedigree sex is unknown" "$(scol original_pedigree_sex)" unknown # Declared male on the same 2 chrX sites: somalier starts its sex column from diff --git a/tests/e2e/rust-c2b-traits.sh b/tests/e2e/rust-c2b-traits.sh index e5e2e3852..a6c5537ab 100755 --- a/tests/e2e/rust-c2b-traits.sh +++ b/tests/e2e/rust-c2b-traits.sh @@ -5,19 +5,22 @@ OG=${OG:-${REPO}/bin/og} TABLE="${REPO}/assets/traits.tsv" RULES="${REPO}/assets/genotype_rules.tsv" G="${CASE_TMP}/g.tsv" -printf 'chr19\t44908684\tT\tC\tT/C\t40\nchr19\t44908822\tC\tT\tC/T\t40\nchr7\t141973545\tC\tG\tC/G\t30\nchr7\t141972905\tG\tA\tG/A\t31\nchr7\t141972804\tT\tC\tT/C\t32\n' > "$G" +printf 'chr6\t26090951\tC\tG\tC/G\t40\nchr6\t26092913\tG\tA\tG/A\t40\nchr19\t44908684\tT\tC\tT/C\t40\nchr19\t44908822\tC\tT\tC/T\t40\nchr7\t141973545\tC\tG\tC/G\t30\nchr7\t141972905\tG\tA\tG/A\t31\nchr7\t141972804\tT\tC\tT/C\t32\n' > "$G" "$OG" traits table --table "$TABLE" --rules "$RULES" --genotypes "$G" --sample S \ --out "${CASE_TMP}/traits.tsv" --rules-out "${CASE_TMP}/rules.tsv" check_eq 'traits table exits 0' "$?" 0 check_eq 'APOE double heterozygote is e2/e4' "$(awk -F'\t' '$1 == "APOE" {print $10}' "${CASE_TMP}/rules.tsv")" e2/e4 +check_eq 'HFE double heterozygote is C282Y/H63D' "$(awk -F'\t' '$1 == "HFE" {print $10}' "${CASE_TMP}/rules.tsv")" C282Y/H63D +check 'HFE reading says it assumes different copies' has 'Phase unknown: this reading assumes rs1800562 A and rs1799945 G sit on different copies' "$(awk -F'\t' '$1 == "HFE" {print $12}' "${CASE_TMP}/rules.tsv")" +check 'APOE reading adds no phase caveat' lacks 'Phase unknown' "$(awk -F'\t' '$1 == "APOE" {print $12}' "${CASE_TMP}/rules.tsv")" check_eq 'the taster rule needs phase' "$(awk -F'\t' '$1 == "TAS2R38" {print $11}' "${CASE_TMP}/rules.tsv")" unphased check_eq 'APOE line occurs exactly once' "$(grep -c '^rs429358+rs7412' "${CASE_TMP}/traits.tsv")" 1 # shellcheck disable=SC2016 # awk field references check 'absent LCT has no inferred genotype' awk -F'\t' '$1 == "rs4988235" {ok = ($6 == "." && $7 == "not_covered")} END {exit !ok}' "${CASE_TMP}/traits.tsv" "$OG" traits phase-sites --rules "$RULES" --genotypes "$G" --sample S --out "${CASE_TMP}/phase.vcf" check_eq 'phase-sites exits 0' "$?" 0 -check_eq 'only the three taster sites need phase' "$(grep -cv '^#' "${CASE_TMP}/phase.vcf")" 3 -check_eq 'phase sites are in genome order' "$(grep -v '^#' "${CASE_TMP}/phase.vcf" | cut -f2 | paste -sd, -)" 141972804,141972905,141973545 +check_eq 'the two HFE and three taster sites need phase, APOE none' "$(grep -cv '^#' "${CASE_TMP}/phase.vcf")" 5 +check_eq 'phase sites are in genome order' "$(grep -v '^#' "${CASE_TMP}/phase.vcf" | cut -f2 | paste -sd, -)" 26090951,26092913,141972804,141972905,141973545 sed 's/44908684\tT\t/44908684\tG\t/' "$G" > "${CASE_TMP}/bad.tsv" "$OG" traits table --table "$TABLE" --rules "$RULES" --genotypes "${CASE_TMP}/bad.tsv" --sample S \ --out "${CASE_TMP}/bad-out.tsv" --rules-out "${CASE_TMP}/bad-rules.tsv" > "${CASE_TMP}/bad.log" 2>&1 diff --git a/tests/e2e/y-str-1.sh b/tests/e2e/y-str-1.sh index 9e6250825..e0f918174 100755 --- a/tests/e2e/y-str-1.sh +++ b/tests/e2e/y-str-1.sh @@ -14,9 +14,11 @@ # - an independent count from the reads: for every high call, the length of # the repeat in the reads that span it with 10 bases on each side # (reference length plus the CIGAR's insertions minus its deletions there -# or in those 10 bases, where an aligner can left-align a repeat's indel) -# gives the same count in at least 90% of the markers, and in every span -# marker (one region over close-set parts) called high; +# or in those 10 bases, where an aligner can left-align a repeat's indel), +# plus the panel's offset to FamilyTreeDNA's scale, gives the same count +# in at least 90% of the markers, and in every span marker (one region +# over close-set parts) called high; without the offsets the counts +# differ at the markers that have one (HG002: DYS438, DYS461, Y-GATA-H4); # - a planted change: the same reads with four bases (one AGAT repeat) cut # out of DYS393 in every read that spans it give DYS393 one repeat fewer, # and leave the other called markers as they were; @@ -133,7 +135,15 @@ check_eq "DYS393 is called high" "$(col "$H" DYS393 confidence)" high # length gives the count with the same rounding as the step (reference copies # rounded half up, plus the length change in whole and partial repeats). dk "$SAMTOOLS_IMAGE" samtools view -q 20 -F 0xF04 "${T}/win.bam" > "${T}/win.sam" -"${REPO}/bin/og" dev fixture ystr-readcount "$PANEL" "$OUT" "${T}/win.sam" > "${T}/readcount.tsv" +"${REPO}/bin/og" dev fixture ystr-readcount "$PANEL" "$OUT" "${T}/win.sam" > "${T}/readcount.raw.tsv" +# The reads' count is on the reference's scale; the panel's offset puts it on +# FamilyTreeDNA's, as the step does ('.' is no offset). +awk -F'\t' -v OFS='\t' ' + NR == FNR { if ($0 !~ /^#/ && $1 != "order") off[$3] = ($7 == "." ? 0 : $7); next } + { n = split($3, p, "."); $3 = (p[1] + off[$1]) (n > 1 ? "." p[2] : ""); print }' \ + "$PANEL" "${T}/readcount.raw.tsv" > "${T}/readcount.tsv" +check_ge "control: without the panel's offsets the reads' count differs where one applies" \ + "$(awk -F'\t' '$2 != $3' "${T}/readcount.raw.tsv" | wc -l | tr -d ' ')" 1 N_CMP=$(grep -c . "${T}/readcount.tsv" || true) N_SAME=$(awk -F'\t' '$2 == $3' "${T}/readcount.tsv" | wc -l | tr -d ' ') awk -F'\t' '$2 != $3 {print " differs: " $0}' "${T}/readcount.tsv" diff --git a/tests/fake-docker/alignment-markdup-gvcf-sex-calling.sh b/tests/fake-docker/alignment-markdup-gvcf-sex-calling.sh index dafa1c3b4..f877ade82 100755 --- a/tests/fake-docker/alignment-markdup-gvcf-sex-calling.sh +++ b/tests/fake-docker/alignment-markdup-gvcf-sex-calling.sh @@ -7,6 +7,13 @@ # intermediate files in the sample directory, removed after; a # run that leaves no gVCF fails and keeps the earlier VCF. # 03e male Clair3 gets --gender=male and the PAR BED; CLAIR3_MODEL wins. +# 03e ont the model comes from the BAM's @RG DS basecall_model= or from +# BASECALL_MODEL, through og longread clair3-model run for real +# (bin/og) against a fake /opt/models; no basecaller, one Clair3 +# has no model for, or a model the image lacks stops the step +# with the image's models listed, before Clair3 runs. +# 02b ont the basecaller model (BASECALL_MODEL, or the unaligned BAM's +# own @RG DS) goes into the aligned BAM's @RG as DS. # shellcheck source=../../scripts/ci/fake-docker/lib.sh . "${REPO_ROOT:?}/scripts/ci/fake-docker/lib.sh" @@ -42,6 +49,21 @@ case "$args" in [ "${FAKE_DV:-ok}" = nogvcf ] || bgzf "$(host_path "$(eq output_gvcf)")" ;; *"/opt/bin/run_clair3.sh "*) bgzf "$(host_path "$(eq output)")/merge_output.vcf.gz" ;; + " /pgp-bin/og longread clair3-model "*) + # The real og, with the image's /opt/models played by CASE_WORK/models. + run=() + for a in "$@"; do + case "$a" in + /pgp-bin/*) run+=("${REPO_ROOT}/bin/${a#/pgp-bin/}") ;; + /genome*) run+=("$(host_path "$a")") ;; + /opt/models*) run+=("${CASE_WORK}/models${a#/opt/models}") ;; + *) run+=("$a") ;; + esac + done + "${run[@]}" | sed "s#^${CASE_WORK}/models#/opt/models#" ;; + *" samtools index "*) + for a in "$@"; do last=$a; done + : > "$(host_path "$last").bai" ;; *" bcftools stats "*) printf 'SN\t0\tnumber of records:\t1\n' ;; *) exec "${CASE_WORK}/hook-outputs" image "$@" ;; @@ -104,6 +126,22 @@ expect_rc dv-nogvcf 1 [ -z "$(leftovers)" ] || fail "files left after the failed run: $(leftovers)" # --- 03e Clair3 --------------------------------------------------------------------- +"${REPO_ROOT}/bin/og" version > /dev/null || fail "og does not run here: build it into bin/.og (rust/og.sh, the Guard fake-docker job does)" +for m in r1041_e82_400bps_sup_v500 r1041_e82_400bps_sup_v520 r1041_e82_400bps_hac_v410 r941_prom_sup_g5014 hifi_revio; do + mkdir -p "${CASE_WORK}/models/${m}" +done +# mkbam FILE HEADER: a BAM that holds only HEADER (gzip reads as BGZF here). +mkbam() { + local n=${#2} + { printf 'BAM\001' + # shellcheck disable=SC2059 # the format is the four length bytes + printf "$(printf '\\x%02x\\x%02x\\x%02x\\x%02x' $((n & 255)) $((n >> 8 & 255)) $((n >> 16 & 255)) $((n >> 24 & 255)))" + printf '%s' "$2" + printf '\000\000\000\000'; } | gzip -c > "$1" +} +LRBAM="${GENOME_DIR}/sample1/aligned_longread/sample1_sorted.bam" +mkbam "$LRBAM" $'@HD\tVN:1.6\n@RG\tID:sample1\tSM:sample1\tPL:ONT\n' +clair3_ran() { grep -q 'run_clair3' "$FAKE_DOCKER_LOG"; } : > "$FAKE_DOCKER_LOG" run_expect 0 clair3-male env PLATFORM=ont CLAIR3_MODEL=/opt/models/r1041_e82_400bps_sup_v520 "${SCRIPTS}/03e-clair3.sh" sample1 male docker_log_has 'run_clair3\.sh .*--model_path=/opt/models/r1041_e82_400bps_sup_v520 .*--gender=male --par_regions_bed=/pgp/par_grch38\.bed' \ @@ -115,3 +153,65 @@ if awk '/run_clair3/ && /--gender/ { bad = 1 } END { exit !bad }' "$FAKE_DOCKER_ fi docker_log_has 'run_clair3\.sh .*--model_path=/opt/models/hifi_revio ' "Clair3 HiFi model path changed" run_expect 2 clair3-badsex env PLATFORM=ont "${SCRIPTS}/03e-clair3.sh" sample1 M + +# --- 03e ONT: the model follows the basecaller ------------------------------------- +mkbam "$LRBAM" $'@HD\tVN:1.6\n@RG\tID:sample1\tSM:sample1\tPL:ONT\tDS:basecall_model=dna_r10.4.1_e8.2_400bps_hac@v4.1.0\n' +: > "$FAKE_DOCKER_LOG" +run_expect 0 clair3-from-rg env PLATFORM=ont "${SCRIPTS}/03e-clair3.sh" sample1 +docker_log_has 'run_clair3\.sh .*--model_path=/opt/models/r1041_e82_400bps_hac_v410 ' \ + "Clair3 did not get the model of the BAM's basecaller (hac v4.1.0)" +: > "$FAKE_DOCKER_LOG" +run_expect 0 clair3-basecall-env env PLATFORM=ont BASECALL_MODEL=dna_r9.4.1_e8_sup@v3.3 "${SCRIPTS}/03e-clair3.sh" sample1 +docker_log_has 'run_clair3\.sh .*--model_path=/opt/models/r941_prom_sup_g5014 ' \ + "BASECALL_MODEL did not choose the R9.4.1 SUP model over the BAM's read group" + +# No basecaller anywhere, a fast basecaller, a model the image lacks, a +# CLAIR3_MODEL the image lacks: each stops before Clair3 runs. +mkbam "$LRBAM" $'@HD\tVN:1.6\n@RG\tID:sample1\tSM:sample1\tPL:ONT\n' +: > "$FAKE_DOCKER_LOG" +run_expect 1 clair3-no-basecaller env PLATFORM=ont "${SCRIPTS}/03e-clair3.sh" sample1 +output_has clair3-no-basecaller 'names no basecaller model.*BASECALL_MODEL.*CLAIR3_MODEL' +output_has clair3-no-basecaller 'models in .*: hifi_revio r1041_e82_400bps_hac_v410 r1041_e82_400bps_sup_v500 r1041_e82_400bps_sup_v520 r941_prom_sup_g5014' +! clair3_ran || fail "Clair3 ran with no basecaller model known" +: > "$FAKE_DOCKER_LOG" +run_expect 1 clair3-fast env PLATFORM=ont BASECALL_MODEL=dna_r10.4.1_e8.2_400bps_fast@v5.0.0 "${SCRIPTS}/03e-clair3.sh" sample1 +output_has clair3-fast 'Clair3 has no model for the basecaller model dna_r10\.4\.1_e8\.2_400bps_fast@v5\.0\.0' +! clair3_ran || fail "Clair3 ran on a fast basecaller" +: > "$FAKE_DOCKER_LOG" +run_expect 1 clair3-not-in-image env PLATFORM=ont BASECALL_MODEL=dna_r10.4.1_e8.2_400bps_sup@v4.3.0 "${SCRIPTS}/03e-clair3.sh" sample1 +output_has clair3-not-in-image 'r1041_e82_400bps_sup_v430 .*is not in the image' +! clair3_ran || fail "Clair3 ran with a model the image lacks" +: > "$FAKE_DOCKER_LOG" +run_expect 1 clair3-bad-override env PLATFORM=ont CLAIR3_MODEL=/opt/models/no_such_model "${SCRIPTS}/03e-clair3.sh" sample1 +output_has clair3-bad-override 'no_such_model \(set by CLAIR3_MODEL\) is not in the image' +! clair3_ran || fail "Clair3 ran with a CLAIR3_MODEL the image lacks" + +# --- 02b ONT carries the basecaller model into the aligned BAM ---------------------- +mkdir -p "${GENOME_DIR}/sample1/fastq" +printf 'placeholder\n' | gzip -c > "${GENOME_DIR}/sample1/fastq/sample1.fastq.gz" +: > "$FAKE_DOCKER_LOG" +run_expect 0 longread-basecall-env env PLATFORM=ont BASECALL_MODEL=dna_r10.4.1_e8.2_400bps_sup@v5.0.0 "${SCRIPTS}/02b-alignment-longread.sh" sample1 +docker_log_has 'minimap2 .*LB:sample1[^ ]*tDS:basecall_model=dna_r10\.4\.1_e8\.2_400bps_sup@v5\.0\.0 ' \ + "step 02b did not put BASECALL_MODEL into the read group" +mkbam "${GENOME_DIR}/sample1/fastq/sample1.bam" $'@HD\tVN:1.6\n@RG\tID:run1\tPL:ONT\tDS:runid=r1 basecall_model=dna_r10.4.1_e8.2_400bps_sup@v5.2.0 modbase_models=x\n' +: > "$FAKE_DOCKER_LOG" +run_expect 0 longread-ubam env PLATFORM=ont INPUT="${GENOME_DIR}/sample1/fastq/sample1.bam" "${SCRIPTS}/02b-alignment-longread.sh" sample1 +docker_log_has 'minimap2 .*LB:sample1[^ ]*tDS:basecall_model=dna_r10\.4\.1_e8\.2_400bps_sup@v5\.2\.0 ' \ + "step 02b did not carry the unaligned BAM's basecaller model into the read group" +# An INPUT with no .bam in its name that links to the unaligned BAM. +ln -s sample1.bam "${GENOME_DIR}/sample1/fastq/reads-link" +: > "$FAKE_DOCKER_LOG" +run_expect 0 longread-ubam-link env PLATFORM=ont INPUT="${GENOME_DIR}/sample1/fastq/reads-link" "${SCRIPTS}/02b-alignment-longread.sh" sample1 +docker_log_has 'minimap2 .*LB:sample1[^ ]*tDS:basecall_model=dna_r10\.4\.1_e8\.2_400bps_sup@v5\.2\.0 ' \ + "step 02b did not read the basecaller model of an unaligned BAM reached through a link" +: > "$FAKE_DOCKER_LOG" +run_expect 0 longread-hifi env PLATFORM=hifi INPUT="${GENOME_DIR}/sample1/fastq/sample1.bam" BASECALL_MODEL=dna_r10.4.1_e8.2_400bps_sup@v5.0.0 "${SCRIPTS}/02b-alignment-longread.sh" sample1 +if grep -q 'DS:basecall_model' "$FAKE_DOCKER_LOG"; then fail "step 02b wrote a basecaller model for HiFi reads"; fi +run_expect 2 longread-bad-basecaller env PLATFORM=ont BASECALL_MODEL=$'sup\tx' "${SCRIPTS}/02b-alignment-longread.sh" sample1 +# A basecall_model in the uBAM header that holds a backslash: minimap2 would +# expand it inside -R, so step 02b warns and leaves DS out instead. +mkbam "${GENOME_DIR}/sample1/fastq/sample1.bam" $'@HD\tVN:1.6\n@RG\tID:run1\tPL:ONT\tDS:basecall_model=sup\\tx@v5.0.0\n' +: > "$FAKE_DOCKER_LOG" +run_expect 0 longread-ubam-bad-basecaller env PLATFORM=ont INPUT="${GENOME_DIR}/sample1/fastq/sample1.bam" "${SCRIPTS}/02b-alignment-longread.sh" sample1 +output_has longread-ubam-bad-basecaller 'ignoring a basecall_model in the BAM header' +if grep -q 'DS:basecall_model' "$FAKE_DOCKER_LOG"; then fail "step 02b put a basecall_model with a backslash into the read group"; fi diff --git a/tests/fake-docker/bash-step-sv.sh b/tests/fake-docker/bash-step-sv.sh index 35925efdd..311c4cdd6 100755 --- a/tests/fake-docker/bash-step-sv.sh +++ b/tests/fake-docker/bash-step-sv.sh @@ -8,6 +8,11 @@ # GRIDSS (04b): runs with --workingdir sv_gridss/work, removed once the VCF # is written; it is skipped, with the reason, when Docker has less memory # than GRIDSS_MIN_MEM_GB (default 32; the fake Docker reports 16 GiB). +# After the raw VCF it writes sv_gridss/_gridss.high.vcf.gz with +# bcftools and GRIDSS's high-confidence rule (QUAL>=1000 && INFO/AS>0 && +# INFO/RAS>0), and its index, and says its calls are left out of the SV +# consensus (step 22 does not convert them). A second run finds the raw +# VCF, skips GRIDSS and writes the high-confidence file again from it. # Delly (19): gets -x with the exclude map setup.sh installs; without it, # runs as before and warns. # Sniffles2 (04c): stops with exit 1, before Sniffles2, when the first @@ -62,6 +67,9 @@ case "$args" in *" bcftools view -e "*) # The expression and the files of a filter call, one per line printf '%s\n' "${5}" "${*: -1}" > "${CASE_WORK}/bcftools-filter" ;; + *" bcftools view -i "*) + # The expression and the input of an include call, one per line + printf '%s\n' "${5}" "${*: -1}" > "${CASE_WORK}/bcftools-include" ;; esac exec "${CASE_WORK}/hook-outputs" "$@" HOOK @@ -94,6 +102,39 @@ GRIDSS_MIN_MEM_GB=8 run_expect 0 gridss "${SCRIPTS}/04b-gridss.sh" sample1 docker_log_has '^run image=[^ ]*gridss.* --workingdir /genome/sample1/sv_gridss/work ' "GRIDSS ran without --workingdir sv_gridss/work" docker_log_has "^run image=[^ ]*gridss.* -t ${THREADS:-8} " "GRIDSS did not get THREADS" [ ! -e "${GENOME_DIR}/sample1/sv_gridss/work" ] || fail "step 04b kept sv_gridss/work after GRIDSS wrote its VCF" +# Step 22 leaves GRIDSS out, and the step says so instead of sending you there. +output_has gridss 'left out of the SV consensus' +output_lacks gridss 'converts and integrates' +# GRIDSS's own high-confidence rule, applied with the pinned bcftools to the raw +# VCF, which stays beside the filtered one. +G=/genome/sample1/sv_gridss +[ "$(sed -n 1p "${CASE_WORK}/bcftools-include" 2>/dev/null)" = 'QUAL>=1000 && INFO/AS>0 && INFO/RAS>0' ] \ + || fail "step 04b did not filter with GRIDSS's high-confidence rule: $(sed -n 1p "${CASE_WORK}/bcftools-include" 2>/dev/null)" +[ "$(sed -n 2p "${CASE_WORK}/bcftools-include" 2>/dev/null)" = "${G}/sample1_gridss.vcf.gz" ] \ + || fail "step 04b did not filter GRIDSS's raw VCF" +docker_log_has "^run image=[^ ]*bcftools[^ ]* :: .* bcftools view -i .* -o ${G//./\\.}/sample1_gridss\\.high\\.vcf\\.gz " \ + "step 04b did not write sv_gridss/sample1_gridss.high.vcf.gz with BCFTOOLS_IMAGE" +docker_log_has "^run image=[^ ]*bcftools.* bcftools index -f -t ${G//./\\.}/sample1_gridss\\.high\\.vcf\\.gz" \ + "step 04b did not index the high-confidence VCF" +H="${GENOME_DIR}/sample1/sv_gridss/sample1_gridss" +[ -f "${H}.vcf.gz" ] && [ -f "${H}.high.vcf.gz" ] && [ -f "${H}.high.vcf.gz.tbi" ] \ + || fail "step 04b did not leave the raw VCF, the high-confidence VCF and its index" +output_has gridss 'High confidence: .*sample1_gridss\.high\.vcf\.gz' +# A second run finds the raw VCF: it skips GRIDSS and writes the high-confidence +# file again from that VCF. The raw VCF is a finished one, ending with the BGZF +# end-of-file block as htslib writes it, so the step takes it as done. +{ printf '##fileformat=VCFv4.2\n#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT\tsample1\n' | gzip -c + printf '\x1f\x8b\x08\x04\x00\x00\x00\x00\x00\xff\x06\x00\x42\x43\x02\x00\x1b\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00'; } > "${H}.vcf.gz" +: > "$FAKE_DOCKER_LOG" +rm -f "${H}.high.vcf.gz" "${H}.high.vcf.gz.tbi" +GRIDSS_MIN_MEM_GB=8 run_expect 0 gridss-skip "${SCRIPTS}/04b-gridss.sh" sample1 +output_has gridss-skip 'skipping GRIDSS' +if awk '/^run image=[^ ]*gridss/ { found = 1 } END { exit !found }' "$FAKE_DOCKER_LOG"; then + fail "step 04b ran GRIDSS again although its VCF exists" +fi +[ -f "${H}.high.vcf.gz" ] && [ -f "${H}.high.vcf.gz.tbi" ] \ + || fail "step 04b did not write the high-confidence VCF and its index from the existing raw VCF" +output_has gridss-skip 'High confidence: .*sample1_gridss\.high\.vcf\.gz' # --- Delly ---------------------------------------------------------------------------- : > "$FAKE_DOCKER_LOG" diff --git a/tests/fake-docker/qc-steps-33-34.sh b/tests/fake-docker/qc-steps-33-34.sh index 4350e5ca4..86fe363a6 100755 --- a/tests/fake-docker/qc-steps-33-34.sh +++ b/tests/fake-docker/qc-steps-33-34.sh @@ -10,7 +10,10 @@ # tell is not checked either; # FREEMIX above 0.03 warns and exits 0; "Insufficient Available markers" # reruns VerifyBamID2 with --DisableSanityCheck and records it; any other -# VerifyBamID2 failure, or missing data, stops the step. +# VerifyBamID2 failure, or missing data, stops the step. The markers its +# check kept come from the first run's log: a skipped check, or fewer than +# 5,000 markers, reads uncertain; fewer than 1,000 somalier sites make +# identity uncertain, and one sample alone leaves it not checked. # Step 34: a CRAM whose flagstat differs from the BAM's, or that fails # quickcheck or its content checksum fails, is removed and the BAM kept; the BAM is # deleted only after the check passed; --restore refuses to write over a BAM @@ -53,14 +56,20 @@ case "$*" in ped_code=$(awk -F'\t' '{print $5; exit}' "$(host_path "$ped")") case "$ped_code" in 1) ped_sex=male ;; 2) ped_sex=female ;; *) ped_sex=unknown ;; esac fi - printf '#family_id\tsample_id\tpaternal_id\tmaternal_id\tsex\tphenotype\toriginal_pedigree_sex\tgt_depth_mean\tn_hom_ref\tn_het\tn_hom_alt\tX_depth_mean\tX_n\tX_hom_ref\tX_het\tX_hom_alt\tY_depth_mean\tY_n\n%s\t%s\t-9\t-9\t%s\t-9\t%s\t30.0\t5000\t6000\t4000\t15.0\t%s\t40\t%s\t260\t14.0\t17\n' \ + printf '#family_id\tsample_id\tpaternal_id\tmaternal_id\tsex\tphenotype\toriginal_pedigree_sex\tgt_depth_mean\tn_hom_ref\tn_het\tn_hom_alt\tX_depth_mean\tX_n\tX_hom_ref\tX_het\tX_hom_alt\tY_depth_mean\tY_n\n%s\t%s\t-9\t-9\t%s\t-9\t%s\t30.0\t%s\t%s\t%s\t15.0\t%s\t40\t%s\t260\t14.0\t17\n' \ "${FAKE_SM:-sample1}" "${FAKE_SM:-sample1}" "${FAKE_SOMALIER_SEX:-$ped_code}" "$ped_sex" \ + "${FAKE_HOM_REF:-5000}" "${FAKE_HET:-6000}" "${FAKE_HOM_ALT:-4000}" \ "${FAKE_X_N:-300}" "${FAKE_X_HET:-0}" > "${o}.samples.tsv" printf '#sample_a\tsample_b\trelatedness\n' > "${o}.pairs.tsv" ;; "verifybamid2 "*) FLAG=--Output; o=$(host_path "$(arg "$@")") case " $* " in *" --DisableSanityCheck "*) few=false ;; *) few=${FAKE_VB2_FEW:-false} ;; esac if [ -n "${FAKE_VB2_FAIL:-}" ]; then echo "Segmentation fault"; exit 139; fi + # As VerifyBamID2: only a run with its marker check logs the markers kept. + case " $* " in + *" --DisableSanityCheck "*) ;; + *) echo "NOTICE - $($few && echo 320 || echo "${FAKE_VB2_MARKERS:-42000}") SNP markers remained after sanity check." ;; + esac if $few; then echo "WARNING - Insufficient Available markers, check input bam depth"; exit 1; fi printf '#SEQ_ID\tRG\tCHIP_ID\t#SNPS\t#READS\tAVG_DP\tFREEMIX\n%s\tNA\tNA\t%s\t1\t30\t%s\n' \ "${FAKE_SM:-sample1}" "$([ "${FAKE_VB2_FEW:-false}" = true ] && echo 320 || echo 99000)" "${FAKE_FREEMIX:-0.004}" > "${o}.selfSM" ;; @@ -123,6 +132,20 @@ docker_log_has 'somalier relate --infer --ped /genome/sample1/qc/somalier/sample || fail "the pedigree does not hold the declared male: $(cat "${GENOME_DIR}/sample1/qc/somalier/sample1.declared.ped")" [ "$(tval contamination)" = ok ] || fail "FREEMIX 0.004 was not reported ok" [ "$(tval verifybamid2_marker_check)" = passed ] || fail "the marker check was not recorded as passed" +[ "$(tval verifybamid2_markers)" = 42000 ] || fail "the markers VerifyBamID2 kept were not read from its log: $(tval verifybamid2_markers)" +[ "$(tval contamination_confidence)" = ok ] || fail "FREEMIX on 42,000 markers was not ok: $(tval contamination_confidence)" +[ "$(tval identity)" = not_checked ] || fail "one sample alone was not left unchecked: $(tval identity)" +output_has qc-match 'Identity: not_checked \(no other sample in the somalier run' + +# A passed marker check that kept only 3,000 markers: FREEMIX is uncertain. +FAKE_VB2_MARKERS=3000 run_expect 0 qc-thin-markers "${SCRIPTS}/33-sample-qc.sh" sample1 +[ "$(tval contamination_confidence)" = uncertain ] || fail "FREEMIX on 3,000 markers was not uncertain" +output_has qc-thin-markers 'The estimate is uncertain: FREEMIX rests on 3000 markers; a firm estimate needs 5,000' + +# 300 informative somalier sites: identity is uncertain. +FAKE_HOM_REF=100 FAKE_HET=120 FAKE_HOM_ALT=80 run_expect 0 qc-thin-sites "${SCRIPTS}/33-sample-qc.sh" sample1 +[ "$(tval identity)" = uncertain ] || fail "identity from 300 sites was not uncertain: $(tval identity)" +output_has qc-thin-sites 'Identity: uncertain \(somalier genotyped 300 sites' FAKE_SOMALIER_SEX=-9 run_expect 0 qc-unknown "${SCRIPTS}/33-sample-qc.sh" sample1 female output_has qc-unknown 'Sex check: not done \(somalier could not tell the sex' @@ -159,6 +182,9 @@ output_has qc-few-markers 'Fewer than 1,000 panel markers have reads' docker_log_has 'verifybamid2 .*--DisableSanityCheck' "the second VerifyBamID2 call lacks --DisableSanityCheck" [ "$(tval verifybamid2_marker_check)" = skipped ] || fail "the skipped marker check was not recorded" [ "$(tval panel_markers)" = 320 ] || fail "the panel size was not recorded" +[ "$(tval verifybamid2_markers)" = 320 ] || fail "the markers of the first run's log were lost by the rerun: $(tval verifybamid2_markers)" +[ "$(tval contamination_confidence)" = uncertain ] || fail "FREEMIX with the marker check skipped was not uncertain" +output_has qc-few-markers 'The estimate is uncertain: VerifyBamID2 skipped its marker check' FAKE_VB2_FAIL=1 run_expect 1 qc-vb2-crash "${SCRIPTS}/33-sample-qc.sh" sample1 output_has qc-vb2-crash 'ERROR: VerifyBamID2 failed' diff --git a/tests/fixtures/consumer_export/README.md b/tests/fixtures/consumer_export/README.md index 03449e9cf..3cb4d1e05 100644 --- a/tests/fixtures/consumer_export/README.md +++ b/tests/fixtures/consumer_export/README.md @@ -26,3 +26,8 @@ dbSNP's rCRS position (see docs/40-export-consumer.md). The slice has rsIDs, positions and reference bases only: no genotype of anyone. + +Sources and terms: the 23andMe v5 site list is from 23andme2vcf +(https://github.com/arrogantrobot/23andme2vcf), Copyright (c) 2015 Rob +Long, MIT licence; its notice is `assets/licences/23andme2vcf-LICENSE.txt`. +dbSNP is NCBI's, with no restriction on use. diff --git a/tests/parity/gen/report-corpus.sh b/tests/parity/gen/report-corpus.sh index c0759db10..aa950f941 100644 --- a/tests/parity/gen/report-corpus.sh +++ b/tests/parity/gen/report-corpus.sh @@ -492,8 +492,11 @@ amut painting '.sections.ancestry_fine.data.painting = [{"code": "AFR", "group": {"group": "Narrow", "fraction": 0.005, "low": 0.0, "high": 0.02}, {"group": "Unfit", "fraction": null, "low": null, "high": null}]' amut no-painting '.sections.ancestry_fine.data.painting = [] | .sections.ancestry_fine.data.not_painted = [] | .sections.ancestry_fine.data.left_out = [] | .sections.ancestry_fine.data.painting_png = ""' +# prs-raw is a run without the panel, so no score has a percentile note: a +# withheld note (c-full's T2D row) would make og print the withheld line, +# which the oracle's commit predates (the cargo test prs_withheld.rs covers it). amut prs-raw '.sections.prs.data.adjusted = false | del(.sections.prs.data.ancestry) - | .sections.prs.data.scores |= map(.percentile = "" | .evaluated_in = null)' + | .sections.prs.data.scores |= map(.percentile = "" | .evaluated_in = null | .percentile_note = "")' amut prs-sex '.sections.prs.data.ancestry = {"population": "", "panel": "", "low_confidence": "True"} | .sections.prs.data.scores = [ {"condition": "Prostate", "pgs_id": "PGS2", "score": "1", "matched": "5", "total": "6", "chrx": "0", diff --git a/tests/parity/gen/summary-collect-c.sh b/tests/parity/gen/summary-collect-c.sh index 8c033035c..51af0da38 100644 --- a/tests/parity/gen/summary-collect-c.sh +++ b/tests/parity/gen/summary-collect-c.sh @@ -96,9 +96,9 @@ HFE\t1\tHFE*001\t3\t20\t.\t0\t-1 short\t1\n" put $f/hla_optitype/S_hla_concordance.tsv "Gene\tT1K\tOptiType\tAgree\tNote\nHLA-A\t A*02:01 \tA*02:01\tyes\t\n\t\t\t\t\nHLA-B\tB*57:01\tB*57:01\tyes\tok\n" put $f/kir_t1k/S_kir_genotype.tsv "KIR2DL1\t2\tKIR2DL1*001\t5\t30\tKIR2DL1*002\t4\t20\nKIR3DL3\t0\t.\t0\t-1\t.\t0\t-1\n" -put $f/prs/S_prs_summary.tsv "Condition\tPGS_ID\tScore_SUM\tVariants_Matched\tVariants_Total\tChrX\tAmbiguous\tApplies_To\tSex_Check\tPercentile\tAncestry_Group\tEvaluated_In\tEffect -CAD\tPGS000018\t0.5\t100\t120\t0\t12 dropped\tall\tok\t75\tEUR\tEUR;;AFR\tHR 1.5 (EUR) -T2D\tPGS000014\t0.1\t10\t20\t0\t0\tall\tok\tNA\tNA\t\t +put $f/prs/S_prs_summary.tsv "Condition\tPGS_ID\tScore_SUM\tVariants_Matched\tVariants_Total\tChrX\tAmbiguous\tApplies_To\tSex_Check\tPercentile\tAncestry_Group\tEvaluated_In\tEffect\tPercentile_Note +CAD\tPGS000018\t0.5\t100\t120\t0\t12 dropped\tall\tok\t75\tEUR\tEUR;;AFR\tHR 1.5 (EUR)\t +T2D\tPGS000014\t0.1\t10\t20\t0\t0\tall\tok\tNA\tNA\t\t\tpercentile withheld: the input lists variants only Short\tPGS1\n" put $f/ancestry/S_ancestry.tsv "key\tvalue\npopulation\tEUR\nreference_panel\tHGDP+1kGP\n\tskipped\npopulation_low_confidence\n" put $f/ancestry_fine/S_ancestry_fine.tsv "level\tcode\tgroup\tfraction\tse\tlow\thigh diff --git a/tests/parity/golden/chip/report-calls/S_chip.tsv b/tests/parity/golden/chip/report-calls/S_chip.tsv new file mode 100644 index 000000000..4b29db100 --- /dev/null +++ b/tests/parity/golden/chip/report-calls/S_chip.tsv @@ -0,0 +1,26 @@ +gene chrom pos ref alt consequence protein_change exon vaf alt_reads depth filter status class note +DNMT3A chr2 1150 C T missense R882H 2 0.130 6 46 PASS chip missense possible clonal haematopoiesis (not a diagnosis): hotspot R882 +DNMT3A chr2 1151 C T missense M880L 2 0.130 6 46 PASS other_change a missense change outside the table's hotspots +DNMT3A chr2 1302 C T splice_acceptor 2 0.130 6 46 PASS chip truncating possible clonal haematopoiesis (not a diagnosis): splice_acceptor +DNMT3A chr2 1152 C T missense R882H 2 0.480 19 39 PASS likely_germline missense VAF 0.48: at or above the 35% cut, where an inherited variant (near 50% or 100%) and a large clone look the same without a matched normal sample; not counted +DNMT3A chr2 1153 C T missense R882H 2 0.970 35 36 PASS likely_germline missense VAF 0.97: at or above the 35% cut, where an inherited variant (near 50% or 100%) and a large clone look the same without a matched normal sample; not counted +DNMT3A chr2 1154 C T missense R882H 2 0.340 13 38 PASS chip missense possible clonal haematopoiesis (not a diagnosis): hotspot R882; 13 of 38 reads also fit an inherited heterozygous variant +DNMT3A chr2 1155 C T missense R882H 2 0.130 6 46 weak_evidence;strand_bias filtered missense FilterMutectCalls: weak_evidence;strand_bias +DNMT3A chr2 1156 C T missense R882H 2 0.060 2 32 PASS low_support missense 2 reads with the change, under 3 +DNMT3A chr2 1157 C T missense R882H 2 0.250 10 40 PASS chip missense possible clonal haematopoiesis (not a diagnosis): hotspot R882 +DNMT3A chr2 1158 C T missense R882H 2 0.250 10 40 PASS chip missense possible clonal haematopoiesis (not a diagnosis): hotspot R882 +DNMT3A chr2 1159 C T missense R882H 2 0 PASS low_support missense 0 reads with the change, under 3 +DNMT3A chr2 1163 C T missense&splice_region R882 2 0.130 6 46 PASS chip missense possible clonal haematopoiesis (not a diagnosis): hotspot R882 +DNMT3A chr2 1164 C T inframe_deletion R882 2 0.130 6 46 PASS other_change a protein change outside the table's classes +TET2 chr4 15500 C T frameshift Q1200fs 2 0.130 6 46 PASS chip truncating possible clonal haematopoiesis (not a diagnosis): frameshift +TET2 chr4 10600 C T stop_gained&splice_donor R100* 1 0.130 6 46 . chip truncating possible clonal haematopoiesis (not a diagnosis): splice_donor +TET2 chr4 15501 C T missense E1201K 2 0.130 6 46 PASS other_change a missense change outside the table's hotspots +JAK2 chr9 500 C T missense V617F 1 0.130 6 46 PASS chip missense possible clonal haematopoiesis (not a diagnosis): V617F +JAK2 chr9 501 C T missense V617L 1 0.130 6 46 PASS other_change a missense change outside the table's hotspots +JAK2 chr9 502 C T stop_gained R618* 1 0.130 6 46 PASS other_change truncating changes of this gene are not counted +PPM1D chr17 60663500 C T stop_gained R500* 6 0.130 6 46 PASS chip truncating possible clonal haematopoiesis (not a diagnosis): stop_gained in exon 6 +PPM1D chr17 60600100 C T stop_gained R100* 5 0.130 6 46 PASS other_change truncating, but in exon 5 of 2 (the table counts exons 6-6) +TP53 chr17 7673800 C T missense R248Q 7 0.130 6 46 PASS chip missense possible clonal haematopoiesis (not a diagnosis): missense in codons 102-292 +TP53 chr17 7673801 C T missense E340K 7 0.130 6 46 PASS other_change a missense change outside the table's hotspots +TP53 chr17 7673802 C T start_lost M1 7 0.130 6 46 PASS other_change a protein change outside the table's classes +DNMT3A chr2 1166 C CA,CAA frameshift R882fs 2 0.300 5 17 PASS chip truncating possible clonal haematopoiesis (not a diagnosis): frameshift; 5 of 17 reads also fit an inherited heterozygous variant diff --git a/tests/parity/golden/chip/report-calls/stdout b/tests/parity/golden/chip/report-calls/stdout index 7f02ad8a1..93c986643 100644 --- a/tests/parity/golden/chip/report-calls/stdout +++ b/tests/parity/golden/chip/report-calls/stdout @@ -1,2 +1,2 @@ -S: 12 CHIP calls in 6 genes (13 other protein changes listed, not counted) +S: 12 CHIP calls in 6 genes (possible clonal haematopoiesis, not a diagnosis; 2 of them also fit an inherited variant; 13 other protein changes listed, not counted) Read-support limit (median 30x over the CHIP genes' coding exons): in the median CHIP gene, a clone with a VAF of about 14% or more shows at least 3 reads with the change 8 times in 10, counted base by base. Mutect2 and its filters call fewer than that. Too few reads for any limit in 4 genes; the share of each one's coding bases read deep enough for that VAF: JAK2 0%, TET2 67%, PPM1D 0%, TP53 0%. CHIP starts at a VAF of 2%, so smaller clones are likely missed: no call here does not rule one out. Not a diagnosis. diff --git a/tests/parity/golden/chip/report-empty/stdout b/tests/parity/golden/chip/report-empty/stdout new file mode 100644 index 000000000..e4309d5d1 --- /dev/null +++ b/tests/parity/golden/chip/report-empty/stdout @@ -0,0 +1,2 @@ +S: 0 CHIP calls in 6 genes (possible clonal haematopoiesis, not a diagnosis; 0 other protein changes listed, not counted) +No CHIP gene has the depth to find a clone (at least 3 reads with the change): no result either way. diff --git a/tests/parity/golden/chip/report-overlap/S_chip.tsv b/tests/parity/golden/chip/report-overlap/S_chip.tsv new file mode 100644 index 000000000..4b29db100 --- /dev/null +++ b/tests/parity/golden/chip/report-overlap/S_chip.tsv @@ -0,0 +1,26 @@ +gene chrom pos ref alt consequence protein_change exon vaf alt_reads depth filter status class note +DNMT3A chr2 1150 C T missense R882H 2 0.130 6 46 PASS chip missense possible clonal haematopoiesis (not a diagnosis): hotspot R882 +DNMT3A chr2 1151 C T missense M880L 2 0.130 6 46 PASS other_change a missense change outside the table's hotspots +DNMT3A chr2 1302 C T splice_acceptor 2 0.130 6 46 PASS chip truncating possible clonal haematopoiesis (not a diagnosis): splice_acceptor +DNMT3A chr2 1152 C T missense R882H 2 0.480 19 39 PASS likely_germline missense VAF 0.48: at or above the 35% cut, where an inherited variant (near 50% or 100%) and a large clone look the same without a matched normal sample; not counted +DNMT3A chr2 1153 C T missense R882H 2 0.970 35 36 PASS likely_germline missense VAF 0.97: at or above the 35% cut, where an inherited variant (near 50% or 100%) and a large clone look the same without a matched normal sample; not counted +DNMT3A chr2 1154 C T missense R882H 2 0.340 13 38 PASS chip missense possible clonal haematopoiesis (not a diagnosis): hotspot R882; 13 of 38 reads also fit an inherited heterozygous variant +DNMT3A chr2 1155 C T missense R882H 2 0.130 6 46 weak_evidence;strand_bias filtered missense FilterMutectCalls: weak_evidence;strand_bias +DNMT3A chr2 1156 C T missense R882H 2 0.060 2 32 PASS low_support missense 2 reads with the change, under 3 +DNMT3A chr2 1157 C T missense R882H 2 0.250 10 40 PASS chip missense possible clonal haematopoiesis (not a diagnosis): hotspot R882 +DNMT3A chr2 1158 C T missense R882H 2 0.250 10 40 PASS chip missense possible clonal haematopoiesis (not a diagnosis): hotspot R882 +DNMT3A chr2 1159 C T missense R882H 2 0 PASS low_support missense 0 reads with the change, under 3 +DNMT3A chr2 1163 C T missense&splice_region R882 2 0.130 6 46 PASS chip missense possible clonal haematopoiesis (not a diagnosis): hotspot R882 +DNMT3A chr2 1164 C T inframe_deletion R882 2 0.130 6 46 PASS other_change a protein change outside the table's classes +TET2 chr4 15500 C T frameshift Q1200fs 2 0.130 6 46 PASS chip truncating possible clonal haematopoiesis (not a diagnosis): frameshift +TET2 chr4 10600 C T stop_gained&splice_donor R100* 1 0.130 6 46 . chip truncating possible clonal haematopoiesis (not a diagnosis): splice_donor +TET2 chr4 15501 C T missense E1201K 2 0.130 6 46 PASS other_change a missense change outside the table's hotspots +JAK2 chr9 500 C T missense V617F 1 0.130 6 46 PASS chip missense possible clonal haematopoiesis (not a diagnosis): V617F +JAK2 chr9 501 C T missense V617L 1 0.130 6 46 PASS other_change a missense change outside the table's hotspots +JAK2 chr9 502 C T stop_gained R618* 1 0.130 6 46 PASS other_change truncating changes of this gene are not counted +PPM1D chr17 60663500 C T stop_gained R500* 6 0.130 6 46 PASS chip truncating possible clonal haematopoiesis (not a diagnosis): stop_gained in exon 6 +PPM1D chr17 60600100 C T stop_gained R100* 5 0.130 6 46 PASS other_change truncating, but in exon 5 of 2 (the table counts exons 6-6) +TP53 chr17 7673800 C T missense R248Q 7 0.130 6 46 PASS chip missense possible clonal haematopoiesis (not a diagnosis): missense in codons 102-292 +TP53 chr17 7673801 C T missense E340K 7 0.130 6 46 PASS other_change a missense change outside the table's hotspots +TP53 chr17 7673802 C T start_lost M1 7 0.130 6 46 PASS other_change a protein change outside the table's classes +DNMT3A chr2 1166 C CA,CAA frameshift R882fs 2 0.300 5 17 PASS chip truncating possible clonal haematopoiesis (not a diagnosis): frameshift; 5 of 17 reads also fit an inherited heterozygous variant diff --git a/tests/parity/golden/chip/report-overlap/stdout b/tests/parity/golden/chip/report-overlap/stdout index 6acc33a71..ab41203a3 100644 --- a/tests/parity/golden/chip/report-overlap/stdout +++ b/tests/parity/golden/chip/report-overlap/stdout @@ -1,2 +1,2 @@ -S: 12 CHIP calls in 6 genes (13 other protein changes listed, not counted) +S: 12 CHIP calls in 6 genes (possible clonal haematopoiesis, not a diagnosis; 2 of them also fit an inherited variant; 13 other protein changes listed, not counted) Read-support limit (median 22x over the CHIP genes' coding exons): in the median CHIP gene, a clone with a VAF of about 14% or more shows at least 3 reads with the change 8 times in 10, counted base by base. Mutect2 and its filters call fewer than that. Too few reads for any limit in 2 genes; the share of each one's coding bases read deep enough for that VAF: JAK2 0%, TET2 0%. CHIP starts at a VAF of 2%, so smaller clones are likely missed: no call here does not rule one out. Not a diagnosis. diff --git a/tests/parity/golden/chip/report-table/S_chip.tsv b/tests/parity/golden/chip/report-table/S_chip.tsv new file mode 100644 index 000000000..4b29db100 --- /dev/null +++ b/tests/parity/golden/chip/report-table/S_chip.tsv @@ -0,0 +1,26 @@ +gene chrom pos ref alt consequence protein_change exon vaf alt_reads depth filter status class note +DNMT3A chr2 1150 C T missense R882H 2 0.130 6 46 PASS chip missense possible clonal haematopoiesis (not a diagnosis): hotspot R882 +DNMT3A chr2 1151 C T missense M880L 2 0.130 6 46 PASS other_change a missense change outside the table's hotspots +DNMT3A chr2 1302 C T splice_acceptor 2 0.130 6 46 PASS chip truncating possible clonal haematopoiesis (not a diagnosis): splice_acceptor +DNMT3A chr2 1152 C T missense R882H 2 0.480 19 39 PASS likely_germline missense VAF 0.48: at or above the 35% cut, where an inherited variant (near 50% or 100%) and a large clone look the same without a matched normal sample; not counted +DNMT3A chr2 1153 C T missense R882H 2 0.970 35 36 PASS likely_germline missense VAF 0.97: at or above the 35% cut, where an inherited variant (near 50% or 100%) and a large clone look the same without a matched normal sample; not counted +DNMT3A chr2 1154 C T missense R882H 2 0.340 13 38 PASS chip missense possible clonal haematopoiesis (not a diagnosis): hotspot R882; 13 of 38 reads also fit an inherited heterozygous variant +DNMT3A chr2 1155 C T missense R882H 2 0.130 6 46 weak_evidence;strand_bias filtered missense FilterMutectCalls: weak_evidence;strand_bias +DNMT3A chr2 1156 C T missense R882H 2 0.060 2 32 PASS low_support missense 2 reads with the change, under 3 +DNMT3A chr2 1157 C T missense R882H 2 0.250 10 40 PASS chip missense possible clonal haematopoiesis (not a diagnosis): hotspot R882 +DNMT3A chr2 1158 C T missense R882H 2 0.250 10 40 PASS chip missense possible clonal haematopoiesis (not a diagnosis): hotspot R882 +DNMT3A chr2 1159 C T missense R882H 2 0 PASS low_support missense 0 reads with the change, under 3 +DNMT3A chr2 1163 C T missense&splice_region R882 2 0.130 6 46 PASS chip missense possible clonal haematopoiesis (not a diagnosis): hotspot R882 +DNMT3A chr2 1164 C T inframe_deletion R882 2 0.130 6 46 PASS other_change a protein change outside the table's classes +TET2 chr4 15500 C T frameshift Q1200fs 2 0.130 6 46 PASS chip truncating possible clonal haematopoiesis (not a diagnosis): frameshift +TET2 chr4 10600 C T stop_gained&splice_donor R100* 1 0.130 6 46 . chip truncating possible clonal haematopoiesis (not a diagnosis): splice_donor +TET2 chr4 15501 C T missense E1201K 2 0.130 6 46 PASS other_change a missense change outside the table's hotspots +JAK2 chr9 500 C T missense V617F 1 0.130 6 46 PASS chip missense possible clonal haematopoiesis (not a diagnosis): V617F +JAK2 chr9 501 C T missense V617L 1 0.130 6 46 PASS other_change a missense change outside the table's hotspots +JAK2 chr9 502 C T stop_gained R618* 1 0.130 6 46 PASS other_change truncating changes of this gene are not counted +PPM1D chr17 60663500 C T stop_gained R500* 6 0.130 6 46 PASS chip truncating possible clonal haematopoiesis (not a diagnosis): stop_gained in exon 6 +PPM1D chr17 60600100 C T stop_gained R100* 5 0.130 6 46 PASS other_change truncating, but in exon 5 of 2 (the table counts exons 6-6) +TP53 chr17 7673800 C T missense R248Q 7 0.130 6 46 PASS chip missense possible clonal haematopoiesis (not a diagnosis): missense in codons 102-292 +TP53 chr17 7673801 C T missense E340K 7 0.130 6 46 PASS other_change a missense change outside the table's hotspots +TP53 chr17 7673802 C T start_lost M1 7 0.130 6 46 PASS other_change a protein change outside the table's classes +DNMT3A chr2 1166 C CA,CAA frameshift R882fs 2 0.300 5 17 PASS chip truncating possible clonal haematopoiesis (not a diagnosis): frameshift; 5 of 17 reads also fit an inherited heterozygous variant diff --git a/tests/parity/golden/chip/report-table/stdout b/tests/parity/golden/chip/report-table/stdout index c403b5e4b..c34a11487 100644 --- a/tests/parity/golden/chip/report-table/stdout +++ b/tests/parity/golden/chip/report-table/stdout @@ -1,2 +1,2 @@ -S: 12 CHIP calls in 13 genes (13 other protein changes listed, not counted) +S: 12 CHIP calls in 13 genes (possible clonal haematopoiesis, not a diagnosis; 2 of them also fit an inherited variant; 13 other protein changes listed, not counted) Read-support limit (median 30x over the CHIP genes' coding exons): in the median CHIP gene, a clone with a VAF of about 14% or more shows at least 3 reads with the change 8 times in 10, counted base by base. Mutect2 and its filters call fewer than that. Too few reads for any limit in 4 genes; the share of each one's coding bases read deep enough for that VAF: TET2 67%, JAK2 0%, TP53 0%, PPM1D 0%. CHIP starts at a VAF of 2%, so smaller clones are likely missed: no call here does not rule one out. Not a diagnosis. diff --git a/tests/parity/golden/locityper-report/boolcounts/out.tsv b/tests/parity/golden/locityper-report/boolcounts/out.tsv new file mode 100644 index 000000000..764b55afb --- /dev/null +++ b/tests/parity/golden/locityper-report/boolcounts/out.tsv @@ -0,0 +1,2 @@ +locus region status genotype haplotype_1 haplotype_2 quality total_reads unexplained_reads weighted_distance warnings filter reason +CYP2D6 chr22:42122285-42152960 called HG00733.1,NA19240.2 HG00733.1 NA19240.2 27.8 . . 0.200 . uncalibrated the authors calibrated this filter on HLA and KIR loci only; by its rule alone it fails: Locityper gave no read counts (total_reads, unexpl_reads), so the unexplained-read rule cannot be checked diff --git a/tests/parity/golden/locityper-report/boolcounts/stdout b/tests/parity/golden/locityper-report/boolcounts/stdout new file mode 100644 index 000000000..ad8e8250b --- /dev/null +++ b/tests/parity/golden/locityper-report/boolcounts/stdout @@ -0,0 +1 @@ +1 of 1 loci called, 0 pass the authors' filter, 1 uncalibrated (outside HLA and KIR) diff --git a/tests/parity/golden/locityper-report/clean/out.tsv b/tests/parity/golden/locityper-report/clean/out.tsv new file mode 100644 index 000000000..5d364c599 --- /dev/null +++ b/tests/parity/golden/locityper-report/clean/out.tsv @@ -0,0 +1,2 @@ +locus region status genotype haplotype_1 haplotype_2 quality total_reads unexplained_reads weighted_distance warnings filter reason +CYP2D6 chr22:42122285-42152960 called HG00733.1,NA19240.2 HG00733.1 NA19240.2 27.8 900 12 0.200 . uncalibrated the authors calibrated this filter on HLA and KIR loci only; by its rule alone it passes diff --git a/tests/parity/golden/locityper-report/clean/stdout b/tests/parity/golden/locityper-report/clean/stdout new file mode 100644 index 000000000..ad8e8250b --- /dev/null +++ b/tests/parity/golden/locityper-report/clean/stdout @@ -0,0 +1 @@ +1 of 1 loci called, 0 pass the authors' filter, 1 uncalibrated (outside HLA and KIR) diff --git a/tests/parity/golden/locityper-report/far/out.tsv b/tests/parity/golden/locityper-report/far/out.tsv new file mode 100644 index 000000000..2cd4b8da4 --- /dev/null +++ b/tests/parity/golden/locityper-report/far/out.tsv @@ -0,0 +1,2 @@ +locus region status genotype haplotype_1 haplotype_2 quality total_reads unexplained_reads weighted_distance warnings filter reason +CYP2D6 chr22:42122285-42152960 called HG00733.1,NA19240.2 HG00733.1 NA19240.2 27.8 900 12 31.500 . uncalibrated the authors calibrated this filter on HLA and KIR loci only; by its rule alone it fails: weighted distance 31.50 is above 30 diff --git a/tests/parity/golden/locityper-report/far/stdout b/tests/parity/golden/locityper-report/far/stdout new file mode 100644 index 000000000..ad8e8250b --- /dev/null +++ b/tests/parity/golden/locityper-report/far/stdout @@ -0,0 +1 @@ +1 of 1 loci called, 0 pass the authors' filter, 1 uncalibrated (outside HLA and KIR) diff --git a/tests/parity/golden/locityper-report/nanquality/out.tsv b/tests/parity/golden/locityper-report/nanquality/out.tsv new file mode 100644 index 000000000..8e722c73f --- /dev/null +++ b/tests/parity/golden/locityper-report/nanquality/out.tsv @@ -0,0 +1,2 @@ +locus region status genotype haplotype_1 haplotype_2 quality total_reads unexplained_reads weighted_distance warnings filter reason +CYP2D6 chr22:42122285-42152960 called A.1,B.2 A.1 B.2 . 10 0 inf . uncalibrated the authors calibrated this filter on HLA and KIR loci only; by its rule alone it fails: weighted distance inf is above 30 diff --git a/tests/parity/golden/locityper-report/nanquality/stdout b/tests/parity/golden/locityper-report/nanquality/stdout new file mode 100644 index 000000000..ad8e8250b --- /dev/null +++ b/tests/parity/golden/locityper-report/nanquality/stdout @@ -0,0 +1 @@ +1 of 1 loci called, 0 pass the authors' filter, 1 uncalibrated (outside HLA and KIR) diff --git a/tests/parity/golden/locityper-report/nocounts/out.tsv b/tests/parity/golden/locityper-report/nocounts/out.tsv new file mode 100644 index 000000000..764b55afb --- /dev/null +++ b/tests/parity/golden/locityper-report/nocounts/out.tsv @@ -0,0 +1,2 @@ +locus region status genotype haplotype_1 haplotype_2 quality total_reads unexplained_reads weighted_distance warnings filter reason +CYP2D6 chr22:42122285-42152960 called HG00733.1,NA19240.2 HG00733.1 NA19240.2 27.8 . . 0.200 . uncalibrated the authors calibrated this filter on HLA and KIR loci only; by its rule alone it fails: Locityper gave no read counts (total_reads, unexpl_reads), so the unexplained-read rule cannot be checked diff --git a/tests/parity/golden/locityper-report/nocounts/stdout b/tests/parity/golden/locityper-report/nocounts/stdout new file mode 100644 index 000000000..ad8e8250b --- /dev/null +++ b/tests/parity/golden/locityper-report/nocounts/stdout @@ -0,0 +1 @@ +1 of 1 loci called, 0 pass the authors' filter, 1 uncalibrated (outside HLA and KIR) diff --git a/tests/parity/golden/locityper-report/nodist/out.tsv b/tests/parity/golden/locityper-report/nodist/out.tsv new file mode 100644 index 000000000..0b60d84e8 --- /dev/null +++ b/tests/parity/golden/locityper-report/nodist/out.tsv @@ -0,0 +1,2 @@ +locus region status genotype haplotype_1 haplotype_2 quality total_reads unexplained_reads weighted_distance warnings filter reason +CYP2D6 chr22:42122285-42152960 called HG00733.1,NA19240.2 HG00733.1 NA19240.2 27.8 900 12 . . uncalibrated the authors calibrated this filter on HLA and KIR loci only; by its rule alone it fails: no weighted distance (the database has no haplotype alignments: setup.sh runs locityper augment) diff --git a/tests/parity/golden/locityper-report/nodist/stdout b/tests/parity/golden/locityper-report/nodist/stdout new file mode 100644 index 000000000..ad8e8250b --- /dev/null +++ b/tests/parity/golden/locityper-report/nodist/stdout @@ -0,0 +1 @@ +1 of 1 loci called, 0 pass the authors' filter, 1 uncalibrated (outside HLA and KIR) diff --git a/tests/parity/golden/locityper-report/nulltotal/out.tsv b/tests/parity/golden/locityper-report/nulltotal/out.tsv new file mode 100644 index 000000000..7fc3eab50 --- /dev/null +++ b/tests/parity/golden/locityper-report/nulltotal/out.tsv @@ -0,0 +1,2 @@ +locus region status genotype haplotype_1 haplotype_2 quality total_reads unexplained_reads weighted_distance warnings filter reason +CYP2D6 chr22:42122285-42152960 called HG00733.1,NA19240.2 HG00733.1 NA19240.2 27.8 . 12 0.200 . uncalibrated the authors calibrated this filter on HLA and KIR loci only; by its rule alone it fails: Locityper gave no read counts (total_reads, unexpl_reads), so the unexplained-read rule cannot be checked diff --git a/tests/parity/golden/locityper-report/nulltotal/stdout b/tests/parity/golden/locityper-report/nulltotal/stdout new file mode 100644 index 000000000..ad8e8250b --- /dev/null +++ b/tests/parity/golden/locityper-report/nulltotal/stdout @@ -0,0 +1 @@ +1 of 1 loci called, 0 pass the authors' filter, 1 uncalibrated (outside HLA and KIR) diff --git a/tests/parity/golden/locityper-report/share/out.tsv b/tests/parity/golden/locityper-report/share/out.tsv new file mode 100644 index 000000000..7c735596b --- /dev/null +++ b/tests/parity/golden/locityper-report/share/out.tsv @@ -0,0 +1,2 @@ +locus region status genotype haplotype_1 haplotype_2 quality total_reads unexplained_reads weighted_distance warnings filter reason +CYP2D6 chr22:42122285-42152960 called HG00733.1,NA19240.2 HG00733.1 NA19240.2 27.8 10000 1500 0.200 . uncalibrated the authors calibrated this filter on HLA and KIR loci only; by its rule alone it passes diff --git a/tests/parity/golden/locityper-report/share/stdout b/tests/parity/golden/locityper-report/share/stdout new file mode 100644 index 000000000..ad8e8250b --- /dev/null +++ b/tests/parity/golden/locityper-report/share/stdout @@ -0,0 +1 @@ +1 of 1 loci called, 0 pass the authors' filter, 1 uncalibrated (outside HLA and KIR) diff --git a/tests/parity/golden/locityper-report/strquality/out.tsv b/tests/parity/golden/locityper-report/strquality/out.tsv new file mode 100644 index 000000000..0a7ee6406 --- /dev/null +++ b/tests/parity/golden/locityper-report/strquality/out.tsv @@ -0,0 +1,2 @@ +locus region status genotype haplotype_1 haplotype_2 quality total_reads unexplained_reads weighted_distance warnings filter reason +CYP2D6 chr22:42122285-42152960 called HG00733.1,NA19240.2 HG00733.1 NA19240.2 . 900 12 . . uncalibrated the authors calibrated this filter on HLA and KIR loci only; by its rule alone it fails: no weighted distance (the database has no haplotype alignments: setup.sh runs locityper augment) diff --git a/tests/parity/golden/locityper-report/strquality/stdout b/tests/parity/golden/locityper-report/strquality/stdout new file mode 100644 index 000000000..ad8e8250b --- /dev/null +++ b/tests/parity/golden/locityper-report/strquality/stdout @@ -0,0 +1 @@ +1 of 1 loci called, 0 pass the authors' filter, 1 uncalibrated (outside HLA and KIR) diff --git a/tests/parity/golden/locityper-report/three-loci/out.tsv b/tests/parity/golden/locityper-report/three-loci/out.tsv new file mode 100644 index 000000000..d7198c272 --- /dev/null +++ b/tests/parity/golden/locityper-report/three-loci/out.tsv @@ -0,0 +1,4 @@ +locus region status genotype haplotype_1 haplotype_2 quality total_reads unexplained_reads weighted_distance warnings filter reason +HLA-DQB1 chr6:32652604-32669077 not called . . . . . . . . . Locityper wrote no result for this locus +CYP2D6 chr22:42122285-42152960 called HG00733.1,NA19240.2 HG00733.1 NA19240.2 27.8 900 12 0.200 . uncalibrated the authors calibrated this filter on HLA and KIR loci only; by its rule alone it passes +FCGR chr1:161506762-161681047 not called . . . . . . . . . Locityper wrote no result for this locus diff --git a/tests/parity/golden/locityper-report/three-loci/stdout b/tests/parity/golden/locityper-report/three-loci/stdout new file mode 100644 index 000000000..c359d926d --- /dev/null +++ b/tests/parity/golden/locityper-report/three-loci/stdout @@ -0,0 +1 @@ +1 of 3 loci called, 0 pass the authors' filter, 1 uncalibrated (outside HLA and KIR) diff --git a/tests/parity/golden/locityper-report/unexplained/out.tsv b/tests/parity/golden/locityper-report/unexplained/out.tsv new file mode 100644 index 000000000..37404de24 --- /dev/null +++ b/tests/parity/golden/locityper-report/unexplained/out.tsv @@ -0,0 +1,2 @@ +locus region status genotype haplotype_1 haplotype_2 quality total_reads unexplained_reads weighted_distance warnings filter reason +CYP2D6 chr22:42122285-42152960 called HG00733.1,NA19240.2 HG00733.1 NA19240.2 27.8 3000 1200 0.200 . uncalibrated the authors calibrated this filter on HLA and KIR loci only; by its rule alone it fails: 1200 of 3000 reads unexplained (1000 or more, and 20% or more) diff --git a/tests/parity/golden/locityper-report/unexplained/stdout b/tests/parity/golden/locityper-report/unexplained/stdout new file mode 100644 index 000000000..ad8e8250b --- /dev/null +++ b/tests/parity/golden/locityper-report/unexplained/stdout @@ -0,0 +1 @@ +1 of 1 loci called, 0 pass the authors' filter, 1 uncalibrated (outside HLA and KIR) diff --git a/tests/parity/golden/locityper-report/warned/out.tsv b/tests/parity/golden/locityper-report/warned/out.tsv new file mode 100644 index 000000000..cec57a9bb --- /dev/null +++ b/tests/parity/golden/locityper-report/warned/out.tsv @@ -0,0 +1,2 @@ +locus region status genotype haplotype_1 haplotype_2 quality total_reads unexplained_reads weighted_distance warnings filter reason +CYP2D6 chr22:42122285-42152960 called HG00733.1,NA19240.2 HG00733.1 NA19240.2 27.8 900 12 0.200 UnexplainedReads uncalibrated the authors calibrated this filter on HLA and KIR loci only; by its rule alone it fails: Locityper warned: UnexplainedReads diff --git a/tests/parity/golden/locityper-report/warned/stdout b/tests/parity/golden/locityper-report/warned/stdout new file mode 100644 index 000000000..ad8e8250b --- /dev/null +++ b/tests/parity/golden/locityper-report/warned/stdout @@ -0,0 +1 @@ +1 of 1 loci called, 0 pass the authors' filter, 1 uncalibrated (outside HLA and KIR) diff --git a/tests/parity/golden/pgx-refblock-fill/bgzip-min-gq-50/stderr b/tests/parity/golden/pgx-refblock-fill/bgzip-min-gq-50/stderr new file mode 100644 index 000000000..a7b2e19e2 --- /dev/null +++ b/tests/parity/golden/pgx-refblock-fill/bgzip-min-gq-50/stderr @@ -0,0 +1,2 @@ +pgx_refblock_fill: 1 of 9 PharmCAT positions longer than one base called 0/0 from reference blocks with GQ >= 50: UGT1A1 chr2:233760233; the others stay as the gVCF has them (a variant call, or missing) +pgx_refblock_fill: 239 reference calls with GQ below 50 (or none) left out, so PharmCAT reads them as missing; at PharmCAT positions: DPYD chr1:97450068, TPMT chr6:18149022, TPMT chr6:18149032, TPMT chr6:18149045, CYP2C9 chr10:94949144, CYP2C9 chr10:94949145, CYP2C9 chr10:94949161, CYP2C9 chr10:94949184, CYP2C9 chr10:94949189, RYR1 chr19:38572262, RYR1 chr19:38572266, G6PD chrX:154532046, G6PD chrX:154532055 diff --git a/tests/parity/golden/pgx-refblock-fill/bgzip-min-gq-50/stdout b/tests/parity/golden/pgx-refblock-fill/bgzip-min-gq-50/stdout new file mode 100644 index 000000000..e1d612c5e --- /dev/null +++ b/tests/parity/golden/pgx-refblock-fill/bgzip-min-gq-50/stdout @@ -0,0 +1,1354 @@ +##fileformat=VCFv4.2 +##FILTER= +##INFO= +##FORMAT= +##FORMAT= +##FORMAT= +##FORMAT= +##ALT= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##INFO= +#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT REFBLOCKS +chr1 97450020 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450021 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450022 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450023 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450024 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450025 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450026 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450027 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450028 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450029 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450030 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450031 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450032 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450033 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450034 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450035 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450036 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450037 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450038 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450039 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450040 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450041 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450042 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450043 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450044 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450045 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450046 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450047 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450048 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450049 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450050 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450051 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450052 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450053 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450054 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450055 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450056 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450057 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450058 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450059 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450060 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450061 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450062 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450063 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450064 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450065 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr2 233759900 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759901 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759902 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759903 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759904 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759905 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759906 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759907 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759908 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759909 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759910 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759911 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759912 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759913 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759914 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759915 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759916 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759917 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759918 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759919 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759920 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759921 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759922 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759923 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759924 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759925 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759926 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759927 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759928 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759929 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759930 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759931 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759932 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759933 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759934 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759935 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759936 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759937 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759938 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759939 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759940 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759941 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759942 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759943 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759944 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759945 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759946 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759947 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759948 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759949 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759950 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759951 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759952 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759953 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759954 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759955 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759956 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759957 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759958 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759959 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759960 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759961 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759962 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759963 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759964 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759965 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759966 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759967 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759968 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759969 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759970 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759971 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759972 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759973 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759974 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759975 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759976 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759977 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759978 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759979 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759980 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759981 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759982 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759983 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759984 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759985 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759986 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759987 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759988 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759989 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759990 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759991 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759992 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759993 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759994 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759995 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759996 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759997 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759998 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759999 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760000 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760001 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760002 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760003 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760004 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760005 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760006 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760007 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760008 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760009 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760010 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760011 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760012 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760013 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760014 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760015 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760016 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760017 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760018 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760019 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760020 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760021 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760022 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760023 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760024 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760025 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760026 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760027 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760028 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760029 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760030 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760031 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760032 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760033 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760034 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760035 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760036 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760037 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760038 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760039 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760040 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760041 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760042 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760043 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760044 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760045 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760046 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760047 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760048 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760049 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760050 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760051 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760052 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760053 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760054 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760055 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760056 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760057 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760058 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760059 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760060 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760061 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760062 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760063 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760064 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760065 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760066 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760067 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760068 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760069 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760070 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760071 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760072 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760073 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760074 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760075 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760076 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760077 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760078 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760079 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760080 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760081 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760082 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760083 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760084 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760085 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760086 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760087 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760088 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760089 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760090 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760091 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760092 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760093 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760094 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760095 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760096 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760097 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760098 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760099 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760100 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760101 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760102 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760103 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760104 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760105 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760106 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760107 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760108 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760109 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760110 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760111 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760112 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760113 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760114 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760115 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760116 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760117 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760118 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760119 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760120 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760121 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760122 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760123 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760124 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760125 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760126 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760127 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760128 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760129 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760130 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760131 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760132 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760133 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760134 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760135 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760136 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760137 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760138 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760139 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760140 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760141 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760142 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760143 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760144 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760145 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760146 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760147 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760148 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760149 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760150 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760151 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760152 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760153 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760154 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760155 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760156 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760157 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760158 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760159 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760160 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760161 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760162 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760163 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760164 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760165 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760166 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760167 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760168 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760169 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760170 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760171 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760172 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760173 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760174 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760175 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760176 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760177 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760178 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760179 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760180 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760181 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760182 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760183 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760184 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760185 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760186 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760187 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760188 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760189 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760190 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760191 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760192 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760193 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760194 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760195 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760196 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760197 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760198 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760199 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760200 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760201 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760202 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760203 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760204 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760205 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760206 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760207 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760208 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760209 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760210 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760211 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760212 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760213 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760214 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760215 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760216 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760217 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760218 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760219 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760220 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760221 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760222 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760223 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760224 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760225 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760226 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760227 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760228 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760229 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760230 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760231 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760232 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760233 rs3064744 CAT C,CATAT,CATATAT . PASS PGX_REFBLOCK GT:GQ 0/0:50 +chr2 233760234 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760235 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760236 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760237 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760238 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760239 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760240 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760241 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760242 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760243 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760244 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760245 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760246 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760247 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760248 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760249 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760250 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760251 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760252 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760253 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760254 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760255 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760256 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760257 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760258 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760259 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760260 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760261 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760262 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760263 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760264 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760265 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760266 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760267 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760268 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760269 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760270 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760271 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760272 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760273 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760274 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760275 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760276 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760277 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760278 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760279 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760280 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760281 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760282 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760283 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760284 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760285 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760286 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760287 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760288 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760289 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760290 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760291 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760292 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760293 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760294 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760295 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760296 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760297 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760298 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760299 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760300 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760301 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760302 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760303 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760304 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760305 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760306 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760307 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760308 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760309 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760310 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760311 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760312 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760313 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760314 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760315 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760316 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760317 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760318 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760319 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760320 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760321 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760322 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760323 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760324 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760325 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760326 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760327 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760328 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760329 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760330 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760331 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760332 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760333 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760334 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760335 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760336 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760337 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760338 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760339 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760340 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760341 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760342 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760343 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760344 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760345 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760346 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760347 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760348 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760349 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760350 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760351 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760352 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760353 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760354 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760355 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760356 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760357 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760358 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760359 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760360 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760361 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760362 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760363 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760364 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760365 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760366 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760367 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760368 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760369 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760370 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760371 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760372 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760373 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760374 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760375 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760376 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760377 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760378 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760379 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760380 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760381 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760382 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760383 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760384 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760385 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760386 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760387 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760388 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760389 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760390 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760391 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760392 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760393 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760394 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760395 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760396 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760397 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760398 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760399 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760400 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760401 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760402 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760403 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760404 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760405 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760406 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760407 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760408 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760409 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760410 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760411 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760412 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760413 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760414 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760415 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760416 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760417 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760418 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760419 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760420 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760421 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760422 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760423 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760424 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760425 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760426 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760427 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760428 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760429 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760430 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760431 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760432 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760433 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760434 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760435 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760436 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760437 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760438 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760439 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760440 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760441 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760442 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760443 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760444 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760445 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760446 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760447 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760448 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760449 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760450 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760451 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760452 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760453 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760454 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760455 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760456 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760457 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760458 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760459 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760460 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760461 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760462 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760463 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760464 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760465 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760466 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760467 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760468 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760469 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760470 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760471 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760472 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760473 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760474 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760475 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760476 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760477 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760478 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760479 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760480 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760481 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760482 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760483 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760484 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760485 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760486 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760487 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760488 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760489 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760490 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760491 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760492 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760493 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760494 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760495 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760496 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760497 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760498 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760499 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760500 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760501 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760502 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760503 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760504 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760505 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760506 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760507 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760508 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760509 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760510 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760511 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760512 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760513 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760514 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760515 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760516 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760517 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760518 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760519 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760520 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760521 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760522 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760523 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760524 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760525 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760526 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760527 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760528 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760529 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760530 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760531 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760532 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760533 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760534 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760535 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760536 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760537 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760538 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760539 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760540 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760541 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760542 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760543 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760544 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760545 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760546 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760547 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760548 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760549 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760550 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760551 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760552 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760553 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760554 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760555 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760556 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760557 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760558 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760559 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760560 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760561 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760562 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760563 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760564 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760565 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760566 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760567 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760568 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760569 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760570 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760571 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760572 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760573 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760574 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760575 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760576 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760577 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760578 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760579 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760580 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760581 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760582 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760583 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760584 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760585 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760586 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760587 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760588 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760589 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760590 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760591 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760592 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760593 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760594 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760595 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760596 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760597 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760598 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760599 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760600 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760601 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760602 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760603 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760604 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760605 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760606 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760607 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760608 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760609 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760610 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760611 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760612 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760613 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760614 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760615 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760616 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760617 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760618 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760619 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760620 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760621 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760622 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760623 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760624 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760625 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760626 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760627 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760628 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760629 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760630 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760631 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760632 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760633 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760634 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760635 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760636 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760637 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760638 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760639 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760640 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760641 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760642 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760643 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760644 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760645 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760646 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760647 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760648 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760649 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760650 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760651 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760652 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760653 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760654 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760655 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760656 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760657 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760658 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760659 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760660 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760661 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760662 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760663 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760664 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760665 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760666 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760667 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760668 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760669 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760670 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760671 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760672 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760673 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760674 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760675 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760676 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760677 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760678 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760679 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760680 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760681 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760682 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760683 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760684 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760685 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760686 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760687 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760688 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760689 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760690 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760691 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760692 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760693 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760694 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760695 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760696 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760697 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760698 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760699 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760700 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760701 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760702 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760703 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760704 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760705 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760706 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760707 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760708 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760709 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760710 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760711 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760712 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760713 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760714 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760715 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760716 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760717 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760718 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760719 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760720 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760721 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760722 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760723 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760724 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760725 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760726 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760727 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760728 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760729 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760730 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760731 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760732 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760733 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760734 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760735 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760736 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760737 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760738 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760739 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760740 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760741 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760742 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760743 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760744 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760745 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760746 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760747 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760748 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760749 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760750 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760751 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760752 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760753 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760754 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760755 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760756 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760757 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760758 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760759 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760760 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760761 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760762 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760763 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760764 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760765 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760766 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760767 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760768 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760769 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760770 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760771 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760772 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760773 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760774 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760775 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760776 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760777 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760778 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760779 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760780 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760781 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760782 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760783 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760784 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760785 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760786 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760787 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760788 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760789 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760790 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760791 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760792 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760793 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760794 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760795 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760796 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760797 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760798 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760799 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760800 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760801 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760802 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760803 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760804 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760805 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760806 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760807 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760808 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760809 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760810 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760811 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760812 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760813 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760814 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760815 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760816 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760817 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760818 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760819 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760820 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760821 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760822 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760823 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760824 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760825 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760826 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760827 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760828 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760829 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760830 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760831 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760832 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760833 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760834 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760835 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760836 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760837 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760838 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760839 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760840 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760841 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760842 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760843 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760844 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760845 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760846 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760847 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760848 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760849 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760850 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760851 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760852 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760853 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760854 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760855 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760856 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760857 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760858 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760859 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760860 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760861 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760862 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760863 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760864 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760865 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760866 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760867 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760868 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760869 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760870 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760871 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760872 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760873 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760874 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760875 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760876 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760877 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760878 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760879 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760880 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760881 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760882 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760883 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760884 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760885 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760886 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760887 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760888 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760889 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760890 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760891 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760892 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760893 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760894 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760895 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760896 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760897 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760898 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760899 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760900 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760901 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760902 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760903 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760904 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760905 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760906 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760907 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760908 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760909 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760910 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760911 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760912 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760913 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760914 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760915 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760916 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760917 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760918 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760919 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760920 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760921 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760922 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760923 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760924 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760925 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760926 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760927 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760928 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760929 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760930 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760931 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760932 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760933 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760934 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760935 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760936 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760937 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760938 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760939 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760940 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760941 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760942 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760943 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760944 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760945 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760946 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760947 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760948 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760949 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760950 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760951 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760952 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760953 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760954 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760955 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760956 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760957 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760958 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760959 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760960 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760961 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760962 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760963 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760964 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760965 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760966 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760967 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760968 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760969 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760970 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760971 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760972 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760973 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760974 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760975 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760976 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760977 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760978 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760979 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760980 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760981 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760982 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760983 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760984 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760985 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760986 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760987 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760988 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760989 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760990 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760991 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760992 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760993 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760994 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760995 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760996 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760997 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760998 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760999 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233761000 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942150 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942151 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942152 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942153 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942154 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942155 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942156 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942157 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942158 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942159 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942160 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942161 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942162 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942163 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942164 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942165 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942166 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942167 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942168 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942169 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942170 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942171 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942172 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942173 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942174 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942175 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942176 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942177 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942178 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942179 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942180 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942181 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942182 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942183 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942184 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942185 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942186 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942187 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942188 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942189 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942190 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942191 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942192 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942193 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942194 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942195 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942196 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942197 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942198 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942199 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942200 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942201 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942202 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942203 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942204 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942205 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942206 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942207 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942208 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942209 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942210 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942212 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942213 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942214 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942215 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942216 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942217 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942218 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942219 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942220 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942221 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942222 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942223 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942224 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942225 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942226 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942227 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942228 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942229 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942230 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942231 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942232 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942233 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942234 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942235 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942236 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942237 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942238 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942239 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942240 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942241 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942242 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942243 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942244 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942245 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942246 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942247 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942248 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942249 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942250 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942251 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942252 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942253 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942254 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942255 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942256 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942257 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942258 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942259 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942260 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949250 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949251 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949252 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949253 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949254 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949255 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949256 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949257 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949258 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949259 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949260 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949261 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949262 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949263 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949264 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949265 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949266 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949267 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949268 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949269 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949270 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949271 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949272 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949273 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949274 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949275 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949276 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949277 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949278 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949279 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949280 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949281 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949282 . A G 30 PASS . GT:GQ:DP 0/1:30:28 +chr10 94949283 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949284 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949285 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949286 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949287 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949288 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949289 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949290 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949291 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949292 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949293 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949294 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949295 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949296 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949297 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949298 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949299 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949300 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949301 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949302 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949303 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949304 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949305 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949306 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949307 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949308 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949309 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949310 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949311 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949312 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949313 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949314 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949315 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949316 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949317 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949318 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949319 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949320 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949321 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949322 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949323 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949324 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949325 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949326 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949327 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949328 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949329 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949330 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 diff --git a/tests/parity/golden/pgx-refblock-fill/block-then-kept/stderr b/tests/parity/golden/pgx-refblock-fill/block-then-kept/stderr index 7fabd6ad7..12075ad15 100644 --- a/tests/parity/golden/pgx-refblock-fill/block-then-kept/stderr +++ b/tests/parity/golden/pgx-refblock-fill/block-then-kept/stderr @@ -1,2 +1,3 @@ pgx_refblock_fill: kept the gVCF's record at chr2:233760233 (not a reference block), not a 0/0 record beside it pgx_refblock_fill: 4 of 9 PharmCAT positions longer than one base called 0/0 from reference blocks with GQ >= 20: DPYD chr1:97450065, TPMT chr6:18149032, RYR1 chr19:38572266, G6PD chrX:154532055; the others stay as the gVCF has them (a variant call, or missing) +pgx_refblock_fill: 61 reference calls with GQ below 20 (or none) left out, so PharmCAT reads them as missing; at PharmCAT positions: CYP2C9 chr10:94949144, CYP2C9 chr10:94949145, CYP2C9 chr10:94949161, CYP2C9 chr10:94949184, CYP2C9 chr10:94949189 diff --git a/tests/parity/golden/pgx-refblock-fill/block-then-kept/stdout b/tests/parity/golden/pgx-refblock-fill/block-then-kept/stdout index 8eb81f4d6..9a70a9cb8 100644 --- a/tests/parity/golden/pgx-refblock-fill/block-then-kept/stdout +++ b/tests/parity/golden/pgx-refblock-fill/block-then-kept/stdout @@ -1367,67 +1367,6 @@ chr10 94942257 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 chr10 94942258 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 chr10 94942259 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 chr10 94942260 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 -chr10 94949140 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949141 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949142 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949143 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949144 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949145 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949146 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949147 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949148 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949149 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949150 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949151 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949152 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949153 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949154 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949155 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949156 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949157 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949158 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949159 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949160 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949161 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949162 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949163 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949164 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949165 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949166 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949167 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949168 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949169 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949170 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949171 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949172 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949173 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949174 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949175 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949176 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949177 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949178 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949179 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949180 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949181 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949182 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949183 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949184 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949185 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949186 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949187 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949188 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949189 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949190 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949191 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949192 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949193 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949194 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949195 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949196 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949197 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949198 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949199 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949200 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 chr10 94949250 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 chr10 94949251 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 chr10 94949252 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 diff --git a/tests/parity/golden/pgx-refblock-fill/crlf/stderr b/tests/parity/golden/pgx-refblock-fill/crlf/stderr new file mode 100644 index 000000000..5ec065540 --- /dev/null +++ b/tests/parity/golden/pgx-refblock-fill/crlf/stderr @@ -0,0 +1,2 @@ +pgx_refblock_fill: 5 of 9 PharmCAT positions longer than one base called 0/0 from reference blocks with GQ >= 20: DPYD chr1:97450065, UGT1A1 chr2:233760233, TPMT chr6:18149032, RYR1 chr19:38572266, G6PD chrX:154532055; the others stay as the gVCF has them (a variant call, or missing) +pgx_refblock_fill: 61 reference calls with GQ below 20 (or none) left out, so PharmCAT reads them as missing; at PharmCAT positions: CYP2C9 chr10:94949144, CYP2C9 chr10:94949145, CYP2C9 chr10:94949161, CYP2C9 chr10:94949184, CYP2C9 chr10:94949189 diff --git a/tests/parity/golden/pgx-refblock-fill/crlf/stdout b/tests/parity/golden/pgx-refblock-fill/crlf/stdout new file mode 100644 index 000000000..2b10dbac5 --- /dev/null +++ b/tests/parity/golden/pgx-refblock-fill/crlf/stdout @@ -0,0 +1,1532 @@ +##fileformat=VCFv4.2 +##FILTER= +##INFO= +##FORMAT= +##FORMAT= +##FORMAT= +##FORMAT= +##ALT= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##INFO= +#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT REFBLOCKS +chr1 97450020 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450021 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450022 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450023 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450024 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450025 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450026 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450027 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450028 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450029 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450030 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450031 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450032 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450033 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450034 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450035 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450036 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450037 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450038 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450039 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450040 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450041 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450042 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450043 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450044 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450045 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450046 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450047 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450048 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450049 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450050 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450051 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450052 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450053 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450054 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450055 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450056 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450057 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450058 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450059 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450060 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450061 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450062 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450063 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450064 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450065 rs72549303 TG T . PASS PGX_REFBLOCK GT:GQ 0/0:45 +chr1 97450066 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450067 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450068 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450069 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450070 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450071 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450072 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450073 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450074 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450075 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450076 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450077 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450078 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450079 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450080 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450081 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450082 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450083 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450084 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450085 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450086 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450087 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450088 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450089 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450090 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450091 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450092 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450093 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450094 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450095 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450096 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450097 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450098 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450099 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450100 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450101 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450102 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450103 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450104 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450105 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450106 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450107 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450108 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450109 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450110 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr2 233759900 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759901 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759902 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759903 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759904 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759905 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759906 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759907 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759908 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759909 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759910 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759911 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759912 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759913 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759914 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759915 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759916 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759917 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759918 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759919 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759920 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759921 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759922 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759923 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759924 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759925 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759926 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759927 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759928 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759929 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759930 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759931 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759932 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759933 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759934 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759935 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759936 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759937 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759938 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759939 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759940 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759941 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759942 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759943 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759944 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759945 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759946 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759947 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759948 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759949 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759950 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759951 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759952 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759953 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759954 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759955 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759956 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759957 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759958 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759959 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759960 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759961 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759962 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759963 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759964 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759965 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759966 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759967 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759968 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759969 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759970 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759971 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759972 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759973 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759974 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759975 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759976 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759977 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759978 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759979 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759980 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759981 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759982 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759983 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759984 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759985 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759986 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759987 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759988 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759989 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759990 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759991 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759992 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759993 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759994 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759995 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759996 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759997 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759998 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759999 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760000 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760001 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760002 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760003 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760004 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760005 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760006 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760007 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760008 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760009 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760010 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760011 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760012 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760013 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760014 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760015 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760016 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760017 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760018 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760019 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760020 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760021 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760022 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760023 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760024 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760025 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760026 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760027 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760028 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760029 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760030 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760031 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760032 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760033 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760034 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760035 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760036 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760037 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760038 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760039 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760040 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760041 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760042 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760043 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760044 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760045 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760046 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760047 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760048 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760049 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760050 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760051 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760052 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760053 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760054 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760055 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760056 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760057 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760058 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760059 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760060 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760061 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760062 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760063 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760064 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760065 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760066 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760067 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760068 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760069 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760070 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760071 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760072 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760073 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760074 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760075 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760076 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760077 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760078 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760079 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760080 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760081 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760082 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760083 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760084 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760085 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760086 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760087 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760088 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760089 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760090 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760091 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760092 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760093 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760094 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760095 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760096 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760097 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760098 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760099 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760100 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760101 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760102 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760103 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760104 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760105 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760106 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760107 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760108 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760109 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760110 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760111 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760112 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760113 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760114 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760115 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760116 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760117 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760118 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760119 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760120 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760121 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760122 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760123 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760124 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760125 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760126 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760127 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760128 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760129 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760130 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760131 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760132 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760133 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760134 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760135 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760136 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760137 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760138 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760139 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760140 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760141 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760142 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760143 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760144 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760145 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760146 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760147 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760148 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760149 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760150 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760151 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760152 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760153 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760154 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760155 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760156 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760157 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760158 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760159 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760160 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760161 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760162 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760163 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760164 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760165 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760166 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760167 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760168 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760169 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760170 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760171 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760172 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760173 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760174 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760175 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760176 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760177 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760178 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760179 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760180 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760181 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760182 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760183 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760184 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760185 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760186 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760187 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760188 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760189 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760190 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760191 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760192 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760193 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760194 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760195 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760196 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760197 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760198 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760199 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760200 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760201 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760202 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760203 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760204 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760205 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760206 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760207 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760208 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760209 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760210 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760211 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760212 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760213 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760214 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760215 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760216 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760217 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760218 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760219 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760220 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760221 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760222 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760223 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760224 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760225 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760226 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760227 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760228 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760229 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760230 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760231 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760232 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760233 rs3064744 CAT C,CATAT,CATATAT . PASS PGX_REFBLOCK GT:GQ 0/0:50 +chr2 233760234 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760235 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760236 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760237 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760238 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760239 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760240 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760241 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760242 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760243 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760244 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760245 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760246 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760247 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760248 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760249 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760250 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760251 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760252 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760253 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760254 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760255 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760256 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760257 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760258 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760259 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760260 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760261 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760262 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760263 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760264 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760265 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760266 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760267 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760268 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760269 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760270 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760271 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760272 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760273 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760274 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760275 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760276 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760277 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760278 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760279 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760280 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760281 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760282 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760283 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760284 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760285 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760286 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760287 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760288 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760289 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760290 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760291 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760292 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760293 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760294 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760295 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760296 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760297 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760298 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760299 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760300 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760301 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760302 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760303 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760304 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760305 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760306 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760307 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760308 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760309 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760310 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760311 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760312 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760313 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760314 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760315 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760316 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760317 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760318 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760319 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760320 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760321 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760322 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760323 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760324 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760325 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760326 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760327 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760328 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760329 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760330 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760331 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760332 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760333 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760334 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760335 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760336 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760337 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760338 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760339 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760340 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760341 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760342 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760343 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760344 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760345 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760346 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760347 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760348 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760349 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760350 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760351 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760352 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760353 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760354 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760355 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760356 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760357 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760358 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760359 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760360 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760361 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760362 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760363 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760364 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760365 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760366 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760367 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760368 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760369 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760370 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760371 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760372 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760373 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760374 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760375 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760376 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760377 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760378 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760379 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760380 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760381 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760382 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760383 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760384 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760385 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760386 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760387 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760388 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760389 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760390 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760391 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760392 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760393 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760394 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760395 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760396 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760397 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760398 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760399 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760400 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760401 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760402 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760403 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760404 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760405 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760406 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760407 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760408 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760409 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760410 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760411 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760412 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760413 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760414 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760415 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760416 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760417 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760418 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760419 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760420 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760421 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760422 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760423 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760424 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760425 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760426 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760427 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760428 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760429 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760430 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760431 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760432 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760433 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760434 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760435 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760436 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760437 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760438 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760439 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760440 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760441 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760442 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760443 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760444 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760445 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760446 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760447 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760448 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760449 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760450 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760451 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760452 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760453 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760454 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760455 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760456 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760457 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760458 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760459 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760460 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760461 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760462 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760463 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760464 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760465 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760466 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760467 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760468 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760469 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760470 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760471 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760472 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760473 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760474 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760475 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760476 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760477 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760478 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760479 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760480 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760481 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760482 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760483 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760484 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760485 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760486 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760487 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760488 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760489 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760490 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760491 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760492 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760493 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760494 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760495 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760496 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760497 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760498 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760499 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760500 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760501 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760502 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760503 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760504 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760505 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760506 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760507 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760508 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760509 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760510 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760511 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760512 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760513 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760514 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760515 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760516 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760517 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760518 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760519 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760520 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760521 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760522 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760523 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760524 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760525 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760526 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760527 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760528 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760529 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760530 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760531 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760532 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760533 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760534 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760535 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760536 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760537 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760538 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760539 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760540 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760541 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760542 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760543 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760544 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760545 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760546 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760547 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760548 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760549 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760550 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760551 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760552 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760553 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760554 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760555 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760556 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760557 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760558 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760559 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760560 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760561 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760562 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760563 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760564 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760565 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760566 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760567 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760568 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760569 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760570 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760571 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760572 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760573 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760574 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760575 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760576 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760577 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760578 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760579 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760580 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760581 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760582 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760583 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760584 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760585 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760586 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760587 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760588 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760589 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760590 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760591 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760592 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760593 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760594 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760595 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760596 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760597 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760598 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760599 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760600 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760601 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760602 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760603 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760604 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760605 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760606 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760607 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760608 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760609 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760610 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760611 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760612 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760613 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760614 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760615 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760616 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760617 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760618 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760619 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760620 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760621 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760622 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760623 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760624 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760625 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760626 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760627 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760628 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760629 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760630 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760631 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760632 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760633 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760634 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760635 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760636 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760637 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760638 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760639 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760640 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760641 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760642 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760643 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760644 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760645 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760646 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760647 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760648 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760649 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760650 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760651 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760652 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760653 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760654 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760655 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760656 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760657 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760658 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760659 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760660 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760661 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760662 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760663 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760664 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760665 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760666 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760667 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760668 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760669 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760670 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760671 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760672 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760673 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760674 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760675 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760676 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760677 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760678 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760679 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760680 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760681 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760682 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760683 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760684 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760685 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760686 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760687 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760688 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760689 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760690 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760691 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760692 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760693 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760694 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760695 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760696 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760697 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760698 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760699 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760700 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760701 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760702 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760703 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760704 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760705 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760706 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760707 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760708 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760709 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760710 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760711 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760712 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760713 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760714 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760715 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760716 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760717 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760718 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760719 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760720 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760721 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760722 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760723 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760724 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760725 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760726 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760727 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760728 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760729 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760730 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760731 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760732 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760733 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760734 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760735 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760736 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760737 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760738 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760739 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760740 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760741 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760742 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760743 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760744 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760745 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760746 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760747 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760748 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760749 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760750 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760751 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760752 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760753 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760754 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760755 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760756 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760757 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760758 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760759 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760760 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760761 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760762 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760763 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760764 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760765 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760766 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760767 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760768 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760769 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760770 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760771 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760772 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760773 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760774 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760775 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760776 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760777 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760778 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760779 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760780 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760781 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760782 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760783 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760784 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760785 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760786 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760787 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760788 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760789 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760790 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760791 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760792 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760793 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760794 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760795 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760796 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760797 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760798 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760799 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760800 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760801 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760802 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760803 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760804 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760805 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760806 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760807 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760808 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760809 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760810 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760811 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760812 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760813 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760814 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760815 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760816 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760817 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760818 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760819 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760820 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760821 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760822 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760823 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760824 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760825 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760826 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760827 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760828 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760829 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760830 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760831 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760832 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760833 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760834 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760835 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760836 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760837 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760838 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760839 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760840 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760841 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760842 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760843 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760844 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760845 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760846 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760847 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760848 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760849 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760850 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760851 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760852 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760853 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760854 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760855 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760856 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760857 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760858 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760859 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760860 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760861 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760862 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760863 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760864 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760865 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760866 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760867 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760868 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760869 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760870 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760871 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760872 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760873 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760874 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760875 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760876 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760877 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760878 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760879 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760880 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760881 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760882 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760883 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760884 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760885 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760886 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760887 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760888 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760889 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760890 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760891 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760892 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760893 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760894 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760895 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760896 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760897 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760898 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760899 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760900 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760901 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760902 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760903 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760904 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760905 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760906 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760907 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760908 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760909 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760910 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760911 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760912 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760913 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760914 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760915 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760916 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760917 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760918 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760919 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760920 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760921 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760922 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760923 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760924 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760925 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760926 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760927 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760928 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760929 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760930 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760931 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760932 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760933 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760934 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760935 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760936 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760937 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760938 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760939 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760940 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760941 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760942 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760943 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760944 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760945 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760946 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760947 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760948 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760949 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760950 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760951 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760952 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760953 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760954 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760955 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760956 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760957 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760958 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760959 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760960 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760961 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760962 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760963 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760964 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760965 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760966 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760967 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760968 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760969 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760970 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760971 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760972 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760973 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760974 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760975 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760976 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760977 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760978 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760979 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760980 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760981 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760982 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760983 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760984 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760985 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760986 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760987 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760988 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760989 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760990 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760991 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760992 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760993 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760994 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760995 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760996 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760997 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760998 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760999 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233761000 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr6 18149010 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149011 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149012 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149013 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149014 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149015 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149016 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149017 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149018 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149019 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149020 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149021 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149022 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149023 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149024 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149025 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149026 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149027 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149028 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149029 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149030 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149031 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149032 rs759836180 C CT . PASS PGX_REFBLOCK GT:GQ 0/0:40 +chr6 18149033 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149034 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149035 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149036 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149037 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149038 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149039 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149040 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149041 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149042 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149043 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149044 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149045 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149046 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149047 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149048 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149049 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149050 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149051 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149052 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149053 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149054 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149055 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149056 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149057 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149058 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149059 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149060 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr10 94942150 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942151 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942152 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942153 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942154 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942155 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942156 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942157 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942158 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942159 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942160 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942161 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942162 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942163 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942164 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942165 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942166 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942167 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942168 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942169 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942170 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942171 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942172 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942173 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942174 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942175 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942176 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942177 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942178 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942179 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942180 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942181 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942182 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942183 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942184 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942185 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942186 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942187 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942188 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942189 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942190 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942191 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942192 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942193 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942194 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942195 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942196 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942197 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942198 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942199 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942200 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942201 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942202 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942203 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942204 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942205 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942206 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942207 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942208 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942209 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942210 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942212 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942213 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942214 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942215 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942216 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942217 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942218 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942219 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942220 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942221 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942222 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942223 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942224 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942225 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942226 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942227 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942228 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942229 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942230 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942231 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942232 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942233 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942234 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942235 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942236 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942237 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942238 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942239 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942240 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942241 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942242 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942243 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942244 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942245 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942246 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942247 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942248 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942249 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942250 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942251 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942252 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942253 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942254 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942255 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942256 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942257 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942258 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942259 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942260 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949250 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949251 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949252 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949253 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949254 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949255 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949256 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949257 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949258 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949259 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949260 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949261 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949262 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949263 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949264 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949265 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949266 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949267 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949268 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949269 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949270 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949271 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949272 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949273 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949274 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949275 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949276 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949277 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949278 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949279 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949280 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949281 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949282 . A G 30 PASS . GT:GQ:DP 0/1:30:28 +chr10 94949283 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949284 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949285 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949286 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949287 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949288 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949289 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949290 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949291 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949292 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949293 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949294 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949295 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949296 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949297 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949298 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949299 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949300 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949301 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949302 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949303 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949304 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949305 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949306 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949307 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949308 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949309 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949310 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949311 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949312 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949313 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949314 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949315 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949316 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949317 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949318 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949319 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949320 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949321 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949322 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949323 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949324 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949325 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949326 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949327 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949328 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949329 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949330 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr19 38572240 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572241 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572242 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572243 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572244 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572245 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572246 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572247 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572248 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572249 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572250 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572251 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572252 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572253 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572254 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572255 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572256 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572257 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572258 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572259 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572260 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572261 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572262 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572263 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572264 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572265 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572266 rs193922862 TC CT . PASS PGX_REFBLOCK GT:GQ 0/0:35 +chr19 38572267 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572268 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572269 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572270 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572271 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572272 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572273 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572274 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572275 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572276 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572277 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572278 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572279 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572280 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572281 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572282 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572283 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572284 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572285 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572286 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572287 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572288 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572289 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572290 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chrX 154532040 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532041 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532042 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532043 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532044 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532045 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532046 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532047 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532048 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532049 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532050 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532051 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532052 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532053 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532054 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532055 . CTCT C . PASS PGX_REFBLOCK GT:GQ 0:30 +chrX 154532056 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532057 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532058 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532059 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532060 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532061 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532062 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532063 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532064 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532065 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532066 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532067 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532068 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532069 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532070 . N . 0 . . GT:GQ:MIN_DP 0:30:20 diff --git a/tests/parity/golden/pgx-refblock-fill/fixture/stderr b/tests/parity/golden/pgx-refblock-fill/fixture/stderr new file mode 100644 index 000000000..5ec065540 --- /dev/null +++ b/tests/parity/golden/pgx-refblock-fill/fixture/stderr @@ -0,0 +1,2 @@ +pgx_refblock_fill: 5 of 9 PharmCAT positions longer than one base called 0/0 from reference blocks with GQ >= 20: DPYD chr1:97450065, UGT1A1 chr2:233760233, TPMT chr6:18149032, RYR1 chr19:38572266, G6PD chrX:154532055; the others stay as the gVCF has them (a variant call, or missing) +pgx_refblock_fill: 61 reference calls with GQ below 20 (or none) left out, so PharmCAT reads them as missing; at PharmCAT positions: CYP2C9 chr10:94949144, CYP2C9 chr10:94949145, CYP2C9 chr10:94949161, CYP2C9 chr10:94949184, CYP2C9 chr10:94949189 diff --git a/tests/parity/golden/pgx-refblock-fill/fixture/stdout b/tests/parity/golden/pgx-refblock-fill/fixture/stdout new file mode 100644 index 000000000..4a26b87a3 --- /dev/null +++ b/tests/parity/golden/pgx-refblock-fill/fixture/stdout @@ -0,0 +1,1532 @@ +##fileformat=VCFv4.2 +##FILTER= +##INFO= +##FORMAT= +##FORMAT= +##FORMAT= +##FORMAT= +##ALT= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##INFO= +#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT REFBLOCKS +chr1 97450020 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450021 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450022 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450023 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450024 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450025 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450026 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450027 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450028 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450029 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450030 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450031 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450032 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450033 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450034 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450035 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450036 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450037 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450038 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450039 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450040 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450041 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450042 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450043 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450044 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450045 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450046 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450047 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450048 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450049 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450050 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450051 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450052 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450053 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450054 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450055 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450056 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450057 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450058 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450059 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450060 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450061 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450062 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450063 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450064 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450065 rs72549303 TG T . PASS PGX_REFBLOCK GT:GQ 0/0:45 +chr1 97450066 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450067 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450068 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450069 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450070 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450071 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450072 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450073 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450074 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450075 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450076 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450077 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450078 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450079 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450080 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450081 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450082 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450083 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450084 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450085 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450086 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450087 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450088 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450089 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450090 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450091 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450092 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450093 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450094 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450095 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450096 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450097 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450098 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450099 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450100 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450101 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450102 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450103 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450104 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450105 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450106 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450107 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450108 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450109 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450110 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr2 233759900 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759901 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759902 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759903 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759904 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759905 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759906 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759907 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759908 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759909 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759910 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759911 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759912 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759913 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759914 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759915 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759916 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759917 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759918 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759919 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759920 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759921 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759922 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759923 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759924 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759925 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759926 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759927 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759928 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759929 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759930 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759931 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759932 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759933 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759934 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759935 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759936 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759937 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759938 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759939 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759940 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759941 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759942 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759943 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759944 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759945 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759946 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759947 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759948 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759949 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759950 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759951 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759952 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759953 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759954 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759955 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759956 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759957 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759958 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759959 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759960 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759961 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759962 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759963 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759964 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759965 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759966 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759967 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759968 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759969 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759970 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759971 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759972 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759973 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759974 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759975 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759976 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759977 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759978 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759979 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759980 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759981 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759982 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759983 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759984 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759985 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759986 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759987 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759988 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759989 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759990 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759991 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759992 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759993 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759994 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759995 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759996 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759997 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759998 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759999 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760000 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760001 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760002 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760003 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760004 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760005 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760006 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760007 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760008 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760009 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760010 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760011 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760012 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760013 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760014 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760015 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760016 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760017 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760018 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760019 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760020 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760021 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760022 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760023 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760024 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760025 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760026 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760027 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760028 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760029 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760030 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760031 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760032 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760033 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760034 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760035 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760036 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760037 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760038 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760039 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760040 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760041 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760042 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760043 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760044 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760045 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760046 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760047 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760048 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760049 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760050 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760051 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760052 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760053 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760054 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760055 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760056 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760057 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760058 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760059 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760060 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760061 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760062 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760063 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760064 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760065 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760066 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760067 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760068 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760069 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760070 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760071 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760072 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760073 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760074 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760075 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760076 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760077 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760078 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760079 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760080 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760081 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760082 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760083 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760084 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760085 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760086 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760087 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760088 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760089 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760090 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760091 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760092 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760093 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760094 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760095 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760096 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760097 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760098 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760099 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760100 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760101 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760102 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760103 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760104 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760105 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760106 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760107 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760108 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760109 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760110 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760111 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760112 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760113 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760114 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760115 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760116 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760117 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760118 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760119 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760120 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760121 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760122 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760123 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760124 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760125 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760126 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760127 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760128 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760129 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760130 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760131 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760132 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760133 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760134 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760135 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760136 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760137 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760138 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760139 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760140 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760141 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760142 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760143 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760144 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760145 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760146 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760147 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760148 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760149 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760150 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760151 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760152 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760153 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760154 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760155 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760156 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760157 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760158 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760159 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760160 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760161 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760162 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760163 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760164 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760165 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760166 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760167 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760168 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760169 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760170 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760171 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760172 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760173 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760174 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760175 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760176 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760177 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760178 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760179 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760180 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760181 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760182 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760183 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760184 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760185 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760186 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760187 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760188 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760189 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760190 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760191 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760192 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760193 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760194 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760195 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760196 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760197 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760198 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760199 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760200 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760201 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760202 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760203 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760204 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760205 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760206 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760207 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760208 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760209 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760210 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760211 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760212 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760213 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760214 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760215 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760216 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760217 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760218 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760219 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760220 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760221 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760222 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760223 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760224 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760225 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760226 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760227 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760228 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760229 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760230 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760231 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760232 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760233 rs3064744 CAT C,CATAT,CATATAT . PASS PGX_REFBLOCK GT:GQ 0/0:50 +chr2 233760234 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760235 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760236 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760237 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760238 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760239 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760240 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760241 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760242 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760243 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760244 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760245 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760246 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760247 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760248 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760249 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760250 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760251 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760252 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760253 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760254 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760255 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760256 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760257 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760258 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760259 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760260 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760261 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760262 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760263 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760264 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760265 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760266 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760267 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760268 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760269 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760270 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760271 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760272 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760273 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760274 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760275 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760276 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760277 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760278 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760279 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760280 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760281 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760282 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760283 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760284 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760285 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760286 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760287 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760288 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760289 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760290 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760291 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760292 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760293 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760294 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760295 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760296 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760297 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760298 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760299 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760300 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760301 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760302 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760303 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760304 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760305 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760306 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760307 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760308 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760309 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760310 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760311 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760312 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760313 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760314 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760315 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760316 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760317 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760318 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760319 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760320 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760321 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760322 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760323 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760324 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760325 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760326 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760327 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760328 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760329 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760330 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760331 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760332 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760333 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760334 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760335 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760336 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760337 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760338 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760339 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760340 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760341 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760342 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760343 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760344 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760345 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760346 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760347 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760348 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760349 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760350 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760351 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760352 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760353 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760354 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760355 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760356 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760357 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760358 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760359 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760360 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760361 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760362 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760363 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760364 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760365 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760366 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760367 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760368 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760369 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760370 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760371 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760372 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760373 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760374 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760375 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760376 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760377 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760378 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760379 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760380 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760381 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760382 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760383 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760384 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760385 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760386 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760387 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760388 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760389 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760390 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760391 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760392 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760393 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760394 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760395 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760396 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760397 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760398 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760399 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760400 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760401 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760402 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760403 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760404 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760405 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760406 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760407 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760408 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760409 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760410 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760411 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760412 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760413 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760414 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760415 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760416 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760417 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760418 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760419 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760420 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760421 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760422 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760423 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760424 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760425 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760426 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760427 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760428 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760429 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760430 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760431 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760432 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760433 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760434 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760435 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760436 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760437 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760438 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760439 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760440 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760441 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760442 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760443 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760444 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760445 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760446 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760447 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760448 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760449 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760450 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760451 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760452 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760453 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760454 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760455 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760456 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760457 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760458 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760459 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760460 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760461 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760462 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760463 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760464 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760465 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760466 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760467 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760468 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760469 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760470 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760471 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760472 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760473 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760474 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760475 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760476 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760477 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760478 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760479 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760480 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760481 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760482 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760483 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760484 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760485 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760486 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760487 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760488 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760489 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760490 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760491 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760492 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760493 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760494 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760495 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760496 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760497 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760498 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760499 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760500 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760501 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760502 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760503 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760504 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760505 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760506 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760507 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760508 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760509 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760510 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760511 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760512 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760513 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760514 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760515 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760516 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760517 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760518 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760519 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760520 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760521 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760522 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760523 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760524 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760525 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760526 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760527 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760528 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760529 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760530 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760531 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760532 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760533 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760534 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760535 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760536 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760537 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760538 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760539 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760540 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760541 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760542 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760543 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760544 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760545 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760546 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760547 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760548 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760549 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760550 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760551 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760552 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760553 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760554 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760555 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760556 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760557 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760558 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760559 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760560 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760561 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760562 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760563 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760564 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760565 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760566 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760567 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760568 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760569 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760570 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760571 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760572 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760573 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760574 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760575 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760576 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760577 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760578 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760579 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760580 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760581 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760582 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760583 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760584 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760585 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760586 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760587 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760588 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760589 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760590 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760591 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760592 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760593 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760594 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760595 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760596 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760597 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760598 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760599 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760600 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760601 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760602 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760603 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760604 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760605 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760606 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760607 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760608 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760609 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760610 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760611 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760612 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760613 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760614 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760615 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760616 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760617 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760618 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760619 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760620 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760621 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760622 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760623 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760624 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760625 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760626 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760627 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760628 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760629 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760630 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760631 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760632 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760633 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760634 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760635 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760636 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760637 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760638 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760639 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760640 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760641 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760642 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760643 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760644 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760645 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760646 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760647 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760648 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760649 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760650 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760651 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760652 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760653 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760654 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760655 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760656 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760657 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760658 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760659 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760660 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760661 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760662 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760663 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760664 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760665 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760666 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760667 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760668 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760669 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760670 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760671 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760672 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760673 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760674 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760675 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760676 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760677 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760678 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760679 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760680 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760681 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760682 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760683 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760684 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760685 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760686 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760687 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760688 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760689 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760690 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760691 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760692 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760693 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760694 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760695 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760696 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760697 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760698 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760699 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760700 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760701 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760702 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760703 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760704 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760705 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760706 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760707 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760708 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760709 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760710 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760711 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760712 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760713 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760714 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760715 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760716 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760717 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760718 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760719 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760720 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760721 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760722 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760723 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760724 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760725 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760726 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760727 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760728 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760729 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760730 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760731 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760732 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760733 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760734 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760735 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760736 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760737 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760738 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760739 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760740 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760741 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760742 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760743 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760744 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760745 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760746 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760747 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760748 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760749 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760750 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760751 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760752 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760753 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760754 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760755 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760756 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760757 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760758 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760759 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760760 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760761 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760762 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760763 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760764 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760765 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760766 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760767 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760768 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760769 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760770 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760771 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760772 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760773 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760774 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760775 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760776 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760777 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760778 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760779 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760780 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760781 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760782 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760783 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760784 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760785 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760786 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760787 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760788 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760789 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760790 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760791 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760792 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760793 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760794 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760795 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760796 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760797 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760798 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760799 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760800 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760801 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760802 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760803 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760804 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760805 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760806 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760807 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760808 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760809 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760810 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760811 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760812 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760813 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760814 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760815 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760816 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760817 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760818 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760819 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760820 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760821 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760822 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760823 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760824 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760825 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760826 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760827 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760828 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760829 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760830 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760831 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760832 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760833 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760834 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760835 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760836 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760837 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760838 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760839 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760840 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760841 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760842 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760843 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760844 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760845 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760846 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760847 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760848 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760849 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760850 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760851 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760852 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760853 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760854 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760855 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760856 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760857 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760858 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760859 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760860 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760861 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760862 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760863 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760864 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760865 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760866 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760867 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760868 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760869 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760870 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760871 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760872 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760873 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760874 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760875 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760876 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760877 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760878 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760879 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760880 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760881 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760882 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760883 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760884 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760885 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760886 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760887 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760888 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760889 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760890 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760891 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760892 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760893 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760894 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760895 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760896 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760897 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760898 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760899 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760900 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760901 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760902 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760903 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760904 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760905 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760906 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760907 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760908 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760909 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760910 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760911 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760912 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760913 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760914 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760915 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760916 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760917 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760918 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760919 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760920 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760921 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760922 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760923 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760924 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760925 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760926 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760927 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760928 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760929 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760930 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760931 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760932 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760933 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760934 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760935 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760936 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760937 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760938 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760939 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760940 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760941 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760942 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760943 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760944 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760945 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760946 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760947 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760948 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760949 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760950 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760951 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760952 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760953 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760954 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760955 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760956 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760957 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760958 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760959 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760960 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760961 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760962 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760963 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760964 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760965 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760966 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760967 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760968 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760969 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760970 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760971 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760972 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760973 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760974 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760975 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760976 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760977 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760978 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760979 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760980 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760981 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760982 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760983 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760984 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760985 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760986 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760987 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760988 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760989 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760990 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760991 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760992 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760993 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760994 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760995 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760996 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760997 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760998 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760999 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233761000 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr6 18149010 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149011 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149012 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149013 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149014 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149015 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149016 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149017 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149018 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149019 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149020 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149021 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149022 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149023 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149024 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149025 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149026 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149027 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149028 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149029 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149030 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149031 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149032 rs759836180 C CT . PASS PGX_REFBLOCK GT:GQ 0/0:40 +chr6 18149033 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149034 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149035 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149036 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149037 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149038 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149039 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149040 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149041 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149042 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149043 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149044 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149045 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149046 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149047 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149048 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149049 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149050 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149051 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149052 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149053 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149054 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149055 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149056 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149057 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149058 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149059 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149060 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr10 94942150 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942151 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942152 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942153 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942154 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942155 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942156 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942157 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942158 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942159 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942160 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942161 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942162 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942163 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942164 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942165 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942166 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942167 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942168 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942169 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942170 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942171 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942172 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942173 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942174 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942175 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942176 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942177 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942178 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942179 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942180 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942181 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942182 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942183 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942184 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942185 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942186 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942187 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942188 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942189 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942190 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942191 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942192 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942193 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942194 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942195 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942196 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942197 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942198 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942199 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942200 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942201 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942202 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942203 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942204 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942205 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942206 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942207 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942208 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942209 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942210 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942212 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942213 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942214 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942215 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942216 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942217 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942218 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942219 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942220 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942221 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942222 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942223 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942224 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942225 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942226 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942227 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942228 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942229 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942230 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942231 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942232 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942233 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942234 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942235 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942236 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942237 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942238 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942239 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942240 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942241 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942242 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942243 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942244 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942245 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942246 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942247 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942248 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942249 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942250 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942251 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942252 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942253 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942254 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942255 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942256 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942257 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942258 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942259 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942260 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949250 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949251 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949252 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949253 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949254 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949255 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949256 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949257 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949258 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949259 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949260 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949261 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949262 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949263 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949264 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949265 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949266 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949267 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949268 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949269 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949270 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949271 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949272 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949273 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949274 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949275 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949276 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949277 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949278 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949279 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949280 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949281 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949282 . A G 30 PASS . GT:GQ:DP 0/1:30:28 +chr10 94949283 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949284 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949285 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949286 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949287 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949288 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949289 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949290 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949291 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949292 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949293 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949294 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949295 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949296 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949297 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949298 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949299 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949300 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949301 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949302 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949303 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949304 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949305 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949306 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949307 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949308 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949309 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949310 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949311 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949312 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949313 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949314 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949315 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949316 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949317 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949318 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949319 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949320 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949321 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949322 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949323 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949324 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949325 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949326 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949327 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949328 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949329 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949330 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr19 38572240 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572241 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572242 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572243 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572244 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572245 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572246 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572247 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572248 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572249 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572250 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572251 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572252 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572253 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572254 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572255 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572256 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572257 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572258 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572259 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572260 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572261 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572262 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572263 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572264 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572265 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572266 rs193922862 TC CT . PASS PGX_REFBLOCK GT:GQ 0/0:35 +chr19 38572267 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572268 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572269 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572270 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572271 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572272 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572273 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572274 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572275 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572276 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572277 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572278 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572279 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572280 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572281 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572282 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572283 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572284 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572285 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572286 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572287 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572288 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572289 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572290 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chrX 154532040 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532041 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532042 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532043 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532044 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532045 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532046 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532047 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532048 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532049 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532050 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532051 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532052 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532053 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532054 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532055 . CTCT C . PASS PGX_REFBLOCK GT:GQ 0:30 +chrX 154532056 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532057 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532058 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532059 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532060 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532061 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532062 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532063 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532064 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532065 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532066 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532067 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532068 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532069 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532070 . N . 0 . . GT:GQ:MIN_DP 0:30:20 diff --git a/tests/parity/golden/pgx-refblock-fill/inconsistent/stderr b/tests/parity/golden/pgx-refblock-fill/inconsistent/stderr index 7fabd6ad7..12075ad15 100644 --- a/tests/parity/golden/pgx-refblock-fill/inconsistent/stderr +++ b/tests/parity/golden/pgx-refblock-fill/inconsistent/stderr @@ -1,2 +1,3 @@ pgx_refblock_fill: kept the gVCF's record at chr2:233760233 (not a reference block), not a 0/0 record beside it pgx_refblock_fill: 4 of 9 PharmCAT positions longer than one base called 0/0 from reference blocks with GQ >= 20: DPYD chr1:97450065, TPMT chr6:18149032, RYR1 chr19:38572266, G6PD chrX:154532055; the others stay as the gVCF has them (a variant call, or missing) +pgx_refblock_fill: 61 reference calls with GQ below 20 (or none) left out, so PharmCAT reads them as missing; at PharmCAT positions: CYP2C9 chr10:94949144, CYP2C9 chr10:94949145, CYP2C9 chr10:94949161, CYP2C9 chr10:94949184, CYP2C9 chr10:94949189 diff --git a/tests/parity/golden/pgx-refblock-fill/inconsistent/stdout b/tests/parity/golden/pgx-refblock-fill/inconsistent/stdout index a3a4afc7a..1c3c31016 100644 --- a/tests/parity/golden/pgx-refblock-fill/inconsistent/stdout +++ b/tests/parity/golden/pgx-refblock-fill/inconsistent/stdout @@ -1367,67 +1367,6 @@ chr10 94942257 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 chr10 94942258 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 chr10 94942259 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 chr10 94942260 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 -chr10 94949140 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949141 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949142 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949143 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949144 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949145 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949146 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949147 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949148 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949149 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949150 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949151 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949152 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949153 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949154 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949155 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949156 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949157 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949158 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949159 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949160 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949161 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949162 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949163 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949164 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949165 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949166 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949167 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949168 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949169 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949170 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949171 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949172 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949173 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949174 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949175 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949176 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949177 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949178 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949179 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949180 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949181 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949182 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949183 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949184 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949185 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949186 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949187 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949188 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949189 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949190 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949191 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949192 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949193 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949194 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949195 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949196 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949197 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949198 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949199 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949200 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 chr10 94949250 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 chr10 94949251 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 chr10 94949252 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 diff --git a/tests/parity/golden/pgx-refblock-fill/kept-then-block/stderr b/tests/parity/golden/pgx-refblock-fill/kept-then-block/stderr index 7fabd6ad7..12075ad15 100644 --- a/tests/parity/golden/pgx-refblock-fill/kept-then-block/stderr +++ b/tests/parity/golden/pgx-refblock-fill/kept-then-block/stderr @@ -1,2 +1,3 @@ pgx_refblock_fill: kept the gVCF's record at chr2:233760233 (not a reference block), not a 0/0 record beside it pgx_refblock_fill: 4 of 9 PharmCAT positions longer than one base called 0/0 from reference blocks with GQ >= 20: DPYD chr1:97450065, TPMT chr6:18149032, RYR1 chr19:38572266, G6PD chrX:154532055; the others stay as the gVCF has them (a variant call, or missing) +pgx_refblock_fill: 61 reference calls with GQ below 20 (or none) left out, so PharmCAT reads them as missing; at PharmCAT positions: CYP2C9 chr10:94949144, CYP2C9 chr10:94949145, CYP2C9 chr10:94949161, CYP2C9 chr10:94949184, CYP2C9 chr10:94949189 diff --git a/tests/parity/golden/pgx-refblock-fill/kept-then-block/stdout b/tests/parity/golden/pgx-refblock-fill/kept-then-block/stdout index 8eb81f4d6..9a70a9cb8 100644 --- a/tests/parity/golden/pgx-refblock-fill/kept-then-block/stdout +++ b/tests/parity/golden/pgx-refblock-fill/kept-then-block/stdout @@ -1367,67 +1367,6 @@ chr10 94942257 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 chr10 94942258 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 chr10 94942259 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 chr10 94942260 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 -chr10 94949140 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949141 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949142 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949143 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949144 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949145 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949146 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949147 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949148 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949149 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949150 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949151 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949152 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949153 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949154 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949155 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949156 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949157 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949158 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949159 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949160 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949161 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949162 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949163 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949164 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949165 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949166 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949167 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949168 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949169 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949170 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949171 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949172 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949173 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949174 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949175 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949176 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949177 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949178 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949179 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949180 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949181 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949182 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949183 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949184 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949185 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949186 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949187 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949188 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949189 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949190 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949191 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949192 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949193 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949194 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949195 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949196 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949197 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949198 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949199 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949200 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 chr10 94949250 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 chr10 94949251 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 chr10 94949252 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 diff --git a/tests/parity/golden/pgx-refblock-fill/min-gq-51/stderr b/tests/parity/golden/pgx-refblock-fill/min-gq-51/stderr new file mode 100644 index 000000000..6178a914d --- /dev/null +++ b/tests/parity/golden/pgx-refblock-fill/min-gq-51/stderr @@ -0,0 +1,2 @@ +pgx_refblock_fill: 0 of 9 PharmCAT positions longer than one base called 0/0 from reference blocks with GQ >= 51; the others stay as the gVCF has them (a variant call, or missing) +pgx_refblock_fill: 1576 reference calls with GQ below 51 (or none) left out, so PharmCAT reads them as missing; at PharmCAT positions: DPYD chr1:97450058, DPYD chr1:97450059, DPYD chr1:97450065, DPYD chr1:97450068, UGT1A1 chr2:233759924, UGT1A1 chr2:233760233, UGT1A1 chr2:233760498, UGT1A1 chr2:233760973, TPMT chr6:18149022, TPMT chr6:18149032, TPMT chr6:18149045, CYP2C9 chr10:94942203, CYP2C9 chr10:94942205, CYP2C9 chr10:94942216, CYP2C9 chr10:94942226, CYP2C9 chr10:94942230, CYP2C9 chr10:94942231, CYP2C9 chr10:94942233, CYP2C9 chr10:94942234, CYP2C9 chr10:94942240, CYP2C9 chr10:94942243, CYP2C9 chr10:94942249, CYP2C9 chr10:94942254, CYP2C9 chr10:94942255, CYP2C9 chr10:94949144, CYP2C9 chr10:94949145, CYP2C9 chr10:94949161, CYP2C9 chr10:94949184, CYP2C9 chr10:94949189, CYP2C9 chr10:94949278, CYP2C9 chr10:94949280, CYP2C9 chr10:94949281, RYR1 chr19:38572262, RYR1 chr19:38572266, G6PD chrX:154532046, G6PD chrX:154532055 diff --git a/tests/parity/golden/pgx-refblock-fill/min-gq-51/stdout b/tests/parity/golden/pgx-refblock-fill/min-gq-51/stdout new file mode 100644 index 000000000..4cbfccc1c --- /dev/null +++ b/tests/parity/golden/pgx-refblock-fill/min-gq-51/stdout @@ -0,0 +1,17 @@ +##fileformat=VCFv4.2 +##FILTER= +##INFO= +##FORMAT= +##FORMAT= +##FORMAT= +##FORMAT= +##ALT= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##INFO= +#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT REFBLOCKS +chr10 94949282 . A G 30 PASS . GT:GQ:DP 0/1:30:28 diff --git a/tests/parity/golden/pgx-refblock-fill/no-final-newline/stderr b/tests/parity/golden/pgx-refblock-fill/no-final-newline/stderr new file mode 100644 index 000000000..5ec065540 --- /dev/null +++ b/tests/parity/golden/pgx-refblock-fill/no-final-newline/stderr @@ -0,0 +1,2 @@ +pgx_refblock_fill: 5 of 9 PharmCAT positions longer than one base called 0/0 from reference blocks with GQ >= 20: DPYD chr1:97450065, UGT1A1 chr2:233760233, TPMT chr6:18149032, RYR1 chr19:38572266, G6PD chrX:154532055; the others stay as the gVCF has them (a variant call, or missing) +pgx_refblock_fill: 61 reference calls with GQ below 20 (or none) left out, so PharmCAT reads them as missing; at PharmCAT positions: CYP2C9 chr10:94949144, CYP2C9 chr10:94949145, CYP2C9 chr10:94949161, CYP2C9 chr10:94949184, CYP2C9 chr10:94949189 diff --git a/tests/parity/golden/pgx-refblock-fill/no-final-newline/stdout b/tests/parity/golden/pgx-refblock-fill/no-final-newline/stdout index 8424be758..b616ea762 100644 --- a/tests/parity/golden/pgx-refblock-fill/no-final-newline/stdout +++ b/tests/parity/golden/pgx-refblock-fill/no-final-newline/stdout @@ -1367,67 +1367,6 @@ chr10 94942257 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 chr10 94942258 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 chr10 94942259 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 chr10 94942260 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 -chr10 94949140 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949141 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949142 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949143 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949144 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949145 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949146 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949147 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949148 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949149 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949150 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949151 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949152 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949153 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949154 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949155 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949156 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949157 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949158 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949159 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949160 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949161 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949162 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949163 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949164 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949165 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949166 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949167 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949168 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949169 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949170 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949171 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949172 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949173 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949174 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949175 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949176 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949177 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949178 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949179 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949180 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949181 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949182 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949183 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949184 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949185 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949186 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949187 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949188 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949189 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949190 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949191 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949192 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949193 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949194 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949195 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949196 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949197 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949198 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949199 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949200 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 chr10 94949250 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 chr10 94949251 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 chr10 94949252 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 diff --git a/tests/parity/golden/pgx-refblock-fill/same-start/stderr b/tests/parity/golden/pgx-refblock-fill/same-start/stderr index 58f736e68..0481f5c4f 100644 --- a/tests/parity/golden/pgx-refblock-fill/same-start/stderr +++ b/tests/parity/golden/pgx-refblock-fill/same-start/stderr @@ -1 +1,2 @@ pgx_refblock_fill: 5 of 10 PharmCAT positions longer than one base called 0/0 from reference blocks with GQ >= 20: DPYD chr1:97450065, UGT1A1 chr2:233760233, TPMT chr6:18149032, RYR1 chr19:38572266, G6PD chrX:154532055; the others stay as the gVCF has them (a variant call, or missing) +pgx_refblock_fill: 61 reference calls with GQ below 20 (or none) left out, so PharmCAT reads them as missing; at PharmCAT positions: CYP2C9 chr10:94949144, CYP2C9 chr10:94949145, CYP2C9 chr10:94949161, CYP2C9 chr10:94949184, CYP2C9 chr10:94949189 diff --git a/tests/parity/golden/pgx-refblock-fill/same-start/stdout b/tests/parity/golden/pgx-refblock-fill/same-start/stdout index 6e6c4df61..4a26b87a3 100644 --- a/tests/parity/golden/pgx-refblock-fill/same-start/stdout +++ b/tests/parity/golden/pgx-refblock-fill/same-start/stdout @@ -1367,67 +1367,6 @@ chr10 94942257 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 chr10 94942258 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 chr10 94942259 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 chr10 94942260 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 -chr10 94949140 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949141 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949142 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949143 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949144 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949145 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949146 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949147 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949148 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949149 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949150 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949151 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949152 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949153 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949154 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949155 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949156 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949157 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949158 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949159 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949160 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949161 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949162 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949163 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949164 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949165 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949166 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949167 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949168 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949169 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949170 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949171 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949172 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949173 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949174 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949175 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949176 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949177 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949178 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949179 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949180 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949181 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949182 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949183 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949184 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949185 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949186 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949187 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949188 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949189 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949190 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949191 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949192 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949193 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949194 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949195 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949196 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949197 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949198 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949199 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949200 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 chr10 94949250 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 chr10 94949251 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 chr10 94949252 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 diff --git a/tests/parity/golden/qc-sample/contaminated/q.tsv b/tests/parity/golden/qc-sample/contaminated/q.tsv new file mode 100644 index 000000000..889b064a7 --- /dev/null +++ b/tests/parity/golden/qc-sample/contaminated/q.tsv @@ -0,0 +1,26 @@ +key value +sample S +somalier_id S +declared_sex +inferred_sex male +sex_check not_checked +sex_check_reason no declared sex +sites_genotyped 120 +depth_at_sites 30.0 +x_sites 39 +x_het 0 +x_hom_alt 39 +x_depth_ratio 0.50 +y_sites 5 +y_depth_ratio 0.47 +freemix 0.0412 +freemix_warn_above 0.04 +contamination warn +panel_markers 10000 +verifybamid2_marker_check +same_person_as +verifybamid2_markers +contamination_confidence uncertain +contamination_confidence_reason the number of markers FREEMIX rests on is not known +identity uncertain +identity_reason somalier genotyped 120 sites; telling one person from another needs 1,000 diff --git a/tests/parity/golden/qc-sample/contaminated/stdout b/tests/parity/golden/qc-sample/contaminated/stdout new file mode 100644 index 000000000..386b01aad --- /dev/null +++ b/tests/parity/golden/qc-sample/contaminated/stdout @@ -0,0 +1,25 @@ + sample: S + somalier_id: S + declared_sex: + inferred_sex: male + sex_check: not_checked + sex_check_reason: no declared sex + sites_genotyped: 120 + depth_at_sites: 30.0 + x_sites: 39 + x_het: 0 + x_hom_alt: 39 + x_depth_ratio: 0.50 + y_sites: 5 + y_depth_ratio: 0.47 + freemix: 0.0412 + freemix_warn_above: 0.04 + contamination: warn + panel_markers: 10000 + verifybamid2_marker_check: + same_person_as: + verifybamid2_markers: + contamination_confidence: uncertain + contamination_confidence_reason: the number of markers FREEMIX rests on is not known + identity: uncertain + identity_reason: somalier genotyped 120 sites; telling one person from another needs 1,000 diff --git a/tests/parity/golden/qc-sample/crlf/q.tsv b/tests/parity/golden/qc-sample/crlf/q.tsv new file mode 100644 index 000000000..c777ae4e2 --- /dev/null +++ b/tests/parity/golden/qc-sample/crlf/q.tsv @@ -0,0 +1,26 @@ +key value +sample S +somalier_id S +declared_sex male +inferred_sex male +sex_check ok +sex_check_reason declared male, somalier infers male +sites_genotyped 120 +depth_at_sites 30.0 +x_sites 39 +x_het 0 +x_hom_alt 39 +x_depth_ratio 0.50 +y_sites 5 +y_depth_ratio 0.47 +freemix +freemix_warn_above 0.03 +contamination not_run +panel_markers +verifybamid2_marker_check +same_person_as +verifybamid2_markers +contamination_confidence +contamination_confidence_reason +identity uncertain +identity_reason somalier genotyped 120 sites; telling one person from another needs 1,000 diff --git a/tests/parity/golden/qc-sample/crlf/stdout b/tests/parity/golden/qc-sample/crlf/stdout new file mode 100644 index 000000000..ded245023 --- /dev/null +++ b/tests/parity/golden/qc-sample/crlf/stdout @@ -0,0 +1,25 @@ + sample: S + somalier_id: S + declared_sex: male + inferred_sex: male + sex_check: ok + sex_check_reason: declared male, somalier infers male + sites_genotyped: 120 + depth_at_sites: 30.0 + x_sites: 39 + x_het: 0 + x_hom_alt: 39 + x_depth_ratio: 0.50 + y_sites: 5 + y_depth_ratio: 0.47 + freemix: + freemix_warn_above: 0.03 + contamination: not_run + panel_markers: + verifybamid2_marker_check: + same_person_as: + verifybamid2_markers: + contamination_confidence: + contamination_confidence_reason: + identity: uncertain + identity_reason: somalier genotyped 120 sites; telling one person from another needs 1,000 diff --git a/tests/parity/golden/qc-sample/female/q.tsv b/tests/parity/golden/qc-sample/female/q.tsv new file mode 100644 index 000000000..8c9544309 --- /dev/null +++ b/tests/parity/golden/qc-sample/female/q.tsv @@ -0,0 +1,26 @@ +key value +sample S +somalier_id S +declared_sex female +inferred_sex female +sex_check ok +sex_check_reason declared female, somalier infers female +sites_genotyped 120 +depth_at_sites 30.0 +x_sites 40 +x_het 20 +x_hom_alt 20 +x_depth_ratio 0.50 +y_sites 5 +y_depth_ratio 0.00 +freemix +freemix_warn_above 0.03 +contamination not_run +panel_markers +verifybamid2_marker_check skipped +same_person_as +verifybamid2_markers +contamination_confidence +contamination_confidence_reason +identity uncertain +identity_reason somalier genotyped 120 sites; telling one person from another needs 1,000 diff --git a/tests/parity/golden/qc-sample/female/stdout b/tests/parity/golden/qc-sample/female/stdout new file mode 100644 index 000000000..28b0a1598 --- /dev/null +++ b/tests/parity/golden/qc-sample/female/stdout @@ -0,0 +1,25 @@ + sample: S + somalier_id: S + declared_sex: female + inferred_sex: female + sex_check: ok + sex_check_reason: declared female, somalier infers female + sites_genotyped: 120 + depth_at_sites: 30.0 + x_sites: 40 + x_het: 20 + x_hom_alt: 20 + x_depth_ratio: 0.50 + y_sites: 5 + y_depth_ratio: 0.00 + freemix: + freemix_warn_above: 0.03 + contamination: not_run + panel_markers: + verifybamid2_marker_check: skipped + same_person_as: + verifybamid2_markers: + contamination_confidence: + contamination_confidence_reason: + identity: uncertain + identity_reason: somalier genotyped 120 sites; telling one person from another needs 1,000 diff --git a/tests/parity/golden/qc-sample/gzip/q.tsv b/tests/parity/golden/qc-sample/gzip/q.tsv new file mode 100644 index 000000000..aa55d3cef --- /dev/null +++ b/tests/parity/golden/qc-sample/gzip/q.tsv @@ -0,0 +1,26 @@ +key value +sample S +somalier_id S +declared_sex +inferred_sex male +sex_check not_checked +sex_check_reason no declared sex +sites_genotyped 120 +depth_at_sites 30.0 +x_sites 39 +x_het 0 +x_hom_alt 39 +x_depth_ratio 0.50 +y_sites 5 +y_depth_ratio 0.47 +freemix +freemix_warn_above 0.03 +contamination not_run +panel_markers +verifybamid2_marker_check +same_person_as +verifybamid2_markers +contamination_confidence +contamination_confidence_reason +identity uncertain +identity_reason somalier genotyped 120 sites; telling one person from another needs 1,000 diff --git a/tests/parity/golden/qc-sample/gzip/stdout b/tests/parity/golden/qc-sample/gzip/stdout new file mode 100644 index 000000000..89fef7d34 --- /dev/null +++ b/tests/parity/golden/qc-sample/gzip/stdout @@ -0,0 +1,25 @@ + sample: S + somalier_id: S + declared_sex: + inferred_sex: male + sex_check: not_checked + sex_check_reason: no declared sex + sites_genotyped: 120 + depth_at_sites: 30.0 + x_sites: 39 + x_het: 0 + x_hom_alt: 39 + x_depth_ratio: 0.50 + y_sites: 5 + y_depth_ratio: 0.47 + freemix: + freemix_warn_above: 0.03 + contamination: not_run + panel_markers: + verifybamid2_marker_check: + same_person_as: + verifybamid2_markers: + contamination_confidence: + contamination_confidence_reason: + identity: uncertain + identity_reason: somalier genotyped 120 sites; telling one person from another needs 1,000 diff --git a/tests/parity/golden/qc-sample/low-quality-nan/q.tsv b/tests/parity/golden/qc-sample/low-quality-nan/q.tsv new file mode 100644 index 000000000..bf2af7a32 --- /dev/null +++ b/tests/parity/golden/qc-sample/low-quality-nan/q.tsv @@ -0,0 +1,26 @@ +key value +sample S +somalier_id U +declared_sex male +inferred_sex unknown +sex_check not_checked +sex_check_reason somalier could not tell the sex from 39 chrX sites (it needs more than 10 with reads, and allele balances that look like one person) +sites_genotyped 120 +depth_at_sites 30.0 +x_sites 39 +x_het 0 +x_hom_alt 39 +x_depth_ratio 0.50 +y_sites 5 +y_depth_ratio 0.47 +freemix +freemix_warn_above 0.03 +contamination not_run +panel_markers +verifybamid2_marker_check +same_person_as +verifybamid2_markers +contamination_confidence +contamination_confidence_reason +identity uncertain +identity_reason somalier genotyped 120 sites; telling one person from another needs 1,000 diff --git a/tests/parity/golden/qc-sample/low-quality-nan/stdout b/tests/parity/golden/qc-sample/low-quality-nan/stdout new file mode 100644 index 000000000..96b18ade5 --- /dev/null +++ b/tests/parity/golden/qc-sample/low-quality-nan/stdout @@ -0,0 +1,25 @@ + sample: S + somalier_id: U + declared_sex: male + inferred_sex: unknown + sex_check: not_checked + sex_check_reason: somalier could not tell the sex from 39 chrX sites (it needs more than 10 with reads, and allele balances that look like one person) + sites_genotyped: 120 + depth_at_sites: 30.0 + x_sites: 39 + x_het: 0 + x_hom_alt: 39 + x_depth_ratio: 0.50 + y_sites: 5 + y_depth_ratio: 0.47 + freemix: + freemix_warn_above: 0.03 + contamination: not_run + panel_markers: + verifybamid2_marker_check: + same_person_as: + verifybamid2_markers: + contamination_confidence: + contamination_confidence_reason: + identity: uncertain + identity_reason: somalier genotyped 120 sites; telling one person from another needs 1,000 diff --git a/tests/parity/golden/qc-sample/low-quality/q.tsv b/tests/parity/golden/qc-sample/low-quality/q.tsv new file mode 100644 index 000000000..9433cdd08 --- /dev/null +++ b/tests/parity/golden/qc-sample/low-quality/q.tsv @@ -0,0 +1,26 @@ +key value +sample S +somalier_id S +declared_sex male +inferred_sex unknown +sex_check not_checked +sex_check_reason somalier could not tell the sex from 39 chrX sites (it needs more than 10 with reads, and allele balances that look like one person) +sites_genotyped 120 +depth_at_sites 30.0 +x_sites 39 +x_het 0 +x_hom_alt 39 +x_depth_ratio 0.50 +y_sites 5 +y_depth_ratio 0.47 +freemix +freemix_warn_above 0.03 +contamination not_run +panel_markers +verifybamid2_marker_check +same_person_as +verifybamid2_markers +contamination_confidence +contamination_confidence_reason +identity uncertain +identity_reason somalier genotyped 120 sites; telling one person from another needs 1,000 diff --git a/tests/parity/golden/qc-sample/low-quality/stdout b/tests/parity/golden/qc-sample/low-quality/stdout new file mode 100644 index 000000000..da94d7caa --- /dev/null +++ b/tests/parity/golden/qc-sample/low-quality/stdout @@ -0,0 +1,25 @@ + sample: S + somalier_id: S + declared_sex: male + inferred_sex: unknown + sex_check: not_checked + sex_check_reason: somalier could not tell the sex from 39 chrX sites (it needs more than 10 with reads, and allele balances that look like one person) + sites_genotyped: 120 + depth_at_sites: 30.0 + x_sites: 39 + x_het: 0 + x_hom_alt: 39 + x_depth_ratio: 0.50 + y_sites: 5 + y_depth_ratio: 0.47 + freemix: + freemix_warn_above: 0.03 + contamination: not_run + panel_markers: + verifybamid2_marker_check: + same_person_as: + verifybamid2_markers: + contamination_confidence: + contamination_confidence_reason: + identity: uncertain + identity_reason: somalier genotyped 120 sites; telling one person from another needs 1,000 diff --git a/tests/parity/golden/qc-sample/male-ok/q.tsv b/tests/parity/golden/qc-sample/male-ok/q.tsv new file mode 100644 index 000000000..b45297c6c --- /dev/null +++ b/tests/parity/golden/qc-sample/male-ok/q.tsv @@ -0,0 +1,26 @@ +key value +sample S +somalier_id S +declared_sex male +inferred_sex male +sex_check ok +sex_check_reason declared male, somalier infers male +sites_genotyped 120 +depth_at_sites 30.0 +x_sites 39 +x_het 0 +x_hom_alt 39 +x_depth_ratio 0.50 +y_sites 5 +y_depth_ratio 0.47 +freemix 0.0012 +freemix_warn_above 0.03 +contamination ok +panel_markers 10000 +verifybamid2_marker_check passed +same_person_as T (0.95), U (0.99) +verifybamid2_markers +contamination_confidence ok +contamination_confidence_reason VerifyBamID2's marker check passed +identity uncertain +identity_reason somalier genotyped 120 sites; telling one person from another needs 1,000 diff --git a/tests/parity/golden/qc-sample/male-ok/stdout b/tests/parity/golden/qc-sample/male-ok/stdout new file mode 100644 index 000000000..c5e1f01b9 --- /dev/null +++ b/tests/parity/golden/qc-sample/male-ok/stdout @@ -0,0 +1,25 @@ + sample: S + somalier_id: S + declared_sex: male + inferred_sex: male + sex_check: ok + sex_check_reason: declared male, somalier infers male + sites_genotyped: 120 + depth_at_sites: 30.0 + x_sites: 39 + x_het: 0 + x_hom_alt: 39 + x_depth_ratio: 0.50 + y_sites: 5 + y_depth_ratio: 0.47 + freemix: 0.0012 + freemix_warn_above: 0.03 + contamination: ok + panel_markers: 10000 + verifybamid2_marker_check: passed + same_person_as: T (0.95), U (0.99) + verifybamid2_markers: + contamination_confidence: ok + contamination_confidence_reason: VerifyBamID2's marker check passed + identity: uncertain + identity_reason: somalier genotyped 120 sites; telling one person from another needs 1,000 diff --git a/tests/parity/golden/qc-sample/mismatch/q.tsv b/tests/parity/golden/qc-sample/mismatch/q.tsv new file mode 100644 index 000000000..2953690ee --- /dev/null +++ b/tests/parity/golden/qc-sample/mismatch/q.tsv @@ -0,0 +1,26 @@ +key value +sample S +somalier_id S +declared_sex female +inferred_sex male +sex_check mismatch +sex_check_reason declared female, somalier infers male +sites_genotyped 120 +depth_at_sites 30.0 +x_sites 39 +x_het 0 +x_hom_alt 39 +x_depth_ratio 0.50 +y_sites 5 +y_depth_ratio 0.47 +freemix +freemix_warn_above 0.03 +contamination not_run +panel_markers +verifybamid2_marker_check +same_person_as +verifybamid2_markers +contamination_confidence +contamination_confidence_reason +identity uncertain +identity_reason somalier genotyped 120 sites; telling one person from another needs 1,000 diff --git a/tests/parity/golden/qc-sample/mismatch/stdout b/tests/parity/golden/qc-sample/mismatch/stdout new file mode 100644 index 000000000..d48d0cc64 --- /dev/null +++ b/tests/parity/golden/qc-sample/mismatch/stdout @@ -0,0 +1,25 @@ + sample: S + somalier_id: S + declared_sex: female + inferred_sex: male + sex_check: mismatch + sex_check_reason: declared female, somalier infers male + sites_genotyped: 120 + depth_at_sites: 30.0 + x_sites: 39 + x_het: 0 + x_hom_alt: 39 + x_depth_ratio: 0.50 + y_sites: 5 + y_depth_ratio: 0.47 + freemix: + freemix_warn_above: 0.03 + contamination: not_run + panel_markers: + verifybamid2_marker_check: + same_person_as: + verifybamid2_markers: + contamination_confidence: + contamination_confidence_reason: + identity: uncertain + identity_reason: somalier genotyped 120 sites; telling one person from another needs 1,000 diff --git a/tests/parity/golden/qc-sample/no-declared-sex/q.tsv b/tests/parity/golden/qc-sample/no-declared-sex/q.tsv new file mode 100644 index 000000000..aa55d3cef --- /dev/null +++ b/tests/parity/golden/qc-sample/no-declared-sex/q.tsv @@ -0,0 +1,26 @@ +key value +sample S +somalier_id S +declared_sex +inferred_sex male +sex_check not_checked +sex_check_reason no declared sex +sites_genotyped 120 +depth_at_sites 30.0 +x_sites 39 +x_het 0 +x_hom_alt 39 +x_depth_ratio 0.50 +y_sites 5 +y_depth_ratio 0.47 +freemix +freemix_warn_above 0.03 +contamination not_run +panel_markers +verifybamid2_marker_check +same_person_as +verifybamid2_markers +contamination_confidence +contamination_confidence_reason +identity uncertain +identity_reason somalier genotyped 120 sites; telling one person from another needs 1,000 diff --git a/tests/parity/golden/qc-sample/no-declared-sex/stdout b/tests/parity/golden/qc-sample/no-declared-sex/stdout new file mode 100644 index 000000000..89fef7d34 --- /dev/null +++ b/tests/parity/golden/qc-sample/no-declared-sex/stdout @@ -0,0 +1,25 @@ + sample: S + somalier_id: S + declared_sex: + inferred_sex: male + sex_check: not_checked + sex_check_reason: no declared sex + sites_genotyped: 120 + depth_at_sites: 30.0 + x_sites: 39 + x_het: 0 + x_hom_alt: 39 + x_depth_ratio: 0.50 + y_sites: 5 + y_depth_ratio: 0.47 + freemix: + freemix_warn_above: 0.03 + contamination: not_run + panel_markers: + verifybamid2_marker_check: + same_person_as: + verifybamid2_markers: + contamination_confidence: + contamination_confidence_reason: + identity: uncertain + identity_reason: somalier genotyped 120 sites; telling one person from another needs 1,000 diff --git a/tests/parity/golden/qc-sample/pedigree-female/q.tsv b/tests/parity/golden/qc-sample/pedigree-female/q.tsv new file mode 100644 index 000000000..2953690ee --- /dev/null +++ b/tests/parity/golden/qc-sample/pedigree-female/q.tsv @@ -0,0 +1,26 @@ +key value +sample S +somalier_id S +declared_sex female +inferred_sex male +sex_check mismatch +sex_check_reason declared female, somalier infers male +sites_genotyped 120 +depth_at_sites 30.0 +x_sites 39 +x_het 0 +x_hom_alt 39 +x_depth_ratio 0.50 +y_sites 5 +y_depth_ratio 0.47 +freemix +freemix_warn_above 0.03 +contamination not_run +panel_markers +verifybamid2_marker_check +same_person_as +verifybamid2_markers +contamination_confidence +contamination_confidence_reason +identity uncertain +identity_reason somalier genotyped 120 sites; telling one person from another needs 1,000 diff --git a/tests/parity/golden/qc-sample/pedigree-female/stdout b/tests/parity/golden/qc-sample/pedigree-female/stdout new file mode 100644 index 000000000..d48d0cc64 --- /dev/null +++ b/tests/parity/golden/qc-sample/pedigree-female/stdout @@ -0,0 +1,25 @@ + sample: S + somalier_id: S + declared_sex: female + inferred_sex: male + sex_check: mismatch + sex_check_reason: declared female, somalier infers male + sites_genotyped: 120 + depth_at_sites: 30.0 + x_sites: 39 + x_het: 0 + x_hom_alt: 39 + x_depth_ratio: 0.50 + y_sites: 5 + y_depth_ratio: 0.47 + freemix: + freemix_warn_above: 0.03 + contamination: not_run + panel_markers: + verifybamid2_marker_check: + same_person_as: + verifybamid2_markers: + contamination_confidence: + contamination_confidence_reason: + identity: uncertain + identity_reason: somalier genotyped 120 sites; telling one person from another needs 1,000 diff --git a/tests/parity/golden/qc-sample/pedigree-kept/q.tsv b/tests/parity/golden/qc-sample/pedigree-kept/q.tsv new file mode 100644 index 000000000..52aa8f6c9 --- /dev/null +++ b/tests/parity/golden/qc-sample/pedigree-kept/q.tsv @@ -0,0 +1,26 @@ +key value +sample S +somalier_id S +declared_sex male +inferred_sex unknown +sex_check not_checked +sex_check_reason somalier could not tell the sex from 2 chrX sites (it needs more than 10 with reads, and allele balances that look like one person) +sites_genotyped 120 +depth_at_sites 30.0 +x_sites 2 +x_het 0 +x_hom_alt 2 +x_depth_ratio 0.50 +y_sites 5 +y_depth_ratio 0.47 +freemix +freemix_warn_above 0.03 +contamination not_run +panel_markers +verifybamid2_marker_check +same_person_as +verifybamid2_markers +contamination_confidence +contamination_confidence_reason +identity uncertain +identity_reason somalier genotyped 120 sites; telling one person from another needs 1,000 diff --git a/tests/parity/golden/qc-sample/pedigree-kept/stdout b/tests/parity/golden/qc-sample/pedigree-kept/stdout new file mode 100644 index 000000000..b1d245627 --- /dev/null +++ b/tests/parity/golden/qc-sample/pedigree-kept/stdout @@ -0,0 +1,25 @@ + sample: S + somalier_id: S + declared_sex: male + inferred_sex: unknown + sex_check: not_checked + sex_check_reason: somalier could not tell the sex from 2 chrX sites (it needs more than 10 with reads, and allele balances that look like one person) + sites_genotyped: 120 + depth_at_sites: 30.0 + x_sites: 2 + x_het: 0 + x_hom_alt: 2 + x_depth_ratio: 0.50 + y_sites: 5 + y_depth_ratio: 0.47 + freemix: + freemix_warn_above: 0.03 + contamination: not_run + panel_markers: + verifybamid2_marker_check: + same_person_as: + verifybamid2_markers: + contamination_confidence: + contamination_confidence_reason: + identity: uncertain + identity_reason: somalier genotyped 120 sites; telling one person from another needs 1,000 diff --git a/tests/parity/golden/qc-sample/somalier-name/q.tsv b/tests/parity/golden/qc-sample/somalier-name/q.tsv new file mode 100644 index 000000000..0d5ed2139 --- /dev/null +++ b/tests/parity/golden/qc-sample/somalier-name/q.tsv @@ -0,0 +1,26 @@ +key value +sample X +somalier_id T +declared_sex +inferred_sex female +sex_check not_checked +sex_check_reason no declared sex +sites_genotyped 120 +depth_at_sites 30.0 +x_sites 40 +x_het 20 +x_hom_alt 20 +x_depth_ratio 0.50 +y_sites 5 +y_depth_ratio 0.47 +freemix +freemix_warn_above 0.03 +contamination not_run +panel_markers +verifybamid2_marker_check +same_person_as S (0.95), U (0.99) +verifybamid2_markers +contamination_confidence +contamination_confidence_reason +identity uncertain +identity_reason somalier genotyped 120 sites; telling one person from another needs 1,000 diff --git a/tests/parity/golden/qc-sample/somalier-name/stdout b/tests/parity/golden/qc-sample/somalier-name/stdout new file mode 100644 index 000000000..7a6d5f73f --- /dev/null +++ b/tests/parity/golden/qc-sample/somalier-name/stdout @@ -0,0 +1,25 @@ + sample: X + somalier_id: T + declared_sex: + inferred_sex: female + sex_check: not_checked + sex_check_reason: no declared sex + sites_genotyped: 120 + depth_at_sites: 30.0 + x_sites: 40 + x_het: 20 + x_hom_alt: 20 + x_depth_ratio: 0.50 + y_sites: 5 + y_depth_ratio: 0.47 + freemix: + freemix_warn_above: 0.03 + contamination: not_run + panel_markers: + verifybamid2_marker_check: + same_person_as: S (0.95), U (0.99) + verifybamid2_markers: + contamination_confidence: + contamination_confidence_reason: + identity: uncertain + identity_reason: somalier genotyped 120 sites; telling one person from another needs 1,000 diff --git a/tests/parity/golden/qc-sample/threshold-sci/q.tsv b/tests/parity/golden/qc-sample/threshold-sci/q.tsv new file mode 100644 index 000000000..8d0e7bd49 --- /dev/null +++ b/tests/parity/golden/qc-sample/threshold-sci/q.tsv @@ -0,0 +1,26 @@ +key value +sample S +somalier_id S +declared_sex +inferred_sex male +sex_check not_checked +sex_check_reason no declared sex +sites_genotyped 120 +depth_at_sites 30.0 +x_sites 39 +x_het 0 +x_hom_alt 39 +x_depth_ratio 0.50 +y_sites 5 +y_depth_ratio 0.47 +freemix 0.0412 +freemix_warn_above 0.05 +contamination ok +panel_markers 10000 +verifybamid2_marker_check +same_person_as +verifybamid2_markers +contamination_confidence uncertain +contamination_confidence_reason the number of markers FREEMIX rests on is not known +identity uncertain +identity_reason somalier genotyped 120 sites; telling one person from another needs 1,000 diff --git a/tests/parity/golden/qc-sample/threshold-sci/stdout b/tests/parity/golden/qc-sample/threshold-sci/stdout new file mode 100644 index 000000000..bb863410a --- /dev/null +++ b/tests/parity/golden/qc-sample/threshold-sci/stdout @@ -0,0 +1,25 @@ + sample: S + somalier_id: S + declared_sex: + inferred_sex: male + sex_check: not_checked + sex_check_reason: no declared sex + sites_genotyped: 120 + depth_at_sites: 30.0 + x_sites: 39 + x_het: 0 + x_hom_alt: 39 + x_depth_ratio: 0.50 + y_sites: 5 + y_depth_ratio: 0.47 + freemix: 0.0412 + freemix_warn_above: 0.05 + contamination: ok + panel_markers: 10000 + verifybamid2_marker_check: + same_person_as: + verifybamid2_markers: + contamination_confidence: uncertain + contamination_confidence_reason: the number of markers FREEMIX rests on is not known + identity: uncertain + identity_reason: somalier genotyped 120 sites; telling one person from another needs 1,000 diff --git a/tests/parity/golden/qc-sample/x-and-y-undeclared/q.tsv b/tests/parity/golden/qc-sample/x-and-y-undeclared/q.tsv new file mode 100644 index 000000000..9d1a54c10 --- /dev/null +++ b/tests/parity/golden/qc-sample/x-and-y-undeclared/q.tsv @@ -0,0 +1,26 @@ +key value +sample S +somalier_id S +declared_sex +inferred_sex unknown +sex_check not_checked +sex_check_reason chrX is heterozygous like a female sample but chrY has reads: a sex-chromosome aneuploidy or a mixed sample +sites_genotyped 120 +depth_at_sites 30.0 +x_sites 40 +x_het 20 +x_hom_alt 20 +x_depth_ratio 0.50 +y_sites 5 +y_depth_ratio 0.47 +freemix +freemix_warn_above 0.03 +contamination not_run +panel_markers +verifybamid2_marker_check +same_person_as +verifybamid2_markers +contamination_confidence +contamination_confidence_reason +identity uncertain +identity_reason somalier genotyped 120 sites; telling one person from another needs 1,000 diff --git a/tests/parity/golden/qc-sample/x-and-y-undeclared/stdout b/tests/parity/golden/qc-sample/x-and-y-undeclared/stdout new file mode 100644 index 000000000..fca49020b --- /dev/null +++ b/tests/parity/golden/qc-sample/x-and-y-undeclared/stdout @@ -0,0 +1,25 @@ + sample: S + somalier_id: S + declared_sex: + inferred_sex: unknown + sex_check: not_checked + sex_check_reason: chrX is heterozygous like a female sample but chrY has reads: a sex-chromosome aneuploidy or a mixed sample + sites_genotyped: 120 + depth_at_sites: 30.0 + x_sites: 40 + x_het: 20 + x_hom_alt: 20 + x_depth_ratio: 0.50 + y_sites: 5 + y_depth_ratio: 0.47 + freemix: + freemix_warn_above: 0.03 + contamination: not_run + panel_markers: + verifybamid2_marker_check: + same_person_as: + verifybamid2_markers: + contamination_confidence: + contamination_confidence_reason: + identity: uncertain + identity_reason: somalier genotyped 120 sites; telling one person from another needs 1,000 diff --git a/tests/parity/golden/qc-sample/x-and-y-unknown/q.tsv b/tests/parity/golden/qc-sample/x-and-y-unknown/q.tsv new file mode 100644 index 000000000..032b3a829 --- /dev/null +++ b/tests/parity/golden/qc-sample/x-and-y-unknown/q.tsv @@ -0,0 +1,26 @@ +key value +sample S +somalier_id S +declared_sex female +inferred_sex unknown +sex_check not_checked +sex_check_reason somalier could not tell the sex from 4 chrX sites (it needs more than 10 with reads, and allele balances that look like one person) +sites_genotyped 120 +depth_at_sites 30.0 +x_sites 4 +x_het 0 +x_hom_alt 4 +x_depth_ratio 0.50 +y_sites 5 +y_depth_ratio 0.47 +freemix +freemix_warn_above 0.03 +contamination not_run +panel_markers +verifybamid2_marker_check +same_person_as +verifybamid2_markers +contamination_confidence +contamination_confidence_reason +identity uncertain +identity_reason somalier genotyped 120 sites; telling one person from another needs 1,000 diff --git a/tests/parity/golden/qc-sample/x-and-y-unknown/stdout b/tests/parity/golden/qc-sample/x-and-y-unknown/stdout new file mode 100644 index 000000000..e12a601cb --- /dev/null +++ b/tests/parity/golden/qc-sample/x-and-y-unknown/stdout @@ -0,0 +1,25 @@ + sample: S + somalier_id: S + declared_sex: female + inferred_sex: unknown + sex_check: not_checked + sex_check_reason: somalier could not tell the sex from 4 chrX sites (it needs more than 10 with reads, and allele balances that look like one person) + sites_genotyped: 120 + depth_at_sites: 30.0 + x_sites: 4 + x_het: 0 + x_hom_alt: 4 + x_depth_ratio: 0.50 + y_sites: 5 + y_depth_ratio: 0.47 + freemix: + freemix_warn_above: 0.03 + contamination: not_run + panel_markers: + verifybamid2_marker_check: + same_person_as: + verifybamid2_markers: + contamination_confidence: + contamination_confidence_reason: + identity: uncertain + identity_reason: somalier genotyped 120 sites; telling one person from another needs 1,000 diff --git a/tests/parity/golden/qc-sample/x-and-y/q.tsv b/tests/parity/golden/qc-sample/x-and-y/q.tsv new file mode 100644 index 000000000..801ea9177 --- /dev/null +++ b/tests/parity/golden/qc-sample/x-and-y/q.tsv @@ -0,0 +1,26 @@ +key value +sample S +somalier_id S +declared_sex female +inferred_sex unknown +sex_check not_checked +sex_check_reason chrX is heterozygous like a female sample but chrY has reads: a sex-chromosome aneuploidy or a mixed sample +sites_genotyped 120 +depth_at_sites 30.0 +x_sites 40 +x_het 20 +x_hom_alt 20 +x_depth_ratio 0.50 +y_sites 5 +y_depth_ratio 0.47 +freemix +freemix_warn_above 0.03 +contamination not_run +panel_markers +verifybamid2_marker_check +same_person_as +verifybamid2_markers +contamination_confidence +contamination_confidence_reason +identity uncertain +identity_reason somalier genotyped 120 sites; telling one person from another needs 1,000 diff --git a/tests/parity/golden/qc-sample/x-and-y/stdout b/tests/parity/golden/qc-sample/x-and-y/stdout new file mode 100644 index 000000000..31d987381 --- /dev/null +++ b/tests/parity/golden/qc-sample/x-and-y/stdout @@ -0,0 +1,25 @@ + sample: S + somalier_id: S + declared_sex: female + inferred_sex: unknown + sex_check: not_checked + sex_check_reason: chrX is heterozygous like a female sample but chrY has reads: a sex-chromosome aneuploidy or a mixed sample + sites_genotyped: 120 + depth_at_sites: 30.0 + x_sites: 40 + x_het: 20 + x_hom_alt: 20 + x_depth_ratio: 0.50 + y_sites: 5 + y_depth_ratio: 0.47 + freemix: + freemix_warn_above: 0.03 + contamination: not_run + panel_markers: + verifybamid2_marker_check: + same_person_as: + verifybamid2_markers: + contamination_confidence: + contamination_confidence_reason: + identity: uncertain + identity_reason: somalier genotyped 120 sites; telling one person from another needs 1,000 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 5c8f30782..e663f2649 100644 --- a/tests/parity/golden/summary-collect/all-history/all-history.json +++ b/tests/parity/golden/summary-collect/all-history/all-history.json @@ -1,7 +1,7 @@ { "schema_version": 2, "sample": "S", - "generated_utc": "2026-11-16 16:16 UTC", + "generated_utc": "2026-11-19 11:33 UTC", "run": { "status_file": true, "started_utc": "2020-01-01 00:00 UTC", @@ -12197,7 +12197,8 @@ "OR9G9", "TAS2R45" ] - } + }, + "partial": "partial: covers 1 of 22 autosomes" }, "sex_check": { "title": "Sex check (indexcov)", @@ -13432,7 +13433,8 @@ "EUR", "AFR" ], - "effect": "HR 1.5 (EUR)" + "effect": "HR 1.5 (EUR)", + "percentile_note": "" }, { "condition": "T2D", @@ -13447,7 +13449,8 @@ "percentile": "", "group": "", "evaluated_in": [], - "effect": "" + "effect": "", + "percentile_note": "percentile withheld: the input lists variants only" }, { "condition": "Short", @@ -13462,7 +13465,8 @@ "percentile": "", "group": null, "evaluated_in": null, - "effect": "" + "effect": "", + "percentile_note": "" } ], "adjusted": true, @@ -13471,7 +13475,8 @@ "panel": "HGDP+1kGP", "low_confidence": null } - } + }, + "partial": "partial: covers 1 of 22 autosomes" }, "ancestry_fine": { "title": "Fine-grained ancestry (ADMIXTURE, RFMix)", @@ -13559,7 +13564,8 @@ "colour": "#56b4e9" } ] - } + }, + "partial": "partial: covers 1 of 22 autosomes" }, "manta": { "title": "Structural variants (Manta)", @@ -14033,7 +14039,8 @@ "depth": 30.0, "read_floor": 2000, "low_reads": true - } + }, + "partial": "partial: covers 1 of 22 autosomes" }, "roh": { "title": "Runs of homozygosity", @@ -14105,7 +14112,8 @@ "partial": false, "note": "Sites on all 22 autosomes; marker presence does not establish callable breadth or copy neutrality." } - } + }, + "partial": "partial: covers 1 of 22 autosomes" }, "haplogroup": { "title": "Mitochondrial haplogroup", @@ -14808,7 +14816,8 @@ "analysed_bp": 2500000000, "neanderthal_percent": "2.00", "denisovan_percent": "0.01" - } + }, + "partial": "partial: covers 1 of 22 autosomes" }, "ancient": { "title": "Ancient populations (AADR PCA)", @@ -15533,6 +15542,16 @@ "Phase: two variants in one gene are compound-het candidates, not confirmed", "Variants of uncertain significance (not interpreted)" ], + "scope": { + "autosomes_covered": 1, + "autosomes": [ + "chr22" + ], + "chrx": false, + "intervals": null, + "partial": true, + "mark": "partial: covers 1 of 22 autosomes" + }, "recheck": { "checked_utc": "2021-03-05 00:00:00 UTC", "items": [ diff --git a/tests/parity/golden/summary-collect/all/all.json b/tests/parity/golden/summary-collect/all/all.json index 04eb170a4..240801087 100644 --- a/tests/parity/golden/summary-collect/all/all.json +++ b/tests/parity/golden/summary-collect/all/all.json @@ -1,7 +1,7 @@ { "schema_version": 2, "sample": "S", - "generated_utc": "2026-11-16 16:16 UTC", + "generated_utc": "2026-11-19 11:33 UTC", "run": { "status_file": true, "started_utc": "2020-01-01 00:00 UTC", @@ -12202,7 +12202,8 @@ "OR9G9", "TAS2R45" ] - } + }, + "partial": "partial: covers 1 of 22 autosomes" }, "sex_check": { "title": "Sex check (indexcov)", @@ -13437,7 +13438,8 @@ "EUR", "AFR" ], - "effect": "HR 1.5 (EUR)" + "effect": "HR 1.5 (EUR)", + "percentile_note": "" }, { "condition": "T2D", @@ -13452,7 +13454,8 @@ "percentile": "", "group": "", "evaluated_in": [], - "effect": "" + "effect": "", + "percentile_note": "percentile withheld: the input lists variants only" }, { "condition": "Short", @@ -13467,7 +13470,8 @@ "percentile": "", "group": null, "evaluated_in": null, - "effect": "" + "effect": "", + "percentile_note": "" } ], "adjusted": true, @@ -13476,7 +13480,8 @@ "panel": "HGDP+1kGP", "low_confidence": null } - } + }, + "partial": "partial: covers 1 of 22 autosomes" }, "ancestry_fine": { "title": "Fine-grained ancestry (ADMIXTURE, RFMix)", @@ -13564,7 +13569,8 @@ "colour": "#56b4e9" } ] - } + }, + "partial": "partial: covers 1 of 22 autosomes" }, "manta": { "title": "Structural variants (Manta)", @@ -14038,7 +14044,8 @@ "depth": 30.0, "read_floor": 2000, "low_reads": true - } + }, + "partial": "partial: covers 1 of 22 autosomes" }, "roh": { "title": "Runs of homozygosity", @@ -14110,7 +14117,8 @@ "partial": false, "note": "Sites on all 22 autosomes; marker presence does not establish callable breadth or copy neutrality." } - } + }, + "partial": "partial: covers 1 of 22 autosomes" }, "haplogroup": { "title": "Mitochondrial haplogroup", @@ -14813,7 +14821,8 @@ "analysed_bp": 2500000000, "neanderthal_percent": "2.00", "denisovan_percent": "0.01" - } + }, + "partial": "partial: covers 1 of 22 autosomes" }, "ancient": { "title": "Ancient populations (AADR PCA)", @@ -15537,5 +15546,15 @@ "Repeat expansions outside the ExpansionHunter catalog", "Phase: two variants in one gene are compound-het candidates, not confirmed", "Variants of uncertain significance (not interpreted)" - ] + ], + "scope": { + "autosomes_covered": 1, + "autosomes": [ + "chr22" + ], + "chrx": false, + "intervals": null, + "partial": true, + "mark": "partial: covers 1 of 22 autosomes" + } } 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 fe0d2bc76..ebeaa0777 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 @@ -479,7 +479,8 @@ "EUR", "AFR" ], - "effect": "HR 1.5 (EUR)" + "effect": "HR 1.5 (EUR)", + "percentile_note": "" }, { "condition": "T2D", @@ -494,7 +495,8 @@ "percentile": "", "group": "", "evaluated_in": [], - "effect": "" + "effect": "", + "percentile_note": "percentile withheld: the input lists variants only" }, { "condition": "Short", @@ -509,7 +511,8 @@ "percentile": "", "group": null, "evaluated_in": null, - "effect": "" + "effect": "", + "percentile_note": "" } ], "adjusted": true, 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 8b5c095b0..fefaebc93 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 @@ -479,7 +479,8 @@ "EUR", "AFR" ], - "effect": "HR 1.5 (EUR)" + "effect": "HR 1.5 (EUR)", + "percentile_note": "" }, { "condition": "T2D", @@ -494,7 +495,8 @@ "percentile": "", "group": "", "evaluated_in": [], - "effect": "" + "effect": "", + "percentile_note": "percentile withheld: the input lists variants only" }, { "condition": "Short", @@ -509,7 +511,8 @@ "percentile": "", "group": null, "evaluated_in": null, - "effect": "" + "effect": "", + "percentile_note": "" } ], "adjusted": true, 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 537b20016..5580a7bd1 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 @@ -479,7 +479,8 @@ "EUR", "AFR" ], - "effect": "HR 1.5 (EUR)" + "effect": "HR 1.5 (EUR)", + "percentile_note": "" }, { "condition": "T2D", @@ -494,7 +495,8 @@ "percentile": "", "group": "", "evaluated_in": [], - "effect": "" + "effect": "", + "percentile_note": "percentile withheld: the input lists variants only" }, { "condition": "Short", @@ -509,7 +511,8 @@ "percentile": "", "group": null, "evaluated_in": null, - "effect": "" + "effect": "", + "percentile_note": "" } ], "adjusted": true, diff --git a/tests/parity/golden/summary-collect/c-full/full.json b/tests/parity/golden/summary-collect/c-full/full.json index 5787626ec..6021171e3 100644 --- a/tests/parity/golden/summary-collect/c-full/full.json +++ b/tests/parity/golden/summary-collect/c-full/full.json @@ -582,7 +582,8 @@ "EUR", "AFR" ], - "effect": "HR 1.5 (EUR)" + "effect": "HR 1.5 (EUR)", + "percentile_note": "" }, { "condition": "T2D", @@ -597,7 +598,8 @@ "percentile": "", "group": "", "evaluated_in": [], - "effect": "" + "effect": "", + "percentile_note": "percentile withheld: the input lists variants only" }, { "condition": "Short", @@ -612,7 +614,8 @@ "percentile": "", "group": null, "evaluated_in": null, - "effect": "" + "effect": "", + "percentile_note": "" } ], "adjusted": true, diff --git a/tests/parity/golden/traits/shared-vocabulary/rules-out.tsv b/tests/parity/golden/traits/shared-vocabulary/rules-out.tsv new file mode 100644 index 000000000..c65e252d3 --- /dev/null +++ b/tests/parity/golden/traits/shared-vocabulary/rules-out.tsv @@ -0,0 +1,10 @@ +rule gene trait rsids chrom pos genotypes gq phase result status reading ancestry note pmids +APOE APOE APOE alleles (e2, e3, e4) rs429358,rs7412 chr19 44908684,44908822 T/G,C/T 40,40 . . other_allele Not read: needs a genotype at both rs429358 and rs7412. yes Odds ratios from a meta-analysis of people of European descent (Farrer 1997); the e4 effect was weaker in African American and Hispanic people and stronger in Japanese people. Step 25's Alzheimer's score (PGS000334) includes the same two sites; docs/42-traits.md says why step 06 does not list APOE. 8346443,9343467 +TAS2R38 TAS2R38 Bitter taste haplotype (TAS2R38, PTC and PROP) rs713598,rs1726866,rs10246939 chr7 141973545,141972905,141972804 .,.,. .,.,. . . not_covered Not read: needs a genotype at every one of rs713598, rs1726866 and rs10246939. no The three TAS2R38 sites of the traits table read together: PAV (Pro49, Ala262, Val296) is the taster form and AVI (Ala49, Val262, Ile296) the non-taster form. Kim 2003 found five haplotypes worldwide; this rule reads the two common ones, and a copy with another (AAV, AAI, PVI or a rarer one) is not read. TAS2R38 lies on the minus strand, so the alleles here are the complement of the codon bases. 12595690,15723792 +APOL1 APOL1 APOL1 kidney risk variants (G1 read, G2 not read) rs73885319,rs60910145 chr22 36265860,36265988 .,. .,. . . not_covered Not read: needs a genotype at both rs73885319 and rs60910145. yes G1 is two missense changes that sit on one copy, S342G (rs73885319) and I384M (rs60910145), in perfect linkage disequilibrium in Genovese 2010, so they are read together without phase. G2 (rs71785313) is a 6-base deletion of N388 and Y389; this rule table reads single-base sites only, so this rule does not read G2 and a G2 copy reads as G0 here; the HTML report reads G2 from the sample's VCF beside this result (og summary collect). G1 and G2 never share a copy. In African Americans, two risk copies (G1 or G2) went with focal segmental glomerulosclerosis (odds ratio 10.5) and hypertension-attributed end-stage kidney disease (odds ratio 7.3), and one copy did not raise the risk (a recessive pattern). Both variants are common on African chromosomes and were absent from the European chromosomes studied. 20647424 +SERPINA1 SERPINA1 Alpha-1 antitrypsin Pi type (M, S, Z) rs17580,rs28929474 chr14 94380925,94378610 .,. .,. . . not_covered Not read: needs a genotype at both rs17580 and rs28929474. yes The two common deficiency alleles of SERPINA1: S (Glu264Val, rs17580) and Z (Glu342Lys, rs28929474). SERPINA1 lies on the minus strand, so the alleles here are the complement of the codon bases. M stands for a copy with neither S nor Z; other deficiency and null alleles are not read. The readings follow the ATS/ERS 2003 standards; a serum alpha-1 antitrypsin level confirms a deficiency. Z is most common in people of northern European descent. 14522813 +HFE HFE HFE haemochromatosis genotype (C282Y, H63D) rs1800562,rs1799945 chr6 26092913,26090951 .,. .,. . . not_covered Not read: needs a genotype at both rs1800562 and rs1799945. yes The two HFE missense changes of Feder 1996: C282Y (rs1800562), found homozygous in 83% of 178 patients with hereditary haemochromatosis, and H63D (rs1799945). The two sites are about 2 kb apart, too far for most read pairs to phase: heterozygous at both reads as C282Y/H63D, one change on each copy, and the reading says it assumes that. Many people with a risk genotype never build up iron; ferritin and transferrin saturation tell. The secondary-findings list reports C282Y homozygotes too (assets/acmg_sf.tsv); this line is the reading of every genotype. C282Y is most common in people of northern European descent. 8696333 +GC GC Vitamin D-binding protein type (Gc1F, Gc1S, Gc2) rs7041,rs4588 chr4 71752617,71752606 .,. .,. . . not_covered Not read: needs a genotype at both rs7041 and rs4588. yes rs7041 (Asp432Glu) and rs4588 (Thr436Lys) together give the three common vitamin D-binding protein types: Gc1F (Asp, Thr), Gc1S (Glu, Thr) and Gc2 (Asp, Lys). GC lies on the minus strand, so the alleles here are the complement of the codon bases. In Powe 2013 the two sites explained 79.4% of the variation in the protein level and 9.9% of that of total 25-hydroxyvitamin D. Gc1F was the most common type in black participants and Gc1S in white ones. The monoclonal assay that study used was questioned in later letters, so the protein levels are those of that assay. A protein type, not a vitamin D deficiency. 24256378 +CAD9p21 CDKN2B-AS1 Chromosome 9p21 heart disease risk haplotype rs10757278,rs1333049 chr9 22124478,22125504 .,. .,. . . not_covered Not read: needs a genotype at both rs10757278 and rs1333049. yes Two tags of the 9p21 risk haplotype near CDKN2A and CDKN2B: rs10757278 (G, Helgadottir 2007, myocardial infarction) and rs1333049 (C, the strongest coronary artery disease signal of the WTCCC 2007 scan). McPherson 2007 found the same interval, with no link to cholesterol, blood pressure or diabetes. The two are read together as tags of one haplotype; heterozygous at both reads as one risk copy, and the reading says it assumes both risk alleles sit on that copy. A copy with only one of the two risk alleles is not read. The studies were of people of European descent. 17478679,17554300,17478681 +MAPT MAPT 17q21.31 inversion lineage (H1, H2) rs1052553,rs8070723 chr17 45996523,46003698 .,. .,. . . not_covered Not read: needs a genotype at both rs1052553 and rs8070723. yes The 17q21.31 region around MAPT comes in two lineages, H1 and H2, that differ by a 900-kb inversion and do not recombine (Stefansson 2005); H2 was found in about 20% of European chromosomes, rarely in Africans and almost never in East Asians. Two H1/H2 tags are read together: rs1052553 in MAPT (A is H1, Wider 2010) and rs8070723 (Hoglinger 2011's proxy for H1/H2, its minor allele G in H2). A copy with H1 at one tag and H2 at the other is not read. GRCh38 carries H1. 15654335,19912324,21685912 +SHARE SHARE Shared position test rs999999991,rs999999992 chr19 44908684,44908822 T/G,C/T 40,40 not_used carrier called One alternate copy. Phase unknown: this reading assumes rs999999991 G and rs999999992 T sit on one copy (the copies h0 and h1); no phasing ran (no BAM, or phasing failed), so that is not checked. no Synthetic alternate allele vocabulary. 1 diff --git a/tests/parity/golden/y-str-report/calls/o.csv b/tests/parity/golden/y-str-report/calls/o.csv new file mode 100644 index 000000000..4b925a03c --- /dev/null +++ b/tests/parity/golden/y-str-report/calls/o.csv @@ -0,0 +1,112 @@ +marker,value,confidence +DYS393,13,low +DYS390,22,low +DYS19,,no call +DYS391,11.2,low +DYS385a,,not callable +DYS385b,,not callable +DYS426,12,low +DYS388,12,low +DYS439,,not callable +DYS389I,12,low +DYS392,12.2,low +DYS389II,,not callable +DYS458,16,low +DYS459a,,not callable +DYS459b,,not callable +DYS455,,no call +DYS454,,no call +DYS447,,not callable +DYS437,,not callable +DYS448,,not callable +DYS449,36,low +DYS464a,,not callable +DYS464b,,not callable +DYS464c,,not callable +DYS464d,,not callable +DYS460,,no call +Y-GATA-H4,,no call +YCAIIa,,not callable +YCAIIb,,not callable +DYS456,,no call +DYS607,,no call +DYS576,,no call +DYS570,,no call +CDYa,,not callable +CDYb,,not callable +DYS442,,no call +DYS438,,no call +DYS531,,no call +DYS578,,no call +DYF395S1a,,not callable +DYF395S1b,,not callable +DYS590,,no call +DYS537,,no call +DYS641,,no call +DYS472,,no call +DYF406S1,,no call +DYS511,,no call +DYS425,,no call +DYS413a,,not callable +DYS413b,,not callable +DYS557,,no call +DYS594,,no call +DYS436,,no call +DYS490,,no call +DYS534,,no call +DYS450,,no call +DYS444,,no call +DYS481,,no call +DYS520,,no call +DYS446,,no call +DYS617,,no call +DYS568,,no call +DYS487,,no call +DYS572,,no call +DYS640,,no call +DYS492,,no call +DYS565,,no call +DYS710,,not callable +DYS485,,no call +DYS632,,no call +DYS495,,no call +DYS540,,no call +DYS714,,no call +DYS716,,not callable +DYS717,,no call +DYS505,,no call +DYS556,,no call +DYS549,,no call +DYS589,,no call +DYS522,,no call +DYS494,,no call +DYS533,,no call +DYS636,,no call +DYS575,,no call +DYS638,,no call +DYS462,,no call +DYS452,,not callable +DYS445,,no call +Y-GATA-A10,,no call +DYS463,,no call +DYS441,,not callable +Y-GGAAT-1B07,,not callable +DYS525,,no call +DYS712,,not callable +DYS593,,no call +DYS650,,not callable +DYS532,,no call +DYS715,,not callable +DYS504,,no call +DYS513,,no call +DYS561,,no call +DYS552,,no call +DYS726,,not callable +DYS635,,no call +DYS587,,no call +DYS643,,no call +DYS497,,no call +DYS510,26,low +DYS434,,no call +DYS461,,no call +DYS435,,no call diff --git a/tests/parity/golden/y-str-report/calls/o.tsv b/tests/parity/golden/y-str-report/calls/o.tsv new file mode 100644 index 000000000..cd7cab69d --- /dev/null +++ b/tests/parity/golden/y-str-report/calls/o.tsv @@ -0,0 +1,112 @@ +order panel marker count confidence reads stutter_reads flank_indel_reads q note +1 Y-12 DYS393 13 low 20 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; no per-read lengths (MALLREADS) to show that the reads agree +2 Y-12 DYS390 22 low 20 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; no per-read lengths (MALLREADS) to show that the reads agree +3 Y-12 DYS19 no call DYS19/DYS394: two lengths on the Y chromosome (GB 0|4) +4 Y-12 DYS391 11.2 low 20 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; no per-read lengths (MALLREADS) to show that the reads agree +5 Y-12 DYS385a not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +6 Y-12 DYS385b not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +7 Y-12 DYS426 12 low 20 0 0 0.6 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; posterior 0.6 below 0.9; no per-read lengths (MALLREADS) to show that the reads agree +8 Y-12 DYS388 12 low 20 5 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; 5 of 20 reads with stutter; no per-read lengths (MALLREADS) to show that the reads agree +9 Y-12 DYS439 not callable not callable: no region for it in the HipSTR marker set +10 Y-12 DYS389I 12 low 20 0 4 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; 4 of 20 reads with a flank indel; no per-read lengths (MALLREADS) to show that the reads agree +11 Y-12 DYS392 12.2 low 20 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; no per-read lengths (MALLREADS) to show that the reads agree +12 Y-12 DYS389II not callable not callable from short reads: a 164 bp repeat is longer than 150 bp reads can span with 10 bases on each side +13 Y-25 DYS458 16 low 6 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; 6 reads, fewer than 10; no per-read lengths (MALLREADS) to show that the reads agree +14 Y-25 DYS459a not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +15 Y-25 DYS459b not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +16 Y-25 DYS455 no call DYS455: HipSTR made no genotype +17 Y-25 DYS454 no call DYS454: unreadable GB x +18 Y-25 DYS447 not callable not callable: no region for it in the HipSTR marker set +19 Y-25 DYS437 not callable not callable: no region for it in the HipSTR marker set +20 Y-25 DYS448 not callable not callable from short reads: a 156 bp repeat is longer than 150 bp reads can span with 10 bases on each side +21 Y-25 DYS449 36 low 20 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; DYS449.1: no per-read lengths (MALLREADS) to show that the reads agree; DYS449.2: no per-read lengths (MALLREADS) to show that the reads agree +22 Y-25 DYS464a not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +23 Y-25 DYS464b not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +24 Y-25 DYS464c not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +25 Y-25 DYS464d not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +26 Y-37 DYS460 no call HipSTR wrote no record for DYS460; see HipSTR's log +27 Y-37 Y-GATA-H4 no call HipSTR wrote no record for Y-GATA-H4; see HipSTR's log +28 Y-37 YCAIIa not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +29 Y-37 YCAIIb not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +30 Y-37 DYS456 no call HipSTR wrote no record for DYS456; see HipSTR's log +31 Y-37 DYS607 no call HipSTR wrote no record for DYS607; see HipSTR's log +32 Y-37 DYS576 no call HipSTR wrote no record for DYS576; see HipSTR's log +33 Y-37 DYS570 no call HipSTR wrote no record for DYS570; see HipSTR's log +34 Y-37 CDYa not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +35 Y-37 CDYb not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +36 Y-37 DYS442 no call HipSTR wrote no record for DYS442; see HipSTR's log +37 Y-37 DYS438 no call HipSTR wrote no record for DYS438; see HipSTR's log +38 Y-67 DYS531 no call HipSTR wrote no record for DYS531; see HipSTR's log +39 Y-67 DYS578 no call HipSTR wrote no record for DYS578; see HipSTR's log +40 Y-67 DYF395S1a not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +41 Y-67 DYF395S1b not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +42 Y-67 DYS590 no call HipSTR wrote no record for DYS590; see HipSTR's log +43 Y-67 DYS537 no call HipSTR wrote no record for DYS537; see HipSTR's log +44 Y-67 DYS641 no call HipSTR wrote no record for DYS641; see HipSTR's log +45 Y-67 DYS472 no call HipSTR wrote no record for DYS472; see HipSTR's log +46 Y-67 DYF406S1 no call HipSTR wrote no record for DYF406S1; see HipSTR's log +47 Y-67 DYS511 no call HipSTR wrote no record for DYS511; see HipSTR's log +48 Y-67 DYS425 no call HipSTR wrote no record for DYS425; see HipSTR's log +49 Y-67 DYS413a not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +50 Y-67 DYS413b not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +51 Y-67 DYS557 no call HipSTR wrote no record for DYS557; see HipSTR's log +52 Y-67 DYS594 no call HipSTR wrote no record for DYS594; see HipSTR's log +53 Y-67 DYS436 no call HipSTR wrote no record for DYS436; see HipSTR's log +54 Y-67 DYS490 no call HipSTR wrote no record for DYS490; see HipSTR's log +55 Y-67 DYS534 no call HipSTR wrote no record for DYS534; see HipSTR's log +56 Y-67 DYS450 no call HipSTR wrote no record for DYS450; see HipSTR's log +57 Y-67 DYS444 no call HipSTR wrote no record for DYS444; see HipSTR's log +58 Y-67 DYS481 no call HipSTR wrote no record for DYS481; see HipSTR's log +59 Y-67 DYS520 no call HipSTR wrote no record for DYS520; see HipSTR's log +60 Y-67 DYS446 no call HipSTR wrote no record for DYS446; see HipSTR's log +61 Y-67 DYS617 no call HipSTR wrote no record for DYS617; see HipSTR's log +62 Y-67 DYS568 no call HipSTR wrote no record for DYS568; see HipSTR's log +63 Y-67 DYS487 no call HipSTR wrote no record for DYS487; see HipSTR's log +64 Y-67 DYS572 no call HipSTR wrote no record for DYS572; see HipSTR's log +65 Y-67 DYS640 no call HipSTR wrote no record for DYS640; see HipSTR's log +66 Y-67 DYS492 no call HipSTR wrote no record for DYS492; see HipSTR's log +67 Y-67 DYS565 no call HipSTR wrote no record for DYS565; see HipSTR's log +68 Y-111 DYS710 not callable not callable: no region for it in the HipSTR marker set +69 Y-111 DYS485 no call HipSTR wrote no record for DYS485; see HipSTR's log +70 Y-111 DYS632 no call HipSTR wrote no record for DYS632; see HipSTR's log +71 Y-111 DYS495 no call HipSTR wrote no record for DYS495; see HipSTR's log +72 Y-111 DYS540 no call HipSTR wrote no record for DYS540; see HipSTR's log +73 Y-111 DYS714 no call HipSTR wrote no record for DYS714; see HipSTR's log +74 Y-111 DYS716 not callable not callable: no region for it in the HipSTR marker set +75 Y-111 DYS717 no call HipSTR wrote no record for DYS717; see HipSTR's log +76 Y-111 DYS505 no call HipSTR wrote no record for DYS505; see HipSTR's log +77 Y-111 DYS556 no call HipSTR wrote no record for DYS556; see HipSTR's log +78 Y-111 DYS549 no call HipSTR wrote no record for DYS549; see HipSTR's log +79 Y-111 DYS589 no call HipSTR wrote no record for DYS589; see HipSTR's log +80 Y-111 DYS522 no call HipSTR wrote no record for DYS522; see HipSTR's log +81 Y-111 DYS494 no call HipSTR wrote no record for DYS494; see HipSTR's log +82 Y-111 DYS533 no call HipSTR wrote no record for DYS533; see HipSTR's log +83 Y-111 DYS636 no call HipSTR wrote no record for DYS636; see HipSTR's log +84 Y-111 DYS575 no call HipSTR wrote no record for DYS575; see HipSTR's log +85 Y-111 DYS638 no call HipSTR wrote no record for DYS638; see HipSTR's log +86 Y-111 DYS462 no call HipSTR wrote no record for DYS462; see HipSTR's log +87 Y-111 DYS452 not callable not callable from short reads: a 155 bp repeat is longer than 150 bp reads can span with 10 bases on each side +88 Y-111 DYS445 no call HipSTR wrote no record for DYS445; see HipSTR's log +89 Y-111 Y-GATA-A10 no call HipSTR wrote no record for Y-GATA-A10; see HipSTR's log +90 Y-111 DYS463 no call HipSTR wrote no record for DYS463; see HipSTR's log +91 Y-111 DYS441 not callable not callable: no region for it in the HipSTR marker set +92 Y-111 Y-GGAAT-1B07 not callable not callable: no region for it in the HipSTR marker set +93 Y-111 DYS525 no call HipSTR wrote no record for DYS525; see HipSTR's log +94 Y-111 DYS712 not callable not callable: no region for it in the HipSTR marker set +95 Y-111 DYS593 no call HipSTR wrote no record for DYS593; see HipSTR's log +96 Y-111 DYS650 not callable not callable: no region for it in the HipSTR marker set +97 Y-111 DYS532 no call HipSTR wrote no record for DYS532; see HipSTR's log +98 Y-111 DYS715 not callable not callable: no region for it in the HipSTR marker set +99 Y-111 DYS504 no call HipSTR wrote no record for DYS504; see HipSTR's log +100 Y-111 DYS513 no call HipSTR wrote no record for DYS513; see HipSTR's log +101 Y-111 DYS561 no call HipSTR wrote no record for DYS561; see HipSTR's log +102 Y-111 DYS552 no call HipSTR wrote no record for DYS552.2; see HipSTR's log +103 Y-111 DYS726 not callable not callable: no region for it in the HipSTR marker set +104 Y-111 DYS635 no call HipSTR wrote no record for DYS635; see HipSTR's log +105 Y-111 DYS587 no call HipSTR wrote no record for DYS587; see HipSTR's log +106 Y-111 DYS643 no call HipSTR wrote no record for DYS643; see HipSTR's log +107 Y-111 DYS497 no call HipSTR wrote no record for DYS497; see HipSTR's log +108 Y-111 DYS510 26 low 20 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; no per-read lengths (MALLREADS) to show that the reads agree +109 Y-111 DYS434 no call HipSTR wrote no record for DYS434; see HipSTR's log +110 Y-111 DYS461 no call HipSTR wrote no record for DYS461; see HipSTR's log +111 Y-111 DYS435 no call HipSTR wrote no record for DYS435; see HipSTR's log diff --git a/tests/parity/golden/y-str-report/calls/stdout b/tests/parity/golden/y-str-report/calls/stdout new file mode 100644 index 000000000..a0d13f61b --- /dev/null +++ b/tests/parity/golden/y-str-report/calls/stdout @@ -0,0 +1 @@ +Y-STR markers: 0 high, 10 low, 71 no call, 30 not callable diff --git a/tests/parity/golden/y-str-report/empty-log/o.csv b/tests/parity/golden/y-str-report/empty-log/o.csv new file mode 100644 index 000000000..4b925a03c --- /dev/null +++ b/tests/parity/golden/y-str-report/empty-log/o.csv @@ -0,0 +1,112 @@ +marker,value,confidence +DYS393,13,low +DYS390,22,low +DYS19,,no call +DYS391,11.2,low +DYS385a,,not callable +DYS385b,,not callable +DYS426,12,low +DYS388,12,low +DYS439,,not callable +DYS389I,12,low +DYS392,12.2,low +DYS389II,,not callable +DYS458,16,low +DYS459a,,not callable +DYS459b,,not callable +DYS455,,no call +DYS454,,no call +DYS447,,not callable +DYS437,,not callable +DYS448,,not callable +DYS449,36,low +DYS464a,,not callable +DYS464b,,not callable +DYS464c,,not callable +DYS464d,,not callable +DYS460,,no call +Y-GATA-H4,,no call +YCAIIa,,not callable +YCAIIb,,not callable +DYS456,,no call +DYS607,,no call +DYS576,,no call +DYS570,,no call +CDYa,,not callable +CDYb,,not callable +DYS442,,no call +DYS438,,no call +DYS531,,no call +DYS578,,no call +DYF395S1a,,not callable +DYF395S1b,,not callable +DYS590,,no call +DYS537,,no call +DYS641,,no call +DYS472,,no call +DYF406S1,,no call +DYS511,,no call +DYS425,,no call +DYS413a,,not callable +DYS413b,,not callable +DYS557,,no call +DYS594,,no call +DYS436,,no call +DYS490,,no call +DYS534,,no call +DYS450,,no call +DYS444,,no call +DYS481,,no call +DYS520,,no call +DYS446,,no call +DYS617,,no call +DYS568,,no call +DYS487,,no call +DYS572,,no call +DYS640,,no call +DYS492,,no call +DYS565,,no call +DYS710,,not callable +DYS485,,no call +DYS632,,no call +DYS495,,no call +DYS540,,no call +DYS714,,no call +DYS716,,not callable +DYS717,,no call +DYS505,,no call +DYS556,,no call +DYS549,,no call +DYS589,,no call +DYS522,,no call +DYS494,,no call +DYS533,,no call +DYS636,,no call +DYS575,,no call +DYS638,,no call +DYS462,,no call +DYS452,,not callable +DYS445,,no call +Y-GATA-A10,,no call +DYS463,,no call +DYS441,,not callable +Y-GGAAT-1B07,,not callable +DYS525,,no call +DYS712,,not callable +DYS593,,no call +DYS650,,not callable +DYS532,,no call +DYS715,,not callable +DYS504,,no call +DYS513,,no call +DYS561,,no call +DYS552,,no call +DYS726,,not callable +DYS635,,no call +DYS587,,no call +DYS643,,no call +DYS497,,no call +DYS510,26,low +DYS434,,no call +DYS461,,no call +DYS435,,no call diff --git a/tests/parity/golden/y-str-report/empty-log/o.tsv b/tests/parity/golden/y-str-report/empty-log/o.tsv new file mode 100644 index 000000000..9faaa7b07 --- /dev/null +++ b/tests/parity/golden/y-str-report/empty-log/o.tsv @@ -0,0 +1,112 @@ +order panel marker count confidence reads stutter_reads flank_indel_reads q note +1 Y-12 DYS393 13 low 20 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; no per-read lengths (MALLREADS) to show that the reads agree +2 Y-12 DYS390 22 low 20 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; no per-read lengths (MALLREADS) to show that the reads agree +3 Y-12 DYS19 no call DYS19/DYS394: two lengths on the Y chromosome (GB 0|4) +4 Y-12 DYS391 11.2 low 20 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; no per-read lengths (MALLREADS) to show that the reads agree +5 Y-12 DYS385a not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +6 Y-12 DYS385b not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +7 Y-12 DYS426 12 low 20 0 0 0.6 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; posterior 0.6 below 0.9; no per-read lengths (MALLREADS) to show that the reads agree +8 Y-12 DYS388 12 low 20 5 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; 5 of 20 reads with stutter; no per-read lengths (MALLREADS) to show that the reads agree +9 Y-12 DYS439 not callable not callable: no region for it in the HipSTR marker set +10 Y-12 DYS389I 12 low 20 0 4 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; 4 of 20 reads with a flank indel; no per-read lengths (MALLREADS) to show that the reads agree +11 Y-12 DYS392 12.2 low 20 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; no per-read lengths (MALLREADS) to show that the reads agree +12 Y-12 DYS389II not callable not callable from short reads: a 164 bp repeat is longer than 150 bp reads can span with 10 bases on each side +13 Y-25 DYS458 16 low 6 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; 6 reads, fewer than 10; no per-read lengths (MALLREADS) to show that the reads agree +14 Y-25 DYS459a not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +15 Y-25 DYS459b not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +16 Y-25 DYS455 no call DYS455: HipSTR made no genotype +17 Y-25 DYS454 no call DYS454: unreadable GB x +18 Y-25 DYS447 not callable not callable: no region for it in the HipSTR marker set +19 Y-25 DYS437 not callable not callable: no region for it in the HipSTR marker set +20 Y-25 DYS448 not callable not callable from short reads: a 156 bp repeat is longer than 150 bp reads can span with 10 bases on each side +21 Y-25 DYS449 36 low 20 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; DYS449.1: no per-read lengths (MALLREADS) to show that the reads agree; DYS449.2: no per-read lengths (MALLREADS) to show that the reads agree +22 Y-25 DYS464a not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +23 Y-25 DYS464b not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +24 Y-25 DYS464c not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +25 Y-25 DYS464d not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +26 Y-37 DYS460 no call HipSTR wrote no record for DYS460, and its log gives no reason +27 Y-37 Y-GATA-H4 no call HipSTR wrote no record for Y-GATA-H4, and its log gives no reason +28 Y-37 YCAIIa not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +29 Y-37 YCAIIb not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +30 Y-37 DYS456 no call HipSTR wrote no record for DYS456, and its log gives no reason +31 Y-37 DYS607 no call HipSTR wrote no record for DYS607, and its log gives no reason +32 Y-37 DYS576 no call HipSTR wrote no record for DYS576, and its log gives no reason +33 Y-37 DYS570 no call HipSTR wrote no record for DYS570, and its log gives no reason +34 Y-37 CDYa not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +35 Y-37 CDYb not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +36 Y-37 DYS442 no call HipSTR wrote no record for DYS442, and its log gives no reason +37 Y-37 DYS438 no call HipSTR wrote no record for DYS438, and its log gives no reason +38 Y-67 DYS531 no call HipSTR wrote no record for DYS531, and its log gives no reason +39 Y-67 DYS578 no call HipSTR wrote no record for DYS578, and its log gives no reason +40 Y-67 DYF395S1a not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +41 Y-67 DYF395S1b not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +42 Y-67 DYS590 no call HipSTR wrote no record for DYS590, and its log gives no reason +43 Y-67 DYS537 no call HipSTR wrote no record for DYS537, and its log gives no reason +44 Y-67 DYS641 no call HipSTR wrote no record for DYS641, and its log gives no reason +45 Y-67 DYS472 no call HipSTR wrote no record for DYS472, and its log gives no reason +46 Y-67 DYF406S1 no call HipSTR wrote no record for DYF406S1, and its log gives no reason +47 Y-67 DYS511 no call HipSTR wrote no record for DYS511, and its log gives no reason +48 Y-67 DYS425 no call HipSTR wrote no record for DYS425, and its log gives no reason +49 Y-67 DYS413a not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +50 Y-67 DYS413b not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +51 Y-67 DYS557 no call HipSTR wrote no record for DYS557, and its log gives no reason +52 Y-67 DYS594 no call HipSTR wrote no record for DYS594, and its log gives no reason +53 Y-67 DYS436 no call HipSTR wrote no record for DYS436, and its log gives no reason +54 Y-67 DYS490 no call HipSTR wrote no record for DYS490, and its log gives no reason +55 Y-67 DYS534 no call HipSTR wrote no record for DYS534, and its log gives no reason +56 Y-67 DYS450 no call HipSTR wrote no record for DYS450, and its log gives no reason +57 Y-67 DYS444 no call HipSTR wrote no record for DYS444, and its log gives no reason +58 Y-67 DYS481 no call HipSTR wrote no record for DYS481, and its log gives no reason +59 Y-67 DYS520 no call HipSTR wrote no record for DYS520, and its log gives no reason +60 Y-67 DYS446 no call HipSTR wrote no record for DYS446, and its log gives no reason +61 Y-67 DYS617 no call HipSTR wrote no record for DYS617, and its log gives no reason +62 Y-67 DYS568 no call HipSTR wrote no record for DYS568, and its log gives no reason +63 Y-67 DYS487 no call HipSTR wrote no record for DYS487, and its log gives no reason +64 Y-67 DYS572 no call HipSTR wrote no record for DYS572, and its log gives no reason +65 Y-67 DYS640 no call HipSTR wrote no record for DYS640, and its log gives no reason +66 Y-67 DYS492 no call HipSTR wrote no record for DYS492, and its log gives no reason +67 Y-67 DYS565 no call HipSTR wrote no record for DYS565, and its log gives no reason +68 Y-111 DYS710 not callable not callable: no region for it in the HipSTR marker set +69 Y-111 DYS485 no call HipSTR wrote no record for DYS485, and its log gives no reason +70 Y-111 DYS632 no call HipSTR wrote no record for DYS632, and its log gives no reason +71 Y-111 DYS495 no call HipSTR wrote no record for DYS495, and its log gives no reason +72 Y-111 DYS540 no call HipSTR wrote no record for DYS540, and its log gives no reason +73 Y-111 DYS714 no call HipSTR wrote no record for DYS714, and its log gives no reason +74 Y-111 DYS716 not callable not callable: no region for it in the HipSTR marker set +75 Y-111 DYS717 no call HipSTR wrote no record for DYS717, and its log gives no reason +76 Y-111 DYS505 no call HipSTR wrote no record for DYS505, and its log gives no reason +77 Y-111 DYS556 no call HipSTR wrote no record for DYS556, and its log gives no reason +78 Y-111 DYS549 no call HipSTR wrote no record for DYS549, and its log gives no reason +79 Y-111 DYS589 no call HipSTR wrote no record for DYS589, and its log gives no reason +80 Y-111 DYS522 no call HipSTR wrote no record for DYS522, and its log gives no reason +81 Y-111 DYS494 no call HipSTR wrote no record for DYS494, and its log gives no reason +82 Y-111 DYS533 no call HipSTR wrote no record for DYS533, and its log gives no reason +83 Y-111 DYS636 no call HipSTR wrote no record for DYS636, and its log gives no reason +84 Y-111 DYS575 no call HipSTR wrote no record for DYS575, and its log gives no reason +85 Y-111 DYS638 no call HipSTR wrote no record for DYS638, and its log gives no reason +86 Y-111 DYS462 no call HipSTR wrote no record for DYS462, and its log gives no reason +87 Y-111 DYS452 not callable not callable from short reads: a 155 bp repeat is longer than 150 bp reads can span with 10 bases on each side +88 Y-111 DYS445 no call HipSTR wrote no record for DYS445, and its log gives no reason +89 Y-111 Y-GATA-A10 no call HipSTR wrote no record for Y-GATA-A10, and its log gives no reason +90 Y-111 DYS463 no call HipSTR wrote no record for DYS463, and its log gives no reason +91 Y-111 DYS441 not callable not callable: no region for it in the HipSTR marker set +92 Y-111 Y-GGAAT-1B07 not callable not callable: no region for it in the HipSTR marker set +93 Y-111 DYS525 no call HipSTR wrote no record for DYS525, and its log gives no reason +94 Y-111 DYS712 not callable not callable: no region for it in the HipSTR marker set +95 Y-111 DYS593 no call HipSTR wrote no record for DYS593, and its log gives no reason +96 Y-111 DYS650 not callable not callable: no region for it in the HipSTR marker set +97 Y-111 DYS532 no call HipSTR wrote no record for DYS532, and its log gives no reason +98 Y-111 DYS715 not callable not callable: no region for it in the HipSTR marker set +99 Y-111 DYS504 no call HipSTR wrote no record for DYS504, and its log gives no reason +100 Y-111 DYS513 no call HipSTR wrote no record for DYS513, and its log gives no reason +101 Y-111 DYS561 no call HipSTR wrote no record for DYS561, and its log gives no reason +102 Y-111 DYS552 no call HipSTR wrote no record for DYS552.2, and its log gives no reason +103 Y-111 DYS726 not callable not callable: no region for it in the HipSTR marker set +104 Y-111 DYS635 no call HipSTR wrote no record for DYS635, and its log gives no reason +105 Y-111 DYS587 no call HipSTR wrote no record for DYS587, and its log gives no reason +106 Y-111 DYS643 no call HipSTR wrote no record for DYS643, and its log gives no reason +107 Y-111 DYS497 no call HipSTR wrote no record for DYS497, and its log gives no reason +108 Y-111 DYS510 26 low 20 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; no per-read lengths (MALLREADS) to show that the reads agree +109 Y-111 DYS434 no call HipSTR wrote no record for DYS434, and its log gives no reason +110 Y-111 DYS461 no call HipSTR wrote no record for DYS461, and its log gives no reason +111 Y-111 DYS435 no call HipSTR wrote no record for DYS435, and its log gives no reason diff --git a/tests/parity/golden/y-str-report/empty-log/stdout b/tests/parity/golden/y-str-report/empty-log/stdout new file mode 100644 index 000000000..a0d13f61b --- /dev/null +++ b/tests/parity/golden/y-str-report/empty-log/stdout @@ -0,0 +1 @@ +Y-STR markers: 0 high, 10 low, 71 no call, 30 not callable diff --git a/tests/parity/golden/y-str-report/log/o.csv b/tests/parity/golden/y-str-report/log/o.csv new file mode 100644 index 000000000..4b925a03c --- /dev/null +++ b/tests/parity/golden/y-str-report/log/o.csv @@ -0,0 +1,112 @@ +marker,value,confidence +DYS393,13,low +DYS390,22,low +DYS19,,no call +DYS391,11.2,low +DYS385a,,not callable +DYS385b,,not callable +DYS426,12,low +DYS388,12,low +DYS439,,not callable +DYS389I,12,low +DYS392,12.2,low +DYS389II,,not callable +DYS458,16,low +DYS459a,,not callable +DYS459b,,not callable +DYS455,,no call +DYS454,,no call +DYS447,,not callable +DYS437,,not callable +DYS448,,not callable +DYS449,36,low +DYS464a,,not callable +DYS464b,,not callable +DYS464c,,not callable +DYS464d,,not callable +DYS460,,no call +Y-GATA-H4,,no call +YCAIIa,,not callable +YCAIIb,,not callable +DYS456,,no call +DYS607,,no call +DYS576,,no call +DYS570,,no call +CDYa,,not callable +CDYb,,not callable +DYS442,,no call +DYS438,,no call +DYS531,,no call +DYS578,,no call +DYF395S1a,,not callable +DYF395S1b,,not callable +DYS590,,no call +DYS537,,no call +DYS641,,no call +DYS472,,no call +DYF406S1,,no call +DYS511,,no call +DYS425,,no call +DYS413a,,not callable +DYS413b,,not callable +DYS557,,no call +DYS594,,no call +DYS436,,no call +DYS490,,no call +DYS534,,no call +DYS450,,no call +DYS444,,no call +DYS481,,no call +DYS520,,no call +DYS446,,no call +DYS617,,no call +DYS568,,no call +DYS487,,no call +DYS572,,no call +DYS640,,no call +DYS492,,no call +DYS565,,no call +DYS710,,not callable +DYS485,,no call +DYS632,,no call +DYS495,,no call +DYS540,,no call +DYS714,,no call +DYS716,,not callable +DYS717,,no call +DYS505,,no call +DYS556,,no call +DYS549,,no call +DYS589,,no call +DYS522,,no call +DYS494,,no call +DYS533,,no call +DYS636,,no call +DYS575,,no call +DYS638,,no call +DYS462,,no call +DYS452,,not callable +DYS445,,no call +Y-GATA-A10,,no call +DYS463,,no call +DYS441,,not callable +Y-GGAAT-1B07,,not callable +DYS525,,no call +DYS712,,not callable +DYS593,,no call +DYS650,,not callable +DYS532,,no call +DYS715,,not callable +DYS504,,no call +DYS513,,no call +DYS561,,no call +DYS552,,no call +DYS726,,not callable +DYS635,,no call +DYS587,,no call +DYS643,,no call +DYS497,,no call +DYS510,26,low +DYS434,,no call +DYS461,,no call +DYS435,,no call diff --git a/tests/parity/golden/y-str-report/log/o.tsv b/tests/parity/golden/y-str-report/log/o.tsv new file mode 100644 index 000000000..9faaa7b07 --- /dev/null +++ b/tests/parity/golden/y-str-report/log/o.tsv @@ -0,0 +1,112 @@ +order panel marker count confidence reads stutter_reads flank_indel_reads q note +1 Y-12 DYS393 13 low 20 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; no per-read lengths (MALLREADS) to show that the reads agree +2 Y-12 DYS390 22 low 20 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; no per-read lengths (MALLREADS) to show that the reads agree +3 Y-12 DYS19 no call DYS19/DYS394: two lengths on the Y chromosome (GB 0|4) +4 Y-12 DYS391 11.2 low 20 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; no per-read lengths (MALLREADS) to show that the reads agree +5 Y-12 DYS385a not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +6 Y-12 DYS385b not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +7 Y-12 DYS426 12 low 20 0 0 0.6 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; posterior 0.6 below 0.9; no per-read lengths (MALLREADS) to show that the reads agree +8 Y-12 DYS388 12 low 20 5 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; 5 of 20 reads with stutter; no per-read lengths (MALLREADS) to show that the reads agree +9 Y-12 DYS439 not callable not callable: no region for it in the HipSTR marker set +10 Y-12 DYS389I 12 low 20 0 4 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; 4 of 20 reads with a flank indel; no per-read lengths (MALLREADS) to show that the reads agree +11 Y-12 DYS392 12.2 low 20 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; no per-read lengths (MALLREADS) to show that the reads agree +12 Y-12 DYS389II not callable not callable from short reads: a 164 bp repeat is longer than 150 bp reads can span with 10 bases on each side +13 Y-25 DYS458 16 low 6 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; 6 reads, fewer than 10; no per-read lengths (MALLREADS) to show that the reads agree +14 Y-25 DYS459a not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +15 Y-25 DYS459b not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +16 Y-25 DYS455 no call DYS455: HipSTR made no genotype +17 Y-25 DYS454 no call DYS454: unreadable GB x +18 Y-25 DYS447 not callable not callable: no region for it in the HipSTR marker set +19 Y-25 DYS437 not callable not callable: no region for it in the HipSTR marker set +20 Y-25 DYS448 not callable not callable from short reads: a 156 bp repeat is longer than 150 bp reads can span with 10 bases on each side +21 Y-25 DYS449 36 low 20 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; DYS449.1: no per-read lengths (MALLREADS) to show that the reads agree; DYS449.2: no per-read lengths (MALLREADS) to show that the reads agree +22 Y-25 DYS464a not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +23 Y-25 DYS464b not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +24 Y-25 DYS464c not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +25 Y-25 DYS464d not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +26 Y-37 DYS460 no call HipSTR wrote no record for DYS460, and its log gives no reason +27 Y-37 Y-GATA-H4 no call HipSTR wrote no record for Y-GATA-H4, and its log gives no reason +28 Y-37 YCAIIa not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +29 Y-37 YCAIIb not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +30 Y-37 DYS456 no call HipSTR wrote no record for DYS456, and its log gives no reason +31 Y-37 DYS607 no call HipSTR wrote no record for DYS607, and its log gives no reason +32 Y-37 DYS576 no call HipSTR wrote no record for DYS576, and its log gives no reason +33 Y-37 DYS570 no call HipSTR wrote no record for DYS570, and its log gives no reason +34 Y-37 CDYa not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +35 Y-37 CDYb not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +36 Y-37 DYS442 no call HipSTR wrote no record for DYS442, and its log gives no reason +37 Y-37 DYS438 no call HipSTR wrote no record for DYS438, and its log gives no reason +38 Y-67 DYS531 no call HipSTR wrote no record for DYS531, and its log gives no reason +39 Y-67 DYS578 no call HipSTR wrote no record for DYS578, and its log gives no reason +40 Y-67 DYF395S1a not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +41 Y-67 DYF395S1b not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +42 Y-67 DYS590 no call HipSTR wrote no record for DYS590, and its log gives no reason +43 Y-67 DYS537 no call HipSTR wrote no record for DYS537, and its log gives no reason +44 Y-67 DYS641 no call HipSTR wrote no record for DYS641, and its log gives no reason +45 Y-67 DYS472 no call HipSTR wrote no record for DYS472, and its log gives no reason +46 Y-67 DYF406S1 no call HipSTR wrote no record for DYF406S1, and its log gives no reason +47 Y-67 DYS511 no call HipSTR wrote no record for DYS511, and its log gives no reason +48 Y-67 DYS425 no call HipSTR wrote no record for DYS425, and its log gives no reason +49 Y-67 DYS413a not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +50 Y-67 DYS413b not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +51 Y-67 DYS557 no call HipSTR wrote no record for DYS557, and its log gives no reason +52 Y-67 DYS594 no call HipSTR wrote no record for DYS594, and its log gives no reason +53 Y-67 DYS436 no call HipSTR wrote no record for DYS436, and its log gives no reason +54 Y-67 DYS490 no call HipSTR wrote no record for DYS490, and its log gives no reason +55 Y-67 DYS534 no call HipSTR wrote no record for DYS534, and its log gives no reason +56 Y-67 DYS450 no call HipSTR wrote no record for DYS450, and its log gives no reason +57 Y-67 DYS444 no call HipSTR wrote no record for DYS444, and its log gives no reason +58 Y-67 DYS481 no call HipSTR wrote no record for DYS481, and its log gives no reason +59 Y-67 DYS520 no call HipSTR wrote no record for DYS520, and its log gives no reason +60 Y-67 DYS446 no call HipSTR wrote no record for DYS446, and its log gives no reason +61 Y-67 DYS617 no call HipSTR wrote no record for DYS617, and its log gives no reason +62 Y-67 DYS568 no call HipSTR wrote no record for DYS568, and its log gives no reason +63 Y-67 DYS487 no call HipSTR wrote no record for DYS487, and its log gives no reason +64 Y-67 DYS572 no call HipSTR wrote no record for DYS572, and its log gives no reason +65 Y-67 DYS640 no call HipSTR wrote no record for DYS640, and its log gives no reason +66 Y-67 DYS492 no call HipSTR wrote no record for DYS492, and its log gives no reason +67 Y-67 DYS565 no call HipSTR wrote no record for DYS565, and its log gives no reason +68 Y-111 DYS710 not callable not callable: no region for it in the HipSTR marker set +69 Y-111 DYS485 no call HipSTR wrote no record for DYS485, and its log gives no reason +70 Y-111 DYS632 no call HipSTR wrote no record for DYS632, and its log gives no reason +71 Y-111 DYS495 no call HipSTR wrote no record for DYS495, and its log gives no reason +72 Y-111 DYS540 no call HipSTR wrote no record for DYS540, and its log gives no reason +73 Y-111 DYS714 no call HipSTR wrote no record for DYS714, and its log gives no reason +74 Y-111 DYS716 not callable not callable: no region for it in the HipSTR marker set +75 Y-111 DYS717 no call HipSTR wrote no record for DYS717, and its log gives no reason +76 Y-111 DYS505 no call HipSTR wrote no record for DYS505, and its log gives no reason +77 Y-111 DYS556 no call HipSTR wrote no record for DYS556, and its log gives no reason +78 Y-111 DYS549 no call HipSTR wrote no record for DYS549, and its log gives no reason +79 Y-111 DYS589 no call HipSTR wrote no record for DYS589, and its log gives no reason +80 Y-111 DYS522 no call HipSTR wrote no record for DYS522, and its log gives no reason +81 Y-111 DYS494 no call HipSTR wrote no record for DYS494, and its log gives no reason +82 Y-111 DYS533 no call HipSTR wrote no record for DYS533, and its log gives no reason +83 Y-111 DYS636 no call HipSTR wrote no record for DYS636, and its log gives no reason +84 Y-111 DYS575 no call HipSTR wrote no record for DYS575, and its log gives no reason +85 Y-111 DYS638 no call HipSTR wrote no record for DYS638, and its log gives no reason +86 Y-111 DYS462 no call HipSTR wrote no record for DYS462, and its log gives no reason +87 Y-111 DYS452 not callable not callable from short reads: a 155 bp repeat is longer than 150 bp reads can span with 10 bases on each side +88 Y-111 DYS445 no call HipSTR wrote no record for DYS445, and its log gives no reason +89 Y-111 Y-GATA-A10 no call HipSTR wrote no record for Y-GATA-A10, and its log gives no reason +90 Y-111 DYS463 no call HipSTR wrote no record for DYS463, and its log gives no reason +91 Y-111 DYS441 not callable not callable: no region for it in the HipSTR marker set +92 Y-111 Y-GGAAT-1B07 not callable not callable: no region for it in the HipSTR marker set +93 Y-111 DYS525 no call HipSTR wrote no record for DYS525, and its log gives no reason +94 Y-111 DYS712 not callable not callable: no region for it in the HipSTR marker set +95 Y-111 DYS593 no call HipSTR wrote no record for DYS593, and its log gives no reason +96 Y-111 DYS650 not callable not callable: no region for it in the HipSTR marker set +97 Y-111 DYS532 no call HipSTR wrote no record for DYS532, and its log gives no reason +98 Y-111 DYS715 not callable not callable: no region for it in the HipSTR marker set +99 Y-111 DYS504 no call HipSTR wrote no record for DYS504, and its log gives no reason +100 Y-111 DYS513 no call HipSTR wrote no record for DYS513, and its log gives no reason +101 Y-111 DYS561 no call HipSTR wrote no record for DYS561, and its log gives no reason +102 Y-111 DYS552 no call HipSTR wrote no record for DYS552.2, and its log gives no reason +103 Y-111 DYS726 not callable not callable: no region for it in the HipSTR marker set +104 Y-111 DYS635 no call HipSTR wrote no record for DYS635, and its log gives no reason +105 Y-111 DYS587 no call HipSTR wrote no record for DYS587, and its log gives no reason +106 Y-111 DYS643 no call HipSTR wrote no record for DYS643, and its log gives no reason +107 Y-111 DYS497 no call HipSTR wrote no record for DYS497, and its log gives no reason +108 Y-111 DYS510 26 low 20 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; no per-read lengths (MALLREADS) to show that the reads agree +109 Y-111 DYS434 no call HipSTR wrote no record for DYS434, and its log gives no reason +110 Y-111 DYS461 no call HipSTR wrote no record for DYS461, and its log gives no reason +111 Y-111 DYS435 no call HipSTR wrote no record for DYS435, and its log gives no reason diff --git a/tests/parity/golden/y-str-report/log/stdout b/tests/parity/golden/y-str-report/log/stdout new file mode 100644 index 000000000..a0d13f61b --- /dev/null +++ b/tests/parity/golden/y-str-report/log/stdout @@ -0,0 +1 @@ +Y-STR markers: 0 high, 10 low, 71 no call, 30 not callable diff --git a/tests/parity/golden/y-str-report/plain-vcf/o.csv b/tests/parity/golden/y-str-report/plain-vcf/o.csv new file mode 100644 index 000000000..4b925a03c --- /dev/null +++ b/tests/parity/golden/y-str-report/plain-vcf/o.csv @@ -0,0 +1,112 @@ +marker,value,confidence +DYS393,13,low +DYS390,22,low +DYS19,,no call +DYS391,11.2,low +DYS385a,,not callable +DYS385b,,not callable +DYS426,12,low +DYS388,12,low +DYS439,,not callable +DYS389I,12,low +DYS392,12.2,low +DYS389II,,not callable +DYS458,16,low +DYS459a,,not callable +DYS459b,,not callable +DYS455,,no call +DYS454,,no call +DYS447,,not callable +DYS437,,not callable +DYS448,,not callable +DYS449,36,low +DYS464a,,not callable +DYS464b,,not callable +DYS464c,,not callable +DYS464d,,not callable +DYS460,,no call +Y-GATA-H4,,no call +YCAIIa,,not callable +YCAIIb,,not callable +DYS456,,no call +DYS607,,no call +DYS576,,no call +DYS570,,no call +CDYa,,not callable +CDYb,,not callable +DYS442,,no call +DYS438,,no call +DYS531,,no call +DYS578,,no call +DYF395S1a,,not callable +DYF395S1b,,not callable +DYS590,,no call +DYS537,,no call +DYS641,,no call +DYS472,,no call +DYF406S1,,no call +DYS511,,no call +DYS425,,no call +DYS413a,,not callable +DYS413b,,not callable +DYS557,,no call +DYS594,,no call +DYS436,,no call +DYS490,,no call +DYS534,,no call +DYS450,,no call +DYS444,,no call +DYS481,,no call +DYS520,,no call +DYS446,,no call +DYS617,,no call +DYS568,,no call +DYS487,,no call +DYS572,,no call +DYS640,,no call +DYS492,,no call +DYS565,,no call +DYS710,,not callable +DYS485,,no call +DYS632,,no call +DYS495,,no call +DYS540,,no call +DYS714,,no call +DYS716,,not callable +DYS717,,no call +DYS505,,no call +DYS556,,no call +DYS549,,no call +DYS589,,no call +DYS522,,no call +DYS494,,no call +DYS533,,no call +DYS636,,no call +DYS575,,no call +DYS638,,no call +DYS462,,no call +DYS452,,not callable +DYS445,,no call +Y-GATA-A10,,no call +DYS463,,no call +DYS441,,not callable +Y-GGAAT-1B07,,not callable +DYS525,,no call +DYS712,,not callable +DYS593,,no call +DYS650,,not callable +DYS532,,no call +DYS715,,not callable +DYS504,,no call +DYS513,,no call +DYS561,,no call +DYS552,,no call +DYS726,,not callable +DYS635,,no call +DYS587,,no call +DYS643,,no call +DYS497,,no call +DYS510,26,low +DYS434,,no call +DYS461,,no call +DYS435,,no call diff --git a/tests/parity/golden/y-str-report/plain-vcf/o.tsv b/tests/parity/golden/y-str-report/plain-vcf/o.tsv new file mode 100644 index 000000000..cd7cab69d --- /dev/null +++ b/tests/parity/golden/y-str-report/plain-vcf/o.tsv @@ -0,0 +1,112 @@ +order panel marker count confidence reads stutter_reads flank_indel_reads q note +1 Y-12 DYS393 13 low 20 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; no per-read lengths (MALLREADS) to show that the reads agree +2 Y-12 DYS390 22 low 20 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; no per-read lengths (MALLREADS) to show that the reads agree +3 Y-12 DYS19 no call DYS19/DYS394: two lengths on the Y chromosome (GB 0|4) +4 Y-12 DYS391 11.2 low 20 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; no per-read lengths (MALLREADS) to show that the reads agree +5 Y-12 DYS385a not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +6 Y-12 DYS385b not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +7 Y-12 DYS426 12 low 20 0 0 0.6 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; posterior 0.6 below 0.9; no per-read lengths (MALLREADS) to show that the reads agree +8 Y-12 DYS388 12 low 20 5 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; 5 of 20 reads with stutter; no per-read lengths (MALLREADS) to show that the reads agree +9 Y-12 DYS439 not callable not callable: no region for it in the HipSTR marker set +10 Y-12 DYS389I 12 low 20 0 4 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; 4 of 20 reads with a flank indel; no per-read lengths (MALLREADS) to show that the reads agree +11 Y-12 DYS392 12.2 low 20 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; no per-read lengths (MALLREADS) to show that the reads agree +12 Y-12 DYS389II not callable not callable from short reads: a 164 bp repeat is longer than 150 bp reads can span with 10 bases on each side +13 Y-25 DYS458 16 low 6 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; 6 reads, fewer than 10; no per-read lengths (MALLREADS) to show that the reads agree +14 Y-25 DYS459a not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +15 Y-25 DYS459b not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +16 Y-25 DYS455 no call DYS455: HipSTR made no genotype +17 Y-25 DYS454 no call DYS454: unreadable GB x +18 Y-25 DYS447 not callable not callable: no region for it in the HipSTR marker set +19 Y-25 DYS437 not callable not callable: no region for it in the HipSTR marker set +20 Y-25 DYS448 not callable not callable from short reads: a 156 bp repeat is longer than 150 bp reads can span with 10 bases on each side +21 Y-25 DYS449 36 low 20 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; DYS449.1: no per-read lengths (MALLREADS) to show that the reads agree; DYS449.2: no per-read lengths (MALLREADS) to show that the reads agree +22 Y-25 DYS464a not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +23 Y-25 DYS464b not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +24 Y-25 DYS464c not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +25 Y-25 DYS464d not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +26 Y-37 DYS460 no call HipSTR wrote no record for DYS460; see HipSTR's log +27 Y-37 Y-GATA-H4 no call HipSTR wrote no record for Y-GATA-H4; see HipSTR's log +28 Y-37 YCAIIa not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +29 Y-37 YCAIIb not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +30 Y-37 DYS456 no call HipSTR wrote no record for DYS456; see HipSTR's log +31 Y-37 DYS607 no call HipSTR wrote no record for DYS607; see HipSTR's log +32 Y-37 DYS576 no call HipSTR wrote no record for DYS576; see HipSTR's log +33 Y-37 DYS570 no call HipSTR wrote no record for DYS570; see HipSTR's log +34 Y-37 CDYa not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +35 Y-37 CDYb not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +36 Y-37 DYS442 no call HipSTR wrote no record for DYS442; see HipSTR's log +37 Y-37 DYS438 no call HipSTR wrote no record for DYS438; see HipSTR's log +38 Y-67 DYS531 no call HipSTR wrote no record for DYS531; see HipSTR's log +39 Y-67 DYS578 no call HipSTR wrote no record for DYS578; see HipSTR's log +40 Y-67 DYF395S1a not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +41 Y-67 DYF395S1b not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +42 Y-67 DYS590 no call HipSTR wrote no record for DYS590; see HipSTR's log +43 Y-67 DYS537 no call HipSTR wrote no record for DYS537; see HipSTR's log +44 Y-67 DYS641 no call HipSTR wrote no record for DYS641; see HipSTR's log +45 Y-67 DYS472 no call HipSTR wrote no record for DYS472; see HipSTR's log +46 Y-67 DYF406S1 no call HipSTR wrote no record for DYF406S1; see HipSTR's log +47 Y-67 DYS511 no call HipSTR wrote no record for DYS511; see HipSTR's log +48 Y-67 DYS425 no call HipSTR wrote no record for DYS425; see HipSTR's log +49 Y-67 DYS413a not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +50 Y-67 DYS413b not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +51 Y-67 DYS557 no call HipSTR wrote no record for DYS557; see HipSTR's log +52 Y-67 DYS594 no call HipSTR wrote no record for DYS594; see HipSTR's log +53 Y-67 DYS436 no call HipSTR wrote no record for DYS436; see HipSTR's log +54 Y-67 DYS490 no call HipSTR wrote no record for DYS490; see HipSTR's log +55 Y-67 DYS534 no call HipSTR wrote no record for DYS534; see HipSTR's log +56 Y-67 DYS450 no call HipSTR wrote no record for DYS450; see HipSTR's log +57 Y-67 DYS444 no call HipSTR wrote no record for DYS444; see HipSTR's log +58 Y-67 DYS481 no call HipSTR wrote no record for DYS481; see HipSTR's log +59 Y-67 DYS520 no call HipSTR wrote no record for DYS520; see HipSTR's log +60 Y-67 DYS446 no call HipSTR wrote no record for DYS446; see HipSTR's log +61 Y-67 DYS617 no call HipSTR wrote no record for DYS617; see HipSTR's log +62 Y-67 DYS568 no call HipSTR wrote no record for DYS568; see HipSTR's log +63 Y-67 DYS487 no call HipSTR wrote no record for DYS487; see HipSTR's log +64 Y-67 DYS572 no call HipSTR wrote no record for DYS572; see HipSTR's log +65 Y-67 DYS640 no call HipSTR wrote no record for DYS640; see HipSTR's log +66 Y-67 DYS492 no call HipSTR wrote no record for DYS492; see HipSTR's log +67 Y-67 DYS565 no call HipSTR wrote no record for DYS565; see HipSTR's log +68 Y-111 DYS710 not callable not callable: no region for it in the HipSTR marker set +69 Y-111 DYS485 no call HipSTR wrote no record for DYS485; see HipSTR's log +70 Y-111 DYS632 no call HipSTR wrote no record for DYS632; see HipSTR's log +71 Y-111 DYS495 no call HipSTR wrote no record for DYS495; see HipSTR's log +72 Y-111 DYS540 no call HipSTR wrote no record for DYS540; see HipSTR's log +73 Y-111 DYS714 no call HipSTR wrote no record for DYS714; see HipSTR's log +74 Y-111 DYS716 not callable not callable: no region for it in the HipSTR marker set +75 Y-111 DYS717 no call HipSTR wrote no record for DYS717; see HipSTR's log +76 Y-111 DYS505 no call HipSTR wrote no record for DYS505; see HipSTR's log +77 Y-111 DYS556 no call HipSTR wrote no record for DYS556; see HipSTR's log +78 Y-111 DYS549 no call HipSTR wrote no record for DYS549; see HipSTR's log +79 Y-111 DYS589 no call HipSTR wrote no record for DYS589; see HipSTR's log +80 Y-111 DYS522 no call HipSTR wrote no record for DYS522; see HipSTR's log +81 Y-111 DYS494 no call HipSTR wrote no record for DYS494; see HipSTR's log +82 Y-111 DYS533 no call HipSTR wrote no record for DYS533; see HipSTR's log +83 Y-111 DYS636 no call HipSTR wrote no record for DYS636; see HipSTR's log +84 Y-111 DYS575 no call HipSTR wrote no record for DYS575; see HipSTR's log +85 Y-111 DYS638 no call HipSTR wrote no record for DYS638; see HipSTR's log +86 Y-111 DYS462 no call HipSTR wrote no record for DYS462; see HipSTR's log +87 Y-111 DYS452 not callable not callable from short reads: a 155 bp repeat is longer than 150 bp reads can span with 10 bases on each side +88 Y-111 DYS445 no call HipSTR wrote no record for DYS445; see HipSTR's log +89 Y-111 Y-GATA-A10 no call HipSTR wrote no record for Y-GATA-A10; see HipSTR's log +90 Y-111 DYS463 no call HipSTR wrote no record for DYS463; see HipSTR's log +91 Y-111 DYS441 not callable not callable: no region for it in the HipSTR marker set +92 Y-111 Y-GGAAT-1B07 not callable not callable: no region for it in the HipSTR marker set +93 Y-111 DYS525 no call HipSTR wrote no record for DYS525; see HipSTR's log +94 Y-111 DYS712 not callable not callable: no region for it in the HipSTR marker set +95 Y-111 DYS593 no call HipSTR wrote no record for DYS593; see HipSTR's log +96 Y-111 DYS650 not callable not callable: no region for it in the HipSTR marker set +97 Y-111 DYS532 no call HipSTR wrote no record for DYS532; see HipSTR's log +98 Y-111 DYS715 not callable not callable: no region for it in the HipSTR marker set +99 Y-111 DYS504 no call HipSTR wrote no record for DYS504; see HipSTR's log +100 Y-111 DYS513 no call HipSTR wrote no record for DYS513; see HipSTR's log +101 Y-111 DYS561 no call HipSTR wrote no record for DYS561; see HipSTR's log +102 Y-111 DYS552 no call HipSTR wrote no record for DYS552.2; see HipSTR's log +103 Y-111 DYS726 not callable not callable: no region for it in the HipSTR marker set +104 Y-111 DYS635 no call HipSTR wrote no record for DYS635; see HipSTR's log +105 Y-111 DYS587 no call HipSTR wrote no record for DYS587; see HipSTR's log +106 Y-111 DYS643 no call HipSTR wrote no record for DYS643; see HipSTR's log +107 Y-111 DYS497 no call HipSTR wrote no record for DYS497; see HipSTR's log +108 Y-111 DYS510 26 low 20 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; no per-read lengths (MALLREADS) to show that the reads agree +109 Y-111 DYS434 no call HipSTR wrote no record for DYS434; see HipSTR's log +110 Y-111 DYS461 no call HipSTR wrote no record for DYS461; see HipSTR's log +111 Y-111 DYS435 no call HipSTR wrote no record for DYS435; see HipSTR's log diff --git a/tests/parity/golden/y-str-report/plain-vcf/stdout b/tests/parity/golden/y-str-report/plain-vcf/stdout new file mode 100644 index 000000000..a0d13f61b --- /dev/null +++ b/tests/parity/golden/y-str-report/plain-vcf/stdout @@ -0,0 +1 @@ +Y-STR markers: 0 high, 10 low, 71 no call, 30 not callable diff --git a/tests/parity/golden/y-str-report/read-length-250/o.csv b/tests/parity/golden/y-str-report/read-length-250/o.csv new file mode 100644 index 000000000..5f6cd99da --- /dev/null +++ b/tests/parity/golden/y-str-report/read-length-250/o.csv @@ -0,0 +1,112 @@ +marker,value,confidence +DYS393,13,low +DYS390,22,low +DYS19,,no call +DYS391,11.2,low +DYS385a,,not callable +DYS385b,,not callable +DYS426,12,low +DYS388,12,low +DYS439,,not callable +DYS389I,12,low +DYS392,12.2,low +DYS389II,29,low +DYS458,16,low +DYS459a,,not callable +DYS459b,,not callable +DYS455,,no call +DYS454,,no call +DYS447,,not callable +DYS437,,not callable +DYS448,20,low +DYS449,36,low +DYS464a,,not callable +DYS464b,,not callable +DYS464c,,not callable +DYS464d,,not callable +DYS460,,no call +Y-GATA-H4,,no call +YCAIIa,,not callable +YCAIIb,,not callable +DYS456,,no call +DYS607,,no call +DYS576,,no call +DYS570,,no call +CDYa,,not callable +CDYb,,not callable +DYS442,,no call +DYS438,,no call +DYS531,,no call +DYS578,,no call +DYF395S1a,,not callable +DYF395S1b,,not callable +DYS590,,no call +DYS537,,no call +DYS641,,no call +DYS472,,no call +DYF406S1,,no call +DYS511,,no call +DYS425,,no call +DYS413a,,not callable +DYS413b,,not callable +DYS557,,no call +DYS594,,no call +DYS436,,no call +DYS490,,no call +DYS534,,no call +DYS450,,no call +DYS444,,no call +DYS481,,no call +DYS520,,no call +DYS446,,no call +DYS617,,no call +DYS568,,no call +DYS487,,no call +DYS572,,no call +DYS640,,no call +DYS492,,no call +DYS565,,no call +DYS710,,not callable +DYS485,,no call +DYS632,,no call +DYS495,,no call +DYS540,,no call +DYS714,,no call +DYS716,,not callable +DYS717,,no call +DYS505,,no call +DYS556,,no call +DYS549,,no call +DYS589,,no call +DYS522,,no call +DYS494,,no call +DYS533,,no call +DYS636,,no call +DYS575,,no call +DYS638,,no call +DYS462,,no call +DYS452,31,low +DYS445,,no call +Y-GATA-A10,,no call +DYS463,,no call +DYS441,,not callable +Y-GGAAT-1B07,,not callable +DYS525,,no call +DYS712,,not callable +DYS593,,no call +DYS650,,not callable +DYS532,,no call +DYS715,,not callable +DYS504,,no call +DYS513,,no call +DYS561,,no call +DYS552,,no call +DYS726,,not callable +DYS635,,no call +DYS587,,no call +DYS643,,no call +DYS497,,no call +DYS510,26,low +DYS434,,no call +DYS461,,no call +DYS435,,no call diff --git a/tests/parity/golden/y-str-report/read-length-250/o.tsv b/tests/parity/golden/y-str-report/read-length-250/o.tsv new file mode 100644 index 000000000..2b4250b71 --- /dev/null +++ b/tests/parity/golden/y-str-report/read-length-250/o.tsv @@ -0,0 +1,112 @@ +order panel marker count confidence reads stutter_reads flank_indel_reads q note +1 Y-12 DYS393 13 low 20 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; no per-read lengths (MALLREADS) to show that the reads agree +2 Y-12 DYS390 22 low 20 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; no per-read lengths (MALLREADS) to show that the reads agree +3 Y-12 DYS19 no call DYS19/DYS394: two lengths on the Y chromosome (GB 0|4) +4 Y-12 DYS391 11.2 low 20 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; no per-read lengths (MALLREADS) to show that the reads agree +5 Y-12 DYS385a not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +6 Y-12 DYS385b not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +7 Y-12 DYS426 12 low 20 0 0 0.6 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; posterior 0.6 below 0.9; no per-read lengths (MALLREADS) to show that the reads agree +8 Y-12 DYS388 12 low 20 5 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; 5 of 20 reads with stutter; no per-read lengths (MALLREADS) to show that the reads agree +9 Y-12 DYS439 not callable not callable: no region for it in the HipSTR marker set +10 Y-12 DYS389I 12 low 20 0 4 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; 4 of 20 reads with a flank indel; no per-read lengths (MALLREADS) to show that the reads agree +11 Y-12 DYS392 12.2 low 20 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; no per-read lengths (MALLREADS) to show that the reads agree +12 Y-12 DYS389II 29 low 20 0 0 0.99 FamilyTreeDNA reports DYS389II as the sum total of DYS389I and DYS389II; the span starts where DYS389I starts, so this count covers DYS389I too; on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; no per-read lengths (MALLREADS) to show that the reads agree +13 Y-25 DYS458 16 low 6 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; 6 reads, fewer than 10; no per-read lengths (MALLREADS) to show that the reads agree +14 Y-25 DYS459a not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +15 Y-25 DYS459b not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +16 Y-25 DYS455 no call DYS455: HipSTR made no genotype +17 Y-25 DYS454 no call DYS454: unreadable GB x +18 Y-25 DYS447 not callable not callable: no region for it in the HipSTR marker set +19 Y-25 DYS437 not callable not callable: no region for it in the HipSTR marker set +20 Y-25 DYS448 20 low 20 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; no per-read lengths (MALLREADS) to show that the reads agree +21 Y-25 DYS449 36 low 20 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; DYS449.1: no per-read lengths (MALLREADS) to show that the reads agree; DYS449.2: no per-read lengths (MALLREADS) to show that the reads agree +22 Y-25 DYS464a not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +23 Y-25 DYS464b not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +24 Y-25 DYS464c not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +25 Y-25 DYS464d not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +26 Y-37 DYS460 no call HipSTR wrote no record for DYS460; see HipSTR's log +27 Y-37 Y-GATA-H4 no call HipSTR wrote no record for Y-GATA-H4; see HipSTR's log +28 Y-37 YCAIIa not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +29 Y-37 YCAIIb not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +30 Y-37 DYS456 no call HipSTR wrote no record for DYS456; see HipSTR's log +31 Y-37 DYS607 no call HipSTR wrote no record for DYS607; see HipSTR's log +32 Y-37 DYS576 no call HipSTR wrote no record for DYS576; see HipSTR's log +33 Y-37 DYS570 no call HipSTR wrote no record for DYS570; see HipSTR's log +34 Y-37 CDYa not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +35 Y-37 CDYb not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +36 Y-37 DYS442 no call HipSTR wrote no record for DYS442; see HipSTR's log +37 Y-37 DYS438 no call HipSTR wrote no record for DYS438; see HipSTR's log +38 Y-67 DYS531 no call HipSTR wrote no record for DYS531; see HipSTR's log +39 Y-67 DYS578 no call HipSTR wrote no record for DYS578; see HipSTR's log +40 Y-67 DYF395S1a not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +41 Y-67 DYF395S1b not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +42 Y-67 DYS590 no call HipSTR wrote no record for DYS590; see HipSTR's log +43 Y-67 DYS537 no call HipSTR wrote no record for DYS537; see HipSTR's log +44 Y-67 DYS641 no call HipSTR wrote no record for DYS641; see HipSTR's log +45 Y-67 DYS472 no call HipSTR wrote no record for DYS472; see HipSTR's log +46 Y-67 DYF406S1 no call HipSTR wrote no record for DYF406S1; see HipSTR's log +47 Y-67 DYS511 no call HipSTR wrote no record for DYS511; see HipSTR's log +48 Y-67 DYS425 no call HipSTR wrote no record for DYS425; see HipSTR's log +49 Y-67 DYS413a not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +50 Y-67 DYS413b not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +51 Y-67 DYS557 no call HipSTR wrote no record for DYS557; see HipSTR's log +52 Y-67 DYS594 no call HipSTR wrote no record for DYS594; see HipSTR's log +53 Y-67 DYS436 no call HipSTR wrote no record for DYS436; see HipSTR's log +54 Y-67 DYS490 no call HipSTR wrote no record for DYS490; see HipSTR's log +55 Y-67 DYS534 no call HipSTR wrote no record for DYS534; see HipSTR's log +56 Y-67 DYS450 no call HipSTR wrote no record for DYS450; see HipSTR's log +57 Y-67 DYS444 no call HipSTR wrote no record for DYS444; see HipSTR's log +58 Y-67 DYS481 no call HipSTR wrote no record for DYS481; see HipSTR's log +59 Y-67 DYS520 no call HipSTR wrote no record for DYS520; see HipSTR's log +60 Y-67 DYS446 no call HipSTR wrote no record for DYS446; see HipSTR's log +61 Y-67 DYS617 no call HipSTR wrote no record for DYS617; see HipSTR's log +62 Y-67 DYS568 no call HipSTR wrote no record for DYS568; see HipSTR's log +63 Y-67 DYS487 no call HipSTR wrote no record for DYS487; see HipSTR's log +64 Y-67 DYS572 no call HipSTR wrote no record for DYS572; see HipSTR's log +65 Y-67 DYS640 no call HipSTR wrote no record for DYS640; see HipSTR's log +66 Y-67 DYS492 no call HipSTR wrote no record for DYS492; see HipSTR's log +67 Y-67 DYS565 no call HipSTR wrote no record for DYS565; see HipSTR's log +68 Y-111 DYS710 not callable not callable: no region for it in the HipSTR marker set +69 Y-111 DYS485 no call HipSTR wrote no record for DYS485; see HipSTR's log +70 Y-111 DYS632 no call HipSTR wrote no record for DYS632; see HipSTR's log +71 Y-111 DYS495 no call HipSTR wrote no record for DYS495; see HipSTR's log +72 Y-111 DYS540 no call HipSTR wrote no record for DYS540; see HipSTR's log +73 Y-111 DYS714 no call HipSTR wrote no record for DYS714; see HipSTR's log +74 Y-111 DYS716 not callable not callable: no region for it in the HipSTR marker set +75 Y-111 DYS717 no call HipSTR wrote no record for DYS717; see HipSTR's log +76 Y-111 DYS505 no call HipSTR wrote no record for DYS505; see HipSTR's log +77 Y-111 DYS556 no call HipSTR wrote no record for DYS556; see HipSTR's log +78 Y-111 DYS549 no call HipSTR wrote no record for DYS549; see HipSTR's log +79 Y-111 DYS589 no call HipSTR wrote no record for DYS589; see HipSTR's log +80 Y-111 DYS522 no call HipSTR wrote no record for DYS522; see HipSTR's log +81 Y-111 DYS494 no call HipSTR wrote no record for DYS494; see HipSTR's log +82 Y-111 DYS533 no call HipSTR wrote no record for DYS533; see HipSTR's log +83 Y-111 DYS636 no call HipSTR wrote no record for DYS636; see HipSTR's log +84 Y-111 DYS575 no call HipSTR wrote no record for DYS575; see HipSTR's log +85 Y-111 DYS638 no call HipSTR wrote no record for DYS638; see HipSTR's log +86 Y-111 DYS462 no call HipSTR wrote no record for DYS462; see HipSTR's log +87 Y-111 DYS452 31 low 20 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; no per-read lengths (MALLREADS) to show that the reads agree +88 Y-111 DYS445 no call HipSTR wrote no record for DYS445; see HipSTR's log +89 Y-111 Y-GATA-A10 no call HipSTR wrote no record for Y-GATA-A10; see HipSTR's log +90 Y-111 DYS463 no call HipSTR wrote no record for DYS463; see HipSTR's log +91 Y-111 DYS441 not callable not callable: no region for it in the HipSTR marker set +92 Y-111 Y-GGAAT-1B07 not callable not callable: no region for it in the HipSTR marker set +93 Y-111 DYS525 no call HipSTR wrote no record for DYS525; see HipSTR's log +94 Y-111 DYS712 not callable not callable: no region for it in the HipSTR marker set +95 Y-111 DYS593 no call HipSTR wrote no record for DYS593; see HipSTR's log +96 Y-111 DYS650 not callable not callable: no region for it in the HipSTR marker set +97 Y-111 DYS532 no call HipSTR wrote no record for DYS532; see HipSTR's log +98 Y-111 DYS715 not callable not callable: no region for it in the HipSTR marker set +99 Y-111 DYS504 no call HipSTR wrote no record for DYS504; see HipSTR's log +100 Y-111 DYS513 no call HipSTR wrote no record for DYS513; see HipSTR's log +101 Y-111 DYS561 no call HipSTR wrote no record for DYS561; see HipSTR's log +102 Y-111 DYS552 no call HipSTR wrote no record for DYS552.2; see HipSTR's log +103 Y-111 DYS726 not callable not callable: no region for it in the HipSTR marker set +104 Y-111 DYS635 no call HipSTR wrote no record for DYS635; see HipSTR's log +105 Y-111 DYS587 no call HipSTR wrote no record for DYS587; see HipSTR's log +106 Y-111 DYS643 no call HipSTR wrote no record for DYS643; see HipSTR's log +107 Y-111 DYS497 no call HipSTR wrote no record for DYS497; see HipSTR's log +108 Y-111 DYS510 26 low 20 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; no per-read lengths (MALLREADS) to show that the reads agree +109 Y-111 DYS434 no call HipSTR wrote no record for DYS434; see HipSTR's log +110 Y-111 DYS461 no call HipSTR wrote no record for DYS461; see HipSTR's log +111 Y-111 DYS435 no call HipSTR wrote no record for DYS435; see HipSTR's log diff --git a/tests/parity/golden/y-str-report/read-length-250/stdout b/tests/parity/golden/y-str-report/read-length-250/stdout new file mode 100644 index 000000000..156bd72dd --- /dev/null +++ b/tests/parity/golden/y-str-report/read-length-250/stdout @@ -0,0 +1 @@ +Y-STR markers: 0 high, 13 low, 71 no call, 27 not callable diff --git a/tests/schema/summary.schema.json b/tests/schema/summary.schema.json index 3f7fd9b66..d08df0c14 100644 --- a/tests/schema/summary.schema.json +++ b/tests/schema/summary.schema.json @@ -50,6 +50,9 @@ }, "data": { "type": "object" + }, + "partial": { + "type": "string" } } } @@ -1824,6 +1827,71 @@ "type": "string" }, "minItems": 1 + }, + "scope": { + "type": "object", + "required": [ + "autosomes_covered", + "autosomes", + "chrx", + "intervals", + "partial", + "mark" + ], + "properties": { + "autosomes_covered": { + "type": "integer", + "minimum": 0 + }, + "autosomes": { + "type": "array", + "items": { + "enum": [ + "chr1", + "chr2", + "chr3", + "chr4", + "chr5", + "chr6", + "chr7", + "chr8", + "chr9", + "chr10", + "chr11", + "chr12", + "chr13", + "chr14", + "chr15", + "chr16", + "chr17", + "chr18", + "chr19", + "chr20", + "chr21", + "chr22" + ] + }, + "maxItems": 22 + }, + "chrx": { + "type": "boolean" + }, + "intervals": { + "type": [ + "string", + "null" + ] + }, + "partial": { + "type": "boolean" + }, + "mark": { + "type": [ + "string", + "null" + ] + } + } } } } diff --git a/tests/shellcheck-baseline.txt b/tests/shellcheck-baseline.txt index 398cace1a..66f24213c 100644 --- a/tests/shellcheck-baseline.txt +++ b/tests/shellcheck-baseline.txt @@ -190,7 +190,6 @@ tests/e2e/prs-scores-and-run-options-1-strand-sex.sh SC2013 for id in $(awk -F'\ tests/e2e/prs-scores-and-run-options-1-strand-sex.sh SC2016 check "control: the default run's pgsc_calc had no --keep_ambiguous" bash -c '! grep -q -- --keep_ambiguous "$1"' _ "${D}/prs/pgsc_calc.${STAMP1}/nextflow.log" tests/e2e/prs-scores-and-run-options-2-panel-chrx.sh SC2013 for id in $(awk -F'\t' '$1 ~ /^PGS[0-9]+$/ {print $1}' "${REPO}/assets/pgs_scores.tsv"); do tests/e2e/qc-1-sample-qc.sh SC2329 above() { [ -n "$1" ] && awk -v a="$1" -v b="$2" 'BEGIN { exit !(a + 0 > b + 0) }'; } -tests/e2e/qc-1-sample-qc.sh SC2329 below() { [ -n "$1" ] && awk -v a="$1" -v b="$2" 'BEGIN { exit !(a + 0 < b + 0) }'; } tests/e2e/reports-and-pgx-correctness-reports.sh SC2329 cleanup() { rm -f "$PRS" "$STATUS"; rmdir "${D}/prs" 2>/dev/null || true; } tests/e2e/reports-and-pgx-correctness-revel.sh SC2329 restore() { tests/e2e/run-all-launcher.sh SC2329 all_cached() { [ "$(status_count "$1" CACHED)" -ge 10 ] && [ "$(status_count "$1" COMPLETED)" -eq 0 ] && [ "$(status_count "$1" FAILED)" -eq 0 ]; } diff --git a/tests/smoke/hipstr.sh b/tests/smoke/hipstr.sh index 9b2e86e41..33588f7e5 100644 --- a/tests/smoke/hipstr.sh +++ b/tests/smoke/hipstr.sh @@ -17,13 +17,15 @@ HipSTR --bams /in/HG002_slice.bam --fasta /in/ref.fa --regions regions.bed --str --max-str-len 150 --output-filters --log hipstr.log python3 --version > python_version.txt 2>&1 # called.tsv: id, GT, GB, DP and Q of every call with a genotype and those -# four fields and DSTUTTER. +# four fields, DSTUTTER and MALLREADS (each read's most likely length, which +# og y str-report needs for a high call). gzip -dc calls.vcf.gz | awk -F'\t' -v OFS='\t' ' /^#/ { next } { split("", f); k = split($9, key, ":"); m = split($10, val, ":") for (i = 1; i <= k && i <= m; i++) f[key[i]] = val[i] - if (("GT" in f) && f["GT"] != "." && ("GB" in f) && ("DP" in f) && ("Q" in f) && ("DSTUTTER" in f)) + if (("GT" in f) && f["GT"] != "." && ("GB" in f) && ("DP" in f) && ("Q" in f) && ("DSTUTTER" in f) \ + && ("MALLREADS" in f) && f["MALLREADS"] ~ /^-?[0-9]+\|[0-9]+/) print $3, f["GT"], f["GB"], f["DP"], f["Q"] }' > called.tsv cat called.tsv diff --git a/tests/test_e2e_scope.sh b/tests/test_e2e_scope.sh index 9ea0189b6..672a77de1 100755 --- a/tests/test_e2e_scope.sh +++ b/tests/test_e2e_scope.sh @@ -6,7 +6,9 @@ # no file, a glob that matches a file outside the e2e scope. Then the # picks: nothing for a path outside the scope, every case for shared wiring, the smoke cases plus the matching ones for a helper, # the case whose file or row changed, the cases those need, never a base -# case. Last, the real table must pass the check. +# case, and for a change under rust/ (the og binary's sources) every case +# whose row has a glob that matches bin/og. Last, the real table must pass +# the check, and on it a Rust change must pick what a bin/og change picks. set -euo pipefail export LC_ALL=C @@ -96,6 +98,12 @@ expect "a base step runs the smoke cases only (the base leg runs every base case printf '%s\n' traits-2 > "${WORK}/rows.txt" ROWS="${WORK}/rows.txt" expect "a changed table row runs its case and what it needs" "${SMOKE} traits-1 traits-2" docs/x.md expect "a deleted case file runs the smoke cases" "${SMOKE}" tests/e2e/gone-1.sh +expect "a Rust change runs the cases that run og and what they need" "${SMOKE} traits-1 traits-2" rust/crates/og-vcf/src/lib.rs +if grep -q 'traits-2: runs og, built from rust/crates/og-vcf/src/lib.rs' "${WORK}/why.txt"; then ok "select says a Rust change picked a case because it runs og" +else bad "select gave no og reason for a Rust change: $(paste -sd' ' "${WORK}/why.txt")"; fi +expect "the og build script runs the cases that run og" "${SMOKE} traits-1 traits-2" rust/og.sh +{ paths | grep -v "^lpa-1${TAB}"; printf '%s\n' "lpa-1${TAB}modules/local/lpa/* bin/*"; } > "${WORK}/wide.tsv" +E2E_PATHS="${WORK}/wide.tsv" expect "a row whose glob covers bin/og runs on a Rust change" "lpa-1 ${SMOKE} traits-1 traits-2" rust/og/src/main.rs if grep -q 'traits-1: needed by traits-2' "${WORK}/why.txt" 2> /dev/null || { pick bin/og > /dev/null; grep -q 'traits-2: runs bin/og' "${WORK}/why.txt"; }; then ok "select says why it picked each case" else bad "select gave no reasons: $(cat "${WORK}/why.txt")"; fi @@ -137,6 +145,23 @@ if [ -s "${WORK}/real.txt" ] && E2E_SELECT="${WORK}/real.txt" "${REPO}/scripts/c ok "a real pick splits: $(paste -sd' ' "${WORK}/real.txt")" else bad "a real pick did not split: $(paste -sd' ' "${WORK}/real.txt")"; fi +# A Rust change picks what a change to bin/og picks: every case that runs og +# (its row has a glob that matches bin/og), the smoke cases and their needs. +"$S" select "${WORK}/changed.txt" > "${WORK}/og.txt" 2> /dev/null +printf '%s\n' rust/og/src/main.rs > "${WORK}/changed.txt" +"$S" select "${WORK}/changed.txt" > "${WORK}/rust.txt" 2> /dev/null || true +if [ -s "${WORK}/rust.txt" ] && cmp -s "${WORK}/og.txt" "${WORK}/rust.txt"; then + ok "the real table: a Rust change runs the $(wc -l < "${WORK}/rust.txt" | tr -d ' ') cases a bin/og change runs" +else bad "the real table: a Rust change picks $(wc -l < "${WORK}/rust.txt" | tr -d ' ') cases, a bin/og change $(wc -l < "${WORK}/og.txt" | tr -d ' '): $(diff "${WORK}/og.txt" "${WORK}/rust.txt" | grep '^[<>]' | paste -sd' ' -)"; fi +for c in output-contract-1-hg002 traits-panel-1 prs-2-ancestry bash-step-11-roh vendor-vcf-intake-5-docs; do + if grep -qx "$c" "${WORK}/rust.txt"; then ok "the real table runs ${c}, which runs og, on a Rust change" + else bad "the real table does not run ${c} on a Rust change, though it runs og"; fi +done +for c in alignment-markdup-gvcf-sex-4-bwamem2 sv-mito-telomere-steps-1-sv-merge; do + if grep -qx "$c" "${WORK}/rust.txt"; then bad "the real table runs ${c} on a Rust change, though it runs no og" + else ok "the real table leaves out ${c}, which runs no og, on a Rust change"; fi +done + printf '%s\n' tests/fixtures/consumer_export/sites.tsv.gz > "${WORK}/changed.txt" if "$S" select "${WORK}/changed.txt" 2> /dev/null | grep -qx consumer-export-1; then ok "the real table runs consumer-export-1 when its fixture changes" else bad "the real table does not run consumer-export-1 when its fixture changes"; fi diff --git a/tests/test_render_report.py b/tests/test_render_report.py index 54de5d098..f782cf812 100644 --- a/tests/test_render_report.py +++ b/tests/test_render_report.py @@ -47,7 +47,9 @@ named ("1 scored, 2 left out (not matched in the panel run)"); 5. both reports: a percentile with its group when there is one, the "Raw score only" line when there is none, and the not-assessed line about - percentiles only then; a score whose chrX rows were left out is named, + percentiles only then; a panel run whose percentiles were withheld for a + variant-only input says so in both reports and in not-assessed, never + that no panel was installed; a score whose chrX rows were left out is named, one whose chrX rows were scored is not; both captions, with a panel and without, carry the ancestry-transfer caveat of docs/25-prs.md; 6. the ClinVar card: a homozygous 3-star P/LP hit gets no green badge, @@ -133,6 +135,8 @@ def check(desc, ok, detail=""): PRS_NOT_ADJUSTED = "Polygenic score percentiles: no ancestry reference panel was used, so the scores are raw sums" +PRS_WITHHELD = ("Polygenic score percentiles: the input lists variants only, so the percentiles were withheld and " + "the scores are raw sums") def haplogroup_explore(kind, hg): @@ -682,7 +686,25 @@ def chrx_of(res): and "PGS000002 (3)" not in txt, txt) check("no panel: the HTML row says raw score only", "raw score only" in html) check("no panel: not-assessed names the missing percentiles", - PRS_NOT_ADJUSTED in summ["not_assessed"]) + PRS_NOT_ADJUSTED in summ["not_assessed"] and PRS_WITHHELD not in summ["not_assessed"]) + # A panel run whose input lists variants only: og prs table withheld + # every percentile and wrote why (Percentile_Note). Neither report + # may say that no panel was installed, nor tell the user to add one. + d = f"{work}/sample_withheld/S" + withheld = "percentile withheld: the input lists variants only" + put(f"{d}/prs/S_prs_summary.tsv", "\t".join(PRS_COLUMNS[:-1] + ["Percentile_Note", "Input"]) + "\n" + f"Coronary artery disease\tPGS000001\t62\t2\t3\t66.7\tNA\tEUR\t0\t0\t\t\t{withheld}\tvcf\n") + summ = collect_summary.collect("S", d) + txt, html = render_report.text_report(summ), render_report.html_report(summ) + check("withheld: both reports say the percentile was withheld for a variant-only input", + "Percentile withheld: the input lists variants only" in txt + and "Percentile withheld: the input lists variants only" in html, txt) + check("withheld: no report says no panel was installed, nor asks for one", + "no ancestry reference panel was installed" not in txt + html + and "--ancestry-panel adds it" not in txt + html, txt) + check("withheld: not-assessed gives the true reason", + PRS_WITHHELD in summ["not_assessed"] and PRS_NOT_ADJUSTED not in summ["not_assessed"], + summ["not_assessed"]) d = f"{work}/sample_adj/S" put(f"{d}/prs/S_prs_summary.tsv", "\t".join(PRS_COLUMNS) + "\n" "Coronary artery disease\tPGS000001\t1.25\t2\t3\t66.7\t94.4\tEUR\t0\tgvcf\n") diff --git a/workflows/clinical.nf b/workflows/clinical.nf index 3006c53a9..47cd3e984 100644 --- a/workflows/clinical.nf +++ b/workflows/clinical.nf @@ -159,11 +159,14 @@ workflow CLINICAL { .map { _id, meta, vcf, kind, pgs -> [meta, vcf, kind, pgs] }, ch_ancestry_ref ) + // With the genotypes pgsc_calc scored: og prs table withholds + // the percentiles when they hold no reference calls. PRS_SUMMARY( PRS.out.results .map { meta, res, kind -> [meta.id, meta, res, kind] } .join(ch_sample_pgs) - .map { _id, meta, res, kind, pgs -> [meta, res, kind, pgs] }, + .join(PRS_SCORE_SITES.out.vcf.map { meta, target, _kind -> [meta.id, target] }) + .map { _id, meta, res, kind, pgs, target -> [meta, res, kind, pgs, target] }, panel_name ) ch_prs_scores = PRS_SUMMARY.out.summary