RTX
RTX copied to clipboard
Add an Expand parameter to turn off the subclass reasoning function?
It seems like the ARAX_expander module automatically does the subclass reasoning for a query.
Example:
add_qnode(ids=DRUGBANK:DB01050, key=n00)
add_qnode(key=n01)
add_qnode(ids=MONDO:0008383, key=n02)
add_qedge(subject=n00, object=n01, key=e00)
add_qedge(subject=n01, object=n02, key=e01)
expand(kp=infores:rtx-kg2)
resultify()
filter_results(action=limit_number_of_results, max_results=5)
One of the results I got is:
{'confidence': None,
'description': 'No description available',
'edge_bindings': {'e00': [{'attributes': None,
'id': 'infores:rtx-kg2:CHEMBL.COMPOUND:CHEMBL4795894--biolink:regulates--biolink:causes--decreased--activity_or_abundance--UniProtKB:P35354'},
{'attributes': None,
'id': 'infores:rtx-kg2:CHEMBL.COMPOUND:CHEMBL4795894--biolink:regulates--biolink:causes--increased--activity_or_abundance--UniProtKB:P35354'},
{'attributes': None,
'id': 'infores:rtx-kg2:CHEMBL.COMPOUND:CHEMBL4795894--biolink:affects--biolink:causes--None--activity--UniProtKB:P35354'},
{'attributes': None,
'id': 'infores:rtx-kg2:UniProtKB:P35354--biolink:interacts_with--None--None--None--CHEMBL.COMPOUND:CHEMBL4795894'},
{'attributes': None,
'id': 'infores:rtx-kg2:CHEMBL.COMPOUND:CHEMBL4795894--biolink:coexists_with--None--None--None--UniProtKB:P35354'},
{'attributes': None,
'id': 'infores:rtx-kg2:CHEMBL.COMPOUND:CHEMBL4795894--biolink:interacts_with--None--None--None--UniProtKB:P35354'},
{'attributes': None,
'id': 'infores:rtx-kg2:CHEMBL.COMPOUND:CHEMBL4795894--biolink:related_to--None--None--None--UniProtKB:P35354'},
{'attributes': None,
'id': 'infores:rtx-kg2:UniProtKB:P35354--biolink:related_to--None--None--None--CHEMBL.COMPOUND:CHEMBL4795894'},
{'attributes': None,
'id': 'infores:rtx-kg2:CHEMBL.COMPOUND:CHEMBL4795894--biolink:affects--None--None--None--UniProtKB:P35354'}],
'e01': [{'attributes': None,
'id': 'infores:rtx-kg2:UniProtKB:P35354--biolink:gene_associated_with_condition--None--None--None--MONDO:0005306'},
{'attributes': None,
'id': 'infores:rtx-kg2:UniProtKB:P35354--biolink:gene_associated_with_condition--None--None--None--MONDO:0008383'},
{'attributes': None,
'id': 'infores:rtx-kg2:UniProtKB:P35354--biolink:gene_associated_with_condition--None--None--None--MONDO:0011849'},
{'attributes': None,
'id': 'infores:rtx-kg2:UniProtKB:P35354--biolink:associated_with--None--None--None--MONDO:0008383'},
{'attributes': None,
'id': 'infores:rtx-kg2:UniProtKB:P35354--biolink:gene_associated_with_condition--None--None--None--MONDO:0005185'}],
'subclass:n02--n02': [{'attributes': None,
'id': 'infores:rtx-kg2:MONDO:0011849--biolink:subclass_of--None--None--None--MONDO:0008383'},
{'attributes': None,
'id': 'infores:rtx-kg2:MONDO:0005185--biolink:subclass_of--None--None--None--MONDO:0008383'},
{'attributes': None,
'id': 'infores:rtx-kg2:MONDO:0005306--biolink:subclass_of--None--None--None--MONDO:0008383'}]},
'essence': 'PTGS2',
'essence_category': 'None',
'id': None,
'node_bindings': {'n00': [{'attributes': None,
'id': 'DRUGBANK:DB01050',
'query_id': None}],
'n01': [{'attributes': None,
'id': 'UniProtKB:P35354',
'query_id': None}],
'n02': [{'attributes': None,
'id': 'MONDO:0008383',
'query_id': None},
{'attributes': None,
'id': 'MONDO:0005185',
'query_id': None},
{'attributes': None,
'id': 'MONDO:0005306',
'query_id': None},
{'attributes': None,
'id': 'MONDO:0011849',
'query_id': None}]},
'reasoner_id': 'ARAX',
'result_group': None,
'result_group_similarity_score': None,
'row_data': [0.999, 'PTGS2', 'None'],
'score': 0.9991809991809992,
'score_direction': None,
'score_name': None}
The ARAX_expander generates some subclass curies for the original qnode MONDO:0008383. I'm wondering if we can add a parameter to turn off this automatic subclass reasoning function when we don't need it.
This is not an urgent request but I think it will be useful for some situations.