This tool will take a bunch (N) of contigs (FASTA) or reads (FASTQ.gz)
and generate a tab-separated matrix with M rows and N+1 columns,
where M is the number unique k-mers found across the inputs,
and the columns are the k-mer string and the counts for the N genomes.
It relies on kmc for efficient k-mer counting, then uses standard
Unix tools like sort, paste, cut and join to combine all the
data into an output file without having to ever have it all in memory
at once. The more --threads and --ram you can give it, the faster
it will run, assuming your disk can keep up.
Do not mix samples of reads and contigs, because the k-mer frequencies
will be not comparable.
When using reads, the minimum k-mer frequency reported is --minfreq
When using reads, it is recommended to only use R1, and ignore R2 as it is
normally noisier and more error-prone, and doesn’t add much extra
information
If you only want “core” k-mers, you can grep -v -w 0 kmers.tsv > core.tsv
(NOTE: will removed header line)
To binarize the results to presence/absence you can
sed -e '1 ! s/[1-9][0-9]*/1/g' kmers.tsv > yesno.tsv
(NOTE: will mess up header line)
Installation
conda install -c conda-forge -c bioconda kounta
License
kounta is free software, released under the
GPL 3.0.
Issues
Please submit suggestions and bug reports to the
Issue Tracker
kounta
Build a multi-genome unique k-mer count matrix
Introduction
This tool will take a bunch (N) of contigs (FASTA) or reads (FASTQ.gz) and generate a tab-separated matrix with M rows and N+1 columns, where M is the number unique k-mers found across the inputs, and the columns are the k-mer string and the counts for the N genomes.
It relies on
kmcfor efficient k-mer counting, then uses standard Unix tools likesort,paste,cutandjointo combine all the data into an output file without having to ever have it all in memory at once. The more--threadsand--ramyou can give it, the faster it will run, assuming your disk can keep up.Quick Start
Using contigs
Using reads
Notes
--minfreqgrep -v -w 0 kmers.tsv > core.tsv(NOTE: will removed header line)sed -e '1 ! s/[1-9][0-9]*/1/g' kmers.tsv > yesno.tsv(NOTE: will mess up header line)Installation
License
kounta is free software, released under the GPL 3.0.
Issues
Please submit suggestions and bug reports to the Issue Tracker
Author
Torsten Seemann