This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Using EBI protein API with uniprot isoforms

I am trying to use the EBI Proteins REST API described here. Specifically, I would like to use the coordinates API to fetch genomic coordinates of a UniProt accession. While using an accession with range such as (Q93077:47-72) works, specifying the UniProt isoform, P84550-3:474-484 for example, does not. Does anyone know if there is a way to query the API with a specific UniProt isoform?

$ curl -X GET --header 'Accept:application/json' 'https://www.ebi.ac.uk/proteins/api/coordinates/location/Q93077:47-72'
{"locations":[{"accession":"Q93077","taxid":9606,"chromosome":"6","ensemblTranslationId":"ENSP00000321389","proteinStart":47,"geneStart":26138280,"proteinEnd":72,"geneEnd":26138357},{"accession":"Q93077","taxid":9606,"chromosome":"6","ensemblTranslationId":"ENSP00000367022","proteinStart":47,"geneStart":26138280,"proteinEnd":72,"geneEnd":26138357},{"accession":"Q93077","taxid":9606,"chromosome":"6","ensemblTranslationId":"ENSP00000473534","proteinStart":47,"geneStart":26138222,"proteinEnd":72,"geneEnd":26138299}]}

$ curl -X GET --header 'Accept:application/json' 'https://www.ebi.ac.uk/proteins/api/coordinates/location/P84550-3:474-484'
{"requestedURL":"https://www.ebi.ac.uk/proteins/api/coordinates/location/P84550-3:474-484","errorMessage":["Can not find coordinates for accession: {P84550-3}"]}
ebi uniprot swiss-prot

1 answer

I believe that API only features the main protein, so https://www.uniprot.org/uniprot/P84550-3 became:

$ curl -X GET --header 'Accept:application/json' 'https://www.ebi.ac.uk/proteins/api/coordinates/location/P84550:474-484'
{"locations":[{"accession":"P84550","taxid":9606,"chromosome":"15","ensemblTranslationId":"ENSP00000369374","proteinStart":474,"geneStart":67827248,"proteinEnd":484,"geneEnd":67827280}]}

Log in to answer this question.