Skip to content

gtdb_ground.py default paths miss the KG-Hub kg-microbe layout, and strain-level ids no longer ground #746

Open

Description

@realmarcin

Two separate findings from grounding a new record on 2026-09-07. Both are real
and reproducible; neither is urgent.

1. The default kg-microbe search list misses a layout that exists here

just ground-taxa-gtdb --ncbi-id NCBITaxon:1488 fails with:

[gtdb] NCBI2GTDB mapping not found. Tried:
  .../ontology/Mechs/kg-microbe/data/raw/NCBI2GTDB.tsv.gz
  .../ontology/kg-microbe/data/raw/NCBI2GTDB.tsv.gz
  .../VIMSS/kg-microbe/data/raw/NCBI2GTDB.tsv.gz

The file is present, at
.../ontology/KG-Hub/KG-Microbe/kg-microbe/data/raw/NCBI2GTDB.tsv.gz — the same
parent directory that holds the culturebotai-claw checkout the CLAW_SRC
default also misses (../../culturebotai-claw/src does not resolve here
either, so just new-history needs CLAW_SRC= passed explicitly).

Passing --kg-microbe-dir works, so this is only a default. Two options:
add the KG-Hub/KG-Microbe/ sibling to the search list (consistent with the
existing three guesses), or drop the guessing and document KG_MICROBE_DIR.
The same question applies to CLAW_SRC.

Found with an ignore-independent find over ~/Documents/VIMSS, so the file's
absence from the three default paths is established, not inferred from a
gitignore-respecting search.

2. Strain-level NCBITaxon ids do not ground against the current mapping

With the mapping found, species rank grounds cleanly:

input result
--name "Clostridium acetobutylicum" GTDB:s__Clostridium_S_acetobutylicum, majority 1.0, 44 genomes
--name "Clostridium ljungdahlii" GTDB:s__Clostridium_B_ljungdahlii, majority 1.0, 4 genomes

Strain rank does not, by id or by name:

input result
--ncbi-id NCBITaxon:272562 (C. acetobutylicum ATCC 824) no GTDB mapping (rank absent from the NCBI2GTDB table, or eukaryote)
--ncbi-id NCBITaxon:748727 (C. ljungdahlii DSM 13528) same
--name "Clostridium acetobutylicum ATCC 824" same
--name "Clostridium ljungdahlii DSM 13528" same

Both ids resolve fine in NCBITaxon (checked against the local OAK build:
"Clostridium acetobutylicum ATCC 824", "Clostridium ljungdahlii DSM 13528").

This matters because the KB already stores a GROUNDED block for one of them.
kb/communities/Clostridium_Ecoli_Nitratidesulfovibrio_Minority_Mediator_Consortium.yaml
carries ncbi_source_id: NCBITaxon:272562, total_genomes: 2, and
mapping_source: kg-microbe NCBI2GTDB.tsv.gz; GTDB release latest (built 2026-07-25)
— a block the tool no longer reproduces from the mapping now on disk
(sha256:761d5537a7edb4b0, same 2026-07-25 mtime).

So one of these is true and I did not establish which:

The third would mean stored groundings can silently drift out of reproducibility
with no gate noticing, which is the same shape as #387 but for provenance rather
than coherence. Worth a check: re-derive every stored gtdb_classification from
the current mapping and count how many still reproduce.

Meanwhile the workaround is to ground at species rank and carry the strain in
strain_designation, which is what CommunityMech:000336 does.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions