BP_BIO...K_PROXY(1p)

πŸ“¦
version 1.7.8 Β· 2 versions
, in debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– BP_BIO...K_PROXY(1p) β€” bestie edition πŸ’–

okay so you found the manual page for bp_biofetch_genbank_proxy.pl, which is a Caching BioFetch-compatible web proxy for GenBank 🧬✨ it's from the User Contributed Perl Documentation and honestly? it ate.


✨ NAME ✨

bp_biofetch_genbank_proxy.pl β€” a Caching BioFetch-compatible web proxy for GenBank. she fetches, she caches, she serves. main character energy fr fr πŸ’…


🌸 SYNOPSIS 🌸

Install in cgi-bin directory of a Web server.  Stand back.

that's it. that's the whole synopsis. stand back. iconic honestly 😭


πŸ¦‹ DESCRIPTION πŸ¦‹

so basically this CGI script is the server side of the BioFetch protocol, as described over at http://obda.open-bio.org/Specs/. she provides two database access services, and no she's not picking favorites:

  • one for data source genbank β€” that's the nucleotide entries 🧬
  • and the other for data source genpep β€” that's the protein entries πŸ₯š

the way she works is she forwards her requests to NCBI's eutils script, which lives at

https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi

then she reformats the output according to the BioFetch format so the sequences can be processed and returned by the Bio::DB::BioFetch module. and here's the cute part β€” returned entries get temporarily cached on the Web server's file system, so the entries you keep coming back to can be retrieved without another round trip to NCBI. no cap, that's the whole glow-up. πŸŽ€


πŸ’œ INSTALLATION πŸ’œ

bestie you need these things installed to run this script, no skipping:

  1. perl
  2. the perl modules LWP and Cache::FileCache
  3. a web server (Apache recommended)

to install, you just copy it into the web server's cgi-bin directory. and honestly? you might wanna shorten its name β€” dbfetch is recommended. way cuter, way easier to type. πŸ’…

there are also several constants chilling at the top of the script that you might wanna adjust, and they are:

  • CACHE_LOCATION β€” this is the location on the filesystem where the cached files will live. the default is /usr/tmp/dbfetch_cache. 🏠
  • MAX_SIZE β€” the maximum size the cache can grow to. when the cache exceeds this size, older entries get deleted automatically, like a little cleanup fairy 🧚. the default setting is 100,000,000 bytes (100 MB).
  • EXPIRATION β€” entries that haven't been accessed in this length of time get removed from the cache. the default is 1 week. ⏳
  • PURGE β€” this constant specifies how often the cache will be purged for older entries. the default is 1 hour. 🧹

⭐ TESTING ⭐

wanna see if this script is performing as expected? vibe check it with this:

use Bio::DB::BioFetch;
my $db = Bio::DB::BioFetch->new(-baseaddress=>'http://localhost/cgi-bin/dbfetch',
                                -format     =>'genbank',
                                -db         =>'genbank');
my $seq = $db->get_Seq_by_id('DDU63596');
print $seq->seq,"\n";

this should print out a DNA sequence. and if it does? slay. πŸ”₯


🌈 SEE ALSO 🌈

  • Bio::DB::BioFetch
  • Bio::DB::Registry

go read those too, iykyk 🫢


πŸ‘‘ AUTHOR πŸ‘‘

Lincoln Stein, <lstein-at-cshl.org>

Copyright (c) 2003 Cold Spring Harbor Laboratory

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See DISCLAIMER.txt for disclaimers of warranty.

fr fr keep that copyright line, bestie, it's not decorative πŸ’–

and that's the page!! this one's from perl v5.36.0, dated 2023-12-17, and it's the BP_BIO...K_PROXY(1p) page in case the title didn't already tell you. mwah, go fetch some sequences πŸ§¬πŸ’…βœ¨

πŸ“¦ where this page comes from