K-mer based data structures and heuristics for microbes and cancer