[Bioperl-l] strand and frames in SearchIO

Jason Stajich jason@cgt.mc.duke.edu
Mon, 13 May 2002 16:06:19 -0400 (EDT)


On Mon, 13 May 2002, Andy Nunberg wrote:

>
>
>
> I am trying to retrieve strand and frame info for each HSP.  I have created
> the blast object from a
> TBLASTX report using Bio::SearchIO with -format 'psiblast'.
>
> when iterating over the HSPs i call the following method to get strand
> information
> my ($q_strand,$s_strand)=$hsp->strand();
> I can see that sometimes I get subject strand info ($s_strand) and
> sometimes I do not.


Hmm - SteveC is going to have to comment as psiblast code is his - my code
(blast.pm) allows you to get the strand with
$hsp->query->strand() and $hsp->hit->strand() (which I hope are self
explanatory)

These *should* work with Steve's implementation.

>
> I also cannot seem to get frame information if I call the frame method on
> the hsp object
> ie ($q_frame,$s_frame)=$hsp->frame; Although I am not sure which of the
> frame methods I am calling when I do this.  (I am not clear on exactly
> which frame method is inherited)
>

HSPI::frame() is supposed to be smart - so that if you call frame with
TBLASTN report it will give you the frame for the hit and BLASTX it will
give you the frame for the query and tblastx should give you and array
($query,$hit).

So to get frame
($q_frame,$s_frame)=$hsp->frame;
should be correct - does it appear to not be?

Additionally (TMTOWTDI), you should be able to call
($qframe,$sframe) = ($hsp->query->frame, $hsp->hit->frame);
if it's been implemented correctly.

I realize it is confusing the HSPI ISA SeqFeature which has a frame - in
the special case of TBLASTX reports the frame method will return a tuple
rather than a single value as defined by the SeqFeatureI interface.

> what is the appropriate method for getting strand and frame info for hsp's
> using SearchIO?
> Thanks
> Andy
> *******************************************************************
> Andy Nunberg, Ph.D
> Computational Biologist
> Orion Genomics, LLC
> (314) 615-6989
> http://www.oriongenomics.com
>
> _______________________________________________
> 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