Bio::Tools::BPbl2seq - Lightweight BLAST parser for pair-wise sequence alignment using the BLAST algorithm.
use Bio::Tools::BPbl2seq;my $report = Bio::Tools::BPbl2seq->new(-file => 't/bl2seq.out');$report->sbjctName;$report->sbjctLength;while(my $hsp = $report->next_feature) {$hsp->score;$hsp->bits;$hsp->percent;$hsp->P;$hsp->match;$hsp->positive;$hsp->length;$hsp->querySeq;$hsp->sbjctSeq;$hsp->homologySeq;$hsp->query->start;$hsp->query->end;$hsp->sbjct->start;$hsp->sbjct->end;$hsp->sbjct->seq_id;$hsp->sbjct->overlaps($exon);}
NOTE: This module's functionality has been implemented in Bio::SearchIO::blast and therefore is not actively maintained. BPbl2seq is a package for parsing BLAST bl2seq reports. BLAST bl2seq is a program for comparing and aligning two sequences using BLAST. Although the report format is similar to that of a conventional BLAST, there are a few differences so that BPlite is unable to read bl2seq reports directly. From the user's perspective, one difference between bl2seq and other blast reports is that the bl2seq report does not print out the name of the first of the two aligned sequences. (The second sequence name is given in the report as the name of the "hit"). Consequently, BPbl2seq has no way of identifying the name of the initial sequence unless it is passed to constructor as a second argument as in:
my $report = Bio::Tools::BPbl2seq->new(\*FH, "ALEU_HORVU");
If the name of the first sequence (the "query") is not passed to BPbl2seq.pm in this manner, the name of the first sequence will be left as "unknown". (Note that to preserve a common interface with the other BLAST programs the two sequences being compared are referred to in bl2seq as "query" and "subject" although this is perhaps a bit misleading when simply comparing 2 sequences as opposed to querying a database.) In addition, since there will only be (at most) one "subject" (hit) in a bl2seq report, one should use the method $report->next_feature, rather than $report->nextSbjct->nextHSP to obtain the next high scoring pair. One should note that the previous (0.7) version of BPbl2seq used slightly different syntax. That version had a bug and consequently the old syntax has been eliminated. Attempts to use the old syntax will return error messages explaining the (minor) recoding required to use the current syntax.
Mailing Lists User feedback is an integral part of the evolution of this and other Bioperl modules. Send your comments and suggestions preferably to one of the Bioperl mailing lists. Your participation is much appreciated.
[email protected] - General discussionhttp://bioperl.org/wiki/Mailing_lists - About the mailing lists
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:
http://bugzilla.open-bio.org/
Email: [email protected] Based on work of: Ian Korf ([email protected], http://sapiens.wustl.edu/~ikorf), Lorenz Pollak ([email protected], bioperl port) Jason Stajich, jason-at-bioperl.org
new
Title : newFunction: Create a new Bio::Tools::BPbl2seq objectReturns : Bio::Tools::BPbl2seqArgs : -file input file (alternative to -fh)-fh input stream (alternative to -file)-queryname name of query sequence-report_type What type of BLAST was run (blastn,blastp,tblastn...)
getSbjct
Title :Usage : $sbjct = $obj->getSbjct();Function : Method of obtaining single "subject" of a bl2seq reportExample : my $sbjct = $obj->getSbjct ) {}Returns : Sbjct object or undef if finishedArgs :
next_feature
Title : next_featureUsage : while( my $feat = $res->next_feature ) { # do something }Function: calls next_feature function from BPlite.Example :Returns : A Bio::SeqFeatureI compliant object, in this case aBio::Tools::BPlite::HSP object, and FALSE if there are no moreHSPs.Args : None
queryName
Title :Usage : $name = $report->queryName();Function : get /set the name of the queryExample :Returns : name of the queryArgs :
sbjctName
Title :Usage : $name = $report->sbjctName();Function : returns the name of the SbjctExample :Returns : name of the SbjctArgs :
sbjctLength
Title : sbjctLengthUsage : $length = $report->sbjctLength();Function : returns the length of the SbjctExample :Returns : name of the SbjctArgs :
P
Title : PUsage :Function : Syntax no longer supported, error message only
percent
Title : percentUsage : $hsp->percent();Function : Syntax no longer supported, error message only
match
Title : matchUsage : $hsp->match();Function : Syntax no longer supported, error message only
positive
Title : positiveUsage : $hsp->positive();Function : Syntax no longer supported, error message only
querySeq
Title : querySeqUsage : $hsp->querySeq();Function : Syntax no longer supported, error message only
sbjctSeq
Title : sbjctSeqUsage : $hsp->sbjctSeq();Function : Syntax no longer supported, error message only
homologySeq
Title : homologySeqUsage : $hsp->homologySeq();Function : Syntax no longer supported, error message only
qs
Title : qsUsage : $hsp->qs();Function : Syntax no longer supported, error message only
ss
Title : ssUsage : $hsp->ss();Function : Syntax no longer supported, error message only
hs
Title : hsUsage : $hsp->hs();Function : Syntax no longer supported, error message only