Question: Design for paired Deseq2 analysis
gravatar for Pin.Bioinf
23 months ago by
Pin.Bioinf270 wrote:

Hello, I have 3 tumor samples and 3 control samples (paired)

i read that I should use the following design formula for DESeq2:

design(dds) <- ~ patient + condition

patient: colnames(cts) , and condition: levels normal, tumor (where normal is the base level). Then results(dds) will build a result table for tumor vs normal, controlling for the patient effect.

This is my coldata:

           sampleCondition  patient
IMLQK13_S1               C IIMLQ3_S1
IMLQ20_S2               C IMLQ20_S2
IMLQ21_S10               C IMLQ21_S10
IMLQ22_S4               T IMLQ22_S4
IMLQ24_S6               T IMLQ24_S6
IIMLQ26_S9               T IMLQ26_S9

But when I do :

dds_2 <- DESeqDataSetFromMatrix(countData = cts,colData = coldata,design = ~ patient + sampleCondition)

I get:

Error in checkFullRank(modelMatrix) : the model matrix is not full rank, so the model cannot be fit as specified. One or more variables or interaction terms in the design formula are linear combinations of the others and must be removed.

Please read the vignette section 'Model matrix not full rank':


So how do you suggest I do a paired analysis with deseq2? Not adding the patient attribute to the formula?

Thank you

rna-seq deseq2 • 1.4k views
ADD COMMENTlink modified 23 months ago by wyzinasu30 • written 23 months ago by Pin.Bioinf270
gravatar for wyzinasu
23 months ago by
wyzinasu30 wrote:

Paired means, in the same patient level, you have two different condition values. In your coldata, 6 samples have 6 different patients values and so you can't do it for paired analysis.

One possible change is: in patient column, values are S1, S2, S10, S1, S2, S10. Then the formula will work.

DESeq2 gives a easy example illustrating paired samples analysis in section 1.6. You can see that type, having two values: single-read, paired-end, is used to indicate paired samples information. If you change it to values that each one is different, then it will not work, which is exactly what problem shows here.

A better and more detailed example is given in edgeR manual, which is strongly recommanded.

ADD COMMENTlink modified 23 months ago • written 23 months ago by wyzinasu30

The edgeR manual is really amazing, especially the background information on necessary information for DE analysis. Highly recommended

ADD REPLYlink written 23 months ago by Amar670
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1127 users visited in the last hour