Created
September 19, 2011 14:16
-
-
Save brainstorm/1226586 to your computer and use it in GitHub Desktop.
Illumina hiseq 2000 sequencers add an extra base "A" at the end of each QSEQ read
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
#!/usr/bin/env python | |
import csv | |
import sys | |
import os | |
ss_reader = csv.DictReader(open(sys.argv[1], 'rU')) | |
ss_writer = csv.DictWriter(open(os.path.splitext(sys.argv[1])[0]+"_a.csv", 'w'), ss_reader.fieldnames) | |
ss_writer.writerow(dict((fn,fn) for fn in ss_reader.fieldnames)) | |
for row in ss_reader: | |
if len(row['Index']) < 7: | |
row['Index'] = row['Index'] + "A" | |
ss_writer.writerow(row) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment