UniProt-EnsemblID mapping

Hi all,
I am trying to programmatically map a list of UniProtKB id’s (e.g. P04035) to their Ensembl id’s (e.g. ENSG00000113161.17 in this case). It is very easy, but time-consuming, via the webpage UniProt and would prefer not manually uploading a file with a bunch of IDs.
They do provide some tips as to how to submit a POST request via curl at UniProt.
But, after several days of failed attempts, I don’t know how to proceed. I don’t know much about POST requests, or API access for that matter.
I even have the API request for this example, as translated by the web mapping tool:
curl --form 'from=UniProtKB_AC-ID' --form 'to=Ensembl' --form 'ids=P04035' https://rest.uniprot.org/idmapping/run

But I do not know how to properly “transfer” the curl command to the POST request node, except for the URL address (I put https://rest.uniprot.org/idmapping/run). But then I have no idea what to put as request body.

Ultimately, I would like to achieve the following:
list of uniprot IDs > list of EnsembleID > query OpenTargets (I suppose a nice example workflow for this one would be: Query GraphQL API – KNIME Hub)

Can you please help me out how to set up the POST request with the POST node?
Thank you very much, I hope I gave enough details.

Hi @lucasig ,

The form data in your curl command is simply a request parameter and with KNIME REST node that should be part of the URL.
e.g.
curl --form 'from=UniProtKB_AC-ID' --form 'to=Ensembl' --form 'ids=P04035' https://rest.uniprot.org/idmapping/run

would be
https://rest.uniprot.org/idmapping/run?from=UniProtKB_AC-ID&to=Ensembl&ids=P04035

You can use string manipulation node to form the url from a list if ids as shown in the example I created for you on the knime hub.

Hope this helps,
Temesgen

2 Likes

@temesgen-dadi thank you so much! Worked like a charm.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.