Biostar Beta. Not for public use.
Design for paired Deseq2 analysis
0
Entering edit mode
18 months ago
Pin.Bioinf • 240
Malaga

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':

vignette('DESeq2')

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 • 459 views
ADD COMMENTlink
3
Entering edit mode
18 months ago
wyzinasu • 30

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
0
Entering edit mode

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

ADD REPLYlink

Login before adding your answer.

Similar Posts
Loading Similar Posts
Powered by the version 2.1