Skip to content
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

Error in get_descendents with curies #154

Open
cbizon opened this issue Nov 6, 2023 · 1 comment
Open

Error in get_descendents with curies #154

cbizon opened this issue Nov 6, 2023 · 1 comment

Comments

@cbizon
Copy link

cbizon commented Nov 6, 2023

v. 1.1.2

If I lookup descendents of noncoding RNA product it works:

tk.get_descendants("noncoding RNA product")
['noncoding RNA product', 'microRNA', 'siRNA']

But if I use the curie form (which came from a response to tk.get_descendents(...,formatted=True)) then it fails:

tk.get_descendants("biolink:NoncodingRNAProduct")
Traceback (most recent call last):
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/pydevconsole.py", line 364, in runcode
    coro = func()
           ^^^^^^
  File "<input>", line 1, in <module>
  File "/opt/anaconda3/envs/redistpf/lib/python3.12/site-packages/bmt/toolkit.py", line 739, in get_descendants
    raise ValueError("not a valid biolink component")
@cbizon
Copy link
Author

cbizon commented Nov 6, 2023

The types and predicates that I found that have this problem are:

Error with type: biolink:NoncodingRNAProduct
Error with type: biolink:MicroRNA
Error with type: biolink:SiRNA
Error with predicate: biolink:gene_fusion_with
Error with predicate: biolink:genetic_neighborhood_of

I think that on the type side it's not happy when there are consecutive capital letters and on the predicate side when there are underscores in the non-curie name of the predicate. That latter case should probably be changed in the model as well...?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant