-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Obsolete/Deprecated property is not populated when converting from obojson #470
Comments
Looks like it's parsed from obograph: kgx/kgx/source/obograph_source.py Lines 334 to 336 in 4e2d410
but the equivalent JSON and OWL parsers don't explicitly parse the field. |
@caufieldjh It seems like that means that there isn't exactly a bug in kgx, but we do need to figure out how to pass the node properties into
Looking at the method declaration, it seems like transform_config is the only way, but since we don't have a config yaml currently, maybe we'd want to add the option to pass in node_properties?
|
I agree - just need the extra param for the transform function, though this does suggest that using a config yaml instead may be a good idea. Is that feasible for the Monarch builds? |
The transform call I pasted in above is from kg-phenio, I think that's where we'd need to add config yaml |
Ah, well in that case it should be easy to test. I'll open an issue over there and start a PR. |
It also looks like the way the deprecated flag is parsed in obograph_source misses many potential instances, since it only looks at |
I think this issue may now be partially resolved by my PR #475 - which is still a draft PR for the moment. However, it may be helpful @caufieldjh and @kevinschaper to have you give me a small sample file of the source data from which you feel KGX is not propagating the ' Better yet, if you can, please send me a small snippet of Python KGX transform code which resembles the code what you are currently doing in your (phenio?) code base. In that way, I can use both the sample data and your snippet to add another unit test for the owl -> json -> tsv transitive transformation, then use it to check if there are any other loose ends in the KGX code that need fixing. |
Thanks @RichardBruskiewich ! {
"id" : "http://purl.obolibrary.org/obo/GO_0051370",
"lbl" : "obsolete ZASP binding",
"type" : "INDIVIDUAL",
"meta" : {
"definition" : {
"val" : "OBSOLETE. Binding to Z-band alternatively spliced PDZ motif protein (ZASP). ZASP is a Z-band protein specifically expressed in heart and skeletal muscle. This protein contains N-terminal PDZ domain and C-terminal LIM domain.",
"xrefs" : [ "PMID:10427098", "PMID:11699871" ]
},
"comments" : [ "This term was made obsolete because it represents binding to an individual protein." ],
"synonyms" : [ {
"pred" : "hasExactSynonym",
"val" : "Z-band alternatively spliced PDZ-motif protein binding"
}, {
"pred" : "hasExactSynonym",
"val" : "ZASP binding"
} ],
"basicPropertyValues" : [ {
"pred" : "http://purl.obolibrary.org/obo/IAO_0100001",
"val" : "GO:0008092"
}, {
"pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBONamespace",
"val" : "molecular_function"
} ],
"deprecated" : true
} |
The transform kg-phenio uses is this one: https://github.com/Knowledge-Graph-Hub/kg-phenio/blob/master/kg_phenio/transform_utils/phenio/phenio_transform.py |
I assume that the phenio.json data is normally properly wrapped within a suitable KGX-like objson-like wrapper, something like: {
"graphs": [
{
"nodes": [
{
"id": "http://purl.obolibrary.org/obo/GO_0051370",
"lbl": "obsolete ZASP binding",
...etc,
"deprecated": true
}
}
],
"edges": [],
"id": "http://purl.obolibrary.org/obo/phenio.owl",
"meta": {
"subsets": [],
"xrefs": [],
"basicPropertyValues": []
}
}
]
} Using this basic structure, I confirm that the obograph source parser detects the I will now iterate towards a unit test to detect transitive conservation of the |
Yes, it is - apologies for the rough snippet |
Hi @caufieldjh and @kevinschaper , I think the PR #475 is close to completed. I added a unit test along the lines of the 'transform' snippet above, with the phenio.json, and it seems to pass. I suppose I also now need to check the owl <-> (json or tsv) path too? |
Thanks again @RichardBruskiewich |
Mainstream use of ' |
Looking at kg-phenio and kg-obo, (and digging into the kg-phenio build), it looks like kgx doesn't produce a
deprecated
column when converting from obojson.Related to / inspired by: monarch-initiative/monarch-app#421
The text was updated successfully, but these errors were encountered: