Hi Gonzalo,<br><br>How about using UniProt BioMart to figure out the species first and then use the species information to connect to Ensembl.<br><br>Here's an <a href="http://www.ebi.ac.uk/uniprot/biomart/martview?VIRTUALSCHEMANAME=default&ATTRIBUTES=uniprot.default.features.accession%7Cuniprot.default.features.organism&FILTERS=uniprot.default.filters.accession.%22P00533%22&VISIBLEPANEL=resultspanel">example</a> UniProt BioMart query that returns the species name using a UniProt accession:<br>
<pre><a href="http://www.ebi.ac.uk/uniprot/biomart/martview?VIRTUALSCHEMANAME=default&ATTRIBUTES=uniprot.default.features.accession|uniprot.default.features.organism&FILTERS=uniprot.default.filters.accession">http://www.ebi.ac.uk/uniprot/biomart/martview?VIRTUALSCHEMANAME=default&ATTRIBUTES=uniprot.default.features.accession|uniprot.default.features.organism&FILTERS=uniprot.default.filters.accession</a>."P00533"&VISIBLEPANEL=resultspanel<br>
<br><br></pre>Here's BioMart query in XML, you can of course use the BioMart Perl API.<br><pre><?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Query>
<Query  virtualSchemaName = "default" formatter = "TSV" header = "0" uniqueRows = "0" count = "" datasetConfigVersion = "0.6" >
                        
        <Dataset name = "uniprot" interface = "default" >
                <Filter name = "accession" value = "P00533"/>
                <Attribute name = "accession" />
                <Attribute name = "organism" />
        </Dataset>
</Query></pre><br>Hope that helps,<br>-Kiran<br><pre><br></pre><br><br><div class="gmail_quote">On Tue, Sep 13, 2011 at 3:57 PM, Gonzalo Parra <span dir="ltr"><<a href="mailto:gonza_parra@hotmail.com">gonza_parra@hotmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">



<div><div dir="ltr">
Hi All,<br><br>I want to map Uniprot IDs to Ensemble Gene IDs. I know how to do it when I know the species where the gene comes from and I do it with this code.<br><br>###########################<br>use strict;<br>use Bio::EnsEMBL::Registry;<br>
<br>my $reg = "Bio::EnsEMBL::Registry";<br><br>$reg->load_registry_from_db(<br>    -host => '<a href="http://ensembldb.ensembl.org" target="_blank">ensembldb.ensembl.org</a>',<br>    -user => 'anonymous'<br>
);<br><br>my $UniprotID='P04637';<br><br>my $ga = $reg->get_adaptor('Homo sapiens', 'core', 'Gene');<br>my $ma = $reg->get_adaptor('Multi', 'compara', 'Member');<br>
<br>foreach my $gene (@{$ga->fetch_all_by_external_name($UniprotID)}) {<br>my $member = $ma->fetch_by_source_stable_id('ENSEMBLGENE', $gene->stable_id); <br><br>next unless (defined $member);<br><br>print $member->stable_id(), "\n";<br>
}<br><br>#####################################<br><br>Now well, I have a list of Uniprot IDs from several species and I'd like to know if there is any way to not tell the adaptor what specie the gene is from in the line<br>
<br>"my $ga = $reg->get_adaptor('Homo sapiens', 'core', 'Gene');"<br><br>Is there any way to do it generic?<br><br>Thanks in advance<br><font color="#888888"><br>Gonzalo<br>                                        </font></div>
</div>
<br>_______________________________________________<br>
Dev mailing list    <a href="mailto:Dev@ensembl.org">Dev@ensembl.org</a><br>
List admin (including subscribe/unsubscribe): <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></blockquote></div><br>