biomart R code cannot retrieve gene symbol
1
2
Entering edit mode
emmak ▴ 20
@emmak-14917
Last seen 4.5 years ago

Could you please let me know what I miss in this code ? It couldn't retrieve the symbol for ENSG00000275038, while the web interface returned AC091980.2. It works for most of genes but returns NA for a few genes.  Thanks for your help!

ensembl <- useMart("ensembl",dataset="hsapiens_gene_ensembl")  
getBM(attributes=c('ensembl_gene_id','hgnc_symbol'),
        filters = 'ensembl_gene_id', values = "ENSG00000275038", mart = ensembl)

  ensembl_gene_id hgnc_symbol
1 ENSG00000275038          NA

 

 

biomart ensemblbiomart ensemble mart • 726 views
ADD COMMENT
4
Entering edit mode
JP Carter ▴ 40
@jp-carter-15371
Last seen 4 days ago
Nashville, TN

The "AC091980.2" is the gene name, not its symbol.   To retrieve the name, here is the updated code:

getBM(attributes=c('ensembl_gene_id','hgnc_symbol','external_gene_name'),
      filters = 'ensembl_gene_id', values = "ENSG00000275038", mart = ensembl)

Note the addition of the "external_gene_name" attribute.

For your particular entry, there does not seem to be a gene symbol. If you look at another entry, for example - http://useast.ensembl.org/Homo_sapiens/Gene/Summary?db=core;g=ENSG00000139515;r=13:27920020-27926231;t=ENST00000381033, you'll see under the summary:

"PDX1 (HGNC Symbol)"

In your entry, you'll see:

"AC091980.2 (Clone-based (Ensembl) gene)"

(edited)

ADD COMMENT

Login before adding your answer.

Traffic: 226 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