[ensembl-dev] $transcript->five_prime_utr

Graham Ritchie grsr at ebi.ac.uk
Sun Feb 6 17:45:56 GMT 2011


Hi Ryan,

You can use the transcript methods coding_region_start and coding_region_end to find the genomic coordinates of the coding region (though bear in mind that if your transcript is on the reverse strand coding_region_start is really the end of the coding region and vice versa), so you should be able to compare your position to these. To check you're really in the UTR though you'll also have to check you're not in an intron (e.g. by using the get_all_Introns method). An alternative approach would be to use the TranscriptMapper to (try to) map your position to both cdna and cds coordinates, if you map to the cdna but not to the cds then you know you're in UTR.

Cheers,

Graham


On 4 Feb 2011, at 19:47, Ryan Giuliany wrote:

> Hi,
> 
> I'm trying to determine if a position is in the 5' or 3' UTR of a transcript.  I've tried the following:
> 
> my $slice_adaptor = $registry->get_adaptor( 'Human', 'Core', 'Slice' );
> ...
> my $slice = $slice_adaptor->fetch_by_region( 'chromosome', "$chr", $pos, $pos);
>    my @transcripts = @{$slice->get_all_Transcripts};
>    foreach my $transcript (@transcripts) {
>        $transcript = $transcript->transform('chromosome');
>        my $fputr = $transcript->five_prime_utr;
>        my $tputr = $transcript->three_prime_utr;
>        if ($pos >= $fputr->start && $pos <= $fputr->end){
> ...
> 
> when running this script I get the following error:
> 
> Can't locate object method "start" via package "Bio::Seq"
> 
> Looking at the docs for Bio::Seq, Seq objects do indeed have a start() method.
> 
> Any tips?
> 
> Thanks!
> Ryan
> 
> 
> _______________________________________________
> Dev mailing list
> Dev at ensembl.org
> http://lists.ensembl.org/mailman/listinfo/dev





More information about the Dev mailing list