Biopieces.open(options[:stream_in], options[:stream_out]) do |input, output|
input.each_record do |record|
- if record.has_key? key
+ if record[key]
count_hash[record[key].to_i] += 1
end
plot.title options[:title]
plot.xlabel options[:xlabel]
plot.ylabel options[:ylabel]
- plot.output options[:data_out] if options[:data_out]
+ plot.output options[:data_out] || "/dev/stderr"
plot.logscale "y" if options[:logscale_y]
plot.xrange "[#{x.min - 1}:#{x.max + 1}]"
plot.style "fill solid 0.5 border"