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

Verbiage when initializing bmt #5

Closed deepakunni3 closed 3 years ago

deepakunni3 commented 5 years ago

When initializing bmt with biolink-model.yaml, I get the following printed onto the console:

Warning: class "drug exposure" slot "drug" does not reference an existing slot.  New slot was created.
Warning: class "treatment" slot "has exposure parts" does not reference an existing slot.  New slot was created.
Warning: class "pairwise interaction association" slot "interacting molecules category" does not reference an existing slot.  New slot was created.
Unrecognized prefix: SEMMEDDB
Unrecognized prefix: WD
Unrecognized prefix: dct
Unrecognized prefix: oban
Unrecognized prefix: HANCESTRO
Unrecognized prefix: RNAcentral
Unrecognized prefix: IntAct
Unrecognized prefix: Reactome
Unrecognized prefix: VMC
Unrecognized prefix: CIViC
Unrecognized prefix: ECTO

Is there a way to suppress these messages? Are these messages being sent to console via logging or via print statements?

@hsolbrig Thoughts?

hsolbrig commented 5 years ago

The glib answer would be to fix the biolink-model itself -- get those prefixes defined and address the other problems. If this is not workable, however, we could add an "ignore warnings" flag to the generator.

deepakunni3 commented 5 years ago

Yes, I would agree that we fix the model. In the interim, an ignore_warnings parameter would be very useful. OR Since bmt is being used at many locations in KGX, the verbiage could be controlled. For example, if the errors are bring thrown at logging.warning level then we could suppress them at runtime by any tool thats using bmt as a dependency.