KMCP utilizes genome coverage information by splitting the reference genomes
into chunks and stores k-mers in a modified and optimized COBS index for
fast alignment-free sequence searching. KMCP combines k-mer similarity and
genome coverage information to reduce the false positive rate of k-mer-based
taxonomic classification and profiling methods.
The read mapping process in KMCP is referred to as pseudo-mapping,
which is similar to but different from the lightweight algorithm in Sailfish (Patro et al., 2014),
pseudoalignment in Kallisto (Bray et al., 2016), quasi-mapping in RapMap (Srivastava et al., 2016),
and lightweight mapping in Salmon (Patro et al., 2017). All of these methods seek to elide the
computation of base-to-base alignment using distinct strategies (Srivastava et al., 2016).
In KMCP, each reference genome is pre-split into chunks of equal size, and the k-mers of a query,
as a whole, are compared to each genome chunk to find all possible ones sharing a predefined
proportion of k-mers with the query. Like quasi-mapping in RapMap, KMCP tracks the target
and position for each query. However, the read position in KMCP is approximate and in a
predefined resolution (the number of genome chunks).
Benchmarking results based on simulated and real data demonstrate that KMCP,
despite a longer running time than some other methods,
not only allows the accurate taxonomic profiling of prokaryotic and viral populations
but also provides more confident pathogen detection in clinical samples of low depth.
The index structure is modified from COBS, while KMCP is 2x-10x faster in sequence searching.
Automatically scales to exploit all available CPU cores.
Searching time is linearly related to the number of reference genomes (chunks).
Scalable searching. Searching results against multiple databases can be fast merged.
This brings many benefits:
There’s no need to re-built the database with newly added reference genomes.
The searching step can be parallelized with a computer cluster in which each computation node searches against a small database.
Computers with limited main memory can also utilize an extensive collection of reference genomes by building and searching against small databases..
Accurate taxonomic profiling
Some k-mer based taxonomic profilers suffer from high false positive rates,
while KMCP adopts multiple strategies
to improve specificity and keeps high sensitivity at the same time.
In addition to archaea and bacteria, KMCP performed well on viruses/phages.
KMCP also provides confident infectious pathogen detection.
Taxonomy data, in the format of NCBI taxdump files, are only needed in the profiling step.
Therefore, it is easy to utilize an updated version of taxonomy data.
GTDB, ICTV and custom taxonomy database are supported by creating taxdump files with taxonkit create-taxdump.
Zhi-Luo Deng (Helmholtz Centre for Infection Research, Germany)
gave a lot of valuable advice on metagenomic profiling and benchmarking.
Robert Clausecker (Zuse Institute Berlin, Germany)
wrote the high-performance vectorized positional popcount package
(pospop)
during my development of KMCP,
which greatly accelerated the bit-matrix searching.
KMCP: accurate metagenomic profiling of both prokaryotic and viral populations by pseudo-mapping
Citation
Table of contents
Documents
https://bioinf.shenwei.me/kmcp
What can we do?
1. Accurate metagenomic profiling
KMCP utilizes genome coverage information by splitting the reference genomes into chunks and stores k-mers in a modified and optimized COBS index for fast alignment-free sequence searching. KMCP combines k-mer similarity and genome coverage information to reduce the false positive rate of k-mer-based taxonomic classification and profiling methods.
The read mapping process in KMCP is referred to as pseudo-mapping, which is similar to but different from the lightweight algorithm in Sailfish (Patro et al., 2014), pseudoalignment in Kallisto (Bray et al., 2016), quasi-mapping in RapMap (Srivastava et al., 2016), and lightweight mapping in Salmon (Patro et al., 2017). All of these methods seek to elide the computation of base-to-base alignment using distinct strategies (Srivastava et al., 2016). In KMCP, each reference genome is pre-split into chunks of equal size, and the k-mers of a query, as a whole, are compared to each genome chunk to find all possible ones sharing a predefined proportion of k-mers with the query. Like quasi-mapping in RapMap, KMCP tracks the target and position for each query. However, the read position in KMCP is approximate and in a predefined resolution (the number of genome chunks).
Benchmarking results based on simulated and real data demonstrate that KMCP, despite a longer running time than some other methods, not only allows the accurate taxonomic profiling of prokaryotic and viral populations but also provides more confident pathogen detection in clinical samples of low depth.
Genome collections with custom taxonomy, e.g., GTDB uses its own taxonomy and MGV uses ICTV taxonomy, are also supported by generating NCBI-style taxdump files with taxonkit create-taxdump. You can even merge the GTDB taxonomy (for prokaryotic genomes from GTDB) and NCBI taxonomy (for genomes from NCBI).
2. Fast sequence search against large scales of genomic datasets
KMCP can be used for fast sequence search against large scales of genomic datasets as BIGSI and COBS do. We reimplemented and modified the Compact Bit-Sliced Signature index (COBS) algorithm, bringing a smaller index size and much faster searching speed (2x for genome search and 10x for short reads) faster than COBS (check the tutorial and benchmark). Also check the algorithm and data structure differences between KMCP and COBS.
3. Fast genome similarity estimation
KMCP can also be used for fast similarity estimation of assemblies/genomes against known reference genomes.
Genome sketching is a method of utilizing small and approximate summaries of genomic data for fast searching and comparison. Mash and Sourmash provide fast genome distance estimation using MinHash (Mash) or FracMinHash (Sourmash). KMCP supports multiple k-mer sketches (Minimizer, FracMinHash (previously named Scaled MinHash), and Closed Syncmers) for genome similarity estimation. And KMCP is 5x-7x faster than Mash/Sourmash (check the tutorial and benchmark).
Features
conda install -c bioconda kmcp--level straininkmcp profile.Installation
Download executable binaries, or install using conda:
SIMD extensions including
AVX512,AVX2,SSE2are sequentially detected and used in two packages for better searching performance.ARM architecture is supported, but
kmcp searchwould be slower.Commands
Quickstart
Next:
KMCP vs COBS
We reimplemented and modified the Compact Bit-Sliced Signature index (COBS) algorithm, bringing a smaller index size and much faster searching speed (2x for genome search and 10x for short reads) faster than COBS.
The differences between KMCP and COBS
Support
Please open an issue to report bugs, propose new functions, or ask for help.
License
MIT License
Acknowledgments