[ensembl-dev] Core API : Exon is_coding method

Bhavana Harsha bh4 at sanger.ac.uk
Fri Oct 6 09:49:41 BST 2017


Hello,

I’m looking at the exons for the human gene CEBPA ENST00000498907.2.
http://grch37.ensembl.org/Homo_sapiens/Transcript/Exons?db=core;g=ENSG00000245848;r=19:33790840-33793470;t=ENST00000498907

It turns out that it has one exon (with UTR sequences on either side of it) and it is protein-coding.

However, when I use the API like this:

my $transcript = $transcript_adaptor->fetch_by_stable_id(‘ENST00000498907’);
my $exon = $transcript->get_all_Exons()->[0];
$exon->is_coding($transcript);

returns 0.

This is because neither of the conditions in the $exon->is_coding() method evaluate to true.

if ($transcript->coding_region_start < $self->start && $self->start < $transcript->coding_region_end) { return 1; }
if ($transcript->coding_region_end > $self->end && $self->end > $transcript->coding_region_start) { return 1; }

I realise this happens for transcripts which have only one exon (e.g. FOXL2).

Do you think that the exon->start and exon->end should be changed to exon->coding_region_start and exon->coding_region_end respectively?

I’m using API version 89.



Regards,
Bhavana






---------------------------------------------
Bhavana Harsha
Bioinformatician
COSMIC
Wellcome Trust Sanger Institute
Hinxton, UK
CB10 1SA



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ensembl.org/pipermail/dev_ensembl.org/attachments/20171006/84b8def9/attachment.html>


More information about the Dev mailing list