How to extract gene location from a list of Ensembl Bacteria IDs?
1
0
Entering edit mode
5.2 years ago
biobaker • 0

I am trying to get obtain genomic coordinates for a list of proteins from different species of bacteria. I obtained the IDs through HMMer, on Ensembl's website. Here are a few of them and what they look like:

AAR34000
OEG73082
EQMM11970

I had previously used the lookup endpoint from Ensembl's REST API without any problems. However, now when I try searching with my code that worked in the past, I get 0 hits. Based on what I've seen online, it looks like the issue may be the fact that these IDs are not in the form of Ensembl stable IDs. However, I haven't found a way to convert these IDs to the Ensembl IDs, and it still doesn't explain why I was able to use the lookup function successfully in the past without the stable IDs.

For context, this is the code I'm running from R, where "accs2" is a vector of the IDs listed above:

library(httr)
library(jsonlite)
library(xml2)

server <- "http://rest.ensembl.org"
ext <- "/lookup/id/"


r <- POST(paste(server, ext, sep = ""), 
          content_type("application/json"), 
          accept("application/json"), body = paste0('{ "ids" :', jsonlite::toJSON(accs2), ' }'))


stop_for_status(r)

dbinfo<-fromJSON(toJSON(content(r)))

dbinfo.df<-data.frame(do.call(rbind, lapply(dbinfo, function(x) x[match(names(dbinfo[[1]]), names(x))])))

Is there something I'm missing here?

ensembl rest genomics r • 1.2k views
ADD COMMENT
0
Entering edit mode

I'm looking into this. Two of the IDs you've got are the correct IDs, but something else strange is happening with the endpoints, I tried the get endpoint with the first two IDs like:

http://rest.ensembl.org/lookup/id/AAR34000

And the error is:

--- 
error: Can not find internal name for species 'geobacter_sulfurreducens_pca'

I suspect this is related to how the bacterial species are held in collections, but I need to check with our developers. I will get back to you when I know more.

The third ID EQMM11970 is telling me ID not found. We did a release yesterday and it's possible that this species or identifier is no longer in the database.

ADD REPLY
0
Entering edit mode

Good to know it's not just me, thank you! Given that I originally obtained these IDs through HMMer on Ensembl's website, I am going to give it a run once more to see if the IDs I get out of HMMer will be consistent with the latest release. I'll post my update shortly.

ADD REPLY
4
Entering edit mode
5.2 years ago
Emily 24k

This was an error in Ensembl and is now fixed.

ADD COMMENT

Login before adding your answer.

Traffic: 1905 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6