Skip to content

Commit

Permalink
added error for Mondo in not human
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristopherMancuso committed Nov 25, 2024
1 parent 34558d9 commit 8fb4e48
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions geneplexus/exception.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
class FlyMonarchError(Exception):
"""Raised becasue no Monarch annotations for Fly."""


class MondoError(Exception):
"""Raised becasue no Mondo only has annotations for Human."""


class ZebrafishBioGRIDError(Exception):
"""Raised becuse BioGRID doesn't have a good Zebrafish network."""
Expand Down
6 changes: 6 additions & 0 deletions geneplexus/geneplexus.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
from ._config.logger_util import set_stream_level
from .download import download_select_data
from .exception import FlyMonarchError
from .exception import MondoError
from .exception import NoPositivesError
from .exception import ZebrafishBioGRIDError

Expand Down Expand Up @@ -105,6 +106,11 @@ def __init__(
raise FlyMonarchError(
f"Fly has no annotations for Monarch. Use either Combined or GO for GSC",
)

if (self.sp_trn != "Human" and self.gsc_trn == "Mondo") or (self.sp_res != "Human" and self.gsc_res == "Mondo"):
raise MondoError(
f"Mondo only has annotations for Human",
)

if self.gsc_trn == "Combined":
logger.info(
Expand Down

0 comments on commit 8fb4e48

Please sign in to comment.