BP_FETCH(1p)

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

πŸ’– BP_FETCH(1p) β€” the fetch-your-sequences baddie πŸ’–

User Contributed Perl Documentation bestie, and yes this is a 1p page, we love that for us.


✨ NAME ✨

bp_fetch.pl β€” grabs sequences out of bioperl indexed databases. literally its whole thing 🧚


🌸 SYNOPSIS 🌸

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

πŸ¦‹ DESCRIPTION πŸ¦‹

So the vibe is: it fetches sequences using the DB access systems in Bioperl. The most common glow-up use of this is fetching sequences from bioperl indices you built with bpindex.pl, or pulling sequences straight off the NCBI website. no cap 🫢

The format for retrieving sequences is deliberately like the GCG/EMBOSS format, like this:

db:name

with the option of sliding in a 'meta' database type, which is:

meta::db:name

That meta info can be one of three types:

  • local β€” local indexed flat file database
  • net β€” networked http: based database
  • ace β€” ACeDB database

And this info defaults to local for database names that have no meta db info. periodt πŸ’…


πŸŽ€ OPTIONS πŸŽ€

  • -fmt <format> β€” the output format. Fasta is the default, and you can also ask for EMBL, Raw, swiss or GCG.
  • -acc β€” says the string is an accession number, not an id.
these next ones are options only for expert use, so if that's not you, maybe don't πŸ‘€
  • -dir <dir> β€” the directory to find the index files in (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 🌈

bp_index and bp_fetch coordinate where the databases lie using the environment variable BIOPERL_INDEX. You can override that with the -dir option. The index type (SDBM or DB_File or some other index file) is controlled by the BIOPERL_INDEX_TYPE variable. And that one defaults to SDBM_File. πŸ’–


πŸ‘‘ USING IT YOURSELF πŸ‘‘

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

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

You can use these modules directly, and honestly that's far better than using this script as a system call or a pipe to read from. Go read the source code for bp_fetch to see how it's used. fr fr πŸ”₯


πŸ’€ EXTENDING IT πŸ’€

bp_fetch uses a bunch of different modules to give you access to databases. 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, exactly like it's done in Bio::Index::EMBL and Bio::Index::Fasta. For access to other databases you're gonna have to roll your own interface, sorry bestie 😭

For new output formats, you need to add a new SeqIO module. Easiest thing ever: go look at Bio::SeqIO::Fasta and figure out how to hack it for your own format (and call it something different, obviously πŸ™ˆ).


🫢 FEEDBACK 🫢

πŸ’Œ Mailing Lists

User feedback is an integral part of the evolution of this and other Bioperl modules. Send your comments and suggestions preferably to the Bioperl mailing list. Your participation is much appreciated. πŸ₯Ή

πŸ› Reporting Bugs

Report bugs to the Bioperl bug tracking system so we can keep track of the bugs and their resolution. Bug reports can be submitted via the web:

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

⭐ AUTHOR ⭐

Ewan Birney <birney@ebi.ac.uk>


And that's the whole page, babe β€” this ran on perl v5.32.1, dated 2021-08-15, and it goes by BP_FETCH(1p). slay, go fetch something βœ¨πŸ’…

πŸ“¦ where this page comes from