gives more than one ENTREZID for a gene symbol
Entering edit mode
harish • 0
Last seen 10 months ago

I have a list of gene symbols and when I run the code in r as given below. Just for the two gene symbols TEC and MEMO1, I get two different entrezID. This makes my list output list longer than my input list, further how to resolve this, and can a gene symbol have two Entrez ID.


HGNC_symbol <- c("TEC", "MEMO1")

conversion <- AnnotationDbi::select(, 
       keys = HGNC_symbol,
       columns = c("ENTREZID", "SYMBOL"),
       keytype = "SYMBOL") AnnotationDbi • 1.2k views
Entering edit mode

ok I understand the trouble here, when I look up for the ENTREZID that I get in the output, I can see that both of the ENTREZID retrieve two different genes, with the same gene symbol for them in NCBI. However, one is approved by the HGNC, and the other is not approved. How can I tell AnnotationDbi to consider my gene symbols as the once approved by HGNC when I retrieve the data for ENTREZID? it is much clear if you look for MEMO1 in NCBI.

Bottom line is, is there a way to specify gene symbols as HGNC gene symbols in AnnotationDbi??

Entering edit mode
Last seen 10 hours ago
United States

There is no way to specify the source of gene symbols for an OrgDb. For TEC, one comes from HGNC, and the other comes from OMIM. When we generate the OrgDb packages, we don't distinguish between sources, as they are all (as far as NCBI is concerned) 'real' gene symbols. Unfortunately, gene symbols are not unique, and come from different sources (and get retired regularly), so one would ideally not use them for anything but presenting data to a biologist, for whom the gene symbol is usually the primary ID.

The easy way to get around this is to use mapIds instead.

> z <- mapIds(, c("TEC", "MEMO1"), "ENTREZID","SYMBOL")
'select()' returned 1:many mapping between keys and columns
> data.frame(ENTREZID = z, SYMBOL = names(z))
TEC       7006    TEC
MEMO1     7795  MEMO1

But do note this is a naive implementation that simply chooses the first choice for each symbol

> mapIds(, c("TEC", "MEMO1"), "ENTREZID","SYMBOL", multiVals = "list")
'select()' returned 1:many mapping between keys and columns
[1] "7006"      "100124696"

[1] "7795"  "51072"
Entering edit mode

To follow up on this, we use the gene_info.gz file from NCBI, parsing out the gene ID and symbol, which are the second and third columns. There is also an eleventh column called 'Symbol from nomenclature authority'

$ zcat gene_info.gz | awk -F '\t' '{ if($1 == 9606 && ($2 == 7795 || $2 == 51072)) print $2"\t"$3"\t"$11}'
7795    MEMO1   -
51072   MEMO1   MEMO1

## and

$ zcat gene_info.gz | awk -F '\t' '{ if($1 == 9606 && ($2 == 7006 || $2 == 100124696)) print $2"\t"$3"\t"$11}'
7006    TEC TEC
100124696   TEC -

## and

$ zcat gene_info.gz | awk -F '\t' '{ if($1 == 9606 && $11 == "-" && $3 != "-") print}' | wc -l
$ zcat gene_info.gz | awk -F '\t' '{ if($1 == 9606 && $11 != "-") print}' | wc -l
$ zcat gene_info.gz | awk -F '\t' '{ if($1 == 9606 && $11 == $3) print}' | wc -l

So there are tons of genes with symbols that aren't from the nomenclature authority that people might want to use. Plus 37 where the symbol and the nomenclature symbol don't agree.


Login before adding your answer.

Traffic: 512 users visited in the last hour
Help About
Access RSS

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

Powered by the version 2.3.6