diff --git a/.gitignore b/.gitignore index 308293227..6d8fbfeec 100644 --- a/.gitignore +++ b/.gitignore @@ -132,3 +132,5 @@ import.report scratch/ .DS_Store docs/_site +docker/edges.tsv.gz +docker/nodes.tsv.gz diff --git a/docs/ontology/0000002/index.html b/docs/ontology/0000002/index.html index 0f3c558a9..57b173871 100644 --- a/docs/ontology/0000002/index.html +++ b/docs/ontology/0000002/index.html @@ -55,10 +55,8 @@
Synonym -
-
- doubling rate (RELATED) -
+ Related +
doubling rate
diff --git a/docs/ontology/0000003/index.html b/docs/ontology/0000003/index.html index 90edb5662..830e18136 100644 --- a/docs/ontology/0000003/index.html +++ b/docs/ontology/0000003/index.html @@ -55,13 +55,8 @@
Synonym -
-
- -
+ Exact +
mean recovery time
diff --git a/docs/ontology/0000004/index.html b/docs/ontology/0000004/index.html index 7c1c65961..d0a9f4a23 100644 --- a/docs/ontology/0000004/index.html +++ b/docs/ontology/0000004/index.html @@ -55,14 +55,16 @@
Synonym -
-
- -
+ Exact +
contagious time
+
+ Synonym + Narrow
+
infectious days
+
+ Synonym + Exact
+
infectious period
diff --git a/docs/ontology/0000005/index.html b/docs/ontology/0000005/index.html index ded607640..dcfeeb3ee 100644 --- a/docs/ontology/0000005/index.html +++ b/docs/ontology/0000005/index.html @@ -55,13 +55,20 @@
Synonym -
-
- -
+ Exact +
transmission coefficient
+
+ Synonym + Exact
+
transmission rate
+
+ Synonym + Related(Symbol LaTeX)
+
\beta
+
+ Synonym + Related(Symbol Text)
+
β
diff --git a/docs/ontology/0000006/index.html b/docs/ontology/0000006/index.html index 9a2381fd7..81a90fbe9 100644 --- a/docs/ontology/0000006/index.html +++ b/docs/ontology/0000006/index.html @@ -55,14 +55,16 @@
Synonym -
-
- -
+ Exact +
R0
+
+ Synonym + Exact
+
basic reproductive number
+
+ Synonym + Exact
+
basic reproductive rate
diff --git a/docs/ontology/0000007/index.html b/docs/ontology/0000007/index.html index 8170f60d0..e207fc5f6 100644 --- a/docs/ontology/0000007/index.html +++ b/docs/ontology/0000007/index.html @@ -55,13 +55,12 @@
Synonym -
-
- -
+ Exact +
effective reproductive number
+
+ Synonym + Exact
+
effective reproductive rate
diff --git a/docs/ontology/0000008/index.html b/docs/ontology/0000008/index.html index dae45befd..f590f779f 100644 --- a/docs/ontology/0000008/index.html +++ b/docs/ontology/0000008/index.html @@ -55,10 +55,8 @@
Synonym -
-
- infectivity (EXACT) -
+ Exact +
infectivity
diff --git a/docs/ontology/0000010/index.html b/docs/ontology/0000010/index.html index 6ea1113c2..082e20c9a 100644 --- a/docs/ontology/0000010/index.html +++ b/docs/ontology/0000010/index.html @@ -55,10 +55,8 @@
Synonym -
-
- incubation period (EXACT) -
+ Exact +
incubation period
diff --git a/docs/ontology/0000011/index.html b/docs/ontology/0000011/index.html index 96033fa19..d6b8fa97d 100644 --- a/docs/ontology/0000011/index.html +++ b/docs/ontology/0000011/index.html @@ -53,6 +53,14 @@
+
+ Synonym + Related(Symbol LaTeX)
+
\delta
+
+ Synonym + Related(Symbol Text)
+
δ
diff --git a/docs/ontology/0000012/index.html b/docs/ontology/0000012/index.html new file mode 100644 index 000000000..5f405637d --- /dev/null +++ b/docs/ontology/0000012/index.html @@ -0,0 +1,96 @@ + + + + + + + + vaccination rate + + + + +
+
+
+ Term + vaccination rate +
+
+

The rate at which individuals take up vaccination.

