DESeq2: collapseReplicates error
1
0
Entering edit mode
ta_awwad ▴ 10
@ta_awwad-11382
Last seen 5 months ago
Frankfurt am Main

Hi,

I am using DESeq2 to find Differentially expressed genes. I am using the following code:

conds<-c("kd1","kd1","kd2","kd2","GFP","GFP")
Design<-data.frame(condition=conds,row.names=paste(conds,rep(c(1,2),3),sep="_"))​

dds <- DESeqDataSetFromMatrix(countData = assay(se),
                             colData = Design,
                             design = ~ condition)​
ddsCollapsed <- collapseReplicates( dds, groupby = dds$condition)
ddsCollapsed <- DESeq(ddsCollapsed, betaPrior=FALSE)

after running the last line, I get the following:

using pre-existing size factors
estimating dispersions
found already estimated dispersions, replacing these
gene-wise dispersion estimates
mean-dispersion relationship
final dispersion estimates
fitting model and testing
Warning message:
In checkForExperimentalReplicates(object, modelMatrix) :
 
same number of samples and coefficients to fit,
  estimating dispersion by treating samples as replicates.
  read the ?DESeq section on 'Experiments without replicates'

I don't know what is the problem actually..

could anybody help

Best,

Tamer

deseq2 rnaseq differential gene expression • 4.3k views
ADD COMMENT
0
Entering edit mode

Hi Michael,

Hi, I ran the following script on R version 3.2 and everything was fine:

conds<- c("kd1","kd1","kd2","kd2","GFP","GFP")
Design<-data.frame(condition=conds,
                   row.names=paste(conds,rep(c(1,2),3),
                   sep="_"))
dds <- DESeqDataSetFromMatrix(countData = assay(se),
                             colData = Design,
                             design = ~ condition)

however, when I updated R into 3.3 I start getting the following error message:

Error in FUN(X[[i]], ...) :
  assay colnames() must be NULL or equal colData rownames()

I tried to follow many solutions but non of them worked .

can you help?!

thanks much

ADD REPLY
0
Entering edit mode

This says that the column names of the countData are not the same as the rownames of colData.

You should check these yourself to make sure they are in the correct order first. You will see that they are not the same descriptors (or else you wouldn't have gotten this error).

Then to remove the error you can either set one or the other, or remove column names from the countData altogether:

colnames(countData) <- ...

or

rownames(colData) <- ...

or 

colnames(countData) <- NULL
ADD REPLY
0
Entering edit mode

I tried all these but till have the error .. as you see I am new in Bioconductor which makes me frustrated .. the script was fine and now after updating R I am getting this error ,,, anyway, thank you for your help

ADD REPLY
0
Entering edit mode

i solved the problem .. thanks much for your help

ADD REPLY
0
Entering edit mode

just one more question, now I have two tables each contain sigGenes for each kd over GFP .. I would like to cluster (using pheatmap) the count matrices of  reskd1SigGenes and reskd2SigGenes together in one plot.

can you guide me through

thanks a million

ADD REPLY
0
Entering edit mode

"can you guide me through"

No. This is in the DESeq2 vignette and our workflow. You need to take time to read the documentation. You will see that asking others what to do at every step is actually a waste of your own time, and that you can accomplish much more if you read documentation and find answers on your own.

ADD REPLY
0
Entering edit mode

in your recent vignette (published on Sept 3rd), it is not clear at all if one can plot heat map using two different count matrices. I do see that it is easy to do it for single counting matrix.. that why I am asking .. I read all the documentations related to DESeq2..

 

thanks much for your time

 

ADD REPLY
0
Entering edit mode
@mikelove
Last seen 2 days ago
United States

That's not an error, it's a message. Have you read the section in the help page for DESeq()?

You can access it by typing on the command line:

> ?DESeq
ADD COMMENT
0
Entering edit mode

I think it is a problem because when I checked the result saummary i got the following:

res <- results(ddsCollapsed)
summary(res)

out of 12388 with nonzero total read count
adjusted p-value < 0.1
LFC > 0 (up)     : 0, 0% 
LFC < 0 (down)   : 0, 0% 
outliers [1]     : 0, 0% 
low counts [2]   : 0, 0% 
(mean count < 0)
[1] see 'cooksCutoff' argument of ?results
[2] see 'independentFiltering' argument of ?results

what do you reccommend?

Thanks

ADD REPLY
0
Entering edit mode

You need to first read the help page. This is specifically addressed in the help page that is mentioned in the message in your original post.

ADD REPLY
0
Entering edit mode

Also, are you collapsing technical replicates? Or are they biological replicates? You never want to collapse biological replicates (when samples originate from different biological units). The collapsing is only recommended when you have multiple sequencing runs of the same library, i.e. technical replicates.

ADD REPLY
0
Entering edit mode

ooh. I would like to collapse biological replicates? is it possible? if yes, how?

ADD REPLY
0
Entering edit mode

You should not collapse biological replicates. You need to include these so that the software can estimate variability within condition. 

Just remove the collapseReplicates() line from your code and then run DESeq() after building the dds. 

But please, please take the time to read the help pages, in particular the main functions ?DESeq and ?results, and I'd also recommend you read the DESeq2 paper so you know what is going on in the software you are using.

ADD REPLY

Login before adding your answer.

Traffic: 825 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