Bio::D...yCache(3pm)
π Bio::DB::InMemoryCache π
okay bestie, so this is a page from the User Contributed Perl Documentation, and it's all about Bio::DB::InMemoryCache β which is basically a cute little memory goblin that hoards your sequence objects so you don't have to keep going back to the actual database. no cap.
β¨ NAME β¨
Bio::DB::InMemoryCache β an abstract interface for a sequence database. it's giving "I'm the blueprint, not the building," iykyk π
πΈ SYNOPSIS πΈ
$cachedb = Bio::DB::InMemoryCache->new( -seqdb => $real_db,
-number => 1000);
#
# get a database object somehow using a concrete class
#
$seq = $cachedb->get_Seq_by_id('ROA1_HUMAN');
#
# $seq is a Bio::Seq object
#
so yeah, you hand it a real db and a -number (the hard cap on how many sequences it's willing to remember), and it goes to work. then you just call get_Seq_by_id('ROA1_HUMAN') like a normal person and boom β a Bio::Seq object. main character behaviour, honestly. π¦
π DESCRIPTION π
This is a memory cache system which saves the objects returned by Bio::DB::RandomAccessI in memory to a hard limit of sequences.
that's the whole vibe: it remembers stuff so future-you doesn't have to wait. but it's got a hard limit, bestie β a fixed ceiling on how many sequences it'll hold. not infinite. respect the limit. π
π CONTACT π
Ewan Birney <birney@ebi.ac.uk> β the icon, the legend, the one to contact. π
π«Ά Support
Please direct usage questions or support issues to the mailing list:
bioperl-l@bioperl.org
rather than to the module maintainer directly. Many experienced and reponsive experts will be able look at the problem and quickly address it. Please include a thorough description of the problem with code and data examples if at all possible.
fr fr, take it to the list, not the maintainer's DMs. there are literally so many smart, experienced, responsive people hanging out there who can clock your problem and fix it fast. and pls pls pls bring a thorough description plus code and data examples if you possibly can β it makes everything easier. πβ¨
π Reporting Bugs
Report bugs to the Bioperl bug tracking system to help us keep track the bugs and their resolution. Bug reports can be submitted via the web:
https://github.com/bioperl/bioperl-live/issues
π APPENDIX π
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _
so if you see an underscore at the front of a method name, that's an internal method, bestie β it's not for you, it's backstage. π
π get_Seq_by_id
Title : get_Seq_by_id
Usage : $seq = $db->get_Seq_by_id('ROA1_HUMAN')
Function: Gets a Bio::Seq object by its name
Returns : a Bio::Seq object
Args : the id (as a string) of a sequence
Throws : "id does not exist" exception
you give it the id as a string, you get a Bio::Seq object back. if that id doesn't exist? it throws an "id does not exist" exception at you. π
π get_Seq_by_acc
Title : get_Seq_by_acc
Usage : $seq = $db->get_Seq_by_acc('X77802');
Function: Gets a Bio::Seq object by accession number
Returns : A Bio::Seq object
Args : accession number (as a string)
Throws : "acc does not exist" exception
same energy, different key: pass the accession number as a string, get a Bio::Seq object. no accession, no vibes β you get an "acc does not exist" exception. π
π get_Seq_by_version
Title : get_Seq_by_version
Usage : $seq = $db->get_Seq_by_version('X77802.1');
Function: Gets a Bio::Seq object by sequence version
Returns : A Bio::Seq object
Args : accession.version (as a string)
Throws : "acc.version does not exist" exception
the fancy one β¨ β you pass accession.version as a string, you get a Bio::Seq object. if that combo isn't a thing, it throws "acc.version does not exist". periodt.
and that's the whole page, bestie!! this was documented under perl v5.32.1, dated 2021-08-15, and it lives in the Bio::D...yCache(3pm) man page β go forth and cache responsibly. mwah ππ
π¦ where this page comes from
- debian bookworm: libbio-perl-perl 1.7.8-1 Β· Perl
- debian trixie: libbio-perl-perl 1.7.8-1 Β· Perl
- ubuntu jammy: libbio-perl-perl 1.7.8-1 Β· Perl
- ubuntu noble: libbio-perl-perl 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