Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

own genelist; too dump top proceed #55

Open
mocherry opened this issue Oct 20, 2021 · 3 comments
Open

own genelist; too dump top proceed #55

mocherry opened this issue Oct 20, 2021 · 3 comments

Comments

@mocherry
Copy link

Dear Clusterprofiler-Team,

being quite new to R I am struggling with the following problem:
I have prepared a comma-delimited Excel file (.csv) with gene expression data: first column Gene Symbol, second column FC as described.
It the looks like this (first three rows):
ID,FC
CXCL3,12.95135115
MMP3,12.40100107
IL6,11.1025565

Then I run:
d <- read.csv("C:/users/kirsch/Desktop/clusterprofiler.csv")
geneList = d[,2]
names(geneList) = as.character(d[,1])
geneList = sort(geneList, decreasing = TRUE)
gene <- names(geneList)[abs(geneList) > 2]
ggo <- groupGO(gene = gene,
OrgDb = org.Hs.eg.db,
ont = "CC",
level = 3,
readable = TRUE)

#and get the error: Error in .testForValidKeys(x, keys, keytype, fks) :
None of the keys entered are valid keys for 'ENTREZID'. Please use the keys method to see a listing of valid arguments

I guess I miss something important or just do not understand enough to solve the problem. Maybe someone can help.
Thanks and ebst,
Matthias

@huerqiang
Copy link
Contributor

Use ?groupGO to get the doc of this function. Since your gene id is gene symbol, you should add the parameter: keyType = SYMBOL .

@mocherry
Copy link
Author

Dear Huerqiang,

I have added keyType = "SYMBOL" to the script:

d <- read.csv("C:/users/kirsch/Desktop/clusterprofiler.csv")
geneList = d[,2]
names(geneList) = as.character(d[,1])
geneList = sort(geneList, decreasing = TRUE)
gene <- names(geneList)[abs(geneList) > 2]
ggo <- groupGO(gene = gene,
OrgDb = org.Hs.eg.db,
keyType = "SYMBOL",
ont = "CC",
level = 3,
readable = TRUE)

and get the following error:
Error in names(x) <- value :
'names' attribute [2] must be the same length as the vector [1]

The geneList produced by this script looks like this:
Type value
CxCL3 double(1) 12.95135

I really do not know where to start to solve this. Admittedly, I am rather inexperienced with R and new to ClusterProfiler.

Help would really be appreciated,
Matthias

@huerqiang
Copy link
Contributor

Please send the "clusterprofiler.csv" file to me: [email protected], and I will give the suitable code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants