changeset 0:f2939b8fb2e1 draft

Uploaded
author yhoogstrate
date Thu, 19 Dec 2013 10:53:31 -0500
parents
children 956b18863409
files FASTQ_replace_dots_for_N.py
diffstat 1 files changed, 12 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/FASTQ_replace_dots_for_N.py	Thu Dec 19 10:53:31 2013 -0500
@@ -0,0 +1,12 @@
+#!/usr/bin/env python
+
+import sys
+from Bio import Seq, SeqRecord, SeqIO
+
+if(sys.argv[0] == ''):
+	input_stream = sys.stdin
+else:
+	input_stream = fh.open(sys.argv[0],"r")
+
+for record in SeqIO.parse(input_stream,"fastq-sanger"):
+	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")