Commit b0277620 authored by Celine Mercier's avatar Celine Mercier

Cython: export: fixed exception raising when no quality data when

exporting to fastq
parent da0e3d40
......@@ -19,11 +19,12 @@ cdef class FastqFormat:
cdef bytes quality
quality = None
if hasattr(data, "quality_bytes"):
quality = data.quality_bytes
elif hasattr(data, "quality"):
quality = tobytes(data.quality)
if quality is None:
raise AttributeError("No quality when exporting to fastq") # TODO discuss
return self.headerFormatter(data) + b"\n" + data[NUC_SEQUENCE_COLUMN] + b"\n+\n" + quality
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment