gem-mapping-studio 0.2.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,12 @@
1
+ """Packaged copies of the repository's reference data, so a pip-installed
2
+ `forome-gem` works outside a repo checkout (the walk-up discovery in
3
+ `forome.gem.umls._paths` prefers the repo copies when present).
4
+
5
+ These files are SYNCED COPIES, not sources of truth. The sources are
6
+ `data/umls/semantic_types.yaml`, `schema/genetic_evidence.shacl.ttl` and
7
+ `schema/dimensions.md` at the repo root; `scripts/release-pypi.sh` re-syncs
8
+ them before building, and the test suite asserts they match.
9
+ """
10
+ from pathlib import Path
11
+
12
+ REFERENCE_DIR = Path(__file__).resolve().parent
@@ -0,0 +1,388 @@
1
+ # Dimensions of the Genetic Evidence Model — Reference
2
+
3
+ This document is the human-readable enumeration reference for every dimension
4
+ in the model. The machine-checkable version lives in
5
+ `genetic_evidence.shacl.ttl`. The paper describes the dimensions
6
+ conceptually; this file lists their current enumerations.
7
+
8
+ Dimensions marked **PROMOTED** have been adopted into the model as first-class
9
+ dimensions after surfacing during annotation and being accepted by the curator.
10
+ Dimensions marked **CANDIDATE** have been surfaced once during annotation but
11
+ have not yet been encountered in a second independent paper (per the
12
+ promotion rule: a second, independent occurrence promotes the candidate to
13
+ first-class).
14
+
15
+ ---
16
+
17
+ ## Core dimensions (always required)
18
+
19
+ ### Knowledge Domain
20
+
21
+ Cardinality: multiple. Objectivity: objective.
22
+
23
+ | Value | Meaning |
24
+ | --- | --- |
25
+ | `HUMAN_GENETICS` | Evidence from human family- or inheritance-based genetic studies (pedigrees, segregation, transmission) |
26
+ | `ANIMAL_GENETICS` | Non-human animal genetics outside a model-organism context |
27
+ | `POPULATION_GENETICS` | Population-level variation, allele frequencies, case-control association, GWAS, PGS |
28
+ | `COMPARATIVE_GENOMICS`| Cross-species sequence/synteny analysis |
29
+ | `EPIGENETICS` | Methylation, chromatin, non-sequence inheritance |
30
+ | `GENE_FUNCTION` | Molecular function of gene products |
31
+ | `MODEL_ORGANISM` | Experimental work in a non-human organism used as a model |
32
+
33
+ ### Method
34
+
35
+ Cardinality: multiple. Objectivity: objective.
36
+
37
+ The `method` dimension records *how* the evidence was generated. It is the
38
+ first dimension of the model to receive an explicit **hierarchical structure**
39
+ rather than a flat enumeration. To stay consistent with OBO conventions, the
40
+ hierarchy is expressed as `is_a` relations between terms (subject `is_a`
41
+ object), which lift directly to OWL `rdfs:subClassOf` when the schema is
42
+ rendered as an ontology (future work; see §6.2 of the companion paper).
43
+ Subsumption is transitive: `GWAS is_a ASSOCIATION_STUDY` and
44
+ `ASSOCIATION_STUDY is_a STATISTICAL_GENETICS`, so a `GWAS` is also (by
45
+ transitivity) a `STATISTICAL_GENETICS`.
46
+
47
+ **Method terms.**
48
+
49
+ | Term | Meaning |
50
+ | --- | --- |
51
+ | `STATISTICAL_GENETICS` | Population-level statistical inference from genetic data |
52
+ | `ASSOCIATION_STUDY` | Statistical test of association between genetic variation and phenotype |
53
+ | `GWAS` | Genome-wide, hypothesis-free association scan |
54
+ | `CANDIDATE_GENE_STUDY` | Hypothesis-driven association study at one or a small set of genes |
55
+ | `FINE_MAPPING` | Within-locus association analysis, often with conditional or LD-aware modelling |
56
+ | `FAMILY_BASED` | Statistical inference from family or pedigree data |
57
+ | `LINKAGE_ANALYSIS` | LOD-score-based identification of disease-linked chromosomal regions |
58
+ | `TRANSMISSION_DISEQUILIBRIUM_TEST` | Tests for non-random allele transmission to affected offspring (TDT, FBAT) |
59
+ | `SEGREGATION_ANALYSIS` | Tests of Mendelian segregation patterns in pedigrees |
60
+ | `META_ANALYSIS` | Combining results across studies; includes polygenic-score construction from multiple GWASes |
61
+ | `EXPERIMENT` | Empirical procedure (laboratory or computational simulation) producing new data points |
62
+ | `IN_VIVO` | Experiment in a living organism |
63
+ | `IN_VITRO` | Experiment in isolated cells, tissues, or biochemical systems outside a living organism |
64
+ | `IN_SILICO` | Computational simulation of a biological process (molecular dynamics, docking, simulation models) |
65
+ | `BIOINFORMATICS_INFERENCE` | Computational analysis of existing biological data to characterize or predict features |
66
+ | `CLINICAL_EVIDENCE` | Observation of variants or phenotypes in clinical contexts |
67
+
68
+ The four top-level families, `STATISTICAL_GENETICS`, `EXPERIMENT`,
69
+ `BIOINFORMATICS_INFERENCE`, and `CLINICAL_EVIDENCE`, have no parent and so do
70
+ not appear as a subject in the relations table below.
71
+
72
+ **Method hierarchy (`is_a` relations).**
73
+
74
+ | Term | Relation | Parent term |
75
+ | --- | --- | --- |
76
+ | `ASSOCIATION_STUDY` | `is_a` | `STATISTICAL_GENETICS` |
77
+ | `GWAS` | `is_a` | `ASSOCIATION_STUDY` |
78
+ | `CANDIDATE_GENE_STUDY` | `is_a` | `ASSOCIATION_STUDY` |
79
+ | `FINE_MAPPING` | `is_a` | `ASSOCIATION_STUDY` |
80
+ | `FAMILY_BASED` | `is_a` | `STATISTICAL_GENETICS` |
81
+ | `LINKAGE_ANALYSIS` | `is_a` | `FAMILY_BASED` |
82
+ | `TRANSMISSION_DISEQUILIBRIUM_TEST` | `is_a` | `FAMILY_BASED` |
83
+ | `SEGREGATION_ANALYSIS` | `is_a` | `FAMILY_BASED` |
84
+ | `META_ANALYSIS` | `is_a` | `STATISTICAL_GENETICS` |
85
+ | `IN_VIVO` | `is_a` | `EXPERIMENT` |
86
+ | `IN_VITRO` | `is_a` | `EXPERIMENT` |
87
+ | `IN_SILICO` | `is_a` | `EXPERIMENT` |
88
+
89
+ Convention: when multiple methods apply, the optional `primary_method` field
90
+ records the curator's hierarchy preference. Multiple values from this
91
+ dimension are interpreted as **additive, not hierarchical** (e.g.,
92
+ `method: [GWAS, META_ANALYSIS]` means both apply); do not list a leaf and its
93
+ own ancestor together unless both genuinely apply.
94
+
95
+ #### Notes on the structure
96
+
97
+ **Why `EXPERIMENT` is a parent.** The pre-hierarchical schema had
98
+ `IN_VIVO_EXPERIMENT` and `IN_VITRO_EXPERIMENT` as flat sibling values, with no
99
+ explicit acknowledgement that they share an epistemic structure (a controlled
100
+ procedure producing new data points). Introducing `EXPERIMENT` as a parent
101
+ makes the shared structure explicit and creates a natural home for `IN_SILICO`
102
+ as a third sibling.
103
+
104
+ **`IN_SILICO` is distinct from `BIOINFORMATICS_INFERENCE`.** The two are easy
105
+ to conflate but capture different epistemic operations. `IN_SILICO` is
106
+ computational *simulation*: a model is constructed, parameterised, executed,
107
+ and analyzed, producing new data points by execution (molecular dynamics,
108
+ docking, forward population-genetics simulation). `BIOINFORMATICS_INFERENCE` is
109
+ computational *analysis* of existing data (sequences, structures, database
110
+ records) to characterize or predict features of those data, with no process
111
+ simulated (conservation analysis, splice-site prediction, variant-impact
112
+ prediction). A study running molecular dynamics to predict the effect of a
113
+ substitution is `IN_SILICO`; a study running SIFT or PolyPhen on a list of
114
+ substitutions is `BIOINFORMATICS_INFERENCE`.
115
+
116
+ **Branches kept flat in this revision.** `BIOINFORMATICS_INFERENCE` and
117
+ `CLINICAL_EVIDENCE` are top-level families without children in this version.
118
+ Natural decompositions exist (`CONSERVATION_ANALYSIS`, `SPLICE_PREDICTION`,
119
+ `IMPACT_PREDICTION` for the former; `PEDIGREE_SEGREGATION`, `CASE_REPORT`,
120
+ `CASE_SERIES` for the latter) and are candidates for elaboration as the corpus
121
+ exercises more leaves. Until then they remain flat to avoid introducing
122
+ structure not exercised by available evidence.
123
+
124
+ #### How to use the hierarchy in annotations
125
+
126
+ See `protocols/PROTOCOL.md` §3.4. The short version: pick the most specific
127
+ applicable value; parent relationships are recoverable from the `is_a`
128
+ hierarchy table above.
129
+ If you are confident only at an intermediate level (e.g., the paper says
130
+ "statistical genetics" without specifying the design), record the intermediate
131
+ value and emit `ai_uncertainty` on the dimension.
132
+
133
+ #### Backward compatibility
134
+
135
+ Existing annotations in the corpus use the pre-hierarchical flat values
136
+ (`STATISTICAL_GENETICS`, `IN_VIVO_EXPERIMENT`, `IN_VITRO_EXPERIMENT`,
137
+ `BIOINFORMATICS_PREDICTION`). These remain valid: `STATISTICAL_GENETICS` is a
138
+ legitimate value (the top of its family); `IN_VIVO_EXPERIMENT` and
139
+ `IN_VITRO_EXPERIMENT` are legacy synonyms for `IN_VIVO` and `IN_VITRO`; and
140
+ `BIOINFORMATICS_PREDICTION` is a legacy synonym for `BIOINFORMATICS_INFERENCE`.
141
+ A future curator-review pass will migrate these to leaf values where the
142
+ underlying paper supports a more specific assignment (see
143
+ `notes/ROADMAP.md` §1.b); until then, annotations using flat values are
144
+ interpreted as having committed to the intermediate level only.
145
+
146
+ Note: the earlier POPULATION_DATA and EPIGENETICS_DATA method values
147
+ (never exercised by any annotation in the corpus) no longer appear as
148
+ standalone method values in this revision. Their content is recovered in
149
+ two places:
150
+
151
+ * Population-scale statistical work is recorded under
152
+ STATISTICAL_GENETICS (or its leaves such as GWAS or
153
+ META_ANALYSIS); the relevant phenomenon is captured by the
154
+ POPULATION_GENETICS value in knowledge_domain.
155
+ * Epigenetic work is recorded with the appropriate experimental
156
+ method (IN_VIVO, IN_VITRO, or BIOINFORMATICS_INFERENCE,
157
+ depending on the workflow); the relevant phenomenon is captured
158
+ by the EPIGENETICS value in knowledge_domain.
159
+
160
+ The general principle: the previous *_DATA method values conflated
161
+ what the evidence concerns (knowledge domain) with how it was
162
+ generated (method). The revision separates these into the appropriate
163
+ dimensions.
164
+
165
+ ### Target type
166
+
167
+ Cardinality: single. Objectivity: objective.
168
+
169
+ | Value | Meaning |
170
+ | --- | --- |
171
+ | `GENE` | A single gene |
172
+ | `RELATED_GENE` | Another gene related to the primary target |
173
+ | `VARIANT` | A specific sequence variant |
174
+ | `SEGMENT` | A defined genomic segment |
175
+ | `INTERVAL` | A coordinate interval (bp or cM) |
176
+ | `TRANSCRIPT` | A transcript isoform |
177
+
178
+ ### Resolution
179
+
180
+ Cardinality: single. Objectivity: objective.
181
+
182
+ | Value | Meaning |
183
+ | --- | --- |
184
+ | `WINDOW` | Coarse genomic window |
185
+ | `GENE` | Gene-level resolution |
186
+ | `FUNCTIONAL_ELEMENT`| Regulatory or functional element |
187
+ | `POSITION` | Single-base position |
188
+ | `VARIANT` | Specific variant |
189
+
190
+ ### Credibility
191
+
192
+ Cardinality: one overall rating, plus optional facets. Objectivity: subjective.
193
+
194
+ The overall credibility is an ordinal rating from the enumeration
195
+ `{VERY_HIGH, HIGH, MEDIUM, LOW}` (anchored on SEPIO confidence), optionally
196
+ accompanied by a free-text `credibility_comment` and by separately rated
197
+ facets — statistical power / sample size, independent replication,
198
+ multiple-testing control, ancestry or population-stratification control,
199
+ and ascertainment. The facet keys are not a closed set and grow with the
200
+ corpus; facets observed so far include `cohort_size`, `replication_cohort`,
201
+ `ancestry_composition`, `followup_duration`, `source_GWAS`,
202
+ `n_variants_tested`, `multiple_testing_correction`. The SHACL shape enforces
203
+ the overall ordinal rating; the facets remain open.
204
+
205
+ **Level definitions.** The levels are defined by *defeasibility* — what it
206
+ would take for the curator to stop believing the evidence item — not by study
207
+ design or by the authors' expressed certainty (see `stated certainty`, a
208
+ candidate facet). Credibility is the curator's trust; interest or relevance is
209
+ a separate judgment and must not color it.
210
+
211
+ | Level | Definition |
212
+ | --- | --- |
213
+ | `VERY_HIGH` | Believed by default even when directly contradicted; only an opposing argument of greater strength prompts re-examination. |
214
+ | `HIGH` | Believed unless directly contradicted by evidence of comparable strength; such a contradiction opens doubt. |
215
+ | `MEDIUM` | Not believed on its own; believed once corroborated by an independent source or an orthogonal evidence type. |
216
+ | `LOW` | Not relied upon; recorded pending independent replication. |
217
+
218
+ The scale intensifies at the top (as ACMG *very strong* and ClinGen
219
+ *definitive* do) whereas GRADE certainty intensifies at the bottom
220
+ (*very low*): GRADE grades a body of evidence by its properties, GEM rates a
221
+ single item by the curator's belief-revision policy, so alignment between the
222
+ two is deliberately non-positional (Supplement S1).
223
+
224
+ ### **PROMOTED**: phenotype_scale
225
+
226
+ Cardinality: single per evidence item. Objectivity: objective.
227
+
228
+ Promoted based on Jossin 2017 annotation where three separate "phenotype"
229
+ callouts tagged passages at distinct scales of phenotypic description. The
230
+ existing `Resolution` dimension captures *genetic* scale; this dimension
231
+ captures *phenotypic* scale, which is independent of genetic scale.
232
+
233
+ | Value | Meaning |
234
+ | --- | --- |
235
+ | `MOLECULAR` | Molecular-level phenotype (binding, activity) |
236
+ | `CELLULAR` | Cell-level phenotype (morphology, polarity) |
237
+ | `HISTOLOGICAL` | Tissue-level phenotype (cell composition, architecture) |
238
+ | `ORGANISMAL` | Whole-organism phenotype (gross anatomy, behavior) |
239
+ | `CLINICAL` | Human clinical phenotype |
240
+
241
+ Relation to existing vocabularies: ECO and HPO both carry partial
242
+ information here under different modeling assumptions. Unification with
243
+ those vocabularies is flagged as future work.
244
+
245
+ ### **PROMOTED**: variant_ascertainment
246
+
247
+ Cardinality: multiple. Objectivity: objective. **Conditional**: required
248
+ only when `target_type = VARIANT` (a variant-level ascertainment route
249
+ applies only to variant targets); the SHACL shape enforces it under that
250
+ condition, and an explicit `not_applicable_or_omitted` is accepted where a
251
+ variant target has no single ascertainment mode (e.g. a polygenic score).
252
+
253
+ Promoted based on Davis 2011 annotation, where the paper explicitly studies
254
+ two populations of variants with different epistemic status: variants
255
+ observed in patients (~14 in pedigrees / 38 heterozygous cases) versus
256
+ variants tested functionally regardless of patient observation (40 total in
257
+ zebrafish). The dimension records the ascertainment route by which each
258
+ variant entered the study.
259
+
260
+ | Value | Meaning |
261
+ | --- | --- |
262
+ | `OBSERVED_IN_CASES` | Variant observed in one or more affected individuals |
263
+ | `OBSERVED_IN_CONTROLS` | Variant observed only in unaffected individuals |
264
+ | `FROM_DATABASE` | Variant sourced from a database (HapMap, dbSNP, gnomAD) |
265
+ | `SYNTHETIC` | Variant constructed in silico / in the laboratory |
266
+
267
+ ---
268
+
269
+ ## Conditional dimensions
270
+
271
+ ### When Knowledge Domain contains `HUMAN_GENETICS` and Target type = `GENE`
272
+
273
+ | Dimension | Value type | Cardinality |
274
+ | ----------------------- | ----------- | ----------- |
275
+ | `mode_of_inheritance` | categorical | single |
276
+ | `mendelian_segregation` | boolean | single |
277
+ | `exact_variant` | boolean | single |
278
+ | `subdomain` | categorical | single |
279
+
280
+ Subdomain enumeration: `GWAS`, `Linkage Study`, `WGS-WES Study`,
281
+ `Candidate Gene Study`.
282
+
283
+ ### When Knowledge Domain contains `HUMAN_GENETICS` and Target type = `VARIANT`
284
+
285
+ | Dimension | Value type | Cardinality |
286
+ | ------------------------------- | ----------------------- | ----------- |
287
+ | `environmental_factors` | quasi-categorical | multiple |
288
+ | `penetrance` | categorical | single |
289
+ | `genetic_background_considered` | boolean | single |
290
+
291
+ Penetrance enumeration: `complete`, `incomplete`, `unknown`.
292
+
293
+ ### When Knowledge Domain contains `GENE_FUNCTION`
294
+
295
+ | Dimension | Value type | Cardinality |
296
+ | -------------------- | ----------- | ----------- |
297
+ | `measurement_target` | categorical | multiple |
298
+ | `gene_relation` | categorical | single |
299
+
300
+ Measurement target enumeration: `EXISTENCE`, `EXPRESSION`, `STABILITY`,
301
+ `BINDING`, `LOCALIZATION`, `ACTIVITY`, `CATALYSIS`.
302
+
303
+ Gene relation enumeration: `X_has_same_function_as_Y`, `X_regulates_Y`,
304
+ `X_inhibits_Y`.
305
+
306
+ ### When Method contains `IN_VIVO` (or legacy `IN_VIVO_EXPERIMENT`) or Knowledge Domain contains `MODEL_ORGANISM`
307
+
308
+ | Dimension | Value type | Cardinality |
309
+ | -------------------------- | ------------ | ----------- |
310
+ | `organism` | categorical | multiple |
311
+ | `specificity_of_phenotype` | free text | single |
312
+
313
+ ### When Knowledge Domain contains `MODEL_ORGANISM`
314
+
315
+ | Dimension | Value type | Cardinality |
316
+ | -------------------------- | ------------ | ----------- |
317
+ | `knockout_type` | categorical | single |
318
+
319
+ Knockout type enumeration: `CONDITIONAL`, `UNCONDITIONAL`. (Activation
320
+ is narrower than `organism`: a knockout type is only meaningful for
321
+ model-organism evidence, not for every in-vivo experiment.)
322
+
323
+ ---
324
+
325
+ ## Candidate dimensions and enumeration values
326
+
327
+ The following have been surfaced once --- during annotation or curator
328
+ review --- but have not yet been independently confirmed by a paper from the
329
+ corpus. They are recorded here for traceability; each promotion requires a
330
+ corpus paper exercising the same gap.
331
+
332
+ ### Candidate: `PROTEIN_SUBDOMAIN` value for Resolution
333
+
334
+ Source: Jossin 2017, WD14/WD10 domain mapping for LLGL1–N-cadherin
335
+ interaction.
336
+
337
+ ### Candidate: `VARIANT_IN_TRANSCRIPT` value for Resolution
338
+
339
+ Source: curator review during the UMLS crosswalk round (2026-09-01), not a
340
+ corpus annotation. There is a recurring evidence pattern asserting that a
341
+ variant has a given effect *in a specific transcript*, usually
342
+ tissue-restricted, and especially where Method is
343
+ `BIOINFORMATICS_INFERENCE` (splice-effect prediction, isoform-level
344
+ expression). This is resolution in transcript coordinates (HGVS `c.`),
345
+ alongside genomic coordinates (`g.`, the current scale) and the protein
346
+ coordinates (`p.`) of the `PROTEIN_SUBDOMAIN` candidate --- the Resolution
347
+ axis spans multiple coordinate systems, not just granularities. Tissue
348
+ context itself stays in `special_considerations` (existing `cell_type`
349
+ key). Promotion follows the standard rule: a corpus paper must exercise
350
+ the gap.
351
+
352
+ ### Candidate: `INTERACTION` and `COMPLEX` values for Target type
353
+
354
+ Source: Jossin 2017 in vivo dominant-negative experiment, which targets the
355
+ LLGL1–N-cadherin interaction rather than a gene. The LLGL1–N-cadherin–β-catenin
356
+ tripartite complex also motivates a `COMPLEX` target value.
357
+
358
+ ### Candidate: additional Gene relation values
359
+
360
+ Source: Jossin 2017 — `X_physically_binds_Y` and
361
+ `X_regulates_trafficking_of_Y`. The existing enumeration covers functional
362
+ equivalence, regulation, and inhibition; it does not cover physical binding
363
+ or trafficking regulation.
364
+
365
+ ### Candidate: `knowledge_domain_priority`
366
+
367
+ Source: Davis 2011 annotator used "Model Organism (primary) Human Genetics
368
+ Functional (somewhat)" — an explicitly ordered compound value. Would either
369
+ attach an ordinal priority to each knowledge_domain value or introduce a
370
+ scalar `primary_knowledge_domain` field (analogous to `primary_method`).
371
+
372
+ ### Candidate: `curator_critique` sub-block on Assertion
373
+
374
+ Source: Davis 2011 annotator's callout "Looks unrealistic, they have twice
375
+ as many cases..." — a methodological critique attached to a specific
376
+ assertion in the paper. Would attach raised_by / concern / status fields
377
+ to `GeneticEvidenceAssertion`.
378
+
379
+ ---
380
+
381
+ ## Free-form extension
382
+
383
+ Per the model's design, `special_considerations` accepts arbitrary key-value
384
+ pairs. Keys observed in the corpus include: `cell_type`,
385
+ `developmental_timing`, `cre_driver`, `techniques`, `cohort_composition`,
386
+ `variant_yield`, `ancestry_stratification`. Promotion of any such key to a
387
+ named dimension requires a second paper to exercise the same slot and
388
+ curator review.