Question: biomart R code cannot retrieve gene symbol
2
gravatar for emmak
17 months ago by
emmak20
emmak20 wrote:

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

 

 

ADD COMMENTlink written 17 months ago by emmak20
Answer: C: biomart R code cannot retrieve gene symbol
4
gravatar for JP Carter
17 months ago by
JP Carter40
Nashville, TN
JP Carter40 wrote:

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 COMMENTlink modified 17 months ago • written 17 months ago by JP Carter40
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 16.09
Traffic: 105 users visited in the last hour