Error:The design matrix has the same number of samples and coefficients to fit, so estimation of dispersion is not possible. Treating samples as replicates was deprecated in v1.20 and no longer su
1
0
Entering edit mode
takisliako • 0
@takisliako-24300
Last seen 11 months ago

Hi everyone,

I've been trying to use DESeq2 to look at expression differences across 4 SRR: 2967085, 2967086, 2973633 and 23351735.

I've used HTseq and got 4 files. An example of the files:

uc001aaa.3  0
uc001aac.4  0
uc001aae.4  0
uc001aah.4  0
uc001aai.1  0
uc001aak.3  0
uc001aal.1  0
uc001aaq.2  0
uc001aar.2  0
uc001aau.3  2

Then i tried:

sampleFiles <- grep("*S",list.files(directory),value=TRUE)
sampleCondition <- sub("(.*S).*","\\1",sampleFiles)
sampleTable <- data.frame(sampleName = sampleFiles,
                          fileName = sampleFiles,
                          condition = sampleCondition)
sampleTable$condition <- factor(sampleTable$condition)
sampleCondition
[1] "AS" "BS" "CS" "DS"

library("DESeq2")
ddsHTSeq <- DESeqDataSetFromHTSeqCount(sampleTable = sampleTable,
                                       directory = directory,
                                       design= ~ condition)
ddsHTSeq
dim: 82960 4 
metadata(1): version
assays(1): counts
rownames(82960): uc001aaa.3 uc001aac.4 ... uc031tky.1 uc031tkz.1
rowData names(0):
colnames(4): AS22967085.txt BS22967086.txt CS22973633.txt
  DS23351735.txt
colData names(1): condition

And then when i try:

dds <- DESeq(ddsHTSeq)
estimating size factors
estimating dispersions
Error in checkForExperimentalReplicates(object, modelMatrix) : 

  The design matrix has the same number of samples and coefficients to fit,
  so estimation of dispersion is not possible. Treating samples
  as replicates was deprecated in v1.20 and no longer supported since v1.22.

I'm new in learning DESeq2. Can anyone help?

deseq2 • 2.2k views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 11 hours ago
United States

The error is telling you that you only have one sample for each sample type. In that situation you can't do any statistical analysis, because you need replicates to estimate the biological variability. It's possible that you have two groups with two samples in each, in which case you need to change your 'condition' to reflect that.

ADD COMMENT
0
Entering edit mode

Dear James,

I also have same issue. conditions. In my case conditions are normal and cancer and file name mentioned as N and C. Kindly tell. How to change and where to change

ADD REPLY
0
Entering edit mode

In general you should create a new post rather than hopping on old posts. Also, please read the FAQ so you know how to ask a good question. As it stands your question is unanswerable.

ADD REPLY
0
Entering edit mode

You cannot compare two samples with DESeq2.

ADD REPLY

Login before adding your answer.

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