Scroll to navigation

KBM2(1) User Commands KBM2(1)


kbm2 - simple instance which implemented kmer-binmap


kbm <options> [start|list|stop]


Program: kbm is a simple instance which implemented kmer-binmap
it maps query sequence against reference by kmer matching matched kmer-pairs are bined (256bp) and counted in a matrix dynamic programming is used to search the best path

Version: 2.5 (20190621) Author: Jue Ruan <>


-i <string> File(s) of query sequences, +, [STDIN]

-d <string> File(s) of reference sequences, +, [<-i>]

-L <int>
Choose the longest subread and drop reads shorter than <int> (5000 recommended for PacBio) [0] Negative integer indicate keeping read names, e.g. -5000.

-o <string> Output file, [STDOUT]

Interactive mode e.g. `mkfifo pipe` then `while true; do cat pipe && sleep 1; done | kbm -t 8 -I -d ref.fa -i - -Hk 21 -S 4` then `cat 1.fq >pipe; cat 2.fq >pipe`, fastq format is better in interaction
Force overwrite
-t <int>
Number of threads, 0: all cores, [1]
-k <int>
Kmer-f size, <= 23, [0]
-p <int>
Kmer-p size, <= 23, [21]
-K <float>
Filter high frequency kmers, maybe repetitive, [1000] if K >= 1, take the integer value as cutoff, MUST <= 65535 else, mask the top fraction part high frequency kmers
-E <int>
Min kmer frequency, [1]
-O <int>
Filter low complexity bins (#indexed_kmer less than <-O>), [2]
-S <float>
Subsampling kmers, 1/(<-S>) kmers are indexed, [4.00] -S is very useful in saving memory and speeding up please note that subsampling kmers will have less matched length
-B <int>
Select no more than n seeds in a query bin, [256] If you are using shared kbmidx by other process using -D too, it will bring wrong behavior
-D <int>
Strand of alignment, 1: forward, 2: reverse, 3: both, [3]
-X <int>
Max number of bin(256bp) in one gap, [4]
-Y <int>
Max number of bin(256bp) in one deviation, [4]
-Z <float>
Max fraction of gapped BINs / aligned BINs, [0.6]
-x <int>
penalty for BIN gap, [-7]
-y <int>
penalty for BIN deviation, [-21]
-z <int>
Enable refine alignment with -p <-z> [0]
-l <int>
Min alignment length, [2048]
-m <int>
Min matched length, [200]
-s <float>
Min similarity, calculated by kmer matched length / aligned length, [0.05]
-r <float>
Max length variation of two aligned fragments, [0.25]
Insist to query contained reads against all
Chainning alignments
-n <int>
Max hits per query, [1000]
-T <int>
For debug, [0]

-W <string> Dump kbm index to file, [NULL]

-R <string> Load kbm index from file, [NULL]

Print version information and then exit

Server start: {kbm -R <wt.fa.kbmidx> start}, will mmap wt.fa.kbmidx into mmeory Server list: {kbm -R <wt.fa.kbmidx> list [10]}, will list the object tree in file Server stop: {kbm -R <wt.fa.kbmidx> stop}, will remove the mmap object


This manpage was written by Andreas Tille for the Debian distribution and can be used for any other usage of the program.
April 2020 kbm2 2.5