+
+
Local Unique Identifier
+
+ 0000012 +
+ + + + + +
+ Property + suggested_data_type +
+
+ float +
+
+ Property + suggested_unit +
+
+ 1 / day +
+
+ Property + physical_min +
+
+ 0.0 +
+
+
+
+ + + + + + \ No newline at end of file diff --git a/docs/ontology/0000013/index.html b/docs/ontology/0000013/index.html new file mode 100644 index 000000000..411ce1c3a --- /dev/null +++ b/docs/ontology/0000013/index.html @@ -0,0 +1,104 @@ + + + + + + + + recovery rate + + + + +
+
+
+ Term + recovery rate +
+
+

The rate at which individuals recover after being infected.

+
+
Local Unique Identifier
+
+ 0000013 +
+ + +
+ Synonym + Related(Symbol Text)
+
γ
+
+ Synonym + Related(Symbol LaTeX)
+
\gamma
+ + + +
+ Property + suggested_data_type +
+
+ float +
+
+ Property + suggested_unit +
+
+ 1 / day +
+
+ Property + physical_min +
+
+ 0.0 +
+
+
+
+ + + + + + \ No newline at end of file diff --git a/docs/ontology/0000014/index.html b/docs/ontology/0000014/index.html new file mode 100644 index 000000000..1f47c26fd --- /dev/null +++ b/docs/ontology/0000014/index.html @@ -0,0 +1,104 @@ + + + + + + + + hospital discharge rate + + + + +
+
+
+ Term + hospital discharge rate +
+
+

The rate at which recovered hospitalized individuals are released from hospital.

+
+
Local Unique Identifier
+
+ 0000014 +
+ + +
+ Synonym + Related(Symbol LaTeX)
+
\tau
+
+ Synonym + Related(Symbol Text)
+
𝜏
+ + + +
+ Property + suggested_data_type +
+
+ float +
+
+ Property + suggested_unit +
+
+ 1 / day +
+
+ Property + physical_min +
+
+ 0.0 +
+
+
+
+ + + + + + \ No newline at end of file diff --git a/docs/ontology/index.html b/docs/ontology/index.html index 7aa6b6854..6a33a2f5f 100644 --- a/docs/ontology/index.html +++ b/docs/ontology/index.html @@ -47,7 +47,7 @@

A custom ontology to support the epidemiology use case in ASKEM.

