From ddea5a2964c391e2ca3ec85d464b6d2c356eb965 Mon Sep 17 00:00:00 2001 From: Celine Mercier Date: Sun, 12 Apr 2020 17:38:42 +0200 Subject: [PATCH] obi import: fixed inconsequential error when precomputing number of entries in some formats --- python/obitools3/utils.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/obitools3/utils.pyx b/python/obitools3/utils.pyx index 28ef89a..c584491 100755 --- a/python/obitools3/utils.pyx +++ b/python/obitools3/utils.pyx @@ -72,7 +72,7 @@ cpdef int count_entries(file, bytes format): return -1 mmapped_file = mmap.mmap(f.fileno(), 0, access=mmap.ACCESS_READ) total_count += len(re.findall(sep, mmapped_file)) - if format != b"ngsfilter" and format != b"tabular": + if format != b"ngsfilter" and format != b"tabular" and format != b"embl" and format != b"genbank": total_count += 1 # adding +1 for 1st entry because separators include \n (ngsfilter and tabular already count one more because of last \n) except: