This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to convert Ensemble Gene IDs to gene symbols or Entrez Gene IDs?

How to convert Ensemble Gene IDs to gene symbols or Entrez Gene IDs?

I am trying to convert Ensemble Gene IDs to Gene symbols, I used biotools onine website to convert but there are some genes did not convert, is there a solution? or other website?

gene symbols mitch ids

2 answers

You can use gget info to get information about Ensembl IDs, including associated gene symbols from a terminal or Python environment.

Example code from terminal:

gget info ENSG00000034713 ENSG00000104853 ENSG00000170296

Python example:

gget.info(["ENSG00000034713", "ENSG00000104853", "ENSG00000170296"])

the way you answer over a dozen of questions with a link instead of a practical answer starts to look like spam

instead of helping the user, your priority appears to be promoting a tool you are an author of.

while it is ok to be a fan of software you wrote, and we love to see authors of the tools contribute to the site here; the proper etiquette and courtesy towards the readers require that you:

  1. disclose that you are suggesting a tool you are an author of (state the conflict of interest)
  2. show the actual solution (provide the utility here where the author asked the question)

Don't just provide a link and do so repeatedly on multiple posts, systematically going over multi-year-old posts just to add that link - that is not what this site was designed for

Please provide the answer that solves the original poster's question.

I'm moving Laura's "answer" to a comment until it is edited with sufficient detail to be a fully formed answer.

I have moved the comment back to an answer.

Hi Istvan,

Thank you for your suggestions. I updated my responses to include example code solving the question. All contributors to the gget program are listed on the GitHub repository linked in every response.

I was unaware that answering older posts was against the site policy - I assumed users would first check if somebody had asked their question before and look at the responses to the original post. I will make sure to follow your guidelines moving forward.

Thank you for making the correction. I have moved the comment back to an answer.

I just to follow up and clarify my statements - it is fine to answer any prior question regardless of its creation date - but we like to see at least a partial solution and not just a link to another website. We don't mind if you post links in addition to the answer.

Think about any knowledge-based resource you visit, Wikipedia, StackOverflow, Quora etc. these are not link collections and link suggestion sites. The same philosophy applies here as well.

Lots of ways to do this. I like the mygene API since it can handle almost any type of ID,

library(mygene)

# Set `fields = "all"` to get all the info available.
df <- queryMany(c("Cdk2", "ENSMUSG00000025358"), fields = c("ensembl.gene", "entrezgene", "symbol"), species = "mouse", size = 1)
df$symbol

Log in to answer this question.