Skip to content

Commit

Permalink
update annoreader_base
Browse files Browse the repository at this point in the history
  • Loading branch information
tanghaibao committed Sep 28, 2023
1 parent 33b123e commit cfc9bea
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
18 changes: 9 additions & 9 deletions goatools/anno/annoreader_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
import collections as cx
import logging

from goatools.evidence_codes import EvidenceCodes
from goatools.anno.opts import AnnoOptions
from goatools.godag.consts import NAMESPACE2NS
from goatools.gosubdag.go_tasks import get_go2parents_go2obj
from ..base import logger
from ..anno.opts import AnnoOptions
from ..evidence_codes import EvidenceCodes
from ..godag.consts import NAMESPACE2NS
from ..gosubdag.go_tasks import get_go2parents_go2obj

__copyright__ = (
"Copyright (C) 2016-present, DV Klopfenstein, H Tang. All rights reserved."
Expand Down Expand Up @@ -148,13 +149,12 @@ def _get_1ns_assn(self, namespace_usr):
if len(self.namespaces) == 1:
nspc = next(iter(self.namespaces))
if namespace_usr is not None and nspc != namespace_usr:
print(f"**WARNING: IGNORING {namespace_usr}; ONLY {nspc} WAS LOADED")
logger.warning("IGNORING %s; ONLY %s WAS LOADED", namespace_usr, nspc)
return nspc, self.associations
if namespace_usr is None:
print(
"**ERROR get_id2gos: GODAG NOT LOADED. USING: {NSs}".format(
NSs=" ".join(sorted(self.namespaces))
)
logger.error(
"get_id2gos: GODAG NOT LOADED. USING: %s",
" ".join(sorted(self.namespaces)),
)
return namespace_usr, self.associations

Expand Down
1 change: 0 additions & 1 deletion goatools/anno/init/reader_idtogos.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""Reads a Annotation File in text format with data in id2gos line"""

from sys import stdout
import timeit
import datetime
import collections as cx
Expand Down

0 comments on commit cfc9bea

Please sign in to comment.