BP_FETCH(1)
πΈ 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 areFasta(that's the default, queen),EMBL,Raw,swissorGCGβ¨-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 theBIOPERL_INDEXenvironment variable π-type<type>β the type of DBM file to open. this overrides theBIOPERL_INDEX_TYPEenvironment 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
.datindexer - 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
- nixos 26.05: perl5.42.3-BioPerl 1.7.8
- nixpkgs unstable: perl5.42.3-BioPerl 1.7.8
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms