bitr() doesn't recognize the keys I've entered as valid gene symbols for my organism's database ('SYMBOL').
2
0
Entering edit mode
11 months ago
Medeea ▴ 20

Hello,

In trying to re-run my pathway analysis with a DEG set annotated with gene symbols. I have encountered this error while wanting to retrieve Entrez IDs for clusterProfiler. This is a new error, as I have worked with the same script before.

up.genes.entrez <- clusterProfiler::bitr(up.genes,fromType = "SYMBOL",toType = "ENTREZID",OrgDb = org.Hs.eg.db)
Error in .testForValidKeys(x, keys, keytype, fks) : 
  None of the keys entered are valid keys for 'SYMBOL'. Please use the keys method to see a listing of valid arguments.

I can not figure out why keytype SYMBOL are not recognized as valid gene symbols anymore. I have tried reinstalling or updating the packages and I would be most grateful for additional suggestions.

pathway-analysis clusterProfiler • 1.6k views
ADD COMMENT
1
Entering edit mode

Can you look at your db file? Sometimes symbol is hgnc_symbol.

ADD REPLY
0
Entering edit mode

Please share a reproducible example, we need to know what is up.genes

ADD REPLY
3
Entering edit mode
11 months ago
Basti ★ 2.0k

up.genes should be a vector of gene IDs whereas in your case, up.genes is a tibble with one column.

You should select the column of geneIDs and not the tibble :

up.genes.entrez <- clusterProfiler::bitr(up.genes$Symbol,fromType = "SYMBOL",toType = "ENTREZID",OrgDb = org.Hs.eg.db)

up.genes.entrez
   SYMBOL ENTREZID
1  CCL3L3   414062
2   F13A1     2162
3 ANGPTL4    51129
4    THBD     7056
5    SYN2     6854
6   CXCL3     2921
ADD COMMENT
0
Entering edit mode

Yes, you are correct. It works now, thank you so much!

ADD REPLY
0
Entering edit mode
11 months ago
Medeea ▴ 20

I extract the list of genes from my DEG data set:

head(DEG)

A tibble: 6 × 8

Gene Id` baseMean log2FoldChange lfcSE stat pvalue padj Symbol
<dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <chr>
1 6373 67.7 -2.32 0.310 -7.50 6.28e-14 1.69e-12 CXCL11

up.genes <- DEG[DEG$log2FoldChange > 1 & DEG$padj < 0.05, 8] head(up.genes)

A tibble: 6 × 1

Symbol <chr>
1 CCL3L3 2 F13A1
3 ANGPTL4 4 THBD
5 SYN2
6 CXCL3

There after, with clusterProfiler::bitr(), I would have another column with EntrezID that clusterProfiler::enrichGO() will want in order to do the pathway analysis. Before it worked for several analysis, and now that I am using it again I get this error.

Thank you!

ADD COMMENT

Login before adding your answer.

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