]> git.donarmstrong.com Git - biopieces.git/blobdiff - bp_bin/scores_to_dec
added quality score check to read_fastq
[biopieces.git] / bp_bin / scores_to_dec
index ecf214848923f7ff08d149dc38e83ad363f42b1b..56381a5522b023ecbde2ae9a7d3fece2aef7088c 100755 (executable)
@@ -29,7 +29,7 @@
 # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
 
 
-require 'biopieces'
+require 'maasha/biopieces'
 
 ILLUMINA_BASE = 64
 
@@ -50,14 +50,12 @@ class Hash
   end
 end
 
-casts = []
+options = Biopieces.options_parse(ARGV)
 
-bp = Biopieces.new
-
-options = bp.parse(ARGV, casts)
-
-bp.each_record do |record|
-  bp.puts record.scores2dec!
+Biopieces.open(options[:stream_in], options[:stream_out]) do |input, output|
+  input.each_record do |record|
+    output.puts record.scores2dec!
+  end
 end