Deacon: fast host-read removal, benchmarking and privacy
Dr Bede Constantinides of the University of Birmingham returns to discuss how Deacon removes host reads using minimizer set membership rather than alignment. The conversation covers its Rust implementation, benchmark design and the difficulty of preserving microbial reads while removing human sequences. It also asks whether counting removed reads adequately measures protection of sensitive genetic information.
Listen to Episode 152: Deacon part 2 on SoundCloud
In this episode
Counting minimizer matches instead of aligning reads
Deacon compares a subset of k-mers, selected as minimizers, from each read with a reference set. It counts matches rather than constructing an alignment. Bede illustrates the scale with a large human pangenome index containing roughly half a billion minimizers and a read containing perhaps 50. The decision depends on how many of those read minimizers match the reference.
This solves a smaller problem than read mapping. minimap2 uses minimizers to seed candidate alignments, then performs additional work to extend them; Deacon avoids that work. Bede reports that careful tuning and indexing multiple human genomes produced surprisingly good balanced accuracy, not just higher speed. Kraken2 uses minimizers too, but its lowest common ancestor classification can be disadvantageous for host depletion. He does not claim to have fully explained Kraken2’s lower accuracy in his comparisons, and distinguishes a dedicated host filter from a broader taxonomic classifier.
Tuning the balance and masking microbial k-mers
The main controls are k-mer length, minimizer window size, an absolute minimum number of matches and a relative matching threshold. Bede emphasises the balance between sensitivity and specificity: he describes alignment-based approaches as more sensitive, while Deacon offers ways to tune the trade-off for a particular application.
Shared sequence makes that trade-off biological as well as computational. The discussion includes human endogenous retroviruses and the difficulty of deciding what to retain. To reduce false positives—microbial reads wrongly discarded—Bede subtracts k-mers from the FDA Argos bacterial collection from Deacon’s default human pangenome index. He describes this masking as useful but imperfect. It also complicates evaluation: bacteria used to construct the mask should not simply be reused as an independent test of microbial preservation.
Rust, SIMD and a small installation
Deacon was Bede’s first Rust project. A vectorised SIMD library for minimizer computation helped motivate the language choice, and subsequent optimisation covered the wider pipeline, including parsing. He reports throughput on the order of gigabases per second. The installation comparison is also striking: Deacon’s binary is around two or three megabytes, whereas one unnamed Python-based competitor has a Conda environment exceeding a gigabyte before its index is downloaded. These are software sizes, not reference-index sizes.
Small binaries still require attention to compatibility. Deacon uses AVX2 instructions on relevant x86 machines and a different SIMD implementation on ARM64. One release accidentally included AVX512 instructions because a GitHub build machine supported them, making it unsuitable for some older CPUs. Bede says compiling locally might sometimes help performance, but he does not expect a measurable benefit for Deacon and favours builds that run on ordinary computers.
Benchmarking diverse viruses and bacteria
Bede argues that benchmarks based on a handful of familiar organisms can miss important losses. He contrasts his approach with a host-depletion benchmarking paper using only three viral taxa. His benchmark material includes simulated viral RefSeq sequences and 1,000 clinically relevant bacterial genomes from FDA Argos, with Illumina-like paired reads and nanopore-like read lengths and error profiles. The mock metagenomic datasets are deposited on Zenodo.
Species matter. In earlier work on naive filtering approaches, Neisseria gonorrhoeae and Clostridioides difficile were among the worse-affected bacteria, whereas TB was comparatively unaffected. One host also asks about E. coli and mycoplasma, without receiving species-specific performance figures. Bede acknowledges that his benchmark framing places relatively strong weight on specificity. Comparisons include Kraken2-based approaches and NCBI Scrubber, but a human–mycobacterial mixture could make Deacon’s default settings look less favourable.
Host-heavy samples and the limits of privacy metrics
One host describes a vaginal dataset that is 99% human, where small bacterial signals are important for a typing scheme and contamination noise can approach the sample signal. Bede suggests that such host-heavy samples may warrant higher host-removal sensitivity, accepting the loss of more microbial reads. There is no single parameter setting presented as best for every sample.
He also separates two objectives: removing human reads that confound microbial classification, and removing sensitive human genetic information. For privacy, the number of reads or bases removed is only a proxy. He argues that evaluation should ask whether remaining data still permit inference of gender, ethnicity or genetic disorders. A host adds the problem of future methods: information that cannot be recovered today might become recoverable later. The discussion raises this concern rather than offering a legal or technical guarantee.
What remains to improve
Bede has tested read-to-reference graph mappers to some extent, but found their performance overheads unattractive for this task. His next steps for Deacon include expanded benchmarks, completing the paper and improving index design, including deciding which k-mers to retain and exploring fungal host depletion with an undergraduate collaborator.
He considers the core approach broadly complete, while wanting to make it easier for people unfamiliar with the command line. He is also investigating other bioinformatics uses for the minimizer-filtering pipeline, without announcing a specific additional application.
Highlights
- 00:01:40 — Deacon’s minimizer set-membership approach and the surprise of its balanced accuracy
- 00:03:56 — Tuning k-mer length, window size and matching thresholds
- 00:05:03 — Why Kraken2’s classification design is not necessarily ideal for host depletion
- 00:06:40 — How minimap2’s alignment work differs from Deacon’s filtering task
- 00:09:39 — Rust, SIMD minimizer computation and a two-to-three-megabyte binary
- 00:11:21 — CPU compatibility and an accidental AVX512 build
- 00:15:15 — Diverse viral and bacterial benchmarks and species-specific read losses
- 00:17:27 — Shared human–viral sequence and masking bacterial k-mers from the host index
- 00:18:55 — Simulated mock metagenomes on Zenodo and the limits of benchmark comparisons
- 00:20:20 — A 99% human vaginal dataset illustrates the challenge of preserving small microbial signals
- 00:22:10 — Graph-mapping overheads and measuring privacy rather than only removed bases
- 00:25:06 — Expanded benchmarks, better indexes and easier access beyond the command line
In their own words
So read mapping is a much bigger problem than what Deacon solves.
— Bede Constantinides, 00:06:40
It’s about the amount of sensitive information you’ve removed.
— Bede Constantinides, 00:22:10
Who is talking
- Bede Constantinides (guest, University of Birmingham)
- Lee Katz (host)
- Andrew Page (host)
- Nabil-Fareed Alikhan (host)
Tools and resources mentioned
Deacon, Hostile, Kraken2, minimap2, Mash, FastANI, STAT, NCBI Scrubber, RAxML, Conda, RefSeq, FDA Argos, simd-minimizers, minimizers, lowest common ancestor classification.
Questions this episode answers
How does Deacon remove host reads without alignment?
It queries minimizers from each read against a reference minimizer set and applies matching thresholds. Unlike minimap2, it does not extend minimizer matches into alignments, so it performs substantially less work.
How does Deacon try to preserve microbial reads?
Bede tunes minimizer parameters and matching thresholds, and masks the default human pangenome index by subtracting k-mers from the FDA Argos bacterial collection. This reduces microbial false positives, but he stresses that it is not a perfect solution.
Which datasets were used to benchmark Deacon?
Bede describes simulations based on viral RefSeq and 1,000 clinically relevant FDA Argos bacterial genomes. They include Illumina-like paired reads and nanopore-like lengths and error profiles, with mock metagenomic datasets deposited on Zenodo.
Does removing most human reads guarantee genetic privacy?
The episode does not establish such a guarantee. Bede argues that privacy should be assessed by whether sensitive characteristics remain inferable, rather than just by the number of bases removed; a host also raises the possibility of future methods recovering information.
This page was written from a machine transcript of the episode and checked against it. Listen to the episode for the whole conversation.
Show notes
In this follow-up Software Deep Dive episode, we continue our conversation with Dr. Bede Constantinides (University of Birmingham) about the design and implementation of Deacon, a fast host-read removal tool for metagenomics.
Deacon uses minimizers and k-mer set membership queries instead of alignment, allowing it to filter reads extremely quickly while balancing sensitivity and specificity. The tool is written in Rust, producing a small, fast binary and enabling very high throughput.
We also discuss benchmarking with diverse viral and bacterial datasets, why tools like Kraken2 are not always ideal for host depletion, and why host read removal remains an unsolved problem—especially when balancing privacy, computational cost, and preservation of microbial reads.
Links
Deacon https://github.com/bede/deacon
Hostile https://github.com/bede/hostile/
Bede Constantinides http://bede.im/