biolink / biolink-model-toolkit

A collection of useful python functions for looking up information and working with the Biolink Model
https://biolink.github.io/biolink-model-toolkit/
BSD 3-Clause "New" or "Revised" License
20 stars 11 forks source link

Camel-case class names are not converted to CURIEs well #50

Closed patrickkwang closed 3 years ago

patrickkwang commented 3 years ago
>>> tk.get_descendants("transcript", formatted=True)
['biolink:Transcript', 'biolink:RNAProduct', 'biolink:Noncoding_RNAProduct', 'biolink:SiRNA', 'biolink:MicroRNA', 'biolink:RNAProductIsoform']

biolink:Noncoding_RNAProduct should not have an underscore.

Yet somehow, at the same time,

>>> tk.get_element("noncoding RNA product").class_uri
'biolink:NoncodingRNAProduct'

These transformations should be unified, too.

patrickkwang commented 3 years ago

The stringcase library that we're using is just pretty shaky: https://github.com/okunishinishi/python-stringcase/issues