Bio::Tools::BPlite::HSP - Blast report High Scoring Pair (HSP)
use Bio::Tools::BPlite; my $report = new Bio::Tools::BPlite(-fh=>\*STDIN); { while(my $sbjct = $report->nextSbjct) { while (my $hsp = $sbjct->nextHSP) { $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->hit->start; $hsp->hit->end; $hsp->hit->seqname; $hsp->hit->overlaps($exon); } } # the following line takes you to the next report in the stream/file # it will return 0 if that report is empty, # but that is valid for an empty blast report. # Returns -1 for EOF. last if ($report->_parseHeader == -1)); redo }
This object handles the High Scoring Pair data for a Blast report. This is where the percent identity, query and hit sequence length, P value, etc are stored and where most of the necessary information is located when building logic around parsing a Blast report.
See Bio::Tools::BPlite for more detailed information on the entire BPlite Blast parsing system.
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.
bioperl-l@bioperl.org - General discussion http://bioperl.org/MailList.shtml - About the mailing lists
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 email or the web:
bioperl-bugs@bioperl.org http://bioperl.org/bioperl-bugs/
Email: schattner@alum.mit.edu
Jason Stajich, jason@bioperl.org
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _
Title : report_type Usage : $type = $sbjct->report_type() Function : Returns the type of report from which this hit was obtained. This usually pertains only to BLAST and friends reports, for which the report type denotes what type of sequence was aligned against what (BLASTN: dna-dna, BLASTP prt-prt, BLASTX translated dna-prt, TBLASTN prt-translated dna, TBLASTX translated dna-translated dna). Example : Returns : A string (BLASTN, BLASTP, BLASTX, TBLASTN, TBLASTX, UNKNOWN) Args : a string on set (you should know what you are doing)
Title : P Usage : $hsp->P(); Function : returns the P (significance) value for a HSP Example : Returns : (double) significance value Args :
Title : percent Usage : $hsp->percent(); Function : returns the percent matching Returns : (double) percent matching Args : none
Title : match Usage : $hsp->match(); Function : returns the match Example : Returns : (double) frac_identical Args :
Title : hsplength Usage : $hsp->hsplength(); Function : returns the HSP length (including gaps) Returns : (integer) HSP length Args : none
Title : positive Usage : $hsp->positive(); Function : returns the number of positive matches (symbols in the alignment with a positive score) Returns : (int) number of positive matches in the alignment Args : none
Title : gaps Usage : $hsp->gaps(); Function : returns the number of gaps or 0 if none Returns : (int) number of gaps or 0 if none Args : none
Title : querySeq Usage : $hsp->querySeq(); Function : returns the query sequence Returns : (string) the Query Sequence Args : none
Title : sbjctSeq Usage : $hsp->sbjctSeq(); Function : returns the Sbjct sequence Returns : (string) the Sbjct Sequence Args : none
Title : homologySeq Usage : $hsp->homologySeq(); Function : returns the homologous sequence Returns : (string) homologous sequence Args : none
Title : qs Usage : $hsp->qs(); Function : returns the Query Sequence (same as querySeq) Returns : (string) query Sequence Args : none
Title : ss Usage : $hsp->ss(); Function : returns the subject sequence ( same as sbjctSeq) Returns : (string) Sbjct Sequence Args : none
Title : hs Usage : $hsp->hs(); Function : returns the Homologous Sequence (same as homologySeq ) Returns : (string) Homologous Sequence Args : none
To install Bio::Seq, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Bio::Seq
CPAN shell
perl -MCPAN -e shell install Bio::Seq
For more information on module installation, please visit the detailed CPAN module installation guide.