]> git.donarmstrong.com Git - biopieces.git/blobdiff - bp_bin/length_seq
fixed database type guess for blast_seq
[biopieces.git] / bp_bin / length_seq
index e3e6b094484db2fbb3a83f9344a35194f8fae2b1..e9f87269e0a5d944e31a7e3296bfd02af36ef896 100755 (executable)
 # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
 
 
-require 'biopieces'
+require 'maasha/biopieces'
 
 casts = []
 
-bp = Biopieces.new
+options = Biopieces.options_parse(ARGV, casts)
 
-options = bp.parse(ARGV, casts)
-
-bp.each_record do |record|
-  record[:SEQ_LEN] = record[:SEQ].length if record.has_key? :SEQ
-  bp.puts record
+Biopieces.open(options[:stream_in], options[:stream_out]) do |input, output|
+  input.each_record do |record|
+    record[:SEQ_LEN] = record[:SEQ].length if record.has_key? :SEQ
+    output.puts record
+  end
 end