<html><body><div style="color:#000; background-color:#fff; font-family:Courier New, courier, monaco, monospace, sans-serif;font-size:14pt"><div>Dear Thibaut and Jay,</div><div>I really appreciate your suggestion to the list  but I have a similar query to the one of Gang</div><div>At the page http://asia.ensembl.org/Homo_sapiens/Transcript/Exons?db=core;g=ENSG00000089234;r=12:112080797-112123790;t=ENST00000419234</div><div><br></div><div style="color: rgb(0, 0, 0); font-size: 18.6667px; font-family: Courier New,courier,monaco,monospace,sans-serif; background-color: transparent; font-style: normal;">The transcript <a href="http://asia.ensembl.org/Homo_sapiens/Transcript/Exons?db=core;g=ENSG00000089234;r=12:112080797-112123790;t=ENST00000419234">ENST00000419234</a> has a length of 3179 nucleotides, that corresponds to the sum of its exons, the protein is expected to have 3179/3=1059 amino acids <br></div><div style="color: rgb(0, 0, 0); font-size:
 18.6667px; font-family: Courier New,courier,monaco,monospace,sans-serif; background-color: transparent; font-style: normal;">but it has only 592 amino acids, the same phenomenon happen for other trancripts.</div><div style="color: rgb(0, 0, 0); font-size: 18.6667px; font-family: Courier New,courier,monaco,monospace,sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 18.6667px; font-family: Courier New,courier,monaco,monospace,sans-serif; background-color: transparent; font-style: normal;">What is the data definition of the length of the transcript and of the protein?</div><br>Kind regards,<br><br>Enrico Rubagotti<br><div><br></div><div style="color: rgb(0, 0, 0); font-size: 18.6667px; font-family: Courier New,courier,monaco,monospace,sans-serif; background-color: transparent; font-style: normal;"><br> </div><div class="yui_3_2_0_19_134610710241460" style="font-family: Courier New,
 courier, monaco, monospace, sans-serif; font-size: 14pt;"> </div>  <span><br><br></span><pre>Hi,
I would recommend you to use the Perl API for all the information you 
want to retrieve from Ensembl.
It's quite easy to use and if there is a schema change, you will not 
have to change all your SQL queries.
Here is some documentation:
<a href="http://www.ensembl.org/info/docs/api/core/core_tutorial.html">http://www.ensembl.org/info/docs/api/core/core_tutorial.html</a>
<a href="http://www.ensembl.org/info/docs/Doxygen/core-api/index.html">http://www.ensembl.org/info/docs/Doxygen/core-api/index.html</a>
<a href="http://www.ensembl.org/info/docs/api/index.html">http://www.ensembl.org/info/docs/api/index.html</a>

Here is some code for your query:

use Bio::EnsEMBL::Registry;

my $registry = 'Bio::EnsEMBL::Registry';

$registry->load_registry_from_db(
     -host => 'ensembldb.ensembl.org', # alternatively 'useastdb.ensembl.org'
     -user => 'anonymous'
);
my $gene_adaptor  = $registry->get_adaptor( 'Human', 'Core', 'Gene' );
my $gene = $gene_adaptor->fetch_by_stable_id('ENSG00000089234');
foreach my $transcript (@{$gene->get_all_Transcripts()) {
   print STDOUT 'Length of ', $transcript->display_id, ': ', $transcript->length, "\n";
}

Regards
Thibaut

On 31/07/12 12:49, Jay Humphrey wrote:
><i> Length is end - start + 1.
</i>><i> 1 2 3 [4 5 6 7 8] 9
</i>><i> start = 4, end = 8
</i>><i> 8 - 4 = 4, actually there are 5 residues.
</i>><i>
</i>><i> On 31/07/2012 10:39, ?? wrote:
</i>>><i> Hi All
</i>>><i> I wondering how to calculate transcript length within Ensembl database.
</i>>><i> I try to sum exon's length:
</i>>><i>
</i>>><i> SELECT tp.stable_id, SUM( e.seq_region_end ) - SUM( e.seq_region_start )
</i>>><i> FROM gene g
</i>>><i> JOIN transcript tp ON ( g.gene_id = tp.gene_id )
</i>>><i> JOIN exon_transcript et ON ( et.transcript_id = tp.transcript_id )
</i>>><i> JOIN exon e ON ( e.exon_id = et.exon_id )
</i>>><i> WHERE g.stable_id = 'ENSG00000089234'
</i>>><i> GROUP BY tp.stable_id
</i>>><i>
</i>>><i> But the result is inconsistent with Ensembl official data:
</i>>><i> <a href="http://asia.ensembl.org/Homo_sapiens/Gene/Summary?g=ENSG00000089234;r=12:112080797-112123790">http://asia.ensembl.org/Homo_sapiens/Gene/Summary?g=ENSG00000089234;r=12:112080797-112123790</a>
</i>>><i>
</i>>><i> If you know how to dig out the datas of 
</i>>><i> variation,orthologue,paralogue,regulation. please also tell me.
</i>>><i>
</i>>><i>
</i>>><i> Thanks million
</i>>><i> -- 
</i>>><i> Gang Chen
</i>>><i> TILSI
</i>>><i> Taicang Institute For Life Science Information
</i>>><i> Address: A2/162, Renmin South Road, Taicang, 215400, Jiangsu 
</i>>><i> Province, P.R.China
</i>>><i> Phone: (+86)512-82782588
</i>>><i>
</i>>><i>
</i>>><i>
</i>>><i> _______________________________________________
</i>>><i> Dev mailing <a href="http://lists.ensembl.org/mailman/listinfo/dev">listDev at ensembl.org</a>
</i>>><i> List admin (including subscribe/unsubscribe):<a href="http://lists.ensembl.org/mailman/listinfo/dev">http://lists.ensembl.org/mailman/listinfo/dev</a>
</i>>><i> Ensembl Blog:<a href="http://www.ensembl.info/">http://www.ensembl.info/</a>
</i>><i>
</i>><i> -- 
</i>><i> Jay Humphrey                   Ensembl Genomes Web Developer
</i>><i> EMBL-EBI                       Tel: +44-(0)1223-492682
</i>><i> Wellcome Trust Genome Campus   Fax: +44-(0)1223-494468
</i>><i> Cambridge CB10 1SD, <a href="ukhttp://www.ensemblgenomes.org/">UKhttp://www.ensemblgenomes.org/</a>  
</i>><i>
</i>><i>
</i>><i> _______________________________________________
</i>><i> Dev mailing <a href="http://lists.ensembl.org/mailman/listinfo/dev">listDev at ensembl.org</a>
</i>><i> List admin (including subscribe/unsubscribe):<a href="http://lists.ensembl.org/mailman/listinfo/dev">http://lists.ensembl.org/mailman/listinfo/dev</a>
</i>><i> Ensembl Blog:<a href="http://www.ensembl.info/">http://www.ensembl.info/</a>
</i>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <<a href="http://lists.ensembl.org/pipermail/dev/attachments/20120801/d347b3bb/attachment.htm">http://lists.ensembl.org/pipermail/dev/attachments/20120801/d347b3bb/attachment.htm</a>></pre><div></div></div></body></html>