-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[:SEQ]
+ output.puts record
+ end