Design for paired Deseq2 analysis
1
0
Entering edit mode
6.3 years ago
Pin.Bioinf ▴ 340

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 • 3.8k views
ADD COMMENT
3
Entering edit mode
6.3 years 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 COMMENT
0
Entering edit mode

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

ADD REPLY

Login before adding your answer.

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