From 050e8fe09da14cafe512a3a7f41c192f2e955444 Mon Sep 17 00:00:00 2001 From: Danilo Horta Date: Sun, 25 Feb 2024 20:21:50 +0000 Subject: [PATCH] Optimize interval access and bump version --- snap/deciphon_snap/view.py | 4 ++-- snap/pyproject.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/snap/deciphon_snap/view.py b/snap/deciphon_snap/view.py index cf74180..bd1320f 100644 --- a/snap/deciphon_snap/view.py +++ b/snap/deciphon_snap/view.py @@ -48,8 +48,8 @@ def make_hmmer_steps(annot: DomAnnot): a = x.align core_positions = a.core_positions core_positions = list(range(a.core_interval.start, a.core_interval.stop + 1)) - start = a.query_interval.to_pyinterval().start - stop = a.query_interval.to_pyinterval().stop + start = a.query_interval.py.start + stop = a.query_interval.py.stop offset = start - 1 amino_pos = [offset + i for i in accumulate([int(i != "-") for i in a.query])] assert amino_pos[0] == start diff --git a/snap/pyproject.toml b/snap/pyproject.toml index 3e7dfbc..7537921 100644 --- a/snap/pyproject.toml +++ b/snap/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "deciphon-snap" -version = "0.10.1" +version = "0.10.2" description = "Reader for Deciphon snap files." authors = ["Danilo Horta "] license = "MIT"