[ensembl-dev] variation api - what exon a variation feature is in and exon start/end positions vary

Andrea Edwards edwardsa at cs.man.ac.uk
Fri Nov 19 23:35:06 GMT 2010


Hi

If i create a variation feature object for a SNP I can get all of the 
transcript variations for that SNP.
How would i find out for each particular transcript variation which exon 
the SNP resides in?

I can get all of the exons for the transcript and iterate through them 
and look at their start and stop positions and see if the snp resides in 
the exon.

However when i did this i found that the start and stop positions you 
get for an exon when you retrieve the exon like this:

========================================
@exons = @{$tv->transcript->get_all_Exons() };

           foreach $exon (@exons) {
                $exon->start
          }

example:
id: ENSBTAE00000282962
start: 3916
end: 4033
==============================================


Is different than when you get an exon like this:



==============================================
my $exon = $exon_adaptor->fetch_by_stable_id( 'ENSBTAE00000282962' );
print $exon->start(), "\n";
     print $exon->end(), "\n";
=========================================================


The latter case seems to be genomic coordinates

I couldn't tell what you are getting in the first case though. The exon 
in the example is at the start of the transcript so I don't know why you 
get a start of 3916. It is also the first exon of all exons in the gene 
so it isn't 3916 from the start of the underlying gene. Please could you 
explain where those start and end coordinates come from. I had to do 
this workaround to get genomic coordinates

@exons = @{$tv->transcript->get_all_Exons() };

           foreach $exon (@exons) {
               print "id: ", $exon->stable_id, "\n";
               $exon = $exon_adaptor->fetch_by_stable_id( 
$exon->stable_id );
               print "start: ", $exon->start, "\n";
               print "end: ", $exon->end, "\n";
           }

thanks




More information about the Dev mailing list