Closed dhimmel closed 1 year ago
Here's how the implementation looks like in the exproted node-link formatted JSON.
First the node JSON (all normal here):
{
"mesh_id": "C531624",
"mesh_class": "SCR_Disease",
"mesh_uri": "http://id.nlm.nih.gov/mesh/2023/C531624",
"mesh_label": "Familial spinal arachnoiditis",
"mesh_date_created": "2010-08-25",
"mesh_date_revised": "2016-07-19",
"mesh_date_established": null,
"mesh_frequency": 68.0,
"mesh_description": "A hereditary form of arachnoiditis that may appear as a thick fibrous band on the spinal arachnoid membrane. It is characterized by adult onset SPASTIC PARAPARESIS with prominent radicular pain and patchy numbness. OMIM: 182950",
"tree_numbers": null,
"id": "C531624"
},
Now the edge JSON:
{
"relationship_type": "preferredMappedTo",
"parent_qualified_id": "D001100Q000151",
"parent_qualifier_id": "Q000151",
"source": "D001100",
"target": "C531624"
},
Note how parent_qualified_id
is different than source
, since source is based only on the parent descriptor ID (it strips out the qualifier id). You can access the qualifier in parent_qualifier_id
.
Some supplemental concept records (SCRs) in MeSH only have a
preferredMappedTo
whose predicate is aAllowedDescriptorQualifierPair
rather than the usualTopicalDescriptor
For example, the SCR Disease Familial spinal arachnoiditis has preferredMappedTo to an AllowedDescriptorQualifierPair Arachnoiditis/congenital. So Arachnoiditis is the parent topical descriptor and congenital is the qualifier.
Currently, these edges are dropped:
https://github.com/related-sciences/nxontology-data/blob/33ea9e9deb3145e56a806ede9462da594dc02761/nxontology_data/mesh/mesh.py#L200-L202
Need to investigate whether any of these AllowedDescriptorQualifierPair parents would break our is-a / parent assumption. If they are consistent with a hierarchical conceptual relationship, then I'm thinking we just add an edge from Arachnoiditis to Familial spinal arachnoiditis with an edge property that for the congenital qualifier.