Skip to content

Releases

v0.22.0

Choose a tag to compare

@github-actions github-actions released this 25 Nov 17:35
355449d

Changed

  • The Store Reader contract bundle carries a Rho Matrix on its Dense and Hybrid
    releases, and asks the Rho readers (issue #497).
    dense_observed,
    dense_completed, hybrid_observed and hybrid_completed carry one, built by
    build-dense-rho, and two new releases, dense_rho (an interior Rho on a Dense release) and hybrid_overflow_only, hold a Hybrid's Rho
    Matrix with an Overflow-only Analysis, so OverflowOnlyAnalysisError is exercised.
    opengwasdb.store.query_digests gains a rho section: rho_matrix, rho_row and
    rho of the spread Analyses, each array digested and spelt out in readable, and a
    refusal answered as its error. differences now compares the rho section too. Bundle version 2; no answer of the bundle's version 1
    changed.

Merged in #500: #500

v0.21.0

Choose a tag to compare

@github-actions github-actions released this 25 Nov 16:44
931ac16

Added

  • build-dense-rho builds a Hybrid release's Rho Matrix, in its Dense Component
    (issue #496).
    Give it the Hybrid release: it estimates the matrix over the Dense
    Component's grid (the shared Variant Axis from 0.3.0, the component's own table on 0.2)
    from the associations the Association Reader reads as observed, and writes
    dense/data.zarr/rho. The Dense Component is refused with the release's name, however
    its path is spelt (a symlink included), and so is a Ragged release. The group records
    exactly the Analyses with no observed association in the component, its Overflow-only
    Analyses, as overflow_only.
    On a Hybrid, rho(), rho_row() and rho_matrix() answer for the others and raise
    OverflowOnlyAnalysisError for a pair naming one, never NaN. A new rule,
    rho.overflow_only, requires the record to equal what the association scan finds, and
    the existing Rho rules judge the component's matrix.

Fixed

  • build-dense-rho reads observed Z through the Association Reader (issue #496).
    It tested isfinite(z) and an imputed array by itself, so a Reference-Completed
    grid without its imputed mask counted every imputed Z as observed and fed it to the
    estimate. It now reads observed associations as every query does: such a grid is
    refused, naming the mask, and a §15-invalid cell is refused rather than read.

Merged in #499: #499

v0.20.0

Choose a tag to compare

@github-actions github-actions released this 25 Nov 13:34
c8ebe4c

Added

  • ogdb rewrite-release --convert-legacy --lifted|--not-lifted converts a 0.2.0, 0.2.1
    or 0.2.2 Dense release to 0.3.0 (issue #492).
    It fixes what can be fixed exactly: every
    SE above 65,504 is masked (grid, Indexed Variant Subsets, Top-Hit tiers) and counted in
    n_missing_se_out_of_range, and an unlifted release's rows name their own ALID as
    source_alid. What only a rebuild fixes -- a source's sorted indels, a lifted release's
    missing source_alid, and an SE exception table rounded to float16 (#355, recorded
    only where the source holds one, with its counts) -- is recorded by validator rule name in
    provenance.converted_from.deviations, and validate reports exactly those rules as
    warnings naming the conversion. The proof compares every deliberate change cell for cell.
    Any other rule listed there fails the new manifest.converted_from, and is not lowered.
    The rewrite's range question now spans at most 10,000 variants and 2,500,000 cells, so a
    large release can be proved; where that narrows it, format_rewrite.range_question_narrowed
    records the range asked (every fixture's range is unchanged). rewrite-release --n-workers N sizes the final validation as validate --n-workers does.

Merged in #494: #494

v0.19.1

Choose a tag to compare

@github-actions github-actions released this 25 Nov 13:23
f73eb6b

No changelog fragments were added by this pull request.


Merged in #493: #493

v0.19.0

Choose a tag to compare

@github-actions github-actions released this 25 Nov 13:00
4028604

Added

  • opengwasdb clump STORE --ld-store ANCESTRY=PATH … writes the Clumps of a 0.3.0
    Store Release's 5e-8 tier, and n_loci_5e8 and n_unclumped_5e8 beside n_hits_5e8
    (ADR 0106, spec §18.1, issue #418).
    Each Analysis's observed rows of the tier are
    clumped against the LD Store its assigned_ancestry maps to, at r² = that store's t_far
    and kb 10,000, by |z| with ties by Store Variant Index; a reference-first indel is looked
    up by its sorted spelling, its r re-signed to the Store's A1. The step writes, in place,
    top_hits/p_5e_08/clumps/default/ (lead, r) in every component holding the tier,
    the two analyses.tsv columns, overview.html, and the manifest's clumps entry last.
    An absent, imputed, ambiguous or unmapped row is marked, never dropped; an Analysis with
    no mapped LD Store gets blank counts, never 0. It refuses, before writing anything, a
    Store of any format but 0.3.0, one with no 5e-8 tier, a Reference-Completed one whose
    tier has no imputed, and an LD Store of another assembly or one that refuses the
    configuration. The engine holds no default LD Store: the mapping is the caller's. The
    format_version does not move. validate gains the seven clumps.* rules (spec
    §20.0), and --ld-store ANCESTRY=PATH, which lets clumps.reclump re-clump a seeded
    sample; without it that rule is recorded as not run. validate --fidelity-seed S seeds that
    sample (0 unless given). analyses.tsv gains two columns
    wherever the step runs: a change for opengwas/opengwasdb-stores too.

Merged in #482: #482

v0.18.0

Choose a tag to compare

@github-actions github-actions released this 25 Nov 00:49
e6ac822

Changed

  • A Hybrid Observed-View Check lets completion drop a shared-axis variant that no Analysis observes, and lists it (stores#478). OGS-00011's completion left out 668 rows of its 47,920,778-row shared axis. Each was a SNV that no association in the Observed-Only release sits on, yet the check failed on overflow.parent_rows_unmapped before it compared a single association. Such a row now counts as dropped. Its count stays in components.overflow.axis.parent_rows_unmapped, and the first 1,000 are named in the new dropped_alids. The full comparison then runs. A source association on a dropped row fails it, under the new components.overflow.all_analyses.associations_on_dropped_rows. An unmapped Dense row still fails as before.

Merged in #490: #490

v0.17.0

Choose a tag to compare

@github-actions github-actions released this 25 Nov 00:05
69c2945

Breaking

  • Reference Completion keeps each observed row's source_alid, and the validator refuses a lifted release with none (issue #449). Dense and Ragged completion rewrote the Store Variant Table without the pre-liftover ALID the build recorded, so a completed release lost which source variant any row came from (OGS-00009: . on all 11,191,070 rows) and nothing failed. Observed rows now keep their source's source_alid; rows added from the panel stay ., and a row the build left blank stays blank. The new rule variant_table.source_alid fails a release whose manifest records a liftover (provenance.chain_file, or a provenance.lift that lifted a variant) and whose table holds no source_alid at all, on every format_version.

    Ragged builds (build-ragged-ssf, build-ragged-besd) now write source_alid too: the pre-lift ALID of a lifted row, the ALID itself for an unlifted one, and . where two origins reach one variant (#85).
    A hosted release built before this fails the new rule until it is rebuilt (opengwas/opengwasdb-stores#498): every completed 0.2 Dense release that lifted, and every lifted Ragged release, holds no source_alid.

  • The Store Reader: every read the query facade makes now lives in one
    subpackage, opengwasdb.store_reader, which imports only numpy, zarr,
    numcodecs and the standard library (issue #464, epic #450).
    The release
    envelope and format-version check, the encoding plan and decode, the decoded
    planes, the association readers, the Ragged CSR, By-Variant Index, Indexed
    Variant Subset, Rho and Top-Hit readers, the Analyses index, the Variant Axis,
    and the facade and result resolution moved there; builders, completion and
    validation import them from it. import opengwasdb.store_reader loads none of
    pandas, scipy, pysam, sqlite3 or threadpoolctl, and import opengwasdb no
    longer loads the builders (its names, and the encoding, variants, index,
    store and layouts.dense packages' re-exports, are imported on first use).
    opengwasdb.query keeps its public names and answers every query as before
    (tests/test_store_reader_digests.py pins the answers of the code before the
    move). log10_p and the Top-Hit z_critical are computed without scipy:
    log10_p is within 3.9e-16 relative error of a 50-digit reference across
    -40 <= z <= 40 (809 points), and z_critical cuts every stored |z| where the
    scipy form did. The 0.2.x Store Variant Table's pysam and SQLite reads move to
    opengwasdb.variants.legacy_table, behind the Store Reader's
    LegacyVariantTable seam.

  • Three module paths are removed, with no shim (issue #464). Import from the Store
    Reader instead: opengwasdb.associations (and its cells, csr, dense, record
    and subset modules, Associations among them) is opengwasdb.store_reader.associations;
    opengwasdb.query.facade is opengwasdb.store_reader.facade; and
    opengwasdb.query.resolve is opengwasdb.store_reader.resolve. opengwasdb.query
    itself keeps query_store, StoreQuery, resolve_rows and log10_p_two_sided.

  • The query TSV gains a beta column after se, so p, eaf, n (where
    present) and association_status each move one column right (issue #466,
    ADR 0104).
    Default columns are now analysis_id, analysis_label, chromosome, position, alid, effect_allele, other_allele, z, se, beta, p, eaf, association_status: p moves from column 10 to 11, eaf from 11 to 12 and
    association_status from 12 to 13, one further right with --variant-info.
    A reader that selects columns by position must move with them. Every query
    result now carries beta and pval, derived once by the Store Reader:
    association_statistics turns a result's z and SE into beta (z * se),
    pval and log10_p, all float64, on Dense, Ragged and Hybrid alike, and
    resolved rows carry all three. A missing association is NaN in all three,
    and so is an infinite SE (ADR 0068), never inf; where p is below float64's
    range pval is 0.0 and log10_p stays exact. The TSV p column prints the
    reader's pval, and NA for an infinite SE where it used to print the p of
    z. --format json gains beta, pval and log10_p. The benchmarks read
    beta and -log10 p from the Store Reader instead of deriving them again.

  • Builds and completion write Store format 0.3.0, a new series that older packages
    refuse (issue #467, ADR 0105).
    A 0.3.0 release indexes its ALIDs with a variable-length sidecar
    (variant_alid_utf8.npy, variant_alid_offsets.npy, variant_alid_keys.npy,
    variant_alid_order.npy). The sidecar holds every ALID, however long. The fixed-width
    variant_alid_bytes.npy/variant_alid_rows.npy pair, which is no longer written, left
    out each ALID over 32 bytes. Those resolved only by scanning the Variant Table with
    pysam: 115,043 such ALIDs on OGS-00010, 2,026 on OGS-00024. On 0.3.0, lookup and
    phewas by such an ALID return its row without loading pysam. A package without the
    0.3 series refuses a 0.3.0 release by name (… declares format_version='0.3.0', a release series this build does not implement). This package still reads 0.1.0 and every 0.2
    release.

  • ogdb rewrite-release SOURCE DESTINATION derives a new 0.3.0 release from a 0.2.3
    one (spec §21.4).
    It never writes its source and refuses a destination that exists.
    It runs named steps on a staged copy, one for each thing 0.3.0 changes. Before it publishes, it
    asks the source and the copy the same fixed set of questions and refuses on any
    difference, then validates the copy. The questions include the release's longest ALIDs
    and ALIDs at 23, 24, 25, 32 and 33 bytes, and the step refuses unless every ALID resolves
    to its own row. A release before 0.2.3 is refused: it lacks 0.2.3's reference-first
    indels and SE count, which no rewrite can add, so it is rebuilt. Hosted Stores are not
    rewritten: they are rebuilt from source at 0.3.0 (opengwas/opengwasdb-stores#498). The
    rewrite proves each format step on fixture and small releases.

  • New validation rule variant_table.alid_sidecar. It checks a 0.3.0 release's
    sidecar against its Variant Table. envelope.required and envelope.closed now follow
    the release's version: the sidecar from 0.3.0, the fixed-width pair before it.

  • The query-result digests are production code (opengwasdb.store.query_digests). The
    rewrite's proof and the store-reader golden test share them, and the store-comparison
    benchmark takes digest_array and result_digests from there.

  • docs/store-format-compatibility.md has the 0.3.0 row. Both repositories' docs change:
    opengwasdb-stores' release manifests and walkthrough name the envelope's files.

  • A 0.3.0 release is queried without reading variants.tsv.gz (issue #469, ADR 0105
    §7).
    variants_table() and
    resolve(..., include_variant_info=True) answer from the sidecars: the ALID sidecar
    names each row, its ALID gives the chromosome, position and alleles, and the rsID index,
    inverted, gives the rsID. The variant count is the ALID sidecar's. No query loads pysam,
    through the Python API or opengwasdb query-*: the CLI imports Reference Completion,
    which does, only inside the complete-* commands. Nor does opengwasdb query-* load
    sqlite3, pandas or scipy: each build, resolve, ancestry, validation and overview command
    imports its modules on use.
    The answers equal 0.2.x's column by column: a row with no rsID is None in
    variants_table() and . in a resolved row, and a cell naming several (rs1;rs2) is
    that cell whole. Naming a few rows scans the rsID index (0.04 s for one row on
    OGS-00004's 23.7 M); once the scans would cost more than one inversion (1.0 s, 95 MB),
    it inverts, once, and keeps it. 0.2.x is unchanged.

  • variant_offsets.npy is not written from 0.3.0. A 0.3.0 release carrying it fails
    envelope.closed. The Dense builder's provenance.dense.variant_axis.row_offsets no
    longer names it, and the index.sqlite dense blob that also named it is gone from
    builds and rewrites alike (#471). variants.tsv.gz and its .tbi still ship, written with htslib,
    as a convenience for tabix, bedtools and R. Spec §4 gives the command that rebuilds a lost
    .tbi: tabix -s1 -b2 -e2 -c'#' variants.tsv.gz.

  • overview.html's file guide says so. variants.tsv.gz is a file to open directly,
    which no 0.3.0 query reads, and every sidecar and regions.tsv is described rather than
    listed as "Internal store file". --variant-info's help names the rsID index it reads.

  • A 0.3.0 release without its rsID index is refused (MissingRsidIndex), rather than read
    as naming no rsID. A 0.2 release built before #109 still opens without one.

  • The variant-axis writer refuses an rsID wider than 24 bytes (UnindexableRsidError).
    0.2.x left such a name out of the rsID index and kept it in the table. A 0.3.0 reader names
    rows from the index, so the name would vanish from every answer. None of the six
    releases measured holds one (OGS-00003, -00004, -00007, -00009, -00016, -00025: 0 cells
    over 24 bytes). The rebuild reads sources, though, and a GWAS-VCF ID cell is kept
    whole: one naming several rsIDs past 24 bytes (three of nine digits already are) is
    refused at build.

  • ogdb rewrite-release gains a variant_offsets step: the copy
    leaves the file out, and the step refuses unless the ALID and position sidecars count the
    rows the source's offsets did.

  • New validation rule variant_table.rsid_rows (0.3.0). It checks that the inverted rsID
    index names every row by the table's rsID. On 0.3.0, variant_table.rows counts against
    the ALID sidecar, and variant_table.representatives checks the tabix index only.

  • ogdb-api breaks on a 0.3.0 release. It reads variant_offsets.npy and seeks into the
    Variant Table through the axis's private attributes. Its owner moves its pin.
    -...

Read more

v0.16.1

Choose a tag to compare

@github-actions github-actions released this 24 Nov 14:39
cfc2072

Fixed

  • A Hybrid build's Pass 2 workers no longer keep the memory of every large
    Analysis they have routed (issue #451).
    Python freed a source's buffers
    after each Analysis, but glibc kept their pages, so a long-lived worker held
    the high-water of everything it had routed: in a 240-Analysis build on
    gnomad-v4-common-hg38-v2, each of 4 workers stepped up about 4 GiB on each
    12M-row source and stayed at 12-15 GiB of its own to the end. Each worker
    now hands its freed pages back after each Analysis
    (encoding.memory.release_freed_heap, glibc's malloc_trim); the same build
    ends its workers at 3.6-4.8 GiB, and its Pass 2 took 23m11s against 26m42s.
    Routing one large Analysis still peaks at 12-14 GiB a worker, and Pass 2's
    worker count is still taken as given: both stay open on #451.

Merged in #485: #485

v0.16.0

Choose a tag to compare

@github-actions github-actions released this 23 Nov 14:01
052cfc7

Added

  • The LD engine is part of the package, as opengwasdb.ld (issue #455, epic
    #453).
    ogld's main at 147f54d (its v0.8.0 plus the Pan-UKB import code) moved
    in with its history: the LD Store and Genotype Store format, build,
    validation and queries (opengwasdb.ld.open, matrix, region, proxies,
    clump, build, validate). Its ADRs are 0087–0101 and its specs are in
    docs/spec/ (ld-store.md, build-inputs.md, genotype-store.md,
    partner-rows.md). fsspec and aiohttp are now runtime dependencies, so an
    LD Store opens over HTTP(S). Building needs the new ld-build extra
    (pgenlib alone), and importing a producer's LD the new ld-import extra
    (lz4 alone); threadpoolctl and pyliftover, which ogld's extras also
    carried, were already this package's own dependencies. The dev extra now
    carries what the LD tests need (pgenlib, lz4, hypothesis,
    pytest-timeout). The LD Store format is unchanged: a Store still records
    software.ogld, now with this package's version, until the next LD Store
    format version. The opengwasdb ld commands and the shared variant identity
    follow in #456 and #457.

  • pytest runs with --strict-markers, for the engine's tests as well as the LD
    tests (issue #455).
    A misspelt mark is now a collection error rather than a test
    that runs in no tier. A test marked realdata or acceptance (the LD tiers that
    read the IEU nodes' panels) is deselected unless the run's -m asks for it:
    tests/conftest.py does that, not an addopts -m (#459). No engine test
    carries either mark; ogld's 5 s per-test timeout and strict xfail apply to
    tests/ld/ only.

  • opengwasdb ld build | import | validate | info | derive-partners, and the
    OPENGWASDB_LD_* environment variables (issue #457).
    The LD Store commands
    that were ogld … are a sub-app of the engine CLI, with the same options,
    required inputs and exit codes (0 done, 1 the store breaks a rule, 2 a
    refusal), messages now opengwasdb ld <command>: <problem>. An option left
    out takes the default BuildInputs and ImportInputs declare. The one change
    to a command line: derive-partners --chromosomes is repeated once per
    chromosome rather than taking several values. The scripts' and tests' OGLD_*
    variables are OPENGWASDB_LD_*; one reader refuses, naming the new name, any
    old variable that is still set rather than let its default apply in silence.

Changed

  • opengwasdb.variants owns both ALID spellings, and an LD Store lookup
    refuses an indel ALID spelt reference first (issue #456).
    The LD
    package's own copy of the engine's identity rules, opengwasdb.ld.identity,
    is gone. LD Stores still spell every pair sorted, an indel's too (ADR 0079
    §5; their format does not move until #462), and now form that spelling with
    the engine's own code: opengwasdb.variants.sorted_spelling
    (sorted_identity, SortedIdentity, sorted_alid_locus,
    resolve_sorted_reversed_indels), judged by orient_to_canonical and
    spelt by sorted_alid_alleles. opengwasdb.variants.normalise gains
    AUTOSOMES, CANONICAL_CHROMOSOMES and chromosome_rank, which raises
    VariantNormalisationError for a label off 1–22, X, Y, MT where
    the LD copy raised KeyError. Refusals are the engine's
    VariantNormalisationError family in place of IdentityError:
    chromosome_missing and allele_invalid keep their typed classes and
    reasons, and two records that are not one site's split raise
    DuplicateRecord (reason duplicate_record). The rest (an unsupported
    chromosome number, a bad position, identical alleles) had reason "". They
    now arrive as a bare VariantNormalisationError, which has no .reason
    attribute. An LD Store reader given a deletion's reference-first ALID, such
    as 1:827587:GGGGCC:G, used to answer Absent, as if the panel lacked the
    variant. It now raises ReferenceFirstIndel, and ogld exits 2. The
    message names the sorted ALID the Store would hold it under
    (1:827587:G:GGGGCC), says that row is the deletion unless the panel also
    has the insertion there, and that r there is signed against the other
    allele (#462). One case stays silent: an insertion's reference-first ALID is
    also a sorted ALID, so at a tandem repeat where the Store holds only the
    deletion of the same two alleles, it finds the deletion's row. The Store
    records no REF to tell them apart (recorded on #462). Every other lookup
    answers as before, and the Test Store's Variant Set is unchanged row for
    row.

  • The LD engine's ADRs, specs and glossary now speak as opengwasdb's
    (issue #458, epic #453).
    ADRs 0087–0101 each say which ogld ADR they were; every
    ADR 00NN, spec §N and build inputs §N in opengwasdb/ld/, tests/ld/,
    scripts/ld/ and the LD docs names the new ADR number or spec file (except the
    provenance strings a committed Store records, which keep ogld's numbers); and
    CONTEXT.md gains an LD Stores section. Variant Identity now says what the
    code does (no left alignment; indels reference-first in GWAS Stores, sorted in LD
    Stores until #462), ALID Search Index is a defined term, and
    CONTRIBUTING.md documents the LD test tiers. Error messages that cited spec §N now
    cite ld-store §N or partner-rows §N, and ones that cited a bare ogld issue #N cite
    opengwas/ogld#N. Prose that named the ogld package, CLI or extras names opengwasdb.ld, opengwasdb ld and opengwasdb[ld-build].

Internal

  • The LD tests are an ld area, and the LD packages are components (issue #459,
    epic #453).
    Every test under tests/ld/ carries the ld mark, so -m ld runs
    opengwasdb.ld's suite and -m "not ld" the engine's; the two add up to the
    default run. The default no longer leaves realdata and acceptance out
    through an addopts -m, which any -m on the command line replaced (-m ld
    brought the HGDP+1kGP tier back): tests/conftest.py deselects a tier unless
    the run's -m needs it (-m realdata, -m acceptance). docs/architecture/components.yaml splits ld into
    seven components on the engine's layers, and a new independent list keeps
    ld-build and ld-query from importing each other, which the layer order
    cannot say. The request-lifetime BLAS test now asserts every BLAS pool is held
    at the cap, so it passes under pip install -e .[dev], where numpy and scipy
    each carry an OpenBLAS.

Merged in #461: #461

v0.15.0

Choose a tag to compare

@github-actions github-actions released this 22 Nov 23:26
5615a10

Changed

OpenGWASDB is now released under GPL-3.0-only, and the University of Bristol holds the copyright (#452, ADR 0086, which supersedes ADR 0082). Earlier versions keep the Sustainable Use License they were published under. Contributions from outside the University of Bristol need a signed Harmony CLA (CLA.md); the CLA bot asks on a contributor's first pull request into main.


Merged in #454: #454