lhqing commited on
Commit
c68362e
·
verified ·
1 Parent(s): 66600a3

Dataset card: layout, measured counts, format gotchas, mixed licensing

Browse files
Files changed (1) hide show
  1. README.md +220 -0
README.md ADDED
@@ -0,0 +1,220 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ pretty_name: WormBase WS298 — ontologies, associations, and AceDB dumps
3
+ license: cc-by-4.0
4
+ language:
5
+ - en
6
+ tags:
7
+ - biology
8
+ - genomics
9
+ - c-elegans
10
+ - caenorhabditis-elegans
11
+ - wormbase
12
+ - ontology
13
+ - gene-ontology
14
+ - obo
15
+ - gaf
16
+ size_categories:
17
+ - 1M<n<10M
18
+ ---
19
+
20
+ # WormBase WS298
21
+
22
+ A byte-faithful mirror of the parts of WormBase release **WS298** the Liu lab depends on: the five
23
+ ontologies, the seven association files, and two classes of the AceDB dump. Files are exactly as
24
+ WormBase served them — still gzipped, original filenames, nothing decompressed, reorganised or
25
+ re-encoded.
26
+
27
+ WS298 is WormBase's **final production release**. Ongoing curation moved to the
28
+ [Alliance of Genome Resources](https://www.alliancegenome.org/), so this is a terminal snapshot
29
+ rather than one that will be superseded — which is the reason to pin it rather than track a moving
30
+ `current-production-release/` alias.
31
+
32
+ ## Layout
33
+
34
+ ```text
35
+ WS298/
36
+ ├── ontology/ five ontologies + seven association files (12 files, 22 MB)
37
+ └── acedb/ Paper and LongText from the AceDB dump (2 files, 120 MB)
38
+ ```
39
+
40
+ The `WS298/ontology/` path is not arbitrary. It is exactly the cache layout
41
+ [`eutely.wormbase.Release`](https://github.com/liuhlab/eutely) expects, so a snapshot of this repo
42
+ can be read directly as a staged release with no copying or renaming — see [Usage](#usage).
43
+
44
+ ## Ontologies
45
+
46
+ `anatomy`, `development` and `phenotype` are worm-specific and authored by WormBase. `disease` and
47
+ `gene` are the full Disease and Gene Ontologies, which WormBase mirrors rather than authors.
48
+
49
+ | File | Terms | IDs | Size |
50
+ | --- | --- | --- | --- |
51
+ | `anatomy_ontology.WS298.obo.gz` | 7,192 | `WBbt:` | 160 KB |
52
+ | `development_ontology.WS298.obo.gz` | 777 | `WBls:` | 29 KB |
53
+ | `phenotype_ontology.WS298.obo.gz` | 2,712 | `WBPhenotype:` | 176 KB |
54
+ | `disease_ontology.WS298.obo.gz` | 14,430 | `DOID:` | 1.3 MB |
55
+ | `gene_ontology.WS298.obo.gz` | 48,165 | `GO:` | 4.5 MB |
56
+
57
+ All five declare `format-version: 1.2`.
58
+
59
+ ## Associations
60
+
61
+ An association is one statement that some entity stands in a named relation to one ontology term,
62
+ backed by evidence. Six sources in four wire formats, 1,323,659 statements between them.
63
+
64
+ | File | Source | Format | Rows | Terms | Size |
65
+ | --- | --- | --- | --- | --- | --- |
66
+ | `anatomy_association.WS298.wb.gz` | `anatomy` | GAF 2.0 | 461,223 | `WBbt:` | 3.7 MB |
67
+ | `development_association.WS298.wb.gz` | `development` | GAF 2.0 | 74,571 | `WBls:` | 382 KB |
68
+ | `phenotype_association.WS298.wb.gz` | `phenotype` | GAF 2.0 | 439,924 | `WBPhenotype:` | 3.1 MB |
69
+ | `gene_association.WS298.wb.gz` | `gene` | GAF 2.2 | 312,203 | `GO:` | 4.4 MB |
70
+ | `disease_association.WS298.daf.txt.gz` | `disease` | DAF 1.0 | 2,364 | `DOID:` | 37 KB |
71
+ | `disease_association.by_orthology.WS298.tsv.txt.gz` | `disease_by_orthology` | TSV | 33,036 | `DOID:` | 222 KB |
72
+ | `gene_association_nonnoctua.WS298.wb.gz` | — | GAF 2.2 | 294,407 | `GO:` | 4.1 MB |
73
+
74
+ Notes on the columns that differ between sources: in `anatomy`, column 4 is an expression
75
+ *certainty*, not a relation; in `gene` it is a real GAF 2.2 relation (`enables`, `involved_in`, …).
76
+ `disease` is curated from worm experiments and its subject is often an allele or strain rather than
77
+ a gene, while `disease_by_orthology` is inferred from a human ortholog and so carries neither
78
+ evidence code nor reference. The two disease files answer the same question with incomparable
79
+ evidence, which is why they stay separate rather than being concatenated.
80
+
81
+ `gene_association_nonnoctua` is **not** a seventh source: every one of its rows appears verbatim in
82
+ `gene_association`. It is the GO set with the Noctua/GO-CAM rows removed, included here only so the
83
+ mirror is complete.
84
+
85
+ **Rows are not records.** A GAF row naming two comma-separated terms is two statements. Parsing the
86
+ seven files yields slightly more records than they have rows — 461,422 records from `anatomy`'s
87
+ 461,223 rows, 2,503 from `disease`'s 2,364. The table above counts rows, because that is what is in
88
+ the file.
89
+
90
+ ## AceDB dump
91
+
92
+ Two classes from the WS298 AceDB dump, kept under their published names.
93
+
94
+ | File | Contents | Records | Size (gz) | Size (raw) |
95
+ | --- | --- | --- | --- | --- |
96
+ | `Paper.xml.gz` | Bibliography: title, journal, authors, abstract pointer | 64,863 `<Paper>` | 23 MB | 302 MB |
97
+ | `LongText.xml.gz` | Free-text bodies — paper abstracts, EMBL records | 671,404 stanzas | 97 MB | 973 MB |
98
+
99
+ ⚠️ **`LongText.xml.gz` is not XML.** Despite the `.xml.gz` name it is AceDB `.ace` format —
100
+ 671,404 `LongText : "<id>"` stanzas of free text, and zero XML tags in the entire file. Feeding it
101
+ to an XML parser fails immediately. `Paper.xml.gz` *is* genuine XML. The misnomer is upstream's;
102
+ the name is preserved here so the file still matches anyone else's copy of the same dump, but do
103
+ not select a parser by suffix.
104
+
105
+ The two connect through the abstract pointer: a `<Paper>` carries
106
+ `<Abstract><LongText>WBPaper00000003</LongText></Abstract>`, and the matching
107
+ `LongText : "WBPaper00000003"` stanza holds the abstract text.
108
+
109
+ Neither file records its release internally. They are placed under `WS298/` because that is the
110
+ release they were dumped from, not because anything in the bytes says so.
111
+
112
+ ## Usage
113
+
114
+ ### With `eutely`
115
+
116
+ The layout is the one [`eutely.wormbase`](https://github.com/liuhlab/eutely) caches into, so a
117
+ snapshot is readable as-is:
118
+
119
+ ```python
120
+ from pathlib import Path
121
+
122
+ from huggingface_hub import snapshot_download
123
+ from eutely.wormbase import Filter, Release, load_associations, load_ontology
124
+
125
+ root = Path(snapshot_download("liuhlab/wormbase", repo_type="dataset"))
126
+ ws298 = Release("WS298", root=root)
127
+
128
+ anatomy = load_ontology("anatomy", release=ws298)
129
+ anatomy["WBbt:0005672"].name # 'AWC'
130
+ len(anatomy.descendants("WBbt:0003681", ("is_a", "part_of"))) # 215 parts of the pharynx
131
+
132
+ assoc = load_associations("anatomy", release=ws298)
133
+ assoc.by_term("WBbt:0005672") # genes expressed in AWC
134
+ ```
135
+
136
+ Pass `root=` and nothing downloads from WormBase — which is the point on a compute node with no
137
+ outbound network.
138
+
139
+ ### Without `eutely`
140
+
141
+ Everything is gzipped text; no special reader is required.
142
+
143
+ ```python
144
+ import gzip
145
+
146
+ with gzip.open("WS298/ontology/gene_association.WS298.wb.gz", "rt") as fh:
147
+ rows = [line.rstrip("\n").split("\t") for line in fh if not line.startswith("!")]
148
+ ```
149
+
150
+ The dataset viewer does not render these files, and no `configs` block claims it can: OBO, GAF, DAF
151
+ and `.ace` are not tabular formats the Hub can infer, and the tab-separated ones carry `!` comment
152
+ headers rather than a column row. Download and parse them directly.
153
+
154
+ ## Three things that will bite you
155
+
156
+ **Most phenotype records are negative.** 318,218 of 439,924 assert that a gene does *not* produce a
157
+ phenotype. "The genes for this phenotype" is the wrong question unless you read column 4 — a
158
+ `NOT` qualifier — or filter on it.
159
+
160
+ **Most GO records are not *C. elegans*.** Only 134,137 of `gene_association`'s 312,203 rows carry
161
+ `taxon:6239` as their primary taxon; the rest are nine other nematodes. (134,390 rows mention
162
+ `taxon:6239` in *either* taxon field, the extra 253 being interacting-taxon entries — a different
163
+ question with a different answer.)
164
+
165
+ **Anatomy containment is `part_of`, not `is_a`.** Walking `is_a` alone answers nothing about what
166
+ lies inside the pharynx. Widen the relation set when traversing the anatomy ontology; in the
167
+ development ontology, note that `preceded_by` is a temporal ordering rather than a hierarchy.
168
+
169
+ ## Provenance
170
+
171
+ Downloaded from `downloads.wormbase.org` on 2026-07-26. The ontology and association files came
172
+ through the `releases/current-production-release/ONTOLOGY/` alias, which is the only path WormBase
173
+ serves — the concrete `releases/WS298/` directory the filenames imply answers 403.
174
+
175
+ Every file was verified as intact gzip and parsed end to end before upload; the record counts in
176
+ the tables above are measured from these exact bytes, not copied from upstream documentation.
177
+
178
+ ## Licensing
179
+
180
+ This is a redistribution of third-party data with **mixed** terms, labelled `cc-by-4.0` because
181
+ that is the strictest condition in the bundle. Per component:
182
+
183
+ | Component | Licence |
184
+ | --- | --- |
185
+ | WormBase-authored data (anatomy, development, phenotype; AceDB dumps) | [CC0 1.0](https://creativecommons.org/publicdomain/zero/1.0/) |
186
+ | 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/) |
187
+ | Human Disease Ontology (`disease_ontology`) | [CC0 1.0](https://disease-ontology.org/about/) |
188
+
189
+ Attribution is therefore required for the GO-derived files and not for the rest. Complying with
190
+ CC BY 4.0 across the whole set satisfies every component. No file here has been modified, so
191
+ attribution to the original creators is the only obligation.
192
+
193
+ ## Citation
194
+
195
+ Cite the upstream resources, not this mirror:
196
+
197
+ ```bibtex
198
+ @article{wormbase2024,
199
+ title = {WormBase 2024: status and transitioning to Alliance infrastructure},
200
+ journal = {Genetics},
201
+ volume = {227},
202
+ number = {1},
203
+ year = {2024},
204
+ doi = {10.1093/genetics/iyae050}
205
+ }
206
+
207
+ @article{geneontology2023,
208
+ title = {The Gene Ontology knowledgebase in 2023},
209
+ journal = {Genetics},
210
+ volume = {224},
211
+ number = {1},
212
+ year = {2023},
213
+ doi = {10.1093/genetics/iyad031}
214
+ }
215
+ ```
216
+
217
+ ## Maintenance
218
+
219
+ Mirrored by the [Liu lab](https://github.com/liuhlab) for [`eutely`](https://github.com/liuhlab/eutely).
220
+ WS298 is terminal, so this repo is a fixed snapshot: it will not be re-cut for new releases.