Open ctb opened 1 year ago
ref https://github.com/sourmash-bio/sourmash/issues/2198 - the tax code and commands are much more straightforward than the lca code these days!
note: on farm, all of this was done in ~ctbrown/scratch/2022-tessa-lca-db-fix
(Should this maybe be moved over to https://github.com/sourmash-bio/sourmash-examples/?)
So @bluegenes built an
LCA_SqliteDatabase
using:and got the following warnings:
Yay warnings! Boo warnings!
What's going on?
First: fixing it.
No taxonomies were loaded, and sourmash SQLite LCA databases without taxonomies are just sourmash SQLite databases, so it should be possible to add a taxonomy ;).
So I tried:
and got back:
because even though the taxonomy table was empty, they still existed.
So I ran the sqlite3 command line interface -
and then inside sqlite,
which returned:
The key/value pair
SqliteLineage
plus the existence of the tablesourmash_taxonomy
were preventingsourmash tax prepare
from running.The following commands removed these:
and then I could re-run:
Now
sourmash tax summarize
produces good results:as does
sourmash sig summarize
:yay w00t!
why did the sourmash lca index fail!?
Let's diagnose that - first, produce a smaller taxonomy:
and subset the database:
then this reproduces the problem, but, like, faster ;) -
adding a
--report out.txt
, I see:so it looks like identifiers are not being split, oops.
Fixed with:
which then yields
tada!
An alternate (and safer?) construction method -
First, build a SQLite database:
then add taxonomy:
Double check - do all these work?
Extract a query:
Check
subsig.lca.sql
:Check
try.lca.sqldb
:Check full GTDB:
yay! w00t! it all works!
Exploring questions -
Why did we need
--no-dna
? Or did we?followed by
worked:
so Tessa was just being very cautious ;).