BP_LOC...B_QUERY(1p)

πŸ“¦
version 1.7.8 Β· 3 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble

✨ NAME ✨

bp_local_taxonomydb_query β€” bestie, this one is your lil' query tool for a local TaxonomyDB, and it'll hand you back either a species 🌸 or a taxonid, whichever way you're going πŸ’…


🌸 DESCRIPTION 🌸

okay so, real talk 🫢 β€” this script is a whole example implementation of how you'd access a local Taxonomy database that's built on top of Berkeley DB ✨ (which means yes, the DB_File module is needed, no cap, go install it πŸ™ˆ).

πŸŽ€ Usage

Here's the vibe, literally copy-paste-able and everything:

bp_local_taxonomydb_query.PLS: [-v] --nodes nodes.dmp --names names.dmp "Genus1 species1" "Genus2 species2"

So you're passing -v if you want verbose (optional bestie, it's in brackets πŸ’…), then --nodes with your nodes.dmp, then --names with your names.dmp, then the actual things you wanna look up, quoted up as "Genus1 species1" "Genus2 species2" and so on 🌈.

πŸ¦‹ About those dmp files

The nodes.dmp and names.dmp files come from the NCBI Taxonomy dump πŸ“ (peep Bio::DB::Taxonomy::flatfile for way more info on that, it's giving homework but like, the useful kind πŸ“š).

✨ Key thing, don't skip this ✨ β€” you only have to provide nodes.dmp and names.dmp the first time you run it. That's it. After that you're free πŸ’–

πŸ’€ The catch (there's always one)

Not gonna lie, that first run will create the local indexes and it may take quite a long time 😭 like genuinely, go make a snack, watch a whole season, whatever. It's the price of admission babe πŸ™ˆ.

πŸ‘‘ But then... the payoff

Once those indexes exist?? Fast access bestie, we're talking:

  • species ➑️ taxon id lookups πŸ’«
  • taxon id ➑️ species name lookups πŸ’«

Both directions, quick, slay, periodt πŸ’…πŸ”₯


🫢 little recap for the girlies who skimmed: Berkeley DB + DB_File = the setup, nodes.dmp + names.dmp = only needed on the first run, first run = slow as heck, every run after = iconic fast lookups both ways 🌸

perl v5.32.1 🧚 2021-08-15 β€” that's the version and date stamp on this cutie, and it lives in the User Contributed Perl Documentation collection πŸ’œ mwah, go query something, you got this bestie πŸŽ€βœ¨

πŸ“¦ where this page comes from