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)
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.
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