Error In Deseq2 Analysis
1
0
Entering edit mode
7.4 years ago
511866357 • 0

Hello,

I have RNA-seq data, which I am trying to analyze with DESeq2,However, when I try

ddsFullCountTable <- DESeqDataSetFromMatrix(countData = new_data, colData = design , design = ~condition)

I get the following error message:

Error in DESeqDataSet(se, design = design, ignoreRank) : some values in assay are not integers

Does anyone have a way to make my data integer? As you can see, the data are in fact integers.

Thanks, xue

RNA-Seq • 5.7k views
ADD COMMENT
1
Entering edit mode
7.4 years ago

I am sorry to say that we don't see any data

Run the following into R (I assume your data is included into the se data.frame)

sapply(se, class)

And then you can check whether your data is actually integers or not. In addition. Notice that DESeq2 is expecting integers. That means your numeric data cannot contain decimals (not floating numeric data)

ADD COMMENT
0
Entering edit mode

Thanks for your answer.In fact I was running an R script, args<-commandArgs(T)

args1 raw_count_table

args2 conditions

args3 condition1 name , condition2 name

args4 outdir

read raw count table

new_data=read.table(args[1],header=T,row.names=1)

read condition

design=read.table(args[2],header=T,row.names=1) print(design) cmp = unlist(strsplit(args[3],',')) print(cmp) library(DESeq2) library(gplots)

dd=which(design$condition==cmp[1] | design$condition==cmp[2])

print(dd)

new_data = data[,dd]

print('generate DEseq object') ddsFullCountTable <- DESeqDataSetFromMatrix(countData = new_data, colData = design , design = ~condition) dds = DESeq(ddsFullCountTable) res = results(dds , contrast = c("condition",cmp[1],cmp[2]))

file_name = paste(cmp[1],cmp[2],"transcript.xls",sep="_") abs_file_name = paste(args[4],file_name,sep="/") write.table(res,file=abs_file_name,sep="\t", quote = FALSE, row.names = TRUE)

when I try

ddsFullCountTable <- DESeqDataSetFromMatrix(countData = new_data, colData = design , design = ~condition)

I get the error message. But My data is an integer.

                                                                                 Look forward to your reply 
                                                                                        xue
ADD REPLY
0
Entering edit mode

run the sapply command I told you

The args() function tells you what can you include in that function, but it does not check the class of the data you have in your data.frame.

Chances are that you do not have integers some place, maybe because they have been coerced to another kind of data

I included the "se" name with the assumption that this is the actual name of your data.frame. Substitute that name for the actual one

ADD REPLY

Login before adding your answer.

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