X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=bp_bin%2Fplot_distribution;h=7554432d4d14c0c9bdea86b86d890b3eea0bbabf;hb=5de6112b70b59420b245ce636a8b2e3c90acbe00;hp=02f802ee611ea1146c88a7de878705358f982f10;hpb=f46d61f0881daf3bb2ad3209dd07169ee2453246;p=biopieces.git diff --git a/bp_bin/plot_distribution b/bp_bin/plot_distribution index 02f802e..7554432 100755 --- a/bp_bin/plot_distribution +++ b/bp_bin/plot_distribution @@ -54,7 +54,7 @@ count_hash = Hash.new(0) 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 @@ -78,7 +78,7 @@ Gnuplot.open do |gp| 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"