clusterProfiler: Input file format
1
0
Entering edit mode
8.5 years ago
Mike ★ 1.9k

Hi All,

I'm using clusterProfiler but not able to run enrichGO on my datasets.

my Input data is like this:

gene entrez logFC P.Value q_value

ABR 29 -1.11808 0.01825 0.852004

ADAT3 113179 -0.0875548 0.9431 0.999156

AMDHD2 51005 -0.864244 0.3177 0.999156

ASNA1 439 -0.354129 0.53285 0.999156

ASPSCR1 79058 -0.255376 0.7536 0.999156

I want to use following commands:

library(clusterProfiler)

data(geneList)

gene <- names(geneList)[abs(geneList) > 2]

 ego <- enrichGO(gene= gene,universe= names(geneList),OrgDb= org.Hs.eg.db,ont= "CC",  pAdjustMethod = "BH", pvalueCutoff  = 0.01,qvalueCutoff  = 0.05, readable= TRUE)

cnetplot(ego, categorySize="pvalue", foldChange=geneList)

I went through clusterProfiler tutorial, but could not find about input file.

so how can I modify above code for my data.

Thanks,

gene • 6.6k views
ADD COMMENT
2
Entering edit mode
8.5 years ago

Where is your problem ? Do you get any error ? The enrichGO() function takes as input a vector of Entrez gene IDs. So make sure that your gene variable is such a thing. Your code looks wrong. You probably want something like:

data<-read.delim("input.txt") # Assuming your file is tab-delimited
genes<-data$entrez[abs(data$logFC)>2]
ego<-enrichGO(gene=genes....)

EDIT: Use data$entrez to get the right column.

ADD COMMENT
0
Entering edit mode

Thanks,

Im using same command, but got following errors

data<-read.delim("input.txt") 

genes<-data$gene[abs(data$logFC)>2]

 ego <- enrichGO(genes , organism= "human", ont= "CC",  pAdjustMethod = "BH", pvalueCutoff  = 0.1,qvalueCutoff  = 0.5, readable= TRUE)

 ego

[1] NA

also used

ego <- enrichGO(genes , organism= "human", ont= "CC",  pAdjustMethod = "BH", readable= TRUE)

ego

[1] NA

 cnetplot(ego, categorySize="pvalue", foldChange=genes)

Error in (function (classes, fdef, mtable)  : 

  unable to find an inherited method for function ‘cnetplot’ for signature ‘"logical"’
ADD REPLY
1
Entering edit mode

You need the Entrez gene IDs. I made a mistake in the code I wrote because the IDs are in data$entrez not in data$gene.

ADD REPLY
0
Entering edit mode

Thanks a lot, Jean-Karim Heriche,

it works now

ADD REPLY
0
Entering edit mode

can you check whether your variable 'genes' is what you expect it to be by printing it?

ADD REPLY

Login before adding your answer.

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