X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=bp_bin%2Fkmer_freq;h=cbe99a8d8e87b210e578b19ed55c24c99b8aff4b;hb=48bea5c28b89dc5586d0bddb338ccd6ba23aa1f9;hp=9f45cefe7d00db386ee0fc6c1945457f17092d69;hpb=f47f8b7621db2e9ee98c78ca0e4f7313535052c7;p=biopieces.git diff --git a/bp_bin/kmer_freq b/bp_bin/kmer_freq index 9f45cef..cbe99a8 100755 --- a/bp_bin/kmer_freq +++ b/bp_bin/kmer_freq @@ -1,6 +1,6 @@ #!/usr/bin/env ruby -# Copyright (C) 2007-2011 Martin A. Hansen. +# Copyright (C) 2007-2012 Martin A. Hansen. # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -57,7 +57,8 @@ Biopieces.open(options[:stream_in], options[:stream_out]) do |input, output| record = { :REC_TYPE => "KMER_FREQ", :KMER => kmer, - :COUNT => count + :COUNT => count, + :FREQ => (count.to_f / kmer_hash.size).round(4) } output.puts record