Cython: made fasta formatter cleaner

This commit is contained in:
Celine Mercier
2019-03-31 15:41:32 +02:00
parent 26fb149efb
commit 416c2d7ba0

View File

@ -6,7 +6,7 @@ from obitools3.dms.capi.obiview cimport NUC_SEQUENCE_COLUMN, \
QUALITY_COLUMN, \
COUNT_COLUMN
from obitools3.utils cimport str2bytes
from obitools3.utils cimport str2bytes, bytes2str_object
from obitools3.dms.column.column cimport Column_line
@ -63,7 +63,7 @@ cdef class HeaderFormat:
if type(value) == Column_line:
value = value.bytes()
else:
value = str2bytes(str(value)) # TODO ugly but how else?
value = str2bytes(str(bytes2str_object(value))) # genius programming
if value is not None:
lines.append(k + b"=" + value + b";")