obi import: small efficiency improvement when dealing with NA values

This commit is contained in:
Celine Mercier
2017-10-04 15:44:48 +02:00
parent b4088a7928
commit 532d8e9cd7

View File

@ -79,6 +79,7 @@ def run(config):
cdef list old_elements_names
cdef list new_elements_names
cdef ProgressBar pb
cdef bytes NA_value
global obi_errno
@ -102,6 +103,8 @@ def run(config):
iseq = input[1]
NA_value = config['obi']['nastring']
get_quality = False
NUC_SEQS_view = False
if isinstance(output[1], View) :
@ -143,7 +146,7 @@ def run(config):
value = seq[tag]
# Check NA value
if value == config['obi']['nastring'] :
if value == NA_value :
value = None
if tag not in dcols :