require 'maasha/biopieces'
casts = []
-casts << {long: 'keys', short: 'k', type: 'list', mandatory: false, default: nil, allowed: nil, disallowed: nil}
-casts << {long: 'no_keys', short: 'K', type: 'list', mandatory: false, default: nil, allowed: nil, disallowed: nil}
+casts << {long: 'keys', short: 'k', type: 'list', mandatory: false, default: nil, allowed: nil, disallowed: nil}
+casts << {long: 'no_keys', short: 'K', type: 'list', mandatory: false, default: nil, allowed: nil, disallowed: nil}
+casts << {long: 'no_stream', short: 'x', type: 'flag', mandatory: false, default: nil, allowed: nil, disallowed: nil}
+casts << {long: 'data_out', short: 'o', type: 'file', mandatory: false, default: nil, allowed: nil, disallowed: nil}
options = Biopieces.options_parse(ARGV, casts)
stats[key][:count] += 1
end
+
+ output.puts record unless options[:no_stream]
+ end
+
+ if options[:data_out]
+ data_out = File.open(options[:data_out], 'w')
end
stats.each do |key, value|
:MEAN => "%0.2f" % (value[:sum] / value[:count].to_f)
}
- output.puts stat_record
+ if options[:data_out]
+ data_out.puts stat_record
+ else
+ output.puts stat_record
+ end
end
end