View Single Post
Old 07-16-2014, 07:35 AM   #2
Michael Love
Senior Member
Location: Boston

Join Date: Jul 2013
Posts: 333

This is your countData, which has as many rows as genes:

mydata = read.table("matrix.txt", header=TRUE)
col1 <- mydata[,1]
It looks like this will be the colData (sample information table).

ExpDesign = data.frame(row.names=col1, condition=c("C", "C", "C", "A", "A", "A", "B", "B", "B")
...which has as many rows as samples.

So the error comes when you try to name the rows of your colData using the gene names in col1.

You will also get an error later when you try to run
assay( mydata )
because mydata is a data.frame. assay() is a function for getting a matrix from SummarizedExperiment objects. You can just use
as.matrix( mydata )
in order to supply a matrix to DESeqDataSet.
Michael Love is offline   Reply With Quote