Answers.Body: <p>I used <a href="http://biit.cs.ut.ee/gprofiler/gconvert.cgi" rel="nofollow noreferrer">gProfileR</a> where there are no problematic IDs with that. It converted ENSEMBL IDs to Gene_symbols and made my work easier with GO analysis too. There is an R package and also API.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-29T09:29:32.170Z
Answers.Text: could you post a code snippet? or is it trivial?
Answers.UserDisplayName: mgalardini
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-29T11:19:49.353Z
Answers.Text: Here is the reference manual for gProfileR [https://cran.r-project.org/web/packages/gProfileR/gProfileR.pdf]
Answers.UserDisplayName: stack_learner
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-29T08:09:53.253Z
Answers.LastActivityDate: 2017-08-29T18:58:59.800Z
Answers.LastEditDate: 2017-08-29T18:58:59.800Z
Answers.UserDisplayName: stack_learner
Answers.Body: <p>It looks like you were using an old annotation. The problematic IDs you posted existed in the GRCh37 annotations, but don't in the most recent GRCh38 annotation. For that reason they were excluded. The IDs that have <code>-</code> as symbols don't have associated symbols, but are present in the database.</p>
  
  <p>To use an archived version in biomart:</p>
  
  <pre><code>mart = useDataset("hsapiens_gene_ensembl", useEnsembl(biomart="ensembl", version=84))
  </code></pre>
  
  <p>That's an example for release 84.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-25T12:11:57.807Z
Answers.Text: biomaRt will return `NA` for genes that are in the database, but don't have symbols.
Answers.UserDisplayName: Ian Sudbery
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-25T12:13:43.450Z
Answers.Text: @IanSudbery Yeah, I'm assuming that OP replaced `NA` with `-` at some point.
Answers.UserDisplayName: Devon Ryan
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-25T12:15:27.667Z
Answers.Text: As you said, I thought the same that the problematic ID's are existed in GRCh37. And tried with that too. And among 3224, I found only 3089 in the results.
Answers.UserDisplayName: stack_learner
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-25T12:19:55.867Z
Answers.Text: Those IDs existed in the GRCh38 release 78 annotation (just checked a local GTF), so perhaps they're still GRCh38, but just an older release of it.
Answers.UserDisplayName: Devon Ryan
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-25T12:30:23.433Z
Answers.Text: I actually did it in this way. install.packages("devtools")
  devtools::install_github("stephenturner/annotables")
  library(dplyr)
  library(annotables)
  grch38
Answers.UserDisplayName: stack_learner
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-25T12:30:57.510Z
Answers.Text: So `ENSG00000257061` was last seen in ENSEMBL 84 (you can look this up by searching on the ENSEMBL website). You need to search against the exact same version as you got your gene list from. Replace `useMart` with `useEnsembl(version=X)` where X is the version of ensembl you used to generate the gene list.
Answers.UserDisplayName: Ian Sudbery
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-25T12:53:33.003Z
Answers.Text: So...can anyone of you please tell how can I use the latest version in the above code? or Is there any R package for biodbnet?
Answers.UserDisplayName: stack_learner
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-25T13:04:12.647Z
Answers.Text: @user3351523 I've updated my answer. The biodbnet question should be a separate post.
Answers.UserDisplayName: Devon Ryan
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-25T13:07:05.347Z
Answers.Text: Just by-the-by, I'm going to guess that any ID that has been retired is unlikely to map to a HGNC symbol.
Answers.UserDisplayName: Ian Sudbery
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-25T15:06:34.913Z
Answers.Text: @DevonRyan With the above mentioned version 84 I got 3220 now. Still 4 ids missing.
Answers.UserDisplayName: stack_learner
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-25T16:29:52.117Z
Answers.Text: Try version 83 then.
Answers.UserDisplayName: Devon Ryan
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-25T16:37:15.620Z
Answers.Text: @user3351523, you have to use the same ensembl version as was used for generating your genes object, or you'll never get 100% conversion.
Answers.UserDisplayName: Ian Sudbery
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-29T08:12:34.697Z
Answers.Text: I used "gProfileR". There are no problematic IDs with that. It converted ENSEMBL IDs to Gene_symbols and made my work easier with GO analysis too. There is an R package and also API. Thank you all for the help !!
Answers.UserDisplayName: stack_learner
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-25T12:10:40.503Z
Answers.LastActivityDate: 2017-08-25T13:03:35.240Z
Answers.LastEditDate: 2017-08-25T13:03:35.240Z
Answers.UserDisplayName: Devon Ryan
Body: <p>I have 3224 Ensembl id's as rownames in a dataframe "G". To convert Ensembl ids into Genesymbols I used biomart like following.</p>
  
  <pre><code>library('biomaRt')
  mart &lt;- useDataset("hsapiens_gene_ensembl", useMart("ensembl"))
  genes &lt;- rownames(G)
  G &lt;-G[,-6]
  G_list &lt;- getBM(filters= "ensembl_gene_id", attributes= c("ensembl_gene_id","hgnc_symbol"),values=genes,mart= mart)
  </code></pre>
  
  <p>Now in G_list I can see only 3200 ensembl ids showing Genesymbols / No Gene_symbols. Why the other 24 ensembl ids are not seen in G_list? If there are no gene_symbol for those 24 ensembl ids it should atleast show "-"</p>
  
  <p>Examples of problematic IDs are: ENSG00000257061, ENSG00000255778, ENSG00000267268. These are not at all shown in G_list (biomaRt). So, I gave them in biodbnet, which seems to handle them.</p>
  
  <p>what is the problem here?</p>
  
Tags: <r><bioconductor><biomart><ensembl>
Title: Ensembl id to GeneSymbol with biomart
ThreadText: # Ensembl id to GeneSymbol with biomart
  
  (Asked by: username_0 on 2017-08-25)
  
  I have 3224 Ensembl id's as rownames in a dataframe "G". To convert Ensembl ids into Genesymbols I used biomart like following.
  
  ```
  library('biomaRt')
  mart <- useDataset("hsapiens_gene_ensembl", useMart("ensembl"))
  genes <- rownames(G)
  G <-G[,-6]
  G_list <- getBM(filters= "ensembl_gene_id", attributes= c("ensembl_gene_id","hgnc_symbol"),values=genes,mart= mart)
  
  ```
  
  Now in G\_list I can see only 3200 ensembl ids showing Genesymbols / No Gene\_symbols. Why the other 24 ensembl ids are not seen in G\_list? If there are no gene\_symbol for those 24 ensembl ids it should atleast show "-"
  
  Examples of problematic IDs are: ENSG00000257061, ENSG00000255778, ENSG00000267268. These are not at all shown in G\_list (biomaRt). So, I gave them in biodbnet, which seems to handle them.
  
  what is the problem here?
  
  **Tags:** r, bioconductor, biomart, ensembl
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2017-08-29. Score: 2 | Accepted answer
  
  I used [gProfileR](http://biit.cs.ut.ee/gprofiler/gconvert.cgi) where there are no problematic IDs with that. It converted ENSEMBL IDs to Gene\_symbols and made my work easier with GO analysis too. There is an R package and also API.
  
  > **Comments:**
  > **username_1**: could you post a code snippet? or is it trivial?  
  > **username_0**: Here is the reference manual for gProfileR [https://cran.r-project.org/web/packages/gProfileR/gProfileR.pdf]  
  
  ---
  
  ### Answer by username_2 on 2017-08-25. Score: 6
  
  It looks like you were using an old annotation. The problematic IDs you posted existed in the GRCh37 annotations, but don't in the most recent GRCh38 annotation. For that reason they were excluded. The IDs that have `-` as symbols don't have associated symbols, but are present in the database.
  
  To use an archived version in biomart:
  
  ```
  mart = useDataset("hsapiens_gene_ensembl", useEnsembl(biomart="ensembl", version=84))
  
  ```
  
  That's an example for release 84.
  
  > **Comments:**
  > **username_3**: biomaRt will return `NA` for genes that are in the database, but don't have symbols.  
  > **username_2**: @username_3 Yeah, I'm assuming that OP replaced `NA` with `-` at some point.  
  > **username_0**: As you said, I thought the same that the problematic ID's are existed in GRCh37. And tried with that too. And among 3224, I found only 3089 in the results.  
  > **username_2**: Those IDs existed in the GRCh38 release 78 annotation (just checked a local GTF), so perhaps they're still GRCh38, but just an older release of it.  
  > **username_0**: I actually did it in this way. install.packages("devtools") devtools::install_github("stephenturner/annotables") library(dplyr) library(annotables) grch38  
  > **username_3**: So `ENSG00000257061` was last seen in ENSEMBL 84 (you can look this up by searching on the ENSEMBL website). You need to search against the exact same version as you got your gene list from. Replace `useMart` with `useEnsembl(version=X)` where X is the version of ensembl you used to generate the gene list.  
  > **username_0**: So...can anyone of you please tell how can I use the latest version in the above code? or Is there any R package for biodbnet?  
  > **username_2**: @user3351523 I've updated my answer. The biodbnet question should be a separate post.  
  > **username_3**: Just by-the-by, I'm going to guess that any ID that has been retired is unlikely to map to a HGNC symbol.  
  > **username_0**: @username_2 With the above mentioned version 84 I got 3220 now. Still 4 ids missing.  
  > **username_2**: Try version 83 then.  
  > **username_3**: @user3351523, you have to use the same ensembl version as was used for generating your genes object, or you'll never get 100% conversion.  
  > **username_0**: I used "gProfileR". There are no problematic IDs with that. It converted ENSEMBL IDs to Gene_symbols and made my work easier with GO analysis too. There is an R package and also API. Thank you all for the help !!  
  
  ---
  
  