KEGG annotation of ORFs -- rc4 ====== KO source: eggNOG-mapper 2.1.12, eggNOG DB 5.0.2 (files dated 2020-2021, i.e. a ~2019 KEGG vintage), `KEGG_ko` field. - orf-to-ko.map.xz: Mapping of ORFs to KOs, from ../../rc4_functional/ orf_to_ko.tsv with the `ko:` prefix stripped, de-duplicated, sorted. Distinct KOs observed: 17,108. Reference hierarchy: regenerated fresh from the live KEGG REST API (rest.kegg.jp), NOT copied from WoL2's kegg/ (that is a frozen 2022 snapshot covering only 10,237 KOs, against the 17,108 observed here). Two real KEGG REST API quirks were found and worked around while building it: - `/link/X/Y` returns rows in the *reverse* column order the URL naively suggests (verified against three independent endpoint pairs). - Only KO's own pathway linkage exposes both the species-generic "map#####" and ortholog-view "path:ko#####" forms; every other entity linked to pathway (module, compound, disease, reaction) returns only the "map#####" form. Handled by converting map->ko by shared numeric ID rather than filtering (filtering produced empty files on the first attempt -- caught before shipping). - pathway-to-disease.map: KEGG's own `/link/disease/pathway` only links disease to organism-specific pathways (e.g. path:hsa05340), never the generic/ortholog form, so this file is instead derived transitively via pathway-to-ko join ko-to-disease (matching the parent README's collapsing-order diagram, where disease hangs off KO, not off pathway). ko-to-go.map: KO-keyed, NOT the same file as ../go/idmaps/kegg.map (reaction-keyed). KEGG REST has no `go` linked db for `ko` (`/link/go/ko` -> HTTP 400), and GO Consortium's external2go has no KO-keyed KEGG cross-reference either (only kegg_reaction2go, which is what ../go/idmaps/kegg.map is built from -- see ../go/README). So this file is built from eggnog.db's `prots` table instead (kegg_ko + gos columns, 285,616 reference proteins with both populated) -- an aggregated empirical cross-reference from eggNOG's reference protein set, NOT a single curated per-KO definition. Spot-checked against ec2go for consistency: K00001 (EC 1.1.1.1, alcohol dehydrogenase) correctly resolves to GO:0004022, matching ec2go's own EC:1.1.1.1 entry. ko_name.txt backfill: 23 of our observed KOs are absent from current KEGG (retired/renumbered since eggNOG 5.0's ~2019 vintage) but are still present in WoL2's own frozen 2022 snapshot (KEGG dropped them sometime between 2022 and now) -- backfilled from /projects/wol/qiyun/wol2/function/kegg/ko_name.txt. These 23 rows reflect KEGG's 2022 state, not current KEGG, for a KO current KEGG no longer defines at all -- listed separately in ko_name_backfilled.txt for transparency; not distinguishable from the other 28,402 rows in ko_name.txt itself. The remaining 105 aren't recoverable from anything available locally (KEGG's REST API has no historical/versioned endpoint). Regeneration and KEGG release: KEGG's REST API always serves the current release, so a later rebuild will pick up whatever KEGG has published since. Format: see ../README's "Format contract" section. module-to-reaction.map and pathway-to-module.map are WIDE (needed by `woltka coverage`); every other file here is long/strict-2-column.