[Bioperl-l] Determining strand orientation from bl2seq report
Jason Stajich
jason@cgt.mc.duke.edu
Fri Jan 24 16:27:53 EST 2003
Searchio can't parse bl2seq (yet), you have to use Bio::Tools::BPbl2seq,
so StandAloneBlast returns a Bio::Tools::BPbl2seq report.
start is always less than in end in the bioperl world to get strand you
call $hsp->query->strand or $hsp->hit->strand.
The HSP object you get back is a FeaturePair object so you can call all
the methods that are available there, in addition the $hsp->hit and
$hsp->query methods return objects which are Bio::SeqFeatureI compliant
so you can call any method available in Bio::SeqFeatureI on them.
perldoc doesn't do a good job with the fact that methods inherit from a
superclass so you don't see all those methods in the documentation, if you
use doc.bioperl.org and click through the inheritance that is available
in the ISA part of a module documentation you will be able to see what
are all the methods.
-jason
On Thu, 23 Jan 2003, Dave Arenillas wrote:
> I'm trying to figure out if there is any way to determine the strand
> orientation (Plus / Plus or Plus / Minus) of an HSP from the blast report
> created by running bl2seq.
>
> ex.
> my @params = ('program' => 'blastn',
> 'outfile' => "$BlastFile");
> my $factory = Bio::Tools::Run::StandAloneBlast->new(@params);
> my $report = $factory->bl2seq($seq1, $seq2);
>
> while (my $hsp = $report->next_feature) {
> #
> # get orientation info from $hsp???
> #
> }
>
> Apparently Bio::Tools::BPlite::HSP objects have no methods to return this
> information. I (incorrectly) assumed that I could test
> $hsp->hit->start > $hsp->hit->end
> but start is always less than end even for Plus / Minus orientation.
>
> I then attempted to create a SearchIO object and use this to parse the blast
> report, for ex.
> my $searchio = new Bio::SearchIO( -format => 'blast',
> -file => "$BlastFile" );
>
> while (my $result = $searchio->next_result) {
> #
> # Results in the error below
> #
> while (my $hit = $result->next_hit) {
> while (my $hsp = $hit->next_hsp) {
> }
> }
> }
>
> However, this produced the following error:
>
> ------------ EXCEPTION -------------
> MSG: no data for midline Lambda K H
> STACK Bio::SearchIO::blast::next_result
> /usr/lib/perl5/site_perl/5.8.0/Bio/SearchIO/blast.pm:566
>
> Is the report produced by bl2seq some kind of simplified blast report which
> SearchIO cannot parse? Is there any other way of determining HSP strand
> orientation?
>
> Thanks,
> Dave
>
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l
>
--
Jason Stajich
Duke University
jason at cgt.mc.duke.edu
More information about the Bioperl-l
mailing list