Clusterprofiler error: No gene can be mapped
1
1
Entering edit mode
4.7 years ago
tianshenbio ▴ 180

I am using the enricher function of clusterprofiler for GO enrichment of my non-model organism.

First I have my DE genes (n=638, converted as character):

gene <- read.csv("list.csv", header = F,sep=",")
gene <- as.character(gene[,1])
head(gene)
[1] "BANY.1.2.t20473" "BANY.1.2.t12787" "BANY.1.2.t10473" "BANY.1.2.t10472"
[5] "BANY.1.2.t08098" "BANY.1.2.t04432"

Then I have the term2gene:

term2gene <- read.csv("GO2gene.csv",header=F,sep=",")
head(term2gene)
          V1               V2
1 GO:0002119  BANY.1.2.t15918
2 GO:0003916  BANY.1.2.t01379
3 GO:0005344  BANY.1.2.t10849
4 GO:0005344  BANY.1.2.t10852
5 GO:0005344  BANY.1.2.t10851
6 GO:0005344  BANY.1.2.t11738

and also term2name:

term2name <- read.csv("GO2name.csv",header=F,sep=",")
head(term2name)
          V1                                                       V2
1 GO:0000001                                mitochondrion inheritance
2 GO:0000002                         mitochondrial genome maintenance
3 GO:0000003                                             reproduction
4 GO:0000006    high-affinity zinc transmembrane transporter activity
5 GO:0000007 low-affinity zinc ion transmembrane transporter activity
6 GO:0000009                   alpha-1,6-mannosyltransferase activity

Then run it:

x <- enricher(gene,TERM2GENE=term2gene,TERM2NAME=term2name,pvalueCutoff = 0.05, pAdjustMethod = "BH",qvalueCutoff = 0.1)

And I got this...

--> No gene can be mapped....
--> Expected input gene ID:  BANY.1.2.t09827, BANY.1.2.t01112, BANY.1.2.t16389, BANY.1.2.t23551, BANY.1.2.t13938, BANY.1.2.t11911
--> return NULL...

Everything seems fine so I really hope to know what the problem is, thank you.

RNA-seq GO enrichment R GO clusterProfiler • 17k views
ADD COMMENT
0
Entering edit mode

Are these gene identifiers official gene symbols? Is your species supported by the tool?

ADD REPLY
0
Entering edit mode

No, they are not, thats why I used enricher since that's for my customized datasets

ADD REPLY
0
Entering edit mode

Thank you for your help, I try today,but it seems not work as we excepted.And I wonder if "\" is right ?I'm I used RStudio to analysis my data.And it give me an error like this "Trailing backslash".T-T

ADD REPLY
3
Entering edit mode
4.7 years ago
MatthewP ★ 1.4k

Hello, can you run intersect(term2gene$V2, gene) ? Maybe no gene hit by any pathway.

ADD COMMENT
0
Entering edit mode

Hi, it shows character(0)...But I searched several genes manually and they did exist in term2gene$V2, what could be the problem?

ADD REPLY
2
Entering edit mode

Maybe try print(head(term2gene$V2), quote=TRUE) to see whether maybe some spaces around your string.

ADD REPLY
1
Entering edit mode

You are right...a space ahead of each term...

print(head(term2gene$V2), quote=TRUE)
[1] " BANY.1.2.t15918" " BANY.1.2.t01379" " BANY.1.2.t10849" " BANY.1.2.t10852"
[5] " BANY.1.2.t10851" " BANY.1.2.t11738"
ADD REPLY
0
Entering edit mode

This solved it?

ADD REPLY
1
Entering edit mode

Yes, space was introduced in front of each term, when I removed it everything went well!

ADD REPLY
0
Entering edit mode

Excuse me,I dont know how to remove space.Could you show the method you use in this problem?Thank you !

ADD REPLY
0
Entering edit mode
sub('^\\ ', '', c(' BANY.1.2.t15918', ' BANY.1.2.t01379'))
[1] "BANY.1.2.t15918" "BANY.1.2.t01379"

^ is a special character that matches the beginning of a string [of text]. The two \\ are needed to properly indicate a character space.

ADD REPLY
0
Entering edit mode

In my case, I was using a data frame as input instead of a character vector. I did not think about checking the input until I saw this comment.

ADD REPLY

Login before adding your answer.

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