[Bioperl-l] bl2seq, get high scoring matches
Tobias Thierer
t_thierer@yahoo.de
Thu, 26 Sep 2002 18:29:00 +0200
Hi,
I would like to use bl2seq to get high scoring local
alignments of sequence pair subsequences. So, following
the documentation, I say:
$factory = Bio::Tools::Run::StandAloneBlast->new(
'program' => 'blastn',
'outfile' => 'bl2seq.out');
$report = $factory->bl2seq($seqA, $seqB);
So that $report is now a reference to a BPbl2seq object
containing the blast report. As I understand the
documentation, there are two ways of proceeding now. Both
yield errors if there is no high scoring match of the
two sequences. More specifically:
Try #1: read the result from bl2seq.out
=======================================
my $in = Bio::AlignIO->new(-file => "<bl2seq.out",
-format =>'bl2seq');
my $align = $in->next_aln;
If bl2seq.out contains no hits (sample file attached to this
eMail), the code above produces the following error:
------------- EXCEPTION -------------
MSG: No hit object found for bl2seq report
STACK Bio::Tools::BPbl2seq::next_feature
path-to-bioperl-1.0.2/Bio/Tools/BPbl2seq.pm:232
STACK Bio::AlignIO::bl2seq::next_aln
path-to-bioperl-1.0.2/Bio/AlignIO/bl2seq.pm:122
STACK Bio::AlignIO::READLINE
path-to-bioperl-1.0.2/Bio/AlignIO.pm:463
STACK main::bl2seqAlign process.pl:60
STACK toplevel process.pl:70
----------------------------------
although the documentation at
http://doc.bioperl.org/releases/bioperl-1.0.2/Bio/AlignIO/bl2seq.html
states that next_aln returns 0 upon end of file or
error. Is this a bug or am I doing something wrong?
Try #2: proceed with the BPbl2seq object referenced by $report
==============================================================
[...do something with $report->sbjctName etc....]
while (my $hsp = $report->next_feature) {
# (...)
}
In my case, this yields:
Can't call method "nextHSP" on unblessed reference at
/(...)/bioperl-1.0.2/Bio/Tools/BPbl2seq.pm line 237, <GEN10>
line 31
So: am I just too dumb to understand the documentation and use
BioPerl (I'm quite new to it) or is this a bug in BioPerl?
Any help would be appreciated.
Thanks in advance,
Tobias Thierer
__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com