I want to make a geneList for clusterProfiler analysis but I get "error in do.call( cbind lapply(x is.na )) variable names are limited to 10000 bytes"
0
0
Entering edit mode
Emilia ▴ 30
@emiliabaffo
Last seen 2.9 years ago
Argentina, Rosario (Universidad Naciona…

Hello! I have a data frame with differential expression analysis which looks like this

head(DEedgeR)
 ENTREZID logFC
  <chr>    <dbl>
1 10       -2.43
2 18       -1.05
3 20        1.01
4 21        2.29
5 24        2.27
6 25        1.12

I tried creating a geneList arguement like it's described here https://github.com/YuLab-SMU/DOSE/wiki/how-to-prepare-your-own-geneList

geneList = DEedgeR[,2]
names(geneList)= as.character(DEedgeR[,1]) #up until here it was okay
#but when I ran this last part
geneList = sort(geneList, decreasing = TRUE)
#I got this
Error in do.call("cbind", lapply(x, "is.na")) : 
variable names are limited to 10000 bytes

I don't know what's wrong since I followed the same steps which were described on the github resource I cited above. My dataset has over 6400 genes but I guess that's not such an oddly elevated amount in this type of analysis. Also, I tried using the geneList object I created above as an argument for the gseGO function just to see what happened and I got the same error message about the 10000 bytes. Sorry if it's too silly but I really hope someone can help me!

clusterProfiler • 3.2k views
ADD COMMENT
0
Entering edit mode

What if you explicitly set logFC as numeric? Thus: geneList = as.numeric( DEedgeR[,2] )

ADD REPLY
0
Entering edit mode

I tried doing it like that but I got "Error: 'list' object cannot be coerced to type 'double'"

ADD REPLY
1
Entering edit mode

Then it seems to me that your object DEedgeR is not a data frame... (but maybe a tibble?) What does: class(DEedgeR) return?

ADD REPLY
1
Entering edit mode

Thanks! it was in fact a tibble, I first ran the as.data.frame(DEedgeR) command then proceeded to do it as I had already tried above and it worked! Thank you so much, I was so worried about the issue being something about the syntax or the function itself that I hadn't even thought it could be simply an object class problem.

ADD REPLY

Login before adding your answer.

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