<div dir="ltr">Thanks very much Magali and Andy.<div><br></div><div>With regard to the script,  <span style="font-size:13px;font-family:arial,sans-serif">fetch_all_by_</span><font face="arial, sans-serif">stable_id_list() quietly fails on gene ids which are no longer in Ensembl database. I have a set of genes from Ensembl 73 which I obtained based on VEP 73. I still want to annotate everything in this set with start, end and external names. I looked up by fetch_by* in the Doxygen Perl Documentation but could not find a function which recognises old ID genes. Do you know any function that solves that?</font></div>
<div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">G.</font></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 8 January 2014 10:34, Andy Yates <span dir="ltr"><<a href="mailto:ayates@ebi.ac.uk" target="_blank">ayates@ebi.ac.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi there,<br>
<br>
The blocking queries have been killed from the server so you should see a marked improvement in your code's performance. Script response time will be dependent on database load & your distance from the MySQL server. The figures Mag quoted are a best case where the database is located on the same network as the machine running the API script.<br>

<br>
Andy<br>
<br>
------------<br>
Andrew Yates - Ensembl Support Coordinator<br>
European Bioinformatics Institute (EMBL-EBI)<br>
European Molecular Biology Laboratory<br>
Wellcome Trust Genome Campus<br>
Hinxton<br>
Cambridge CB10 1SD<br>
Tel: <a href="tel:%2B44-%280%291223-492538" value="+441223492538">+44-(0)1223-492538</a><br>
Fax: <a href="tel:%2B44-%280%291223-494468" value="+441223494468">+44-(0)1223-494468</a><br>
<a href="http://www.ensembl.org/" target="_blank">http://www.ensembl.org/</a><br>
<div class="HOEnZb"><div class="h5"><br>
On 8 Jan 2014, at 10:27, mag <<a href="mailto:mr6@ebi.ac.uk">mr6@ebi.ac.uk</a>> wrote:<br>
<br>
> Hi Genomeo,<br>
><br>
> I am afraid we still have some heavy and long running queries slowing down our servers.<br>
> We are looking into it as we speak.<br>
><br>
> I have tried running your code on a local server, for all the genes on chromosome 1.<br>
> This returns in less than a minute, with 5363 genes and 17531 transcripts.<br>
> It would be a little bit slower from a remote server, but this gives you an idea of how fast the script should be running in normal conditions.<br>
><br>
> The useast server seems a lot quieter, so I would recommend you try using that instead.<br>
> host => <a href="http://useastdb.ensembl.org" target="_blank">useastdb.ensembl.org</a>, user => anonymous<br>
> (<a href="http://www.ensembl.org/info/data/mysql.html" target="_blank">http://www.ensembl.org/info/data/mysql.html</a>)<br>
><br>
> Alternatively, if you are planning on using the databases regularly and have mysql installed locally, you can create your own local server.<br>
> The mysql dumps are available here: <a href="ftp://ftp.ensembl.org/pub/current_mysql/" target="_blank">ftp://ftp.ensembl.org/pub/current_mysql/</a><br>
> And instructions on how to install it can be found here: <a href="http://www.ensembl.org/info/docs/webcode/mirror/install/ensembl-data.html" target="_blank">http://www.ensembl.org/info/docs/webcode/mirror/install/ensembl-data.html</a><br>

><br>
><br>
> Hope that helps,<br>
> Magali<br>
><br>
> On 08/01/2014 09:25, Genomeo Dev wrote:<br>
>> Hi,<br>
>><br>
>> This morning it is getting even slower - takes minutes to just run the code for two genes.<br>
>><br>
>> Do you have any advice on how I can run it for 5000 genes within a reasonable time?<br>
>><br>
>> G.<br>
>><br>
>><br>
>> On 7 January 2014 19:26, <<a href="mailto:mr6@ebi.ac.uk">mr6@ebi.ac.uk</a>> wrote:<br>
>> Hi Genomeo,<br>
>><br>
>> I don't think there is anything massively wrong with the code you are using.<br>
>><br>
>> Looking at our mysql server, it is currently under heavy load, which would<br>
>> explain slow response time.<br>
>><br>
>> Please let us know if the problem persists.<br>
>><br>
>><br>
>> Regards,<br>
>> Magali<br>
>><br>
>> > Hi all,<br>
>> ><br>
>> > I am finding this code very slow. I am using Ensembl VM 74:<br>
>> ><br>
>> > $gene_adaptor = Bio::EnsEMBL::Registry->get_adaptor( "human", "core",<br>
>> > "gene" );<br>
>> ><br>
>> > my $genes =<br>
>> > $gene_adaptor->fetch_all_by_stable_id_list(["ENSG00000249352","ENSG00000109576"]);<br>
>> ><br>
>> > while ( my $gene = shift @{$genes} ) {<br>
>> > my $gstring = feature2string($gene);<br>
>> > print "$gstring\n";<br>
>> > my $transcripts = $gene->get_all_Transcripts();<br>
>> > while ( my $transcript = shift @{$transcripts} ) {<br>
>> > my $tstring = feature2string($transcript);<br>
>> > print "\t$tstring\n";<br>
>> > }<br>
>> > }<br>
>> ><br>
>> > I suspect the first line is the problem. Any advice on how I can run this<br>
>> > faster? especially for a large set of genes?<br>
>> ><br>
>> > Thanks,<br>
>> ><br>
>> > Genomeo<br>
>> > _______________________________________________<br>
>> > Dev mailing list    <a href="mailto:Dev@ensembl.org">Dev@ensembl.org</a><br>
>> > Posting guidelines and subscribe/unsubscribe info:<br>
>> > <a href="http://lists.ensembl.org/mailman/listinfo/dev" target="_blank">http://lists.ensembl.org/mailman/listinfo/dev</a><br>
>> > Ensembl Blog: <a href="http://www.ensembl.info/" target="_blank">http://www.ensembl.info/</a><br>
>> ><br>
>><br>
>><br>
>><br>
><br>
> _______________________________________________<br>
> Dev mailing list    <a href="mailto:Dev@ensembl.org">Dev@ensembl.org</a><br>
> Posting guidelines and subscribe/unsubscribe info: <a href="http://lists.ensembl.org/mailman/listinfo/dev" target="_blank">http://lists.ensembl.org/mailman/listinfo/dev</a><br>
> Ensembl Blog: <a href="http://www.ensembl.info/" target="_blank">http://www.ensembl.info/</a><br>
<br>
</div></div></blockquote></div><br></div>