diff --git a/src/intron_graph.py b/src/intron_graph.py index 7a459b82..64d12789 100644 --- a/src/intron_graph.py +++ b/src/intron_graph.py @@ -209,6 +209,8 @@ def signleton_dead_start(self, v): def get_outgoing(self, intron, v_type=None): res = [] + if intron not in self.outgoing_edges: + return res if v_type is None: for v in self.outgoing_edges[intron]: if v[0] >= 0: @@ -221,6 +223,8 @@ def get_outgoing(self, intron, v_type=None): def get_incoming(self, intron, v_type=None): res = [] + if intron not in self.incoming_edges: + return res if v_type is None: for v in self.incoming_edges[intron]: if v[0] >= 0: