Skip to content

v0.19.0

Choose a tag to compare

@github-actions github-actions released this 05 Aug 13:23
· 20 commits to main since this release

Highlights

atb amr gains --species-like, the wildcard species filter that until now only atb query had (#33):

atb amr --hq-only --species-like "Campylobacter_D jej%" --format tsv -o amrfp.tsv

% matches any sequence of characters. Every other character, including _, matches itself. GTDB splits genera into lettered clades - Campylobacter_D, Enterococcus_B - so underscores in species names are typed literally.

The filter does not force a full scan. AMR data is partitioned per genus, and the literal text before the first % selects which partition files can hold a match:

Pattern Files read
Campylobacter_D jej% one genus partition
Streptococcus% every Streptococcus* partition, plus the shared small-genus partition
%coli full dataset, with a note on stderr suggesting you anchor the pattern

The shared partition is always included for prefix patterns because it holds every genus below the partition threshold - 2,617 of 2,658 genera but only ~2% of samples - so narrowing stays complete rather than silently lossy.

Added

  • atb amr --species-like <pattern> filters AMR results by a wildcard species pattern, with genus-partition narrowing driven by the literal prefix. It counts as a filter for the "scan everything?" confirmation, so it does not require --yes.

Fixed

  • --species-like now applies % wildcards anywhere in the pattern. Patterns with an interior wildcard, such as "Enterococcus%faecium" - the form the docs recommend for searching across GTDB naming variants - previously fell back to an exact string comparison whenever a query was answered from parquet rather than from a SQLite index.
  • atb query --species-like treats _ as a literal character rather than as a single-character wildcard, so it agrees with the parquet path and with the documented rule. This is a behavior change: patterns that relied on _ standing in for another character, such as "Escherichia_coli" matching Escherichia coli, no longer match. Write "Escherichia coli" or "Escherichia%coli" instead.

Both execution paths - parquet streaming and SQLite index - now share one matcher, so they return identical rows for the same pattern.

Docs

  • docs/guides/amr.md documents the pattern rule, the partition-narrowing behavior, and two worked --species-like examples.
  • docs/guides/query.md states the %/_ rule alongside the existing wildcard example.
  • CLI reference regenerated for atb amr and atb query.

Verification

Tested against the full ~58.5M-row AMR dataset: the command above returned 277,638 rows spanning Campylobacter_D jejuni, jejuni_A, and jejuni_D. The two lettered sub-clades are ones an exact --species match drops, so the wildcard returns a more complete answer.