Abstract
Motivation
Polymerase chain reaction (PCR) enables rapid, cost-effective diagnostics but requires prior identification of genomic regions that allow sensitive and specific detection of target microbial groups, herein referred to as microbial signature sequences. We introduce Seqwin, an open-source framework designed to automate microbial genome signature discovery. Tens of thousands of microbial genomes are now available for a single species, limiting the application of existing manual and automated approaches for identifying signatures. Modern approaches that are capable of leveraging all available microbial genomes will ensure sensitive and accurate DNA signature identification and enable robust pathogen detection for clinical, environmental, and public health applications.
Results
Seqwin builds weighted pan-genome minimizer graphs and uses a traversal algorithm to identify signature sequences that occur frequently in target genomes but remain rare in non-targets. Unlike earlier tools that depend on strict presence or absence of sequences, Seqwin accommodates natural sequence variation and scales to very large genome collections. When applied to genomes from C. difficile, M. tuberculosis, and S. enterica, Seqwin recovered more high-quality signatures than alternative methods with lower computational burden. Seqwin’s analysis of nearly 15 000 S. enterica genomes yielded over 200 candidate signatures in three minutes. Seqwin provides an open-source solution for the long-standing need for scalable microbial signature discovery and diagnostic assay design.
Availability and Implementation
Seqwin is available on GitHub (https://github.com/treangenlab/Seqwin) and can be installed via Bioconda (https://bioconda.github.io/recipes/seqwin/README.html). Benchmarking datasets, outputs, and scripts are available on Zenodo (https://doi.org/10.5281/zenodo.19874011).
1 Introduction
PCR-based infectious disease diagnostics have been the clinical standard for more than three decades, providing rapid and reliable detection of specific pathogens (Eisenach et al. 1990). Clinical studies in the late 1980s, such as the detection of HIV-1 DNA in infants and adults (Laure et al. 1988), first demonstrated its utility in patient diagnosis. These early studies laid the foundation for PCR-based infectious disease diagnostics. Signature sequences are genomic regions that allow accurate identification and classification of microorganisms within specific taxonomic groups. DNA signature sequences were originally defined to be sequences both 100% conserved over all target genomes and unique compared to all non-target genomes (Slezak et al. 2003). However, over time the definition has been relaxed in signature detection tools and is now more commonly defined as a sequence that is highly sensitive (largely present in most target genomes) and highly specific (largely absent in or divergent from closely related non-target genomes).
Early computational methods for signature discovery mainly focused on microarray and TaqMan assay design, and they usually required signatures to be perfectly conserved in all target genomes (Nordberg 2005, Feng and Tillier 2007, Phillippy et al. 2007, 2009, Bader et al. 2011). Approaches such as YODA (Nordberg 2005) and ProDesign (Feng and Tillier 2007) use exhaustive searches combined with various filtering criteria, while Insignia (Phillippy et al. 2007, 2009) and CaSSiS (Bader et al. 2011) leverage maximal unique matches (MUMs) identified via a suffix tree data structure. While all of these methods were important advances in microbial signature discovery, they suffer from several limitations. First, tools developed for the design of microarray probes typically produce short signatures (50 bp) (Nordberg 2005, Feng and Tillier 2007), which are often insufficient for modern targeted sequencing assays. Second, many of these methods were developed before the NGS era, when genomic data was considerably limited. When Insignia pioneered open-source microbial signature discovery, only tens to hundreds of genomes were available for a given microbial target. Consequently, these tools were not designed to handle modern genomic databases at terabyte-to-petabyte scales. Furthermore, due to their reliance on exact matches across all target genomes, these methods are highly vulnerable to sequence variation, limiting their application in the context of increasingly diverse genomic datasets. On the other hand, non-exact match approaches provide improved sensitivity but poor scalability. For example, SigSeekr (Knowles et al. 2015) relies on BLAST-based (Camacho et al. 2009) genome subtraction methods, but suffers from prohibitive running time on large-scale datasets.
Recent years have seen a new wave of tools for genomic signature identification that emphasize scalability and flexibility. Many abandon all-versus-all sequence alignment in favour of ultrafast k-mer-based strategies or clever filtering techniques. Fur (Haubold et al. 2021, Vieira Mourato et al. 2024) combines targeted genomic subtraction and stringent intersection methods to discover unique genomic regions. However, it struggles with highly divergent target genomes and/or similar background genomes, and may produce few or no candidate signatures. Methods such as Neptune (Marinier et al. 2017), KmerGO (Wang et al. 2020), KEC (Beran et al. 2021), and Unikseq (Allison et al. 2023, Lopez et al. 2025) use alignment-free k-mer filtering and subsequently combine k-mers into longer signatures through sequence assembly or similar strategies. However, they all require substantial memory to store k-mers from all input genomes. NAUniSeq (Sharma et al. 2024) is a recent k-mer-based method that automates the selection of target and non-target taxa, reporting identified k-mers directly as signatures without further extension. As a result, it typically requires a larger k (e.g. 100 bp), and all output signatures are fixed at that length. CURED (Theiller et al. 2026) uses a similar k-mer filtering strategy and reports restriction sites in the output k-mers. Although some of these tools do not explicitly use the term “signature,” they computationally address the same problem using target and non-target genome groups as input. Table 1 summarizes these tools, including their publication years and approaches. While recent advances in computational approaches have provided more scalable solutions, each still grapples with trade-offs related to sensitivity and scalability on gigabyte- to terabyte-sized datasets, motivating the development of solutions that can address this unmet need.
Table 1.
Existing tools for identifying signature sequences in microbial genomes.
| Name | Yeara | Approach |
|---|---|---|
| Insignia | 2009 | Suffix tree |
| SigSeekr | 2015 | BLAST |
| Neptune | 2017 | k-mer assembly |
| KmerGO | 2020 | k-mer assembly |
| KEC | 2021 | k-mer assembly |
| Fur | 2024 | Sequence filtering pipeline |
| NAUniSeq | 2024 | k-mer filtering |
| Unikseq | 2025 | k-mer assembly |
| CURED | 2026 | k-mer filtering |
| Seqwin | 2026 | Minimizer graph |
Year of the latest publication.
To address this gap, we developed Seqwin, a rapid and flexible algorithm for genomic signature discovery using pan-genome minimizer graphs. Unlike previous minimizer graph-based methods that require each minimizer to be present in all input genomes (Coombe et al. 2020, 2025), Seqwin allows the inclusion of minimizers from any of the input genomes and penalizes those absent in targets and/or present in non-targets. It then extracts connected low-penalty subgraphs and determines a representative sequence (signature) for each subgraph with a memory-efficient workflow. This novel minimizer graph approach increases the retention of original sequence information while keeping a low memory profile, and enables fast and flexible search of genomic signatures. In related work, mdBG constructs a minimizer-space de Bruijn graph for long-read assembly (Ekim et al. 2021); in contrast, Seqwin builds minimizer adjacency graphs (edges reflect consecutive minimizers along genomes) for comparative analyses.
Due to its efficient and flexible design, Seqwin performs well at identifying signatures from large collections of microbial genomes despite sequence variation, a critically important capability given the heterogeneity and rapid expansion of contemporary genomic databases. This allows Seqwin to operate effectively across diverse contexts, including wastewater monitoring and low-microbial-biomass clinical settings, while minimizing the impact of incomplete or low-quality genome assemblies. As a result, Seqwin provides a scalable and computationally efficient framework for microbial pathogen detection, enabling the rapid identification of genomic signatures for a wide range of downstream applications.
2 Methods
Seqwin’s algorithm includes four main steps (Fig. 1a). A more detailed description of each step can be found in Supplementary Note 1.
Figure 1.
Overview of the Seqwin workflow. (a) Seqwin first compresses all input genomes into a weighted pan-genome minimizer graph. It then extracts connected low-penalty subgraphs and selects a representative for each subgraph in minimizer space. It finally converts each representative back to sequence space as the signature. (b) Graph construction (a toy example). Each unique minimizer is coloured. Input genomes may yield different sets of minimizers (light blue and light orange) due to sequence variations (red dashed box). Adjacent minimizers are connected with a weighted, undirected edge in the graph. The thickness of each edge is proportional to its weight. Target genomes (black) and non-target genomes (grey) are treated equally. (c) A penalty score is calculated for each minimizer node based on the L2 norm of its absence in target genomes and presence in non-target genomes (colour map). Sets of connected nodes with low average penalty and high edge weights are extracted as low-penalty subgraphs (green). (d) A representative is selected for each low-penalty subgraph. The underlying minimizers from all target genomes are listed for a low-penalty subgraph (blue, green, and orange; light blue, light green, and dashed lines are minimizers and edges not included in this subgraph). The most common minimizer ordering is selected as the representative (rep), and the corresponding genomic sequence becomes the signature (e.g. the first or third sequence in panel b).
Generate a minimizer sketch for each input genome and build a weighted pan-genome minimizer graph [Fig. 1b; a more constrained graph was described by Coombe et al. (2020)].
Calculate a penalty score for each graph node based on the L2 norm of its absence in target genomes and presence in non-target genomes.
Extract connected subgraphs with average node penalty below a threshold (calculated automatically or provided by the user; Fig. 1c).
Choose a representative sequence for each low-penalty subgraph as the signature (Fig. 1d), and calculate its “conservation” (sensitivity) and “divergence” (specificity) scores by aligning the sequence to all target and non-target genomes with BLAST (Camacho et al. 2009) (Supplementary Note 2).
Signatures with both high conservation and divergence are considered top candidates. Signatures with high divergence scores can still be found in non-target genomes, but only at low nucleotide identity. This reduces the chance of picking up mobile genetic elements (MGEs), which have been shown to be highly problematic as signature sequences (Afshinnekoo et al. 2015) (see Supplementary Notes 1 and 2 for details).
2.1 Generation of minimizer sketches
Seqwin first computes minimizers (Roberts et al. 2004) for all input genomes using the ntHash algorithm (Mohamadi et al. 2016, Nikolić et al. 2022) (k-mer length and window size by default), including target genomes and non-target genomes. Each genome may contain one or more contigs (sequences) of unknown orientation (strand). For each sequence in a genome, a set of minimizers is sampled from its k-mers to form the minimizer sketch of that sequence.
We set by default to lower the collision rate for reliable signature detection, which is consistent with common genome sketching defaults for assembled bacterial genomes (Ondov et al. 2016). For viral genomes, a lower k might be preferable. The default window size () is selected to maximize the number of signatures longer than 200 bp, which is sufficient for the design of most PCR-based assays (typical amplicon length 100 bp). For a random minimizer sketch, the expected minimizer density is under standard assumptions (i.e.) (Zheng et al. 2023), implying an expected spacing of positions between consecutive minimizers and an expected span of for three consecutive minimizers (i.e. from the first to the third). Therefore, requiring at least three consecutive minimizers to represent a signature of at least 200 bp motivates as a reasonable default. Throughout, we treat a run of three consecutive minimizers as the minimum evidence needed to call a signature. In practice, the choice of w reflects a trade-off between memory and resolution: increasing w reduces minimizer density and memory usage but coarsens the resolution for detecting signatures, whereas decreasing w increases density (and memory usage) and enables detection of shorter signatures, at the cost of representing long signatures with more consecutive minimizers and potentially reducing the number of long signatures reported.
Here, we describe the process of generating a minimizer sketch for a sequence (Algorithm S1). First, the canonical hash value of each k-mer in the sequence is calculated [Equation (1)] (Zheng et al. 2023). Formally,
| (1) |
where s is the k-mer sequence, is the reverse complement of s, is a hash function, and k-mer comparison is based on lexicographical order. Hereafter, k-mers and minimizers are represented by their canonical hash values unless stated otherwise. Next, for each window of w consecutive k-mers, the location of the k-mer with the smallest canonical hash value is selected, breaking ties by preferring the leftmost k-mer. The k-mer at this location is the minimizer of this window. The minimizer sketch of the sequence is the union of the selected k-mers and their locations across all windows. It is crucial that each minimizer is paired with its location in the sequence, since the same k-mer might be found at different locations. The minimizer sketch of a genome is the union of the sketches of each of its sequences. The minimizer sketch could also be replaced with other k-mer sketching methods (Edgar 2021, Kille et al. 2023), as long as the “local guarantee” holds (Zheng et al. 2023).
The algorithms described in this manuscript (Algorithm 1 and Algorithms S1 to S5) are not necessarily the most efficient implementations, but they have the same behaviour as the Seqwin source code (version 0.3.2).
Algorithm 1.
Construction of a weighted pan-genome minimizer graph
Require: Set of genomes
Ensure: Weighted undirected graph
1: , , empty map
2: for alldo
3: ,
4: for all sequence S in A do
5: M is a list of tuples (minimizer hash and location, defined in Algorithm S1)
6: ifthen continue
7: fortodo minimizers are ordered by location
8: ;
9: ifthen undirected edge
10:
11:
12: end for
13: end for
14:
15 for alldo calculate edge weights
16 ifthen
17 ;
18: else
19:
20: end if
21: end for
22: end for
23: return
2.2 Construction of a weighted pan-genome minimizer graph
This process is described in Algorithm 1. For each genome, we construct an undirected graph based on its minimizers, where each node corresponds to a unique minimizer (identified by its canonical hash value), and an edge is added between two nodes if the minimizers are adjacent (regardless of their ordering) in one of the genome’s sequences.
Next, the individual genome graphs are merged into a single pan-genome minimizer graph. In this merged graph, nodes represent distinct minimizers observed in any genome, and an undirected edge connects two minimizers if they are found adjacent in at least one genome. The edges are assigned a weight equal to the number of different genomes in which that minimizer adjacency occurs. In other words, if two specific minimizers appear consecutively (no matter the ordering) in the sequences of multiple genomes, the edge between their nodes is given a higher weight (reflecting the number of genomes supporting that adjacency). This results in a unified weighted graph capturing adjacency relationships of minimizers across all genomes.
2.3 Calculation of node penalty
Since each node in the pan-genome graph represents a distinct minimizer observed in one or more genomes, suppose a minimizer node h is found in target genomes and non-target genomes. Let
| (2) |
where is the total number of target genomes, and is the total number of non-target genomes. The penalty of h is defined as
| (3) |
which is the L2 norm (Euclidean norm) of its absence in targets: , and presence in non-targets: . Penalty ranges from 0 (best case: the minimizer is present in all target genomes and in no non-target genomes) to (worst case: the minimizer is absent from all targets and present in all non-targets). Thus, a lower penalty indicates that a minimizer is more sensitive and specific to the target group.
A node penalty threshold is used in downstream processes, and the output signatures of Seqwin are mostly derived from low-penalty nodes (). can be determined by the user or automatically computed by Seqwin, as described next.
2.4 Calculation of penalty threshold
Intuitively, should be determined by the expected k-mer absence and presence in target and non-target genomes, respectively. Consider a random k-mer h (not necessarily a minimizer) sampled from a random target genome (select the target genome first and then select the k-mer). is the fraction of target genomes that do not include h (absence), and is the fraction of non-target genomes that include h (presence), as defined in Equation (2). is then calculated with the expectations of these fractions
| (4) |
which is the geometric mean of expected k-mer absence and presence, multiplied by a constant . In practice, defaults to 0.5 and can be tuned by the user to trade off the number of output signatures against their quality (e.g. increase when more signatures are needed). We use the geometric mean so that will bias toward the smaller value of the two terms, resulting in a more stringent threshold.
Consider genomes as sets of k-mers (duplicated k-mers in each genome are ignored). Then, these expectations can be calculated from pairwise Jaccard indices (a proof can be found in Supplementary Note 3). Since the Jaccard indices can be effectively estimated with MinHash sketches using Mash (Ondov et al. 2016), can be calculated by running Mash on all input genomes.
Another way to estimate the expected values is to use minimizer sketches instead of MinHash sketches. This can be faster because Seqwin already generates minimizer sketches for all input genomes. As previously reported, minimizer sketches on average underestimate the fraction of shared k-mers between two sequences (Belbasi et al. 2022), resulting in biased estimates of the expectations. However, since this bias leads to overestimation of k-mer absence in targets () and underestimation of k-mer presence in non-targets (), the bias of the resulting geometric mean is smaller [Equation (4)]. Consequently, this provides a practical solution for estimating defined in Equation (4), particularly when processing large datasets where calculating pairwise Jaccard indices is computationally prohibitive. Seqwin implements this method as a faster alternative for calculating , along with the unbiased Mash implementation.
2.5 Extraction of low-penalty subgraphs
The minimizer graph is filtered to remove edges with negligible weights and isolated nodes (Supplementary Note 4). Disjoint low-penalty subgraphs are then extracted from the filtered graph (Algorithm S2). Each subgraph is a set of connected minimizer nodes whose average node penalty [Equation (3)] does not exceed the threshold . The procedure first identifies all candidate seed nodes with penalty . Starting from each seed, a greedy breadth-first search (BFS) expansion is performed by iteratively adding the adjacent node with the lowest penalty, as long as including that node keeps the subgraph’s average penalty below . This expansion continues until no more neighbouring nodes can be added or the subgraph reaches a specified maximum size (100 by default). Subgraphs meeting the minimum size requirement (3 by default) are retained, and their nodes are marked as used so subgraphs remain disjoint (no node is part of more than one subgraph). Seeds are processed in random order, and the final list of subgraphs is shuffled to balance subgraph sizes in downstream processes (subgraphs created first tend to be larger due to the greedy optimization).
2.6 Choosing a representative sequence for each low-penalty subgraph
For each low-penalty subgraph (a set of connected minimizer nodes from the graph), a representative minimizer ordering is determined and the corresponding genomic sequence is output as a candidate signature. The procedure involves (1) finding the maximal consecutive occurrence of the subgraph’s minimizers in each target genome, and (2) choosing the most common one across all target genomes, weighted by length (Algorithm S3 and Fig. 1d). A more detailed illustration of this process can be found in Fig. S1.
In each target genome that contains one or more minimizers from a given subgraph, we identify the longest segment of those minimizers that appear consecutively in the genome’s sequence (allowing for at most one intervening minimizer not in the subgraph). Note that there could be repetitive segments in a single genome. Two minimizers are defined as consecutive if (1) they appear in the same sequence of that genome, and (2) the difference between their indices in the minimizer sketch is less than or equal to 2. This yields, for each genome, an ordered tuple of minimizer hashes representing that subgraph’s segment in the genome.
Among all target genomes, the most common minimizer ordering (treating forward and reverse ordering as equivalent) is then selected as the subgraph’s representative minimizer ordering. Prevalence is measured by the number of target genomes in which a given ordering occurs, weighted by the length (number of minimizers) of the ordering to favour longer sequences. The orientation of the representative ordering is chosen to match the strand orientation that is more commonly observed for that sequence in the target genomes. One of the genomes supporting this representative minimizer ordering is used to determine its actual genomic sequence (the representative sequence), based on the minimizer coordinates in that genome. Representative sequences that satisfy user-defined length thresholds ( 200 bp by default) are output as candidate signatures. Candidates are evaluated for their sensitivity and specificity, measured as conservation and divergence, respectively (Supplementary Note 2).
3 Results
3.1 Seqwin outperforms existing tools in signature quality, running time, and memory usage
To test Seqwin’s ability to identify sensitive and specific signatures, we compared it with other tools. We selected Fur as a fast, memory-efficient method and Unikseq and Neptune as representative k-mer assembly methods (Table 1). Note that NAUniSeq was not included in the benchmark given we were unable to successfully run it on our evaluation dataset due to missing files that caused installation errors.
We first used the dataset published with Fur (Haubold et al. 2021) to benchmark the four tools (Seqwin, Fur, Unikseq, and Neptune). The Fur dataset consists of 33 Escherichia coli genomes from 6 different strains, labelled A (6 genomes), B1 (14 genomes), B2 (5 genomes), D (2 genomes), E (4 genomes), and F (2 genomes). For each run of each tool, genomes under one of the strains were used as targets (e.g. strain A), and genomes under all other strains (e.g. B1, B2, D, E, and F) were used as non-targets. Thus, each tool generated 6 different sets of signatures, summarized in Table S1. Each signature was evaluated for its sensitivity (conservation) and specificity (divergence), with results shown in Fig. S2. As a supplement to the divergence score, for each signature we also counted the fraction of non-target genomes with a BLAST hit, shown in Fig. S3.
Next, we benchmarked all four tools against microbial genomes retrieved from NCBI RefSeq/GenBank. We downloaded all available genomes (August 2025) under three pathogenic taxa and their neighbouring taxa: Clostridioides difficile (NCBI Taxonomy ID 1496, 3995 genomes), Mycobacterium tuberculosis (NCBI Taxonomy ID 1773, 8296 genomes), and Salmonella enterica subsp. enterica (NCBI Taxonomy ID 59201, 14 822 genomes). Here, “neighbouring taxa” are those that diverge from a common ancestral node into separate sister lineages. For example, as the only species in the genus Clostridioides, C. difficile’s neighbours encompass all other genera under the shared family, Peptostreptococcaceae. Genomes from all assembly quality levels were included, while those labelled as “Atypical genomes” and “Genomes from large multi-isolate projects” were excluded. Genomes under each pathogenic taxon were used as targets and genomes under the neighbouring taxa were used as non-targets. For each dataset, we sampled 100 or 1000 genomes as input (targets and non-targets combined), with results shown in Table 2, Figure 2 and Figure S4. To retain genome diversity, we included at least 20 non-target genomes for each of the 100-genome datasets, since target genomes far outnumbered non-target genomes in the full datasets (Table 2). Metadata of all NCBI genomes can be found in Supplementary Data 2–4.
Table 2.
Benchmarking of Seqwin, Fur, Unikseq, and Neptune on genomes retrieved from NCBI RefSeq/GenBank.
| Target taxon | # genomesa | Tool | # signatures | Median length (bp). | Median conservation. | Median divergence. | Wall-clock time (s)b | Peak memory usage (GB)c |
|---|---|---|---|---|---|---|---|---|
| C. difficile (NCBI Taxonomy ID 1496). | 100 (20) | Seqwin | 33 | 271 | 0.994 | 0.12 | 8.81 | 0.658 |
| Fur | 0 | N/A | N/A | N/A | 10.8 | 3.54 | ||
| Unikseq | 9074 | 237 | 0.975 | 0.067 | 1090 | 78.8 | ||
| Neptune | 3679 | 327 | 0.962 | 0.025 | 2450 | 13.5 | ||
| 1000 (167) | Seqwin | 227 | 313 | 0.992 | 0.13 | 22.2 | 2.20 | |
| Fur | 0 | N/A | N/A | N/A | 68.1 | 4.21 | ||
| Unikseq | 10 989 | 186 | 0.982 | 0.032 | 10 600 | 565 | ||
| Neptune | 4596 | 212 | 0.977 | 0.014 | 18 700 | 13.9 | ||
| 3995 (667) | Seqwin | 156 | 312 | 0.993 | 0.13 | 35.8d | 5.92 | |
| M. tuberculosis (NCBI Taxonomy ID 1773). | 100 (20) | Seqwin | 1674 | 1184 | 0.994 | 0.14 | 13.7 | 0.916 |
| Fur | 655 | 372 | 0.995 | 0.0087 | 12.4 | 6.14 | ||
| Unikseq | 10 520 | 199 | 1.00 | 0.16 | 1130 | 71.8 | ||
| Neptune | 1843 | 350 | 0.992 | 0.039 | 1360 | 13.5 | ||
| 1000 (77) | Seqwin | 150 | 312 | 0.997 | 0.090 | 24.1 | 1.98 | |
| Fur | 0 | N/A | N/A | N/A | 63.2 | 7.46 | ||
| Unikseq | 103 | 172 | 0.993 | 0.020 | 11 700 | 576 | ||
| Neptune | 30 | 301 | 0.993 | 0.0086 | 2760 | 14.8 | ||
| 8296 (637) | Seqwin | 208 | 350 | 0.998 | 0.091 | 90.1d | 12.1 | |
| S. enterica subsp. enterica (NCBI Taxonomy ID 59201). | 100 (20) | Seqwin | 382 | 333 | 0.990 | 0.048 | 9.79 | 0.679 |
| Fur | 0 | N/A | N/A | N/A | 11.4 | 6.22 | ||
| Unikseq | 593 | 249 | 0.339 | 0.017 | 1260 | 77.2 | ||
| Neptune | 24 | 800 | 0.685 | 0.0036 | 206 | 14.7 | ||
| 1000 (21) | Seqwin | 319 | 317 | 0.990 | 0.053 | 25.5 | 2.19 | |
| Fur | 0 | N/A | N/A | N/A | 52.9 | 4.91 | ||
| Unikseq | 542 | 233 | 0.337 | 0.021 | 13 200 | 624 | ||
| Neptune | 23 | 382 | 0.797 | 0.0029 | 2770 | 15.6 | ||
| 14 822 (304) | Seqwin | 275 | 321 | 0.990 | 0.049 | 144d | 22.9 |
Including neighbouring non-target genomes. The number of non-target genomes is shown in parentheses. Percentage of complete genomes (assembly level at or above chromosome) in each full dataset: 7.43% (C. difficile), 12.03% (M. tuberculosis), 13.73% (S. enterica). Metadata of all genomes can be found in Supplementary Data 2–4.
Twenty CPU threads/processes were used for Seqwin, Fur, and Neptune. Unikseq only supported a single CPU thread.
Neptune stores k-mers of input genomes as temporary files on disk.
When Seqwin was run on the full datasets, minimizer sketches were used to calculate the penalty thresholds to reduce running time (see Methods and Supplementary Note 5).
Figure 2.
Benchmarking of Seqwin, Fur, Unikseq, and Neptune using genomes downloaded from NCBI RefSeq/GenBank (Schoch et al. 2020). Each data point represents a signature sequence, generated by one of the tools using genomes under a pathogenic taxon as targets (e.g. C. difficile), and genomes under its neighbouring taxa as non-targets. Blue, orange, green, and purple represent Seqwin, Fur, Unikseq, and Neptune, respectively. The number of output signatures (data points) in each setting is shown in each scatter plot. 100 or 1000 genomes are sampled from each NCBI full dataset (Table 2), and used as inputs to the tools. See Supplementary Note 2 for the calculation of conservation and divergence.
Compared to Fur, Seqwin identified more signatures with comparable running time and peak memory (Table S1 and Table 2). Fur produced zero signatures in several experiments, most likely due to its stringent search strategy. Compared to Unikseq, Seqwin’s output signatures had similar median lengths (Table S1 and Table 2) in most settings. Although Unikseq produced more signatures, many of them had lower conservation scores (Figure S2 and Figure 2). This was especially true for S. enterica (Table 2 and Fig. 2), where Unikseq identified only a handful of high-conservation signature sequences. Seqwin was also more efficient with respect to wall-clock time and peak memory usage. Neptune’s output signatures resembled those of Unikseq, with higher conservation but still less than Seqwin (Table 2 and Fig. 2). It also required more running time and peak memory than Seqwin (Table S1 and Table 2). Note that Neptune stores k-mers of input genomes as temporary files on disk, which reduces peak memory usage but can increase running time.
Lists of genomes used in all experiments can be found in Supplementary Data 1–4. Benchmark details can be found in Supplementary Note 5.
3.2 Seqwin efficiently scales up to thousands of bacterial genomes
Next, we evaluated only Seqwin on all genomes downloaded from NCBI RefSeq/GenBank, as Fur did not generate any signatures for the benchmark settings with 1000 genomes, and Unikseq was estimated to require terabytes of memory (Table 2). For nearly 15 000 S. enterica genomes, Seqwin finished in only three minutes using 20 CPU threads and 23 GB peak memory (Table 2). Seqwin also maintained similar signature quantity and quality to those obtained with 1000 genomes, as shown in Figure 3 and Figure S5. Note that the penalty thresholds in these experiments were calculated with minimizer sketches to reduce running time (see Methods for more details).
Figure 3.
Output signatures of Seqwin using all genomes downloaded from NCBI RefSeq/GenBank . Each data point represents a signature sequence, generated by Seqwin using genomes under a pathogenic taxon as targets (e.g. C. difficile), and genomes under its neighbouring taxa as non-targets. The number of output signatures (data points) in each setting is shown in each scatter plot. Signatures overlapping with potential MGEs are labelled in red and orange, all others are blue. Number of orange data points (left to right): 5, 11, and 23. Number of red data points (left to right): 0, 6, and 0.
In addition, we annotated the reference genomes of the target pathogens and identified genes and mobile genetic elements (MGEs), using eggNOG-mapper (Cantalapiedra et al. 2021) and the Mobilome Annotation Pipeline (MAP) under MGnify (Richardson et al. 2023), respectively. “Compositional outliers” were potential MGEs identified by MAP (Fig. 3), indicating genomic regions with abnormal composition (e.g. GC content) compared to their contexts. Insertion sequences were identified by MAP and were also confirmed by gene annotations, with gene products annotated as transposase, integrase, or resolvase. In all three experimental settings, fewer than 10% of the signatures overlapped with predicted MGEs (compositional outliers and insertion sequences). Moreover, only M. tuberculosis had signatures overlapping with insertion sequences (Fig. 3), and their median divergence was 0.021, which is lower than the median divergence of all M. tuberculosis signatures (Table 2). Annotation results of all signatures shown in Fig. 3 can be found in Supplementary Data 5–7. Details of the annotation process can be found in Supplementary Note 6.
4 Discussion
We have demonstrated that Seqwin advances scalable microbial genome signature discovery; using target and non-target genome sets as input, Seqwin identified genomic signatures across tens of thousands of genomes. By coupling a minimizer-graph strategy with tolerance for sequence variation and genomic diversity, Seqwin bypasses the strict search criteria and high memory usage that critically limited previous methods. We have shown that Seqwin consistently achieves higher signature sensitivity and specificity across both small- and large-scale datasets while using fewer computational resources than other approaches. Although wet-lab validation was not performed in this study (planned as future work), we envision Seqwin being coupled with established primer and probe design software, such as varVAMP (Fuchs et al. 2025), Olivar (Wang et al. 2024), and PrimalScheme (Kent et al. 2024), to support sensitive and specific PCR assay design for clinical and public health surveillance.
However, there are two major open problems we leave for future work. First, Seqwin estimates specificity from the provided non-target genomes and considers all non-targets equally. Consequently, specificity is best estimated when the non-target set is restricted to close phylogenetic neighbours, ideally using well-curated and high-quality genomes. Although Seqwin is flexible and tolerates some noise in the non-target set, including a large number of very distantly related non-target genomes can bias specificity estimation. In practice, it is suggested to perform an additional screening of candidate signatures against a comprehensive background and examine hits outside the intended search space. Taxonomic mislabelling in public databases is another challenge that Seqwin itself cannot resolve. Using a genome-based taxonomy database such as GTDB (Parks et al. 2026) may alleviate this issue. A potential solution is to weight non-target genomes by sequence similarity, for example using Jaccard indices, so that specificity estimation is driven more strongly by the most relevant near-neighbour genomes. Second, Seqwin is designed to identify single genomic regions that distinguish the target group from the non-target group, rather than combinations of multiple regions that are informative only when considered together. As a result, Seqwin may miss combinatorial signatures in which no individual region is sufficiently conserved across the full target set, even though the union of those regions could still distinguish targets from non-targets. This limitation is relevant when designing assays for antimicrobial-resistant (AMR) strains of a pathogen, as AMR can depend on combinations of mutations or genes across multiple loci rather than on a single diagnostic region (Kaczmarek et al. 2006). Support for identifying combinatorial signatures is under development and is planned for a future Seqwin update.
In summary, inspired by approaches pioneered by Insignia two decades ago, Seqwin represents a highly sensitive and discriminative computational approach for microbial genome signature discovery. We anticipate Seqwin will enable signature discovery at unprecedented scale and support automated, sensitive, specific PCR assay design for clinical and environmental applications.
Supplementary Material
Acknowledgments
The authors would like to thank Dr. Adam Phillippy and Dr. Jingjing Wu for valuable feedback and suggestions.
Contributor Information
Michael X Wang, Department of Computer Science, Rice University, Houston, TX 77005, United States; Department of Civil and Environmental Engineering, Rice University, Houston, TX 77005, United States.
Bryce Kille, Department of Computer Science, Rice University, Houston, TX 77005, United States.
Michael G Nute, Department of Computer Science, Rice University, Houston, TX 77005, United States.
Siyi Zhou, Department of Civil and Environmental Engineering, Rice University, Houston, TX 77005, United States.
Lauren B Stadler, Department of Civil and Environmental Engineering, Rice University, Houston, TX 77005, United States.
Todd J Treangen, Department of Computer Science, Rice University, Houston, TX 77005, United States; Department of Bioengineering, Rice University, Houston, TX 77030, United States; Ken Kennedy Institute, Rice University, Houston, TX 77005, United States.
Author contributions
Michael X. Wang (Conceptualization, Methodology, Software, Validation, Formal analysis, Investigation, Data curation, Visualization, Writing—original draft, Writing—review & editing), Bryce Kille (Conceptualization, Writing—review & editing), Michael G. Nute (Methodology, Writing—original draft, Writing—review & editing), Siyi Zhou (Methodology, Writing—review & editing), Lauren B. Stadler (Conceptualization, Funding acquisition, Resources, Writing—review & editing), and Todd J. Treangen (Conceptualization, Funding acquisition, Resources, Methodology, Writing—original draft, Writing—review & editing)
Supplementary material
Supplementary material is available at Bioinformatics online.
Conflict of interests
M.G.N., M.X.W., and T.J.T. are listed as inventors on a provisional patent application (filed on August 15th, 2025) related to the methodology focused on minimizer graphs for signature detection. The remaining authors declare no competing interests.
Funding
This work was supported in part by NIH NIAID grants R21-AI190938 and P01-AI152999, NSF awards IIS-2239114 and EF-2126387, and the National Library of Medicine Training Program in Biomedical Informatics and Data Science [T15LM007093 to B.K.].
Data availability
NCBI accessions and metadata of all genomes used in this study can be found in Supplementary Data. Benchmarking datasets, outputs, and scripts are available on Zenodo (https://doi.org/10.5281/zenodo.19874011).
References
- Afshinnekoo E, Meydan C, Chowdhury S. et al. Geospatial resolution of human and bacterial diversity with city-scale metagenomics. Cell Syst 2015;1:72–87. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Allison MJ, Warren RL, Lopez ML. et al. Enabling robust environmental DNA assay design with “unikseq” for the identification of taxon-specific regions within whole mitochondrial genomes. Environ DNA 2023;5:1032–47. [Google Scholar]
- Bader KC, Grothoff C, Meier H.. Comprehensive and relaxed search for oligonucleotide signatures in hierarchically clustered sequence datasets. Bioinformatics 2011;27:1546–54. [DOI] [PubMed] [Google Scholar]
- Belbasi M, Blanca A, Harris RS. et al. The minimizer Jaccard estimator is biased and inconsistent. Bioinformatics 2022;38:i169–76. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Beran P, Stehlíková D, Cohen SP. et al. KEC: unique sequence search by K-mer exclusion. Bioinformatics 2021;37:3349–50. [DOI] [PubMed] [Google Scholar]
- Camacho C, Coulouris G, Avagyan V. et al. BLAST+: architecture and applications. BMC Bioinformatics 2009;10:421–9. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Cantalapiedra CP, Hernández-Plaza A, Letunic I. et al. eggNOG-mapper v2: functional annotation, orthology assignments, and domain prediction at the metagenomic scale. Mol Biol Evol 2021;38:5825–9. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Coombe L, Kazemi P, Wong J. et al. ntSynt: multi-genome synteny detection using minimizer graph mappings. BMC Biol 2025;23:367. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Coombe L, Nikolić V, Chu J. et al. ntJoin: fast and lightweight assembly-guided scaffolding using minimizer graphs. Bioinformatics 2020;36:3885–7. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Edgar R. Syncmers are more sensitive than minimizers for selecting conserved k-mers in biological sequences. PeerJ 2021;9:e10805. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Eisenach KD, Cave MD, Bates JH. et al. Polymerase chain reaction amplification of a repetitive DNA sequence specific for mycobacterium tuberculosis. J Infect Dis 1990;161:977–81. [DOI] [PubMed] [Google Scholar]
- Ekim B, Berger B, Chikhi R.. Minimizer-space de Bruijn graphs: whole-genome assembly of long reads in minutes on a personal computer. Cell Syst 2021;12:958–68.e6. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Feng S, Tillier ER.. A fast and flexible approach to oligonucleotide probe design for genomes and gene families. Bioinformatics 2007;23:1195–202. [DOI] [PubMed] [Google Scholar]
- Fuchs J, Kleine J, Schemmerer M. et al. varVAMP: degenerate primer design for tiled full genome sequencing and qPCR. Nat Commun 2025;16:5067. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Haubold B, Klötzl F, Hellberg L. et al. Fur: find unique genomic regions for diagnostic PCR. Bioinformatics 2021;37:2081–7. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Kaczmarek FM, Dib-Hajj F, Shang W. et al. High-level carbapenem resistance in a Klebsiella pneumoniae clinical isolate is due to the combination of BLA act-1 -lactamase production, porin OmpK35/36 insertional inactivation, and down-regulation of the phosphate transport porin PHOE. Antimicrob Agents Chemother 2006;50:3396–406. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Kent C, Smith AD, Tyson J. et al. PrimalScheme: open-source community resources for low-cost viral genome sequencing. bioRxiv, 2024–12, 2024.
- Kille B, Garrison E, Treangen TJ. et al. Minmers are a generalization of minimizers that enable unbiased local Jaccard estimation. Bioinformatics 2023;39:btad512. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Knowles M, Lambert D, Huszczynski G. et al. PCR for the specific detection of an Escherichia coli O157:H7 laboratory control strain. J Food Prot 2015;78:1738–44. [DOI] [PubMed] [Google Scholar]
- Laure F, Courgnaud V, Rouzioux C. et al. Detection of HIV1 DNA in infants and children by means of the polymerase chain reaction. Lancet 1988;2:538–41. 10.1016/s0140-6736(88)92659-1 [DOI] [PubMed] [Google Scholar]
- Lopez MLD, Warren RL, Allison MJ. et al. Conserved sequence identification within large genomic datasets using ‘unikseq2’: application in environmental DNA assay development. Mol Ecol Resour 2025;25:e70014. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Marinier E, Zaheer R, Berry C. et al. Neptune: a bioinformatics tool for rapid discovery of genomic variation in bacterial populations. Nucleic Acids Res 2017;45:e159. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Mohamadi H, Chu J, Vandervalk BP. et al. ntHash: recursive nucleotide hashing. Bioinformatics 2016;32:3492–4. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Nikolić V, Kazemi P, Coombe L. et al. btllib: A C++ library with Python interface for efficient genomic sequence processing. JOSS 2022;7:4720. [Google Scholar]
- Nordberg EK. YODA: selecting signature oligonucleotides. Bioinformatics 2005;21:1365–70. [DOI] [PubMed] [Google Scholar]
- Ondov BD, Treangen TJ, Melsted P. et al. Mash: fast genome and metagenome distance estimation using MinHash. Genome Biol 2016;17:132–14. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Parks DH, Chaumeil P-A, Mussig AJ. et al. GTDB release 10: a complete and systematic taxonomy for 715 230 bacterial and 17 245 archaeal genomes. Nucleic Acids Res 2026;54:D743–54. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Phillippy AM, Ayanbule K, Edwards NJ. et al. Insignia: a DNA signature search web server for diagnostic assay development. Nucleic Acids Res 2009;37:W229–34. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Phillippy AM, Mason JA, Ayanbule K. et al. Comprehensive DNA signature discovery and validation. PLoS Comput Biol 2007;3:e98. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Richardson L, Allen B, Baldi G. et al. MGnify: the microbiome sequence data analysis resource in 2023. Nucleic Acids Res 2023;51:D753–59. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Roberts M, Hayes W, Hunt BR. et al. Reducing storage requirements for biological sequence comparison. Bioinformatics 2004;20:3363–9. [DOI] [PubMed] [Google Scholar]
- Schoch CL, Ciufo S, Domrachev M, et al. NCBI Taxonomy: a comprehensive update on curation, resources and tools. Database 2020;2020:baaa062. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Sharma GK, Sharma R, Joshi K. et al. Advancing microbial diagnostics: a universal phylogeny guided computational algorithm to find unique sequences for precise microorganism detection. Brief Bioinform 2024;25:bbae545. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Slezak T, Kuczmarski T, Ott L. et al. Comparative genomics tools applied to bioterrorism defence. Brief Bioinform 2003;4:133–49. [DOI] [PubMed] [Google Scholar]
- Theiller E, Rajagopol S, Higgins S. et al. Empowering global disease surveillance with cured: a tool for rapid identification of unique genomic biomarkers. mSystems 2026;11:e01063-25. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Vieira Mourato B, Tsers I, Denker S. et al. Marker discovery in the large. Bioinform Adv 2024;4:vbae113. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Wang MX, Lou EG, Sapoval N. et al. Olivar: towards automated variant aware primer design for multiplex tiled amplicon sequencing of pathogens. Nat Commun 2024;15:6306. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Wang Y, Chen Q, Deng C. et al. KmerGO: a tool to identify group-specific sequences with k-mers. Front Microbiol 2020;11:2067. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Zheng H, Marçais G, Kingsford C.. Creating and using minimizer sketches in computational genomics. J Comput Biol 2023;30:1251–76. [DOI] [PMC free article] [PubMed] [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
Supplementary Materials
Data Availability Statement
NCBI accessions and metadata of all genomes used in this study can be found in Supplementary Data. Benchmarking datasets, outputs, and scripts are available on Zenodo (https://doi.org/10.5281/zenodo.19874011).



