DESeq2: error message
1
0
Entering edit mode
whyw6948 • 0
@whyw6948-23037
Last seen 5 days ago
United States

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
deseq2 • 981 views
ADD COMMENT
0
Entering edit mode
Kevin Blighe ★ 3.9k
@kevin
Last seen 11 days ago
Republic of Ireland

Hey,

There seems to be quite a few things going on here, and it seems that you're not providing all information. For example:

  • what is contained in idx and how was it generated?; for what is it filtering? Is it filtering exactly as you expect it to [filter]?
  • your design formula looks overly complex - is it really necessary? These should be kept as simple as possible. Why do you not set the design formula when running DESeqDataSetFromMatrix()?

So, I think that you should re-consider your study design and then go back to the beginning to re-run DESeqDataSetFromMatrix(). Keep it as simple as is feasibly possible so that you can at least get a working example.

If it helps, regarding the rownames issue, what is the output of:

table( is.na(rownames(countdata)) )
table( is.na(rownames(dds)) ) # before the filter
table( is.na(rownames(dds)) ) # after the filter

Kevin

ADD COMMENT

Login before adding your answer.

Traffic: 949 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6