{'fraction_non_alphanumeric': 0.03529411764705882, 'fraction_numerical': 0.004152249134948097, 'mean_word_length': 5.025, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
KCOSS: an ultra-fast k-mer counter for assembled genome analysis

MOTIVATION
The k-mer frequency in whole genome sequences provides researchers with an insightful perspective on genomic complexity, comparative genomics, metagenomics, and phylogeny. The current k-mer counting tools are typically slow, and they require large memory and hard disk for assembled genome analysis.


RESULTS
We propose a novel and ultra-fast k-mer counting algorithm, KCOSS, to fulfill k-mer counting mainly for assembled genomes with segmented Bloom filter, lock-free queue, lock-free thread pool, and cuckoo hash table. We optimize running time and memory consumption by recycling memory blocks, merging multiple consecutive first-occurrence k-mers into C-read, and writing a set of C-reads to disk asynchronously. KCOSS was comparatively tested with Jellyfish2, CHTKC, and KMC3 on seven assembled genomes and three sequencing datasets in running time, memory consumption, and hard disk occupation. The experimental results show that KCOSS counts k-mer with less memory and disk while having a shorter running time on assembled genomes. KCOSS can be used to calculate the k-mer frequency not only for assembled genomes but also for sequencing data.


AVAILABILITY
The KCOSS software is implemented in C ++. It is freely available on GitHub: https://github.com/kcoss-2021/KCOSS.


SUPPLEMENTARY INFORMATION
Supplementary data are available at Bioinformatics online.