Bio::S...st_pull(3pm)
β¨ 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 thatresult_count()counts the number of times you have callednext_result(), so it will not be able to tell you how many results there were in the file if you userewind(). 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
- 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