#!/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
record = {
:REC_TYPE => "KMER_FREQ",
:KMER => kmer,
- :COUNT => count
+ :COUNT => count,
+ :FREQ => (count.to_f / kmer_hash.size).round(4)
}
output.puts record