BP_LOC...B_QUERY(1p)
β¨ 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 providenodes.dmpandnames.dmpthe 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
- debian bookworm: bioperl 1.7.8-1 Β· Perl
- debian trixie: bioperl 1.7.8-1 Β· Perl
- ubuntu jammy: bioperl 1.7.8-1 Β· Perl
- ubuntu noble: bioperl 1.7.8-1 Β· Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms