diff options
author | Nicholas Noll <nbnoll@eml.cc> | 2020-07-28 16:23:26 -0700 |
---|---|---|
committer | Nicholas Noll <nbnoll@eml.cc> | 2020-07-28 16:23:26 -0700 |
commit | 8e60f8b5688404fc75d91a6716494782a50b93a8 (patch) | |
tree | b2316909edbc9ff00ee3bd84c305a2222f0ae1e0 | |
parent | eb11078f41054ca8e29e635d273740f4b2f9acd9 (diff) |
fix: make try except more localized to not catch all exceptions
-rw-r--r-- | pangraph/sequence.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pangraph/sequence.py b/pangraph/sequence.py index 7759c90..9374335 100644 --- a/pangraph/sequence.py +++ b/pangraph/sequence.py @@ -120,6 +120,8 @@ class Path(object): ids = [n.blk.id for n in self.nodes] try: i, j = ids.index(start[0]), ids.index(stop[0]) + except: + return if self.nodes[i].strand == start[1]: beg, end, s = i, j, Strand.Plus @@ -134,8 +136,6 @@ class Path(object): self.position = np.cumsum([0] + [n.length(self.name) for n in self.nodes]) N += 1 - except: - return def replace(self, blk, tag, new_blks, blk_map): new = [] |