]> git.donarmstrong.com Git - biopieces.git/blobdiff - bp_bin/plot_distribution
added missing files
[biopieces.git] / bp_bin / plot_distribution
index d2d4d70f387d38e972d61497678652abb5b79ded..175ca595377d4e3824d2c51620af5654e2114fd3 100755 (executable)
@@ -45,7 +45,7 @@ casts << {:long=>'logscale_y', :short=>'L', :type=>'flag',   :mandatory=>false,
 
 options = Biopieces.options_parse(ARGV, casts)
 
-key = options[:key]
+key = options[:key].to_sym
 
 options[:xlabel] = key unless options[:xlabel]
 options[:ylabel] = "log10(#{options[:ylabel]})" if options[:logscale_y]
@@ -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