Created
May 12, 2014 06:16
-
-
Save mscook/2ac9e97696000ad61f4d to your computer and use it in GitHub Desktop.
Gives an idea on what PHRED encoding
This file contains 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
import glob | |
import os | |
inf = glob.glob("*.gz") | |
rlen = 76.0 | |
for f in inf: | |
tmp = f.split(".fastq.gz")[0] | |
os.system("zcat "+f+" | head -n 4 | tail -n 1 > "+tmp) | |
with open(tmp) as fin: | |
cur = 0 | |
line = fin.readlines()[0].strip() | |
for c in line: | |
cur = cur+ord(c) | |
print tmp,cur/rlen-33,cur/rlen-64 | |
os.system("rm "+tmp) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@nbenzakour