BP_FETCH(1p)
π 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 databasenetβ networkedhttp:based databaseaceβ 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 theBIOPERL_INDEXenvironment variable).-type <type>β the type of DBM file to open (this overrides theBIOPERL_INDEX_TYPEenvironment 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
.datindexer - 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. π₯Ή
bioperl-l@bioperl.orgβ General discussionhttp://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. 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
- 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