Make the phred range stricter and more explicit.

This commit is contained in:
Devon Ryan
2017-06-27 11:11:19 +02:00
parent f3853a0956
commit 907bd53776
+1 -2
View File
@@ -705,8 +705,7 @@ class BaseFastq ( Sequence ):
def sangerQualities( lines ):
"""Presuming lines are lines from a fastq file, return True if the qualities are compatible with sanger encoding"""
for line in lines[3::4]:
_ = [ord( c ) for c in line[0]]
if max( _ ) > ord( 'M' ):
if not all(_ >= '!' and _ <= 'M' for _ in line[0]):
return False
return True