tanghaibao / goatools

Python library to handle Gene Ontology (GO) terms
BSD 2-Clause "Simplified" License
783 stars 210 forks source link

Don't display ERROR in get_id2gos (thanks @yuanning-li, #152) #209

Closed tanghaibao closed 3 years ago

tanghaibao commented 3 years ago

When running map_to_slim.py we get an error string:

**ERROR IdToGosReader(..., godag=None).get_id2gos: GODAG is None!. IGNORING namespace(BP)

Since this does not impact end results. I changed the display to a warning instead, with the appropriate logging level which can be a bit friendlier to the users:

WARNING:root:IdToGosReader.get_id2gos: GODAG is None. IGNORING namespace(BP). If you are running `map_to_slim.py`, this warning can be ignored.