Question: How to track which protein ID is linked to which gene ID with rentrez
0
gravatar for s_herrera
3.2 years ago by
s_herrera10
s_herrera10 wrote:

I have a bunch of protein IDs and I want to fetch the corresponding coding sequences (CDSs) without loosing the protein ID. I have managed to download the corresponding CDSs, but unfortunately, CDSs IDs are very different from protein IDs in NCBI.

I have the following R code:

library(rentrez)
Prot_ids <- c("XP_012370245.1","XP_004866438.1","XP_013359583.1")
links <- entrez_link(dbfrom="protein", db="nuccore", id=Prot_ids, by_id = TRUE)

And then, I used this command to "match" protein IDs with CDS IDs:

lapply(links2, function(x) x$links$protein_nuccore_mrna)

[[1]]
[1] "820968283"

[[2]]
[1] "861491027"

[[3]]
[1] "918634580"

However, as you can see the argument 'by_id=TRUE' just make a list of three elink objects but now I have lost the protein IDs.

I would want something like:

Protein ID XP_012370245.1 XP_004866438.1 XP_013359583.1
CDS ID XM_004866381.2 XM_012514791.1 XM_013504129.1

Any suggestion is very welcome, thanks!!

rentrez R ncbi • 920 views
ADD COMMENTlink written 3.2 years ago by s_herrera10
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 632 users visited in the last hour