Created
April 6, 2017 19:00
-
-
Save mkweskin/79bf3d9b9c7525f8c75c22501f09341f to your computer and use it in GitHub Desktop.
Gives the average Q value for each sequence in a fastq
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import numpy as np | |
from Bio import SeqIO | |
for record in SeqIO.parse("test_R1.fq", "fastq"): | |
print ('{}\t{}'.format(record.id, np.mean(record.letter_annotations["phred_quality"]))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment