pyobo 0.10.5__py3-none-any.whl → 0.10.6__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.
- pyobo/__init__.py +1 -0
- pyobo/api/__init__.py +1 -0
- pyobo/api/names.py +21 -0
- pyobo/gilda_utils.py +54 -47
- pyobo/sources/__init__.py +4 -0
- pyobo/sources/cgnc.py +2 -1
- pyobo/sources/chembl.py +2 -1
- pyobo/sources/depmap.py +2 -0
- pyobo/sources/drugcentral.py +2 -1
- pyobo/sources/geonames.py +229 -0
- pyobo/sources/hgnc.py +32 -1
- pyobo/sources/mgi.py +3 -1
- pyobo/sources/mirbase.py +2 -0
- pyobo/sources/mirbase_family.py +5 -2
- pyobo/sources/npass.py +1 -1
- pyobo/sources/pombase.py +1 -1
- pyobo/sources/ror.py +163 -0
- pyobo/sources/sgd.py +2 -5
- pyobo/sources/slm.py +6 -6
- pyobo/sources/umls/get_synonym_types.py +36 -0
- pyobo/sources/umls/synonym_types.tsv +243 -242
- pyobo/sources/umls/umls.py +3 -7
- pyobo/sources/zfin.py +2 -1
- pyobo/struct/reference.py +12 -1
- pyobo/struct/struct.py +71 -17
- pyobo/struct/typedef.py +21 -6
- pyobo/version.py +1 -1
- {pyobo-0.10.5.dist-info → pyobo-0.10.6.dist-info}/METADATA +2 -2
- {pyobo-0.10.5.dist-info → pyobo-0.10.6.dist-info}/RECORD +33 -30
- {pyobo-0.10.5.dist-info → pyobo-0.10.6.dist-info}/WHEEL +1 -1
- {pyobo-0.10.5.dist-info → pyobo-0.10.6.dist-info}/LICENSE +0 -0
- {pyobo-0.10.5.dist-info → pyobo-0.10.6.dist-info}/entry_points.txt +0 -0
- {pyobo-0.10.5.dist-info → pyobo-0.10.6.dist-info}/top_level.txt +0 -0
|
@@ -1,242 +1,243 @@
|
|
|
1
|
-
key name
|
|
2
|
-
AA Attribute type abbreviation
|
|
3
|
-
AB Abbreviation in any source vocabulary
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
AD Adjective
|
|
7
|
-
AM Short form of modifier
|
|
8
|
-
AS Attribute type synonym
|
|
9
|
-
AT Attribute type
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
CCN Chemical code name
|
|
18
|
-
CCS FIPS 10-4 country code
|
|
19
|
-
|
|
20
|
-
CDA Clinical drug name in abbreviated format
|
|
21
|
-
CDC Clinical drug name in concatenated format (NDDF)
|
|
22
|
-
CDD Clinical drug name in delimited format
|
|
23
|
-
CDO Concept domain
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
CPR Concept property
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
CSN Chemical Structure Name
|
|
35
|
-
CSY Code system
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
DEV Descriptor entry version
|
|
43
|
-
|
|
44
|
-
DFG Dose Form Group
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
DSV Descriptor sort version
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
ETAL Entry Term Alias
|
|
57
|
-
ETCF Entry term, consumer friendly description
|
|
58
|
-
ETCLIN Entry term, clinician description
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
HTN HL7 Table Name
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
IVC Intervention categories
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
LVDN Linguistic variant display name
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
MTH_OPN Metathesaurus obsolete preferred term, natural language form
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
MTH_PTGB Metathesaurus-supplied form of British preferred term
|
|
126
|
-
MTH_PTN Metathesaurus preferred term, natural language form
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
MTH_RXN_CDC RxNorm Created CDC
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
MTH_SYGB Metathesaurus-supplied form of British synonym
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
NPT HL7 non-preferred for language term
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
OAF Obsolete active fully specified name
|
|
145
|
-
OAM Obsolete Modifier Abbreviation
|
|
146
|
-
OAP Obsolete active preferred term
|
|
147
|
-
OAS Obsolete active synonym
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
OLC Obsolete Long common name
|
|
153
|
-
OLG Obsolete LOINC group name
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
OPN Obsolete preferred term, natural language form
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
OSN Official short name
|
|
166
|
-
|
|
167
|
-
PCE Preferred entry term for Supplementary Concept
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
PHENO_ET Phenotype entry term
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
PSC Protocol selection criteria
|
|
179
|
-
PSN Prescribable Names
|
|
180
|
-
|
|
181
|
-
PTAV Preferred Allelic Variant
|
|
182
|
-
PTCS Preferred Clinical Synopsis
|
|
183
|
-
PTGB British preferred term
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
PTN Preferred term, natural language form
|
|
187
|
-
|
|
188
|
-
PXQ Preferred qualifier term
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
RSY Root synonym
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
SY Designated synonym
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
VS Value Set
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
1
|
+
key name
|
|
2
|
+
AA Attribute type abbreviation
|
|
3
|
+
AB Abbreviation in any source vocabulary
|
|
4
|
+
AC Activities
|
|
5
|
+
ACR Acronym
|
|
6
|
+
AD Adjective
|
|
7
|
+
AM Short form of modifier
|
|
8
|
+
AS Attribute type synonym
|
|
9
|
+
AT Attribute type
|
|
10
|
+
BD Fully-specified drug brand name that can be prescribed
|
|
11
|
+
BN Fully-specified drug brand name that can not be prescribed
|
|
12
|
+
BPCK Branded Drug Delivery Device
|
|
13
|
+
BR Binding realm
|
|
14
|
+
CA2 ISO 3166-1 standard country code in alpha-2 (two-letter) format
|
|
15
|
+
CA3 ISO 3166-1 standard country code in alpha-3 (three-letter) format
|
|
16
|
+
CC Trimmed ICPC component process
|
|
17
|
+
CCN Chemical code name
|
|
18
|
+
CCS FIPS 10-4 country code
|
|
19
|
+
CD Clinical Drug
|
|
20
|
+
CDA Clinical drug name in abbreviated format
|
|
21
|
+
CDC Clinical drug name in concatenated format (NDDF)
|
|
22
|
+
CDD Clinical drug name in delimited format
|
|
23
|
+
CDO Concept domain
|
|
24
|
+
CE Entry term for a Supplementary Concept
|
|
25
|
+
CHN Chemical structure name
|
|
26
|
+
CL Class
|
|
27
|
+
CMN Common name
|
|
28
|
+
CN LOINC official component name
|
|
29
|
+
CO Component name (these are hierarchical terms, as opposed to the LOINC component names which are analytes)
|
|
30
|
+
CP ICPC component process (in original form)
|
|
31
|
+
CPR Concept property
|
|
32
|
+
CR Concept relationship
|
|
33
|
+
CS Short component process in ICPC, i.e. include some abbreviations
|
|
34
|
+
CSN Chemical Structure Name
|
|
35
|
+
CSY Code system
|
|
36
|
+
CU Common usage
|
|
37
|
+
CV Content view
|
|
38
|
+
CX Component, with abbreviations expanded.
|
|
39
|
+
DC10 Diagnostic criteria for ICD10 code
|
|
40
|
+
DC9 Diagnostic criteria for ICD9 code
|
|
41
|
+
DE Descriptor
|
|
42
|
+
DEV Descriptor entry version
|
|
43
|
+
DF Dose Form
|
|
44
|
+
DFG Dose Form Group
|
|
45
|
+
DI Disease name
|
|
46
|
+
DN Display Name
|
|
47
|
+
DO Domain
|
|
48
|
+
DP Drug Product
|
|
49
|
+
DS Short form of descriptor
|
|
50
|
+
DSV Descriptor sort version
|
|
51
|
+
DT Definitional term, present in the Metathesaurus because of its connection to a Dorland's definition or to a definition created especially for the Metathesaurus
|
|
52
|
+
EP Print entry term
|
|
53
|
+
EQ Equivalent name
|
|
54
|
+
ES Short form of entry term
|
|
55
|
+
ET Entry term
|
|
56
|
+
ETAL Entry Term Alias
|
|
57
|
+
ETCF Entry term, consumer friendly description
|
|
58
|
+
ETCLIN Entry term, clinician description
|
|
59
|
+
EX Expanded form of entry term
|
|
60
|
+
FBD Foreign brand name
|
|
61
|
+
FI Finding name
|
|
62
|
+
FN Full form of descriptor
|
|
63
|
+
FSY Foreign Synonym
|
|
64
|
+
GLP Global period
|
|
65
|
+
GN Generic drug name
|
|
66
|
+
GO Goal
|
|
67
|
+
GPCK Generic Drug Delivery Device
|
|
68
|
+
GT Glossary term
|
|
69
|
+
HC Hierarchical class
|
|
70
|
+
HD Hierarchical descriptor
|
|
71
|
+
HG High Level Group Term
|
|
72
|
+
HGJKN Japanese High Level Group Term (kana)
|
|
73
|
+
HGJKN1 Japanese High Level Group Term (kana1)
|
|
74
|
+
HS Short or alternate version of hierarchical term
|
|
75
|
+
HT Hierarchical term
|
|
76
|
+
HTJKN Japanese Hierarchical term (kana)
|
|
77
|
+
HTJKN1 Japanese Hierarchical term (kana1)
|
|
78
|
+
HTN HL7 Table Name
|
|
79
|
+
HX Expanded version of short hierarchical term
|
|
80
|
+
ID Nursing indicator
|
|
81
|
+
IN Name for an ingredient
|
|
82
|
+
IS Obsolete Synonym
|
|
83
|
+
IT Index term
|
|
84
|
+
IV Intervention
|
|
85
|
+
IVC Intervention categories
|
|
86
|
+
LA LOINC answer
|
|
87
|
+
LC Long common name
|
|
88
|
+
LG LOINC group
|
|
89
|
+
LLT Lower Level Term
|
|
90
|
+
LLTJKN Japanese Lower Level Term (kana)
|
|
91
|
+
LLTJKN1 Japanese Lower Level Term (kana1)
|
|
92
|
+
LN LOINC official fully specified name
|
|
93
|
+
LO Obsolete official fully specified name
|
|
94
|
+
LPDN LOINC parts display name
|
|
95
|
+
LPN LOINC parts name
|
|
96
|
+
LS Expanded system/sample type (The expanded version was created for the Metathesaurus and includes the full name of some abbreviations.)
|
|
97
|
+
LV Lexical variant
|
|
98
|
+
LVDN Linguistic variant display name
|
|
99
|
+
MD CCS multi-level diagnosis categories
|
|
100
|
+
MH Main heading
|
|
101
|
+
MIN name for a multi-ingredient
|
|
102
|
+
MP Preferred names of modifiers
|
|
103
|
+
MS Multum names of branded and generic supplies or supplements
|
|
104
|
+
MTH_ACR MTH acronym
|
|
105
|
+
MTH_CN MTH Component, with abbreviations expanded.
|
|
106
|
+
MTH_ET Metathesaurus entry term
|
|
107
|
+
MTH_FN MTH Full form of descriptor
|
|
108
|
+
MTH_HG MTH High Level Group Term
|
|
109
|
+
MTH_HT MTH Hierarchical term
|
|
110
|
+
MTH_HX MTH Hierarchical term expanded
|
|
111
|
+
MTH_IS Metathesaurus-supplied form of obsolete synonym
|
|
112
|
+
MTH_LLT MTH Lower Level Term
|
|
113
|
+
MTH_LN MTH Official fully specified name with expanded abbreviations
|
|
114
|
+
MTH_LO MTH Expanded LOINC obsolete fully specified name
|
|
115
|
+
MTH_OAF Metathesaurus-supplied form of obsolete active fully specified name
|
|
116
|
+
MTH_OAP Metathesaurus-supplied form of obsolete active preferred term
|
|
117
|
+
MTH_OAS Metathesaurus-supplied form of obsolete active synonym
|
|
118
|
+
MTH_OET Metathesaurus obsolete entry term
|
|
119
|
+
MTH_OF Metathesaurus-supplied form of obsolete fully specified name
|
|
120
|
+
MTH_OL MTH Non-current Lower Level Term
|
|
121
|
+
MTH_OP Metathesaurus obsolete preferred term
|
|
122
|
+
MTH_OPN Metathesaurus obsolete preferred term, natural language form
|
|
123
|
+
MTH_OS MTH System-organ class
|
|
124
|
+
MTH_PT Metathesaurus preferred term
|
|
125
|
+
MTH_PTGB Metathesaurus-supplied form of British preferred term
|
|
126
|
+
MTH_PTN Metathesaurus preferred term, natural language form
|
|
127
|
+
MTH_RXN_BD RxNorm Created BD
|
|
128
|
+
MTH_RXN_CD RxNorm Created CD
|
|
129
|
+
MTH_RXN_CDC RxNorm Created CDC
|
|
130
|
+
MTH_RXN_DP RxNorm Created DP
|
|
131
|
+
MTH_SI MTH Sign or symptom of
|
|
132
|
+
MTH_SMQ Metathesaurus version of Standardised MedDRA Query
|
|
133
|
+
MTH_SY MTH Designated synonym
|
|
134
|
+
MTH_SYGB Metathesaurus-supplied form of British synonym
|
|
135
|
+
MV Multi-level procedure category
|
|
136
|
+
N1 Chemical Abstracts Service Type 1 name of a chemical
|
|
137
|
+
NA Name aliases
|
|
138
|
+
NM Name of Supplementary Concept
|
|
139
|
+
NP Non-preferred term
|
|
140
|
+
NPT HL7 non-preferred for language term
|
|
141
|
+
NS Short form of non-preferred term
|
|
142
|
+
NX Expanded form of non-preferred term
|
|
143
|
+
OA Obsolete abbreviation
|
|
144
|
+
OAF Obsolete active fully specified name
|
|
145
|
+
OAM Obsolete Modifier Abbreviation
|
|
146
|
+
OAP Obsolete active preferred term
|
|
147
|
+
OAS Obsolete active synonym
|
|
148
|
+
OC Nursing outcomes
|
|
149
|
+
OET Obsolete entry term
|
|
150
|
+
OF Obsolete fully specified name
|
|
151
|
+
OL Non-current Lower Level Term
|
|
152
|
+
OLC Obsolete Long common name
|
|
153
|
+
OLG Obsolete LOINC group name
|
|
154
|
+
OLJKN Japanese Non-current Lower Level Term (kana)
|
|
155
|
+
OLJKN1 Japanese Non-current Lower Level Term (kana1)
|
|
156
|
+
OM Obsolete modifiers in HCPCS
|
|
157
|
+
ONP Obsolete non-preferred for language term
|
|
158
|
+
OOSN Obsolete official short name
|
|
159
|
+
OP Obsolete preferred name
|
|
160
|
+
OPN Obsolete preferred term, natural language form
|
|
161
|
+
OR Orders
|
|
162
|
+
OS System-organ class
|
|
163
|
+
OSJKN Japanese System-organ class in the WHO Adverse Reaction Terminology (kana)
|
|
164
|
+
OSJKN1 Japanese System-organ class in the WHO Adverse Reaction Terminology (kana1)
|
|
165
|
+
OSN Official short name
|
|
166
|
+
PC "Preferred ""trimmed term"" in ICPC"
|
|
167
|
+
PCE Preferred entry term for Supplementary Concept
|
|
168
|
+
PEP Preferred entry term
|
|
169
|
+
PHENO Phenotype
|
|
170
|
+
PHENO_ET Phenotype entry term
|
|
171
|
+
PIN Name from a precise ingredient
|
|
172
|
+
PM Machine permutation
|
|
173
|
+
PN Metathesaurus preferred name
|
|
174
|
+
POS Place of service
|
|
175
|
+
PQ Qualifier for a problem
|
|
176
|
+
PR Name of a problem
|
|
177
|
+
PS Short forms that needed full specification
|
|
178
|
+
PSC Protocol selection criteria
|
|
179
|
+
PSN Prescribable Names
|
|
180
|
+
PT Designated preferred name
|
|
181
|
+
PTAV Preferred Allelic Variant
|
|
182
|
+
PTCS Preferred Clinical Synopsis
|
|
183
|
+
PTGB British preferred term
|
|
184
|
+
PTJKN Japanese Designated preferred name (kana)
|
|
185
|
+
PTJKN1 Japanese Designated preferred name (kana1)
|
|
186
|
+
PTN Preferred term, natural language form
|
|
187
|
+
PX Expanded preferred terms (pair with PS)
|
|
188
|
+
PXQ Preferred qualifier term
|
|
189
|
+
QAB Qualifier abbreviation
|
|
190
|
+
QEV Qualifier entry version
|
|
191
|
+
QSV Qualifier sort version
|
|
192
|
+
RAB Root abbreviation
|
|
193
|
+
RHT Root hierarchical term
|
|
194
|
+
RPT Root preferred term
|
|
195
|
+
RS Extracted related names in SNOMED2
|
|
196
|
+
RSY Root synonym
|
|
197
|
+
RT Term that is related to, but often considered non-synonymous with, the preferred term
|
|
198
|
+
RXN_IN Rxnorm Preferred Ingredient
|
|
199
|
+
RXN_PT Rxnorm Preferred
|
|
200
|
+
SB Named subset of a source
|
|
201
|
+
SBD Semantic branded drug
|
|
202
|
+
SBDC Semantic Branded Drug Component
|
|
203
|
+
SBDF Semantic branded drug and form
|
|
204
|
+
SBDFP Semantic branded drug and form with precise ingredient as basis of strength
|
|
205
|
+
SBDG Semantic branded drug group
|
|
206
|
+
SC Special Category term
|
|
207
|
+
SCALE Scale
|
|
208
|
+
SCD Semantic Clinical Drug
|
|
209
|
+
SCDC Semantic Drug Component
|
|
210
|
+
SCDF Semantic clinical drug and form
|
|
211
|
+
SCDFP Semantic clinical drug and form with precise ingredient as basis of strength
|
|
212
|
+
SCDG Semantic clinical drug group
|
|
213
|
+
SCDGP Semantic clinical drug group with precise ingredient as basis of strength
|
|
214
|
+
SCN Scientific name
|
|
215
|
+
SD CCS diagnosis categories
|
|
216
|
+
SI Name of a sign or symptom of a problem
|
|
217
|
+
SMQ Standardised MedDRA Query
|
|
218
|
+
SP CCS procedure categories
|
|
219
|
+
SS "Synonymous ""short"" forms"
|
|
220
|
+
SSN Source short name, used in the UMLS Knowledge Source Server
|
|
221
|
+
ST Step
|
|
222
|
+
SU Active Substance
|
|
223
|
+
SX Mixed-case component synonym with expanded abbreviations
|
|
224
|
+
SY Designated synonym
|
|
225
|
+
SYGB British synonym
|
|
226
|
+
SYN Designated alias
|
|
227
|
+
TA Task
|
|
228
|
+
TC Term class
|
|
229
|
+
TG Name of the target of an intervention
|
|
230
|
+
TMSY Tall Man synonym
|
|
231
|
+
TQ Topical qualifier
|
|
232
|
+
TX CCPSS synthesized problems for TC termgroup
|
|
233
|
+
UCN Unique common name
|
|
234
|
+
UE Unique equivalent name
|
|
235
|
+
USN Unique scientific name
|
|
236
|
+
USY Unique synonym
|
|
237
|
+
VAB Versioned abbreviation
|
|
238
|
+
VPT Versioned preferred term
|
|
239
|
+
VS Value Set
|
|
240
|
+
VSY Versioned synonym
|
|
241
|
+
XD Expanded descriptor in AOD
|
|
242
|
+
XM Cross mapping set
|
|
243
|
+
XQ Alternate name for a qualifier
|
pyobo/sources/umls/umls.py
CHANGED
|
@@ -7,7 +7,6 @@ Run with ``python -m pyobo.sources.umls``
|
|
|
7
7
|
|
|
8
8
|
import itertools as itt
|
|
9
9
|
import operator
|
|
10
|
-
import os
|
|
11
10
|
from typing import Iterable
|
|
12
11
|
|
|
13
12
|
import bioregistry
|
|
@@ -16,14 +15,13 @@ from tqdm.auto import tqdm
|
|
|
16
15
|
from umls_downloader import open_umls
|
|
17
16
|
|
|
18
17
|
from pyobo import Obo, Reference, Synonym, SynonymTypeDef, Term
|
|
19
|
-
|
|
18
|
+
|
|
19
|
+
from .get_synonym_types import get_umls_synonyms
|
|
20
20
|
|
|
21
21
|
__all__ = [
|
|
22
22
|
"UMLSGetter",
|
|
23
23
|
]
|
|
24
24
|
|
|
25
|
-
HERE = os.path.abspath(os.path.dirname(__file__))
|
|
26
|
-
SYNONYM_TYPE_PATH = os.path.join(HERE, "synonym_types.tsv")
|
|
27
25
|
|
|
28
26
|
RRF_COLUMNS = [
|
|
29
27
|
"CUI",
|
|
@@ -48,10 +46,8 @@ RRF_COLUMNS = [
|
|
|
48
46
|
]
|
|
49
47
|
|
|
50
48
|
PREFIX = "umls"
|
|
51
|
-
|
|
52
49
|
SOURCE_VOCAB_URL = "https://www.nlm.nih.gov/research/umls/sourcereleasedocs/index.html"
|
|
53
|
-
|
|
54
|
-
SYNONYM_ABB = open_map_tsv(SYNONYM_TYPE_PATH)
|
|
50
|
+
SYNONYM_ABB = get_umls_synonyms()
|
|
55
51
|
|
|
56
52
|
|
|
57
53
|
class UMLSGetter(Obo):
|
pyobo/sources/zfin.py
CHANGED
|
@@ -16,6 +16,7 @@ from pyobo.struct import (
|
|
|
16
16
|
has_gene_product,
|
|
17
17
|
orthologous,
|
|
18
18
|
)
|
|
19
|
+
from pyobo.struct.typedef import exact_match
|
|
19
20
|
from pyobo.utils.io import multidict, multisetdict
|
|
20
21
|
from pyobo.utils.path import ensure_df
|
|
21
22
|
|
|
@@ -40,7 +41,7 @@ class ZFINGetter(Obo):
|
|
|
40
41
|
"""An ontology representation of ZFIN's zebrafish database."""
|
|
41
42
|
|
|
42
43
|
bioversions_key = ontology = PREFIX
|
|
43
|
-
typedefs = [from_species, has_gene_product, orthologous]
|
|
44
|
+
typedefs = [from_species, has_gene_product, orthologous, exact_match]
|
|
44
45
|
|
|
45
46
|
def iter_terms(self, force: bool = False) -> Iterable[Term]:
|
|
46
47
|
"""Iterate over terms in ZFIN."""
|
pyobo/struct/reference.py
CHANGED
|
@@ -31,6 +31,12 @@ class Reference(curies.Reference):
|
|
|
31
31
|
raise ExpansionError(f"Unknown prefix: {v}")
|
|
32
32
|
return norm_prefix
|
|
33
33
|
|
|
34
|
+
@property
|
|
35
|
+
def preferred_curie(self) -> str:
|
|
36
|
+
"""Get the preferred curie for this reference."""
|
|
37
|
+
pp = bioregistry.get_preferred_prefix(self.prefix) or self.prefix
|
|
38
|
+
return f"{pp}:{self.identifier}"
|
|
39
|
+
|
|
34
40
|
@root_validator(pre=True)
|
|
35
41
|
def validate_identifier(cls, values): # noqa
|
|
36
42
|
"""Validate the identifier."""
|
|
@@ -48,7 +54,7 @@ class Reference(curies.Reference):
|
|
|
48
54
|
|
|
49
55
|
@classmethod
|
|
50
56
|
def auto(cls, prefix: str, identifier: str) -> "Reference":
|
|
51
|
-
"""Create a reference and
|
|
57
|
+
"""Create a reference and autopopulate its name."""
|
|
52
58
|
from ..api import get_name
|
|
53
59
|
|
|
54
60
|
name = get_name(prefix, identifier)
|
|
@@ -153,6 +159,11 @@ class Referenced:
|
|
|
153
159
|
"""The CURIE for this typedef.""" # noqa: D401
|
|
154
160
|
return self.reference.curie
|
|
155
161
|
|
|
162
|
+
@property
|
|
163
|
+
def preferred_curie(self) -> str:
|
|
164
|
+
"""The preferred CURIE for this typedef.""" # noqa: D401
|
|
165
|
+
return self.reference.preferred_curie
|
|
166
|
+
|
|
156
167
|
@property
|
|
157
168
|
def pair(self) -> Tuple[str, str]:
|
|
158
169
|
"""The pair of namespace/identifier.""" # noqa: D401
|