This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Error when running edgeR

Hello!

I am running edgeR on my rna-seq data. I got my read counts from salmon quantification. I am able to read in my file but i am getting stuff on the DGEList function. I have been running the command

y<-DGEList(counts=raw.data,  group=Group)

but i keep getting this error

"Error in .isAllZero(counts) :
  count matrix must be integer or double-precision".

Here is my script up until then

library(edgeR)
raw.data<-read.csv("newMuscle.csv", header=TRUE, sep="\t", row.names=NULL, quote="", skipNul=TRUE, comment.char="", encoding="latin1")
names<- c("1499","1500","1502","1515","1984","2066","2110","9089","9094","9101","9223","1499","1500","1502","1515","1984","2066","2110","9089","9094","9101","9223")
type<- factor(c("BF", "BF", "BF", "BF", "BF", "BF", "BF", "BF", "BF", "BF", "BF","LD", "LD", "LD", "LD", "LD", "LD", "LD", "LD", "LD", "LD", "LD"))
treat<- factor(c("control","zilmax","control","control","zilmax","control","control","zilmax","zilmax","zilmax","zilmax","control","zilmax","control","control","zilmax","control","control","zilmax","zilmax","zilmax","zilmax"))
targets<-data.frame(names,type,treat)
Group<-factor(paste(targets$type,targets$treat,sep="."))
cbind(targets,Group=Group

I have googled the error but nothing i have tried has worked.

Thanks for the help!

rna-seq

I added code markup to your post for increased readability. You can do this by selecting the text and clicking the 101010 button. When you compose or edit a post that button is in your toolbar, see image below:

101010 Button

2 answers

This is frequently asked question, see:

error while making a DegList object on R using edgeR package (Error in colSums(counts) : 'x' must be numeric)

Hi,

isAllZero throws an error if NA or negative counts are present. I would check raw.data

is.na(raw.data) || raw.data < 0

If TRUE, something may went wrong during the reading of the table.

Log in to answer this question.