Skip to content

v0.20.0

Choose a tag to compare

@github-actions github-actions released this 05 Aug 14:32
· 15 commits to main since this release

Highlights

There is now a way to find out which names --columns accepts (#34):

atb columns

It lists all 40 columns grouped by the table each comes from, marking with * the ones the SQLite index cannot answer - asking for one of those sends the query to the parquet files, which is slower and needs that file downloaded. The command reads no data, so it works before anything has been fetched.

For scripting:

atb columns --format tsv | cut -f1 | tail -n +2   # names only
atb columns --format json                          # name, source, in_index, description

Answering the question turned up two problems behind it. A misspelt name used to produce a blank column and exit 0, and nine of the names on offer never returned data at all.

Added

  • atb columns lists every column name atb query --columns accepts, grouped by source table, with a note on each one the SQLite index cannot answer. --format tsv, csv or json prints the same list for scripts.
  • A generated Available columns reference page, rendered from the same registry the CLI validates against, so it cannot fall behind the columns the CLI accepts.

Fixed

  • The sylph and mlst columns return data on the parquet path. Adjusted_ANI, Taxonomic_abundance, Sequence_abundance, Median_cov and the five mlst_* columns caused their parquet file to be read but were never joined onto the result, so any query that could not be answered from the SQLite index returned them as empty strings and exited 0 - indistinguishable from a sample with no record.

    $ atb query --species "Escherichia coli" --limit 3 --columns sample_accession,mlst_st,mean_length
    sample_accession  mlst_st  mean_length
    SAMN40589622      14141    18645.92
    SAMN41155940      152      8233.3
    SAMN41388190      152      8258.6
    

    The mlst_st column was blank for every row before this release.

Changed

  • An unrecognised --columns name is now an error. atb query exits 1 before opening the index, naming the closest columns when any are close:

    $ atb query --species "Escherichia coli" --columns sample_accession,N5O
    Error: unknown column "N5O" - did you mean "N50" or "N90"? Run 'atb columns' to list all
    

    Names in a TOML filter file are checked the same way, after the merge. This is a behavior change: a script passing a name that is not a column will now fail where it previously exited 0 with a blank column. Run atb columns to check a name.

Verification

Tested against the full local dataset. The SQLite fast path and the parquet path now return identical rows for the same request, including where an MLST record is genuinely absent:

sample_accession  mlst_scheme      mlst_st  mlst_status
SAMEA117870366
SAMEA7472386      ecoli_achtman_4  52       PERFECT

Three tests hold the column registry to the code so the two lists cannot drift apart again: the query planner must read the source file of every registered column, every column the planner routes must be registered under the same source, and the registry's in_index flag must agree with the index's own column mapping in both directions.