Number of Terms
-
11
+
14
MIRA Epi Metaregistry
@@ -55,9 +55,36 @@
- + +
+
+ Synonym Type Definitions +
+ + + + + + + + + + + + + + + + + + + + +
IDNameSpecificity
referenced_by_latexSymbol LaTeXRELATED
referenced_by_symbolSymbol TextRELATED
+
+
Terms, Relations, and Properties @@ -68,6 +95,7 @@
Type Local Identifier Name + Definition @@ -77,6 +105,7 @@
0000001 population + The number of people who live in an area being modeled. @@ -84,6 +113,7 @@
0000002 doubling time + The length of time that an infectious disease requires to double in incidence. @@ -91,6 +121,7 @@
0000003 recovery time + The length of time an infected individual needs to recover after being infected. @@ -98,6 +129,7 @@
0000004 infectious time + The length of time an infected individual is infectious after being infected. @@ -105,6 +137,7 @@
0000005 effective contact rate + The average number of contacts per person per time which result in an infection. Can be calculated as the transmissibility multiplied by the average number of people exposed. @@ -112,6 +145,7 @@
0000006 basic reproduction number + Represents the average number of people who will be infected by any given infected person where all individuals are susceptible to infection. It is calculated as the ratio of the effective contact rate and then mean recovery time. @@ -119,6 +153,7 @@
0000007 effective reproduction number + Represents the average number of people who will be infected by any given infected person in a partially susceptible population. It is calculated by multiplying the basic reproduction number by the fraction of the population that is susceptible. @@ -126,6 +161,7 @@
0000008 transmissibility + The ability of a person infected with a given pathogen to infect a susceptible person. @@ -133,6 +169,7 @@
0000009 virulence + The likelihood of a disease occurring due to a pathogen. Virulence is measured relative to a standard, such as another pathogen or host. @@ -140,6 +177,7 @@
0000010 incubation time + The length of time after which an infected person shows symptoms of disease. @@ -147,6 +185,31 @@
0000011 progression rate + The rate at which an infected person develops symptoms of disease. Inverse of the incubation time. + + + + Term + + 0000012 + vaccination rate + The rate at which individuals take up vaccination. + + + + Term + + 0000013 + recovery rate + The rate at which individuals recover after being infected. + + + + Term + + 0000014 + hospital discharge rate + The rate at which recovered hospitalized individuals are released from hospital. diff --git a/mira/dkg/askemo/api.py b/mira/dkg/askemo/api.py index 60dbc440b..4c521e369 100644 --- a/mira/dkg/askemo/api.py +++ b/mira/dkg/askemo/api.py @@ -20,12 +20,17 @@ # "owl:equivalentTo", } +REFERENCED_BY_LATEX = "referenced_by_latex" +REFERENCED_BY_SYMBOL = "referenced_by_symbol" + #: Keys are values in ASKEMO and values are OBO specificities SYNONYM_TYPES = { "oboInOwl:hasExactSynonym": "EXACT", "oboInOwl:hasBroadSynonym": "BROAD", "oboInOwl:hasNarrowSynonym": "NARROW", "oboInOwl:hasRelatedSynonym": "RELATED", + REFERENCED_BY_LATEX: "RELATED", + REFERENCED_BY_SYMBOL: "RELATED", # Don't include these since they are lower specificity # "oboInOwl:hasSynonym": "RELATED", } diff --git a/mira/dkg/askemo/askemo.json b/mira/dkg/askemo/askemo.json index 3df8f67df..9fabe11e8 100644 --- a/mira/dkg/askemo/askemo.json +++ b/mira/dkg/askemo/askemo.json @@ -96,6 +96,14 @@ { "type": "oboInOwl:hasExactSynonym", "value": "transmission rate" + }, + { + "type": "referenced_by_latex", + "value": "\\beta" + }, + { + "type": "referenced_by_symbol", + "value": "β" } ], "type": "class", @@ -240,6 +248,16 @@ "physical_min": 0.0, "suggested_data_type": "float", "suggested_unit": "1 / day", + "synonyms": [ + { + "type": "referenced_by_latex", + "value": "\\delta" + }, + { + "type": "referenced_by_symbol", + "value": "δ" + } + ], "type": "class" }, { @@ -258,7 +276,16 @@ "physical_min": 0.0, "suggested_data_type": "float", "suggested_unit": "1 / day", - "synonyms": [], + "synonyms": [ + { + "type": "referenced_by_symbol", + "value": "γ" + }, + { + "type": "referenced_by_latex", + "value": "\\gamma" + } + ], "type": "class" }, { @@ -268,7 +295,16 @@ "physical_min": 0.0, "suggested_data_type": "float", "suggested_unit": "1 / day", - "synonyms": [], + "synonyms": [ + { + "type": "referenced_by_latex", + "value": "\\tau" + }, + { + "type": "referenced_by_symbol", + "value": "𝜏" + } + ], "type": "class" } ] \ No newline at end of file diff --git a/mira/dkg/askemo/generate_site.py b/mira/dkg/askemo/generate_site.py index 257a6dee4..51d71d699 100644 --- a/mira/dkg/askemo/generate_site.py +++ b/mira/dkg/askemo/generate_site.py @@ -8,12 +8,20 @@ from pyobo.struct import make_ad_hoc_ontology from mira.dkg import ASKEMO -from mira.dkg.askemo.api import Term, get_askemo_terms, SYNONYM_TYPES +from mira.dkg.askemo.api import Term, get_askemo_terms, SYNONYM_TYPES, REFERENCED_BY_LATEX, REFERENCED_BY_SYMBOL HERE = Path(__file__).parent.resolve() ROOT = HERE.parent.parent.parent.resolve() ONTOLOGY_DIRECTORY = ROOT.joinpath("docs", "ontology") +SYMBOL_SYNONYM_TEXT_TYPEDEF = pyobo.SynonymTypeDef(REFERENCED_BY_SYMBOL, "Symbol Text", specificity="RELATED") +SYMBOL_SYNONYM_LATEX_TYPEDEF = pyobo.SynonymTypeDef(REFERENCED_BY_LATEX, "Symbol LaTeX", specificity="RELATED") +SYNONYM_TYPEDEFS = [SYMBOL_SYNONYM_LATEX_TYPEDEF, SYMBOL_SYNONYM_TEXT_TYPEDEF] +SYNONYM_TYPEDEFS_DICT = { + synonym_typedef.id: synonym_typedef + for synonym_typedef in SYNONYM_TYPEDEFS +} + def _get_term(term: Term) -> pyobo.Term: properties = {} @@ -37,6 +45,7 @@ def _get_term(term: Term) -> pyobo.Term: pyobo.Synonym( name=synonym.value, specificity=SYNONYM_TYPES[synonym.type], + type=SYNONYM_TYPEDEFS_DICT.get(synonym.type), ) for synonym in term.synonyms or [] ], @@ -56,6 +65,7 @@ def main(): ASKEMO.prefix, ASKEMO.name, terms=[_get_term(term) for term in get_askemo_terms().values()], + _synonym_typedefs=SYNONYM_TYPEDEFS, ) make_site( obo,