Skip to content

v0.16.0

Choose a tag to compare

@github-actions github-actions released this 23 Nov 14:01
· 290 commits to main since this release
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