#Find patterns forming clumps in a string.
#Given: A string Genome, and integers k, L, and t.
#Return: All distinct k-mers forming (L, t)-clumps in Genome.
use strict;
use warnin...
#!/bin/bash
#Counting k-mers for different k
echo "k,unique,distinct,total"
for k in {1..15}; do
kat hist -o phiX_$k.hist -m $k phiX.fasta >/dev/null 2>&1
egrep -v '^#' phiX_$k.hist|awk '{if ($1==1) u=$2; d+=$2; t+=$2*$1;}\
END{print "'$k',"u","d","t}'
done