Hello,
Hope you are all well. I am running into an error and I'm not sure what it means. It seems that it is telling me that I am missing rownames, but when I rownames(dds), it returns a list of gene names. This is a paired study: each subject has two samples (pre/post). I am interested in estimating the average treatment effect within each diagnostic category.
dds <- DESeqDataSetFromMatrix(countData = countdata,
colData = phenotype,
design = ~ treatment)
#filter data
dds <- dds[idx,]
#we need to group each study_id within each "responder" category so DESeq measures the average this way
phenotype$deseq_study <- c(1,1,2,2,3,3,4,4,1,1,2,2,5,5,6,6,3,3,4,4,5,5,7,7,6,6,8,8,9,9,10,10,11,11,7,7,12,12,8,8,13,13,9,9,10,10,11,11,14,14,12,12,13,13,15,15,14,14,16,16,17,17,18,18,19,19,20,20)
#create the model matrix
ddsMF <- model.matrix(~diagnosis + diagnosis: deseq_study + diagnosis:treatment + SV1 + SV2,data=phenotype)
#remove individuals who do not exist in our dataset
ditch <- c("diagnosisHC:deseq_study20","diagnosisHC:deseq_study19","diagnosisHC:deseq_study18","diagnosisHC:deseq_study17",
"diagnosisHC:deseq_study16","diagnosisHC:deseq_study15")
ddsMF <- ddsMF[,!colnames(ddsMF) %in% ditch]
#run deseq
ddsMat <- DESeq(dds, full=ddsMF, betaPrior = FALSE)
using supplied model matrix
estimating size factors
Error in `rownames<-`(`*tmp*`, value = names(x)) :
missing values not allowed in rownames