changeset 4:f7c90e81c05d draft

Uploaded
author yhoogstrate
date Thu, 19 Dec 2013 11:08:00 -0500
parents 9a92bd75ec9b
children c3a676a14734
files FASTQ_replace_dots_for_N.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/FASTQ_replace_dots_for_N.py	Thu Dec 19 11:02:09 2013 -0500
+++ b/FASTQ_replace_dots_for_N.py	Thu Dec 19 11:08:00 2013 -0500
@@ -3,10 +3,10 @@
 import sys
 from Bio import Seq, SeqRecord, SeqIO
 
-if(sys.argv[0] == ''):
+if(len(sys.argv[0]) >= 2):
 	input_stream = sys.stdin
 else:
-	input_stream = fh.open(sys.argv[0],"r")
+	input_stream = open(sys.argv[1],"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")