Thanks, the uniprotswissprot seems to be the correct one as it retrieved the right one for every protein in my list (eg. Q8WXI7 and Q9BSC4). Any idea what is the difference? is it possible that with new releases or other protein ids, I might need to check them all? Many thanks again
Hi all,
I'm working with UniProtKB and would like to get the genomic coordinates of list of proteins. To my knowledge, the first step is to retrieve the mapping between uniprot and ensembl via biomaRt:
annotLookup <- getBM(
mart = mart,
attributes = c(
'ensembl_gene_id',
'uniprot_gn_symbol',
'uniprot_gn_id',
'chromosome_name'),
uniqueRows=TRUE)
However, the uniprot id doesn't always exist! So, alternatively I used the gene name. Although that the protein was then found, it has, however, different uniprot id.
For control, I used ID mapping from uniprot to double check, both biomaRt and ID mapping agreed on the same ensembl id. This indeed indicates that here must be a correct mapping between these two.
My question obviously is, how can I map the uniprot id correctly to the ensembl id?
Thank you
1 answer
I wonder if the attribute you actually need is uniprotswissprot rather than uniprot_gn_id. Without some more examples of the IDs you're trying to convert all the answers are a bit of a guess, but that seems to work for P19544
library(biomaRt)
ensembl <- useEnsembl(biomart = "genes", dataset = "hsapiens_gene_ensembl")
protein_id <- "P19544"
getBM(
attributes = c(
'uniprotswissprot',
'ensembl_gene_id',
'chromosome_name',
'start_position',
'end_position'
),
filter = "uniprotswissprot",
value = protein_id,
mart = ensembl
)
#> uniprotswissprot ensembl_gene_id chromosome_name start_position end_position
#> 1 P19544 ENSG00000184937 11 32387775 32435564
Log in to answer this question.
Please provide examples when referring to any kind of IDs.
How about: Using EBI protein API with uniprot isoforms
This should still work: How To Convert Uniprot Ids To Ensemble Gene/Transcript Ids
Thank you, I'm working with list of genes, but take as an example P19544
the method above, doesn't retrieve it either
The following works:
https://www.ebi.ac.uk/proteins/api/genecentric/P19544
OR
If you would rather have JSON then:
A couple of notes:
I've fixed those for you but please be mindful of what important tools in the field are called.