1.

How Do I Get The Frame For A Translated Search?

Answer»

I'm using Bio::Search* and its frame() to parse BLAST but I'm seeing 0, 1, or 2 instead of the EXPECTED -3, -2, -1, +1, +2, +3.

Why am I seeing these different numbers and how do I get the frame according to BLAST?

These are GFF frames - so +1 is 0 in GFF, -3 will be ENCODED with a frame of 2 with the strand being set to -1.
Frames are relative to the hit or query sequence so you need to query it based on sequence you are INTERESTED in:

$hsp->hit->strand;
$hsp->hit->frame;
or
$hsp->query->strand;
$hsp->query->frame;
So the value according to a blast report of -3 can be constructed as:
my $blastframe = ($hsp->query->frame + 1) * $hsp->query->strand;

I'm using Bio::Search* and its frame() to parse BLAST but I'm seeing 0, 1, or 2 instead of the expected -3, -2, -1, +1, +2, +3.

Why am I seeing these different numbers and how do I get the frame according to BLAST?

These are GFF frames - so +1 is 0 in GFF, -3 will be encoded with a frame of 2 with the strand being set to -1.
Frames are relative to the hit or query sequence so you need to query it based on sequence you are interested in:

$hsp->hit->strand;
$hsp->hit->frame;
or
$hsp->query->strand;
$hsp->query->frame;
So the value according to a blast report of -3 can be constructed as:
my $blastframe = ($hsp->query->frame + 1) * $hsp->query->strand;



Discussion

No Comment Found