create DGElist Object
1
0
Entering edit mode
@nasersadri-20416
Last seen 22 months ago

How can I correct this error in creating DGElist Object???

 > library(edgeR)
> y <- DGEList(counts=rawdata[,4:9], genes=rawdata[,1:3])
## Error in colSums(counts) : 'x' must be numeric

edger DGElist • 1.0k views
ADD COMMENT
0
Entering edit mode

Can you please run the following command and show us the output:

head(rawdata)

ADD REPLY
0
Entering edit mode
@gordon-smyth
Last seen 1 hour ago
WEHI, Melbourne, Australia

Well, the error message pretty much tells you what the problem is. The raw data you are inputting to DGEList as counts contain entries that are not numbers. This might occur, for example, if rawdata is a data.frame that you have read from a file and the file contains annotation columns as well as counts. The code you are using assumes that the first 3 columns are annotation but apparently you actually have more than 3 annotation columns.

I am guessing that you have copied code from page 44 of the edgeR User's Guide. It is good that you are using the example case study as a guide for your own analysis, but you have to adapt the code to your own data rather than use it verbatim. If your data has more than 3 columns of annotation, then you have to change the column numbers appropriately.

Having a look at rawdata would immediately show which columns are counts and which are not. You have chosen not to respond to my question of 13 hours ago but I encourage you to have a closer look at your data input yourself even if you don't want to show it on a public web site.

ADD COMMENT

Login before adding your answer.

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