We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3d275d5 commit b96851bCopy full SHA for b96851b
phred_per_read.py
@@ -34,7 +34,13 @@ def phred_to_number(fastqfile):
34
for n in range(0, count):
35
name = fastq[4 * n]
36
qualityscore = fastq[4 * n + 3]
37
- score_one=[phred[i] for i in qualityscore]
+ score_one=[]
38
+ for i in qualityscore:
39
+ try:
40
+ score_one.append(phred[i])
41
+ except KeyError as e:
42
+ logging.warnings("score char not in sanger 0-45 range", e)
43
+
44
score_one_mean=mean(score_one)
45
# Note the last word in qyalityscore is "\n"
46
print("{}\t{}".format(name, score_one_mean))
0 commit comments