Standalone tool based on the bwa index to locate a set of kmers along a reference genome. klocate
searches each kmer (full and perfect match) in the index and outputs all positions the kmer maps to (output to sdtout in bed format).
git clone --recursive https://github.com/ldenti/klocate.git
cd klocate/bwa
make
cd ../KMC
make
cd ..
make
klocate -h
klocate index -h
klocate map -h
# Index the reference genome
./klocate index data/dros.4.fa
# Locate kmers from txt list (txt mode)
./klocate find -k 23 -f 0 data/dros.4.fa data/query.k23.txt > txt.bed
# Locate kmers from fasta/q file (fx mode)
./klocate find -k 23 -f 1 data/dros.4.fa data/query.k23.fa > fa.bed
./klocate find -k 23 -f 1 data/dros.4.fa data/query.k23.fq > fq.bed
# Locate kmers from KMC database (kmc mode)
./klocate find -k 23 -f 2 data/dros.4.fa data/query.k23 > kmc.bed