The wordCount scripts are perl scripts to parse multiFasta files into kmer counts.  wordCount2 treats every kmer individually. wordCount3 collapses reverse complements. The output files from these script can be input into the R script to get distances and do clustering. 

For the perl scripts, at the command line type:

perl wordCount2.pl -in [your fasta file] -len [k-mer length range from  
1-20, defaults on 8] -min [min seq length - defaults to k-merLen*10]

The R script generates distance matrices using various distance measures and  calls Hopach to produce clusters from the output of wordCount.  Copy/paste modules of interest in R to run them. You will need to change the path to your path. 