我在使用R时非常新。我想在DESeq2包中使用de DESeq函数。我试图将我的数据集从文本文件转换为DESeq矩阵。
举个例子:
datafile = "C:\\Users\\589016\\Desktop\\Test.csv"
countTable = read.delim(datafile, sep = ";", header = F)
countTable
V1 V2 V3 V4
b1 1,2 4 40 30
b2 3,2 3,4 50 3,1
b3 4 4,3 20 30,2
b4 5 3 3,2 3,4
b5 3,2 4,5 4 4,1
b6 0 5 2,1 3
b7 4,5 0 3,4 2,1
b8 3 0 0,1 2,1
b9 2 3,2 0,1 0
b10 0,4 0 0,1 1
ExpDesign = data.frame(row.names = colnames(countTable), condition = c("control", "control", "case", "case"))
ExpDesign
condition
V1 control
V2 control
V3 case
V4 case
cds = DESeqDataSetFromMatrix(countData = countTable, colData=ExpDesign$condition, design=~ExpDesign$condition)
然后我收到以下消息:
Error in `rownames<-`(`*tmp*`, value = c("V1", "V2", "V3", "V4")) :
attempt to set 'rownames' on an object with no dimensions
我该怎么办?