diff --git a/python/obitools3/commands/ngsfilter.pyx b/python/obitools3/commands/ngsfilter.pyx old mode 100644 new mode 100755 index 131201c..e7356e9 --- a/python/obitools3/commands/ngsfilter.pyx +++ b/python/obitools3/commands/ngsfilter.pyx @@ -271,7 +271,7 @@ cdef tuple annotate(sequences, infos, no_tags, verbose=False): sequences[0][REVERSE_QUALITY_COLUMN] = sequences[1].quality # used by alignpairedend tool for seq in sequences: - if hasattr(seq, "quality_array"): + if hasattr(seq, "quality_array") and seq.quality_array is not None: q = -reduce(lambda x,y:x+y,(math.log10(z) for z in seq.quality_array),0)/len(seq.quality_array)*10 seq[b'avg_quality']=q q = -reduce(lambda x,y:x+y,(math.log10(z) for z in seq.quality_array[0:10]),0)