Bio::S...st_pull(3pm)

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

✨ Bio::SearchIO::blast_pull β€” a parser for BLAST output πŸ’…

okay bestie, you found the manual page for Bio::SearchIO::blast_pull, which lives in the User Contributed Perl Documentation corner of the internet. It's giving parser energy, and honestly? She's iconic. Let's get into it 🫢


🌸 SYNOPSIS 🌸

no cap: do not use this class directly, it is available through Bio::SearchIO πŸ™ˆ
# do not use this class directly it is available through Bio::SearchIO
use Bio::SearchIO;
my $in = Bio::SearchIO->new(-format => 'blast_pull',
                           -file   => 't/data/new_blastn.txt');
while (my $result = $in->next_result) {
    # this is a Bio::Search::Result::BlastPullResult object
    print "Results for ", $result->query_name(), "\n";
    while (my $hit = $result->next_hit) {
        print $hit->name(), "\n";
        while (my $hsp = $hit->next_hsp) {
            print "length is ", $hsp->length(), "\n";
        }
    }
}

like. look at her go. nested loops, popping off one result at a time. main character behavior fr fr πŸ‘‘


πŸ’– DESCRIPTION πŸ’–

So this object implements a pull-parser for BLAST output. Why "pull"? Because she's fast β€” she only does work on request, hence the 'pull'. She doesn't do extra credit, she doesn't overachieve, she does exactly what you ask and nothing more. Lowkey the healthiest work-life balance in the whole codebase 😌✨

Currently only NCBI BLASTN and BLASTP are supported. That's it, that's the list, don't come for her about the rest 🌸


πŸ¦‹ 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. (yes really, they want to hear from you, it's not a trap πŸ₯Ί)

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. The way that there are many experienced and reponsive experts on that list who will be able look at the problem and quickly address it… bestie please use the group chat, not the DMs πŸ’€

Please include a thorough description of the problem with code and data examples if at all possible. Receipts! We need the receipts! 🧾✨

πŸ› Reporting Bugs

Report bugs to the Bioperl bug tracking system to help us keep track of the bugs and their resolution. Bug reports can be submitted via the web:

https://github.com/bioperl/bioperl-live/issues

πŸ‘‘ AUTHOR - Sendu Bala πŸ‘‘

Email bix@sendu.me.uk

shoutout to Sendu, an absolute legend, no notes πŸ’œ


🌈 APPENDIX 🌈

The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _ (iykyk, that underscore means hands off, she's private 🌸)

new

Title   : new
Usage   : my $obj = Bio::SearchIO::blast_pull->new();
Function: Builds a new Bio::SearchIO::blast_pull object
Returns : Bio::SearchIO::blast_pull
Args    : -fh/-file => BLAST output filename
          -format   => 'blast_pull'
          -evalue   => float or scientific notation number to be used
                       as an evalue cutoff for hits
          -score    => integer or scientific notation number to be used
                       as a score value cutoff for hits
          -piped_behaviour => 'temp_file'|'memory'|'sequential_read'

          -piped_behaviour defines what the parser should do if the input is
           an unseekable filehandle (eg. piped input), see
           Bio::PullParserI::chunk for details. Default is 'memory'.

so like, new builds you a brand new Bio::SearchIO::blast_pull object. you pass her a -fh/-file (the BLAST output filename), a -format of 'blast_pull', and optionally an -evalue and/or -score cutoff β€” both of which accept a float or a scientific notation number, and both of which act as cutoffs for hits βœ‚οΈ

and then there's -piped_behaviour, which is the drama queen of the options, and she only matters if your input is an unseekable filehandle (eg. piped input 🚰). She can be 'temp_file', 'memory', or 'sequential_read', and she defines what the parser should do in that situation β€” see Bio::PullParserI::chunk for the details. Default is 'memory'. 🧠

next_result

Title   : next_result
Usage   : my $hit = $searchio->next_result;
Function: Returns the next Result from a search
Returns : Bio::Search::Result::ResultI object
Args    : none

gives you the next Result from a search. no args, no stress, just vibes 🌸

result_count

Title   : result_count
Usage   : my $count = $searchio->result_count
Function: Returns the number of results we have processed.
Returns : integer
Args    : none

returns the number of results we have processed so far. an integer, because she's precise like that πŸ”’βœ¨

rewind

Title   : rewind
Usage   : $searchio->rewind;
Function: Allow one to reset the Result iterator to the beginning, so that
          next_result() will subsequently return the first result and so on.

          NB: result objects are not cached, so you will get new result objects
          each time you rewind. Also, note that result_count() counts the
          number of times you have called next_result(), so will not be able
          tell you how many results there were in the file if you use rewind().

Returns : n/a
Args    : none

okay so rewind lets you reset the Result iterator back to the beginning, so next_result() will subsequently hand you the first result again and so on. it's giving "run it back" πŸ”

⚠️ NB: result objects are not cached, so you will get new result objects each time you rewind. Also, note that result_count() counts the number of times you have called next_result(), so it will not be able to tell you how many results there were in the file if you use rewind(). she is not keeping score across rewind, bestie, do not trust her with that number πŸ’€

Returns: n/a. Args: none. simple. clean. periodt πŸ’…


and that's the whole page, babe 🌈 this was perl v5.32.1, dated 2021-08-15, from the User Contributed Perl Documentation collection β€” Bio::S...st_pull(3pm), mwah, iconic, go parse some BLAST output πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from