Repository navigation
Releases
v0.22.0
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_observedandhybrid_completedcarry one, built by
build-dense-rho, and two new releases,dense_rho(an interior Rho on a Dense release) andhybrid_overflow_only, hold a Hybrid's Rho
Matrix with an Overflow-only Analysis, soOverflowOnlyAnalysisErroris exercised.
opengwasdb.store.query_digestsgains arhosection:rho_matrix,rho_rowand
rhoof the spread Analyses, each array digested and spelt out inreadable, and a
refusal answered as its error.differencesnow compares therhosection too. Bundle version 2; no answer of the bundle's version 1
changed.
v0.21.0
Added
build-dense-rhobuilds 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, asoverflow_only.
On a Hybrid,rho(),rho_row()andrho_matrix()answer for the others and raise
OverflowOnlyAnalysisErrorfor 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-rhoreads observed Z through the Association Reader (issue #496).
It testedisfinite(z)and animputedarray 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.
v0.20.0
Added
ogdb rewrite-release --convert-legacy --lifted|--not-liftedconverts 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
missingsource_alid, and an SE exception table rounded tofloat16(#355, recorded
only where the source holds one, with its counts) -- is recorded by validator rule name in
provenance.converted_from.deviations, andvalidatereports exactly those rules as
warnings naming the conversion. The proof compares every deliberate change cell for cell.
Any other rule listed there fails the newmanifest.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 Nsizes the final validation asvalidate --n-workersdoes.
v0.19.1
v0.19.0
Added
opengwasdb clump STORE --ld-store ANCESTRY=PATH …writes the Clumps of a 0.3.0
Store Release's 5e-8 tier, andn_loci_5e8andn_unclumped_5e8besiden_hits_5e8
(ADR 0106, spec §18.1, issue #418). Each Analysis's observed rows of the tier are
clumped against the LD Store itsassigned_ancestrymaps 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 twoanalyses.tsvcolumns,overview.html, and the manifest'sclumpsentry 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 noimputed, 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_versiondoes not move.validategains the sevenclumps.*rules (spec
§20.0), and--ld-store ANCESTRY=PATH, which letsclumps.reclumpre-clump a seeded
sample; without it that rule is recorded as not run.validate --fidelity-seed Sseeds that
sample (0 unless given).analyses.tsvgains two columns
wherever the step runs: a change for opengwas/opengwasdb-stores too.
v0.18.0
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_unmappedbefore it compared a single association. Such a row now counts as dropped. Its count stays incomponents.overflow.axis.parent_rows_unmapped, and the first 1,000 are named in the newdropped_alids. The full comparison then runs. A source association on a dropped row fails it, under the newcomponents.overflow.all_analyses.associations_on_dropped_rows. An unmapped Dense row still fails as before.
v0.17.0
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'ssource_alid; rows added from the panel stay., and a row the build left blank stays blank. The new rulevariant_table.source_alidfails a release whose manifest records a liftover (provenance.chain_file, or aprovenance.liftthat lifted a variant) and whose table holds nosource_alidat all, on everyformat_version.Ragged builds (
build-ragged-ssf,build-ragged-besd) now writesource_alidtoo: 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 nosource_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_readerloads none of
pandas, scipy, pysam, sqlite3 or threadpoolctl, andimport opengwasdbno
longer loads the builders (its names, and theencoding,variants,index,
storeandlayouts.densepackages' re-exports, are imported on first use).
opengwasdb.querykeeps its public names and answers every query as before
(tests/test_store_reader_digests.pypins the answers of the code before the
move).log10_pand the Top-Hitz_criticalare computed without scipy:
log10_pis within 3.9e-16 relative error of a 50-digit reference across
-40 <= z <= 40 (809 points), andz_criticalcuts 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
LegacyVariantTableseam. -
Three module paths are removed, with no shim (issue #464). Import from the Store
Reader instead:opengwasdb.associations(and itscells,csr,dense,record
andsubsetmodules,Associationsamong them) isopengwasdb.store_reader.associations;
opengwasdb.query.facadeisopengwasdb.store_reader.facade; and
opengwasdb.query.resolveisopengwasdb.store_reader.resolve.opengwasdb.query
itself keepsquery_store,StoreQuery,resolve_rowsandlog10_p_two_sided. -
The query TSV gains a
betacolumn afterse, sop,eaf,n(where
present) andassociation_statuseach move one column right (issue #466,
ADR 0104). Default columns are nowanalysis_id, analysis_label, chromosome, position, alid, effect_allele, other_allele, z, se, beta, p, eaf, association_status:pmoves from column 10 to 11,eaffrom 11 to 12 and
association_statusfrom 12 to 13, one further right with--variant-info.
A reader that selects columns by position must move with them. Every query
result now carriesbetaandpval, derived once by the Store Reader:
association_statisticsturns a result's z and SE intobeta(z * se),
pvalandlog10_p, allfloat64, 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), neverinf; where p is below float64's
rangepvalis 0.0 andlog10_pstays exact. The TSVpcolumn prints the
reader'spval, andNAfor an infinite SE where it used to print the p of
z.--format jsongainsbeta,pvalandlog10_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.npypair, 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,lookupand
phewasby 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 DESTINATIONderives 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.requiredandenvelope.closednow 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 takesdigest_arrayandresult_digestsfrom there. -
docs/store-format-compatibility.mdhas 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 oropengwasdb query-*: the CLI imports Reference Completion,
which does, only inside thecomplete-*commands. Nor doesopengwasdb 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 isNonein
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.npyis not written from 0.3.0. A 0.3.0 release carrying it fails
envelope.closed. The Dense builder'sprovenance.dense.variant_axis.row_offsetsno
longer names it, and theindex.sqlitedenseblob that also named it is gone from
builds and rewrites alike (#471).variants.tsv.gzand its.tbistill 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.gzis a file to open directly,
which no 0.3.0 query reads, and every sidecar andregions.tsvis 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-VCFIDcell is kept
whole: one naming several rsIDs past 24 bytes (three of nine digits already are) is
refused at build. -
ogdb rewrite-releasegains avariant_offsetsstep: 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.rowscounts against
the ALID sidecar, andvariant_table.representativeschecks the tabix index only. -
ogdb-api breaks on a 0.3.0 release. It reads
variant_offsets.npyand seeks into the
Variant Table through the axis's private attributes. Its owner moves its pin.
-...
v0.16.1
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'smalloc_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.
v0.16.0
Added
-
The LD engine is part of the package, as
opengwasdb.ld(issue #455, epic
#453). ogld'smainat147f54d(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).fsspecandaiohttpare now runtime dependencies, so an
LD Store opens over HTTP(S). Building needs the newld-buildextra
(pgenlibalone), and importing a producer's LD the newld-importextra
(lz4alone);threadpoolctlandpyliftover, which ogld's extras also
carried, were already this package's own dependencies. Thedevextra 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. Theopengwasdb ldcommands 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 markedrealdataoracceptance(the LD tiers that
read the IEU nodes' panels) is deselected unless the run's-masks for it:
tests/conftest.pydoes that, not anaddopts-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 wereogld …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 nowopengwasdb ld <command>: <problem>. An option left
out takes the defaultBuildInputsandImportInputsdeclare. The one change
to a command line:derive-partners --chromosomesis repeated once per
chromosome rather than taking several values. The scripts' and tests'OGLD_*
variables areOPENGWASDB_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.variantsowns 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 byorient_to_canonicaland
spelt bysorted_alid_alleles.opengwasdb.variants.normalisegains
AUTOSOMES,CANONICAL_CHROMOSOMESandchromosome_rank, which raises
VariantNormalisationErrorfor a label off1–22,X,Y,MTwhere
the LD copy raisedKeyError. Refusals are the engine's
VariantNormalisationErrorfamily in place ofIdentityError:
chromosome_missingandallele_invalidkeep their typed classes and
reasons, and two records that are not one site's split raise
DuplicateRecord(reasonduplicate_record). The rest (an unsupported
chromosome number, a bad position, identical alleles) had reason"". They
now arrive as a bareVariantNormalisationError, which has no.reason
attribute. An LD Store reader given a deletion's reference-first ALID, such
as1:827587:GGGGCC:G, used to answer Absent, as if the panel lacked the
variant. It now raisesReferenceFirstIndel, andogldexits 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 §Nandbuild inputs §Ninopengwasdb/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.mdgains an LD Stores section.Variant Identitynow says what the
code does (no left alignment; indels reference-first in GWAS Stores, sorted in LD
Stores until #462),ALID Search Indexis a defined term, and
CONTRIBUTING.mddocuments the LD test tiers. Error messages that citedspec §Nnow
citeld-store §Norpartner-rows §N, and ones that cited a bare ogld issue#Ncite
opengwas/ogld#N. Prose that named theogldpackage, CLI or extras namesopengwasdb.ld,opengwasdb ldandopengwasdb[ld-build].
Internal
- The LD tests are an
ldarea, and the LD packages are components (issue #459,
epic #453). Every test undertests/ld/carries theldmark, so-m ldruns
opengwasdb.ld's suite and-m "not ld"the engine's; the two add up to the
default run. The default no longer leavesrealdataandacceptanceout
through anaddopts-m, which any-mon the command line replaced (-m ld
brought the HGDP+1kGP tier back):tests/conftest.pydeselects a tier unless
the run's-mneeds it (-m realdata,-m acceptance).docs/architecture/components.yamlsplitsldinto
seven components on the engine's layers, and a newindependentlist keeps
ld-buildandld-queryfrom 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 underpip install -e .[dev], where numpy and scipy
each carry an OpenBLAS.
v0.15.0
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.