Skip to content

Migrate GO annotation download URLs to new /annotations/gaf/ layout - #13

Merged
kevinschaper merged 1 commit into
mainfrom
claude/go-announcements-1153-ipqnpv
Jun 30, 2026
Merged

kevinschaper merged 1 commit into
mainfrom
claude/go-announcements-1153-ipqnpv

Conversation

@kevinschaper

Copy link
Copy Markdown
Member

Closes #12.

What

The GO project reorganized its annotation file distribution (geneontology/go-announcements#1153). The /annotations directory is split into /gaf, /gpad, /gpi subdirectories and files are renamed using UniProt mnemonic organism codes. Old URLs remain available through July 2026 and redirects expire September 2026, so this ingest must move to the new URLs.

This PR rewrites all 13 GAF download URLs to the new /annotations/gaf/<MNEMONIC>-<variant>.gaf.gz scheme.

Variant choice

MOD files are now published in two variants. We use:

  • -mod (MOD ID-centric) for MOD-submitted species — preserves MOD-namespace gene identifiers, matching current behavior.
  • -uniprot for the UniProt-mediated species we previously took from goa_* files.
Old basename New basename infores
goa_human.gaf.gz gaf/HUMAN-uniprot.gaf.gz goa-human
mgi.gaf.gz gaf/MOUSE-mod.gaf.gz mgi
rgd.gaf.gz gaf/RAT-mod.gaf.gz rgd
goa_dog.gaf.gz gaf/CANLF-uniprot.gaf.gz goa-dog
goa_cow.gaf.gz gaf/BOVIN-uniprot.gaf.gz goa-cow
goa_pig.gaf.gz gaf/PIG-uniprot.gaf.gz goa-pig
goa_chicken.gaf.gz gaf/CHICK-uniprot.gaf.gz goa-chicken
zfin.gaf.gz gaf/DANRE-mod.gaf.gz zfin
fb.gaf.gz gaf/DROME-mod.gaf.gz flybase
wb.gaf.gz gaf/CAEEL-mod.gaf.gz wormbase
dictybase.gaf.gz gaf/DICDI-mod.gaf.gz dictybase
sgd.gaf.gz gaf/YEAST-mod.gaf.gz sgd
pombase.gaf.gz gaf/SCHPO-mod.gaf.gz pombase

Changes

  • download.yaml — all 13 GO annotation URLs updated. Local local_name taxid paths are unchanged, so src/go_annotation.yaml needs no changes.
  • src/versions.py — GAF_INFORES keys updated to the new basenames (infores mappings unchanged).
  • tests/test_versions.py — fixtures and the URL assertion updated to the new scheme.
  • README.md — documented download path updated to /annotations/gaf/.

Verification

  • All 13 new URLs return HTTP 200 (HEAD-checked against current.geneontology.org).
  • Confirmed every GAF basename in download.yaml is mapped in GAF_INFORES (the invariant test_gaf_infores_covers_all_download_yaml_entries enforces).

Note: the full pytest suite could not be run in this environment because the kozahub-metadata-schema sibling dependency isn't reachable through the sandbox proxy. CI should run it.

🤖 Generated with Claude Code


Generated by Claude Code

The GO project reorganized its annotation distribution
(geneontology/go-announcements#1153): the /annotations directory is split
into /gaf, /gpad, /gpi subdirectories and files are renamed with UniProt
mnemonic organism codes. Old URLs expire after September 2026.

Rewrite all 13 GAF download URLs to the new /annotations/gaf/<MNEMONIC>-<variant>
scheme. MOD-submitted species (mouse, rat, zebrafish, fly, worm, yeast, pombe,
dicty) use the `-mod` (MOD ID-centric) variant to preserve MOD-namespace gene
identifiers; UniProt-mediated species (human, dog, cow, pig, chicken) use
`-uniprot`. Update GAF_INFORES basename keys and test fixtures to match.

Closes #12
@kevinschaper kevinschaper self-assigned this Jun 30, 2026
@kevinschaper
kevinschaper merged commit 4ce3e8e into main Jun 30, 2026
3 checks passed
kevinschaper added a commit that referenced this pull request Jul 8, 2026
* Fix MOD-species edge loss: match NCBITaxon: taxon prefix

The June 2026 GO pipeline migration (geneontology/go-announcements#1153,
migrated in #13) reorganized annotation distribution and, on the `-mod`
GAF files, changed the Taxon column prefix on MOD-native rows from the
legacy lowercase `taxon:` to `NCBITaxon:`.

The go_annotation reader's Taxon `in` filter is an exact string match and
only enumerated `taxon:<id>` values, so every MOD-native row in the `-mod`
files was excluded. The eight MOD-sourced species collapsed to near-zero
(only residual ComplexPortal rows, which still use `taxon:`, survived; and
PomBase/dictyBase, which have no such rows, dropped to exactly zero). The
five `-uniprot` species were unaffected because those files still use
`taxon:`. Net effect in the 2026-07-01 release: 3.80M -> 2.02M edges (-47%).

Per-species drop (2026-06-01 -> 2026-07-01):
  mouse 709,827->2,436  rat 571,401->439  zebrafish 196,070->23
  fly 170,725->850  yeast 138,996->2,772  worm 103,852->488
  pombe 65,983->0  dicty 65,201->0

Enumerate every target taxon under both `taxon:` and `NCBITaxon:` prefixes
so single-taxon MOD rows match again while preserving the existing behavior
of dropping piped multi-taxon (host/pathogen) annotations. Add a regression
test asserting the filter covers both prefixes for all taxa.

Verified locally against freshly downloaded YEAST-mod + SCHPO-mod GAFs:
2,772 edges with the old filter vs 218,380 with the fix.

Claude-Session: https://claude.ai/code/session_01EEmWQVnmV7nFMca8LfWzYz

* Add min_edge_count guard to fail on edge-count collapse

Set a whole-graph min_edge_count of 3,000,000 on the go_annotation writer.
Healthy full-species builds emit ~3.8M edges; the June 2026 GO format change
silently dropped that to ~2.0M and shipped before anyone noticed. This coarse
floor sits well above the failure and ~20% below the healthy low, so a
catastrophic drop fails the build loudly without tripping on normal
fluctuation.

Enforcement requires koza with writer count-bound checking
(monarch-initiative/koza#238); until that release is picked up the field is a
harmless no-op, matching koza's prior behavior.

Claude-Session: https://claude.ai/code/session_01EEmWQVnmV7nFMca8LfWzYz

* Require koza>=2.6.1 to activate the min_edge_count guard

koza 2.6.1 is the first release that enforces writer min/max count bounds
(monarch-initiative/koza#238, closing #239); on earlier versions the
min_edge_count added to go_annotation.yaml was a silent no-op. Bump the floor
and refresh the lockfile so the edge-count-collapse guard actually fails the
build.

Claude-Session: https://claude.ai/code/session_01EEmWQVnmV7nFMca8LfWzYz

* Tighten filter and guard comments; pair taxon prefixes

Interleave each taxon id with its two prefixes and trim the comments to what a
future reader needs: the Taxon column mixes taxon:/NCBITaxon: prefixes so the
list carries both, and min_edge_count is ~20% below current output.

Claude-Session: https://claude.ai/code/session_01EEmWQVnmV7nFMca8LfWzYz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update GO annotation download URLs for upstream /annotations reorganization (geneontology/go-announcements#1153)

2 participants