Bio::I...issPfam(3pm)

πŸ“¦
version 1.7.8 Β· 3 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble

πŸ’– 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_file and fetch block 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