Cython: added full handling of NA strings when importing files

This commit is contained in:
Celine Mercier
2018-10-17 16:41:15 +02:00
parent da76f911db
commit da0e3d4043
11 changed files with 43 additions and 32 deletions

View File

@ -83,7 +83,6 @@ def run(config):
cdef list old_elements_names
cdef list new_elements_names
cdef ProgressBar pb
cdef bytes NA_value
global obi_errno
DMS.obi_atexit()
@ -122,9 +121,7 @@ def run(config):
pb = ProgressBar(10000000, config, seconde=5) # TODO should be number of records in file
entries = input[1]
NA_value = tobytes(config['obi']['inputnastring'])
NUC_SEQS_view = False
if isinstance(output[1], View) :
view = output[1]
@ -169,11 +166,7 @@ def run(config):
value = entry[tag]
if tag == b"taxid":
tag = b"TAXID"
# Check NA value
if value == NA_value :
value = None
if tag not in dcols :
value_type = type(value)