Question: clusterProfiler: Input file format
0
gravatar for Mike
3.1 years ago by
Mike1.3k
UK
Mike1.3k wrote:

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 • 2.2k views
ADD COMMENTlink modified 3.1 years ago by Jean-Karim Heriche19k • written 3.1 years ago by Mike1.3k
2
gravatar for Jean-Karim Heriche
3.1 years ago by
EMBL Heidelberg, Germany
Jean-Karim Heriche19k wrote:

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 COMMENTlink modified 3.1 years ago • written 3.1 years ago by Jean-Karim Heriche19k

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 REPLYlink modified 3.1 years ago by genomax68k • written 3.1 years ago by Mike1.3k
1

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 REPLYlink written 3.1 years ago by Jean-Karim Heriche19k

Thanks a lot, Jean-Karim Heriche,

it works now

ADD REPLYlink written 3.1 years ago by Mike1.3k

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

ADD REPLYlink written 3.1 years ago by WouterDeCoster39k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 954 users visited in the last hour