Mercurial > repos > yhoogstrate > fastq_replace_dots_for_n
comparison FASTQ_replace_dots_for_N.py @ 0:f2939b8fb2e1 draft
Uploaded
author | yhoogstrate |
---|---|
date | Thu, 19 Dec 2013 10:53:31 -0500 |
parents | |
children | f7c90e81c05d |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:f2939b8fb2e1 |
---|---|
1 #!/usr/bin/env python | |
2 | |
3 import sys | |
4 from Bio import Seq, SeqRecord, SeqIO | |
5 | |
6 if(sys.argv[0] == ''): | |
7 input_stream = sys.stdin | |
8 else: | |
9 input_stream = fh.open(sys.argv[0],"r") | |
10 | |
11 for record in SeqIO.parse(input_stream,"fastq-sanger"): | |
12 SeqIO.write(SeqRecord.SeqRecord(seq=Seq.Seq(str(record.seq).replace(".","N")),letter_annotations=record.letter_annotations,id=record.id,name=record.name,description=record.description),sys.stdout,"fastq-sanger") |