BP_FETCH(1)

πŸ“¦ version 1.7.8, in nixos 26.05, nixpkgs unstable

🌸 BP_FETCH(1) β€” the bp_fetch.pl glow-up πŸŽ€

okay bestie, so this is a page from the User Contributed Perl Documentation section of the manual, and it's literally all about bp_fetch.pl, the little script that pulls sequences out of bioperl indexed databases. pull up a chair, she's iconic πŸ’…


✨ NAME ✨

bp_fetch.pl β€” fetches sequences from bioperl indexed databases. that's it, that's the whole vibe πŸ¦‹


✨ SYNOPSIS ✨

here's how you actually run her, no cap:

  bp_fetch.pl swiss:ROA1_HUMAN

  bp_fetch.pl net::genbank:JX295726

  bp_fetch.pl net::genpept:ROA1_HUMAN

  bp_fetch.pl ace::myserver.somewhere.edu,21000:X56676

  bp_fetch.pl -fmt GCG swiss:ROA1_HUMAN

like, five whole examples, we ate πŸ”₯


✨ DESCRIPTION ✨

so bp_fetch grabs sequences using the DB access systems inside Bioperl. the most common use case? fetching sequences out of bioperl indices that you built with bpindex.pl, or pulling sequences straight from the NCBI website. both valid, both slay πŸ’–

the format for retrieving sequences is deliberately modeled on the GCG/EMBOSS style, like this:

  db:name

and you can also slot in a 'meta' database type upfront, like:

  meta::db:name

the meta info can be one of three types, bestie:

  local - local indexed flat file database
  net   - networked http: based database
  ace   - ACeDB database

if you give a database name with no meta db info at all, this defaults to local. easy 🫢


✨ OPTIONS ✨

  • -fmt <format> β€” the output format. options are Fasta (that's the default, queen), EMBL, Raw, swiss or GCG ✨
  • -acc β€” says the string is an accession number, not an id.

πŸ’€ options only for expert use πŸ’€

ngl these ones are for the advanced girlies. proceed with main character energy but, like, carefully.
  • -dir <dir> β€” the directory where the index files live. this overrides the BIOPERL_INDEX environment variable 🌈
  • -type <type> β€” the type of DBM file to open. this overrides the BIOPERL_INDEX_TYPE environment variable 🌈

✨ ENVIRONMENT ✨

okay so bp_index and bp_fetch coordinate where the databases lie using the environment variable BIOPERL_INDEX πŸ’œ that can be overridden with the -dir option, no drama.

the index type β€” could be SDBM, or DB_File, or another index file entirely β€” is controlled by the BIOPERL_INDEX_TYPE variable. and that one defaults to SDBM_File. periodt πŸŽ€


✨ USING IT YOURSELF ✨

bp_fetch is a wrapper around the bioperl modules that support the Bio::DB::BioSeqI abstract interface. the lineup includes:

  • James Gilbert β€” Fasta indexer, Abstract indexer
  • Aaron Mackay β€” GenBank and GenPept DB access
  • Ewan Birney β€” EMBL .dat indexer
  • Many people β€” SeqIO code

lowkey the tea is: you can use these modules directly, and that's far better than treating this script like a system call or a pipe to read from 😭 seriously. read the source code for bp_fetch to see how it's used. iykyk πŸ’…


✨ EXTENDING IT ✨

bp_fetch uses a bunch of different modules to provide access to databases, and any module that subscribes to the Bio::DB::BioSeqI interface can be used here πŸ¦‹

for flat file indexers, the best move is extending Bio::Index::Abstract β€” which is exactly what's done in Bio::Index::EMBL and Bio::Index::Fasta. for access to other databases you'll need to roll your own interface, bestie. go off πŸ‘‘

for new output formats, you need to add a new SeqIO module. the easiest thing is to peek at Bio::SeqIO::Fasta and figure out how to hack it for your own format β€” call it something different, obviously πŸ™ˆ


✨ FEEDBACK ✨

πŸ’Œ Mailing Lists

user feedback is an integral part of the evolution of this and other Bioperl modules, fr fr. send your comments and suggestions preferably to the Bioperl mailing list β€” your participation is much appreciated 🫢

  bioperl-l@bioperl.org                  - General discussion
  http://bioperl.org/wiki/Mailing_lists  - About the mailing lists

πŸ› Reporting Bugs

report bugs to the Bioperl bug tracking system so we can keep track of the bugs and their resolution β€” that's the whole point, bestie πŸ’€ bug reports can be submitted via the web:

  https://github.com/bioperl/bioperl-live/issues

✨ AUTHOR ✨

Ewan Birney <birney@ebi.ac.uk> β€” holding it down πŸ‘‘


and that's the page!! 🌟 little sign-off for you: this one's from perl v5.42.3, dated 2021-02-03, and it's the BP_FETCH(1) manual page. mwah πŸ’‹πŸŽ€

πŸ“¦ where this page comes from