clusterProfiler - custom annotations
1
0
Entering edit mode
adam • 0
@ca690993
Last seen 24 months ago
United States

Hello,

I am trying to perform enrichment analysis using custom annotations. I have a gene list of symbols and a TERM2GENE which is a dataframe where the first column is the custom annotation ID and the second column is the associated gene in symbol format. I also have a TERM2NAME file which is the annotation ID and a descriptor. I had assumed that the format of the gene ID (entrezID vs. gene symbol) wouldn't matter since I am supplying the TERM2GENE list in the same format. However, when I try to run this I get the following error. I have also tried converting the symbol to entrezID, just to make sure that wasn't the problem, and get the same error.

--> No gene can be mapped.... --> Expected input gene ID: fbxw11a,cebpa,nos2a,ndel1b,ndel1a,caspa --> return NULL...

Any help would be greatly appreciated.

Code should be placed in three backticks as shown below

Example truncated code

GeneList <- data.frame(geneID = c("a2ml","abcb6a", "abcb7", "abi3bpb"))

T2G -> data.frame(TermID = c("ZFA:0000084", "ZFA:0001399", "ZFA:0000114", "ZFA:0000124"), geneID = c("a2ml","abcb6a", "abcb7", "abi3bpb"))

result -> enricher(GeneList, TERM2GENE = T2G)



# include your problematic code here with any corresponding output 
# please also include the results of running the following in an R session 

sessionInfo( )
clusterProfiler • 3.4k views
ADD COMMENT
0
Entering edit mode
Guido Hooiveld ★ 4.1k
@guido-hooiveld-2020
Last seen 11 hours ago
Wageningen University, Wageningen, the …

The argument (content) used for gene should be a (character) vector, but yours is a data.frame.

Upon fixing that, it works... the error that is appearing now is to be expected.

> library(clusterProfiler)
> 
> GeneList <- data.frame(geneID = c("a2ml","abcb6a", "abcb7", "abi3bpb"))
> 
> T2G <- data.frame(TermID = c("ZFA:0000084", "ZFA:0001399", "ZFA:0000114", "ZFA:0000124"), geneID = c("a2ml","abcb6a", "abcb7", "abi3bpb"))
> 
> result <- enricher(gene = GeneList, TERM2GENE = T2G)
--> No gene can be mapped....
--> Expected input gene ID: a2ml,abcb7,abi3bpb,abcb6a
--> return NULL...
> 
> class(GeneList)
[1] "data.frame"
> 
> class(GeneList$geneID)
[1] "character"
> 
> result <- enricher(GeneList$geneID, TERM2GENE = T2G)
No gene sets have size between 10 and 500 ...
--> return NULL...
> 
ADD COMMENT

Login before adding your answer.

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