Skip to content

Instantly share code, notes, and snippets.

@brainstorm
Created September 19, 2011 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brainstorm/1226586 to your computer and use it in GitHub Desktop.
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
#!/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