--- pretty_name: WormBase WS298 — ontologies, associations, and AceDB dumps license: cc-by-4.0 language: - en tags: - biology - genomics - c-elegans - caenorhabditis-elegans - wormbase - ontology - gene-ontology - obo - gaf size_categories: - 1M` | 23 MB | 302 MB | | `LongText.xml.gz` | Free-text bodies — paper abstracts, EMBL records | 671,404 stanzas | 97 MB | 973 MB | ⚠️ **`LongText.xml.gz` is not XML.** Despite the `.xml.gz` name it is AceDB `.ace` format — 671,404 `LongText : ""` stanzas of free text, and zero XML tags in the entire file. Feeding it to an XML parser fails immediately. `Paper.xml.gz` *is* genuine XML. The misnomer is upstream's; the name is preserved here so the file still matches anyone else's copy of the same dump, but do not select a parser by suffix. The two connect through the abstract pointer: a `` carries `WBPaper00000003`, and the matching `LongText : "WBPaper00000003"` stanza holds the abstract text. Neither file records its release internally. They are placed under `WS298/` because that is the release they were dumped from, not because anything in the bytes says so. ## Usage ### With `eutely` The layout is the one [`eutely.wormbase`](https://github.com/liuhlab/eutely) caches into, so a snapshot is readable as-is: ```python from pathlib import Path from huggingface_hub import snapshot_download from eutely.wormbase import Filter, Release, load_associations, load_ontology root = Path(snapshot_download("liuhlab/wormbase", repo_type="dataset")) ws298 = Release("WS298", root=root) anatomy = load_ontology("anatomy", release=ws298) anatomy["WBbt:0005672"].name # 'AWC' len(anatomy.descendants("WBbt:0003681", ("is_a", "part_of"))) # 215 parts of the pharynx assoc = load_associations("anatomy", release=ws298) assoc.by_term("WBbt:0005672") # genes expressed in AWC ``` Pass `root=` and nothing downloads from WormBase — which is the point on a compute node with no outbound network. ### Without `eutely` Everything is gzipped text; no special reader is required. ```python import gzip with gzip.open("WS298/ontology/gene_association.WS298.wb.gz", "rt") as fh: rows = [line.rstrip("\n").split("\t") for line in fh if not line.startswith("!")] ``` The dataset viewer does not render these files, and no `configs` block claims it can: OBO, GAF, DAF and `.ace` are not tabular formats the Hub can infer, and the tab-separated ones carry `!` comment headers rather than a column row. Download and parse them directly. ## Three things that will bite you **Most phenotype records are negative.** 318,218 of 439,924 assert that a gene does *not* produce a phenotype. "The genes for this phenotype" is the wrong question unless you read column 4 — a `NOT` qualifier — or filter on it. **Most GO records are not *C. elegans*.** Only 134,390 of `gene_association`'s 312,203 rows carry `taxon:6239`; the rest are nine other nematodes — *C. briggsae*, *C. remanei*, *P. pacificus*, *B. malayi* and five more. Watch the arithmetic here. A `grep` for the bare column value returns 134,137, but 253 further worm rows name a second, interacting taxon and so read `taxon:6239|taxon:287` — always a pathogen (*P. aeruginosa*, *E. coli*, *B. thuringiensis* …), never another host. Those are *C. elegans* rows. No row carries `taxon:6239` in the interacting position alone, so 134,390 is the count of rows about the worm and 134,137 is only the count of rows about the worm *and nothing else*. **Anatomy containment is `part_of`, not `is_a`.** Walking `is_a` alone answers nothing about what lies inside the pharynx. Widen the relation set when traversing the anatomy ontology; in the development ontology, note that `preceded_by` is a temporal ordering rather than a hierarchy. ## Provenance Downloaded from [downloads.wormbase.org](https://downloads.wormbase.org/) on 2026-07-26. The twelve files in `WS298/ontology/` each came from exactly one URL, formed by appending the filename to the release's ONTOLOGY directory: ```text https://downloads.wormbase.org/releases/current-production-release/ONTOLOGY/ ``` So `anatomy_ontology.WS298.obo.gz` is […/ONTOLOGY/anatomy_ontology.WS298.obo.gz](https://downloads.wormbase.org/releases/current-production-release/ONTOLOGY/anatomy_ontology.WS298.obo.gz), and so on for the other eleven. Note the path goes through the `current-production-release/` alias: that is the only path WormBase serves, and the concrete `releases/WS298/` directory the filenames imply answers 403. Because WS298 is the final release, the alias and the pin name the same bytes — but if WormBase ever advances the alias, these files remain WS298 and upstream would not. The two files in `WS298/acedb/` come from the same release's AceDB per-class dump tree. That directory is reachable from a browser but Cloudflare-gated to non-interactive clients, so it cannot be re-fetched by script — which is part of why they are mirrored here at all. Every file was verified as intact gzip and parsed end to end before upload, and re-verified SHA-256-identical to the source after a round trip through this repo. The counts in the tables above are measured from these exact bytes, not copied from upstream documentation — where the two disagreed, the bytes won. ## Licensing This is a redistribution of third-party data with **mixed** terms, labelled `cc-by-4.0` because that is the strictest condition in the bundle. Per component: | Component | Licence | | --- | --- | | WormBase-authored data (anatomy, development, phenotype; AceDB dumps) | [CC0 1.0](https://creativecommons.org/publicdomain/zero/1.0/) | | Gene Ontology and its annotations (`gene_ontology`, `gene_association*`) | [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) — [GO citation policy](https://geneontology.org/docs/go-citation-policy/) | | Human Disease Ontology (`disease_ontology`) | [CC0 1.0](https://disease-ontology.org/about/) | Attribution is therefore required for the GO-derived files and not for the rest. Complying with CC BY 4.0 across the whole set satisfies every component. No file here has been modified, so attribution to the original creators is the only obligation. ## Citation Cite the upstream resources, not this mirror: ```bibtex @article{wormbase2024, title = {WormBase 2024: status and transitioning to Alliance infrastructure}, journal = {Genetics}, volume = {227}, number = {1}, year = {2024}, doi = {10.1093/genetics/iyae050} } @article{geneontology2023, title = {The Gene Ontology knowledgebase in 2023}, journal = {Genetics}, volume = {224}, number = {1}, year = {2023}, doi = {10.1093/genetics/iyad031} } ``` ## Maintenance Mirrored by the [Liu lab](https://github.com/liuhlab) for [`eutely`](https://github.com/liuhlab/eutely). WS298 is terminal, so this repo is a fixed snapshot: it will not be re-cut for new releases.