]> git.donarmstrong.com Git - biopieces.git/blobdiff - bp_bin/write_fastq_files
added missing seq fix to plot_nucleotide_distribution
[biopieces.git] / bp_bin / write_fastq_files
index 91ba26ef04626c663758154a7cdefca2a13f67ea..eab5a870aedb7a5622efc4e68b8200e79ddf5cf9 100755 (executable)
@@ -46,6 +46,8 @@ fh_hash = {}
 Biopieces.open(options[:stream_in], options[:stream_out]) do |input, output|
   input.each_record do |record|
     if record[:SEQ_NAME] and record[:SEQ] and record[:SCORES] and record[key]
+      seq = Seq.new_bp(record)
+
       if fh_hash.has_key? record[key].to_sym
         fastq_io = fh_hash[record[key].to_sym]
       else
@@ -54,7 +56,7 @@ Biopieces.open(options[:stream_in], options[:stream_out]) do |input, output|
         fh_hash[record[key].to_sym] = fastq_io
       end
 
-      fastq_io.puts record
+      fastq_io.puts seq.to_fastq
     end
 
     output.puts record unless options[:no_stream]