[Bioperl-l] Strand direction in Bl2seq

Jason Stajich jason at cgt.duhs.duke.edu
Tue May 27 21:22:40 EDT 2003


Julio -

not sure whether you are getting bitten by a bug or just not using things
correctly.  First off which Bioperl parser are you using? BPbl2seq I
assume since bl2seq parsing was only recently introduced into the bioperl
Bio::SearchIO system.

The HSP object you get out of BPbl2seq should give you the strands like
this:

my $qstrand = $hsp->query->strand;
my $hstrand = $hsp->hit->strand;

One of the problems is that you do need to specify why the report_type is
when you run BPbl2seq by specifying

-report_type => 'BLASTN' (or TBLASTN or BLASTX or TBLASTX or BLASTP)

when initializing a BPbl2seq object.

The latest code in bioperl-live CVS can handle bl2seq reports in
Bio::SearchIO and the API code is identical.

-jason

On Wed, 28 May 2003, Julio Fernandez Banet wrote:

> Hello.
> First of all say thanks for your help and keep the good work as I found this
> mailing list very helpful while trying to write my first lines of code.
>
> I'm writing some code using bl2seq.
> My problem is when I try to get the direction of the alignment using
> $hit_direction=Hsp->strand('hit') it seems it doesn't work and I only get
> hit as a result and not the direction in the format 1, -1, 0 as I good like
> to get.
> I tried writing it in diferent ways:
> $hit_direction=Hsp->hit->strand();
>
> I don't know if there any way to use it with bl2seq instead of blast, but if
> this is not the way to get the direction of the alignment any help on how to
> know if the strands are Plus/Plus or Plus/Minus would be really helpful.
>
> Thanks a lot for your help
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l
>

--
Jason Stajich
Duke University
jason at cgt.mc.duke.edu


More information about the Bioperl-l mailing list