Bio::I...issPfam(3pm)
π Bio::Index::SwissPfam π
okay bestie, sit down, hydrate, and let me tell you about Bio::Index::SwissPfam β it's a Perl module (it lives in the 3pm section of your manpages, iykyk) and it's here to make SwissPfam files searchable. no cap. π¦
β¨ SYNOPSIS β¨
like, here's the vibe. first, you build the index:
use Bio::Index::SwissPfam;
use strict;
my $Index_File_Name = shift;
my $inx = Bio::Index::SwissPfam->new('-filename' => $Index_File_Name,
'-write_flag' => 'WRITE');
$inx->make_index(@ARGV);
and then, later, you fetch stuff out of it:
use Bio::Index::SwissPfam;
use strict;
my $Index_File_Name = shift;
my $inx = Bio::Index::SwissPfam->new('-filename' => $Index_File_Name);
foreach my $id (@ARGV) {
my $seq = $inx->fetch($id); # Returns stream
while( <$seq> ) {
if(/^>/) {
print;
last;
}
}
}
see how it's just... vibing? π
πΈ DESCRIPTION πΈ
okay so SwissPfam is one of the flat files that ships with Pfam. and this module? this module gives you a way to index it. slay.
it inherits functions for managing dbm files from Bio::Index::Abstract.pm, and it hands you the basic functionality for indexing SwissPfam files. π«Ά
β οΈ real talk: it only retrieves FileStreams at the moment. once we have something better (ie, an object!), will use that. that's the plan, bestie.
also it's heavily snaffled from Index::Fasta system of James Gilbert β credit where credit is due, we love a lineage. π
and one tiny note that is somehow also a whole lifestyle: for best results, use strict. fr fr. π
π FEED_BACK π
π¬ Mailing Lists
user feedback is an integral part of the evolution of this and other Bioperl modules. like, genuinely. your comments and suggestions are wanted, preferably sent to one of the Bioperl mailing lists. your participation is much appreciated. π₯Ί
bioperl-l@bioperl.org - General discussion
http://bioperl.org/wiki/Mailing_lists - About the mailing lists
π« 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. π
π 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
π AUTHOR - Ewan Birney
π APPENDIX π
the rest of the documentation details each of the object methods. internal methods are usually preceded with a _. (that underscore is the secret handshake, iykyk. π)
π§ _index_file
Title : _index_file
Usage : $index->_index_file( $file_name, $i )
Function: Specialist function to index swisspfam format files.
Is provided with a filename and an integer
by make_index in its SUPER class.
Example :
Returns :
Args :
so _index_file is the specialist function that indexes swisspfam format files. it gets handed a filename and an integer by make_index in its SUPER class. very "I don't do the intake, I do the actual work" energy. β
π fetch
Title : fetch
Usage : $index->fetch( $id )
Function: Returns a Bio::Seq object from the index
Example : $seq = $index->fetch( 'dJ67B12' )
Returns : Bio::Seq object
Args : ID
fetch gives you a Bio::Seq object back from the index. you give it an ID, it gives you the goods. the way that $index->fetch( 'dJ67B12' ) just works? iconic. ππ₯
π reminder from your girl: that_index_fileandfetchblock up there is the whole API surface listed here. don't go inventing extra options, I'm not gonna let you embarrass us both.
perl v5.32.1 Β· 2021-08-15
and that's the whole page, bestie β written by the Bioperl crew, dated 2021-08-15, running on perl v5.32.1. go index something cute. π β¨π¦
π¦ 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