This package contains source code for two auxiliary tools for use with GADEM. Note that the 
tools support up to 16-mers, whereas GADEM only supports up to 9-mers (i.e. 8th order Markov).

1) <kmerFreq> for counting or calculating the frequencies of k-mers (up to 16-mers) 
   in a single set of sequences. The frequencies can be read in by GADEM as the Markov 
   background models. 

   To compute the frequencies genome-wide (chromosome by chromosome), obtain the counts first 
   (see below) and then average them to obtain the frequencies using the <aveCount> utility.

   Usage (for k-mer counts):      ./kmerFreq inputSeqFile kmer ouputFile c
   Usage (for k-mer frequencies): ./kmerFreq inputSeqFile kmer ouputFile

   where inputSeqFile:	file in which k-mers to be counted
         kmer:		length of the longest k-mer to be counted
         outputFile:	name of output file
         c:             generate counts rather than frequencies

   To average the counts to obtain frequencies:

   ./aveCount countFile_1 countFile_2 ... countFile_N output

2) <simulateMarkovSeq> for simulating Markov background sequences. This allows a user
   to simulate Markov background sequences using the background model from <kmerFreq>.

   Usage: ./simulateMarkovSeq modelFile MarkovOrder numSeq seqLen outputFile

   where modelFile:	file containing the frequencies (e.g., from <kmerFreq>)
         MarkovOrder:	order of Markov model (an integer between 0 and 8)
         numSeq:	number of sequences to generate
	 seqLen:	length of each simulated sequence
	 outputFile:    output file name
