I have missing samples in my interaction design, so I followed the tutorial to get rid of missing samples:
m1 = model.matrix(~Strain + Condition + Strain:Condition, meta)
all.zero <- apply(m1, 2, function(x) all(x==0))
idx <- which(all.zero)
m1 <- m1[,-idx]
But now I'm not sure how to supply this to create a DESeq object? Ive tried suppliying it to the design argument but get an error
dds <- DESeqDataSetFromMatrix(countData = raw_counts,
colData = meta,
design = m1)
I can create the object using a different design, but then how do i replace the design with the correct model matrix?
I might be confusing design
and model.matrix
, if so can somebody clarify?
I notice that DESeq() accepts a `modelMatrixType` argument, but not `modelMatrix` argument?