DESeq2 paired analysis matrix
0
Entering edit mode
@georginafqw-23788
Last seen 4 weeks ago

Hello,

I have samples from 20+ patients from disease and normal tissues and would like to analyse the data normal vs disease with patient as a random effect. I have 2 questions:

  1. Am I doing it correctly- below is my code
  2. Due to poor QC some samples were removed, can I use incomplete pairs?

Here is my coldata (few rows)

Group Patient Age Sex Smoking Normal 1 57 Male Current Disease 1 57 Male Current Normal 2 64 Female Current Disease 2 64 Female Current Normal 3 65 Female Current Disease 3 65 Female Current

disease vs control

ddsMat <- DESeqDataSetFromMatrix(countData = count_matrix,
                                 colData = coldata,
                                 design = ~ Group)
dds <- DESeq(ddsMat)

adjusted for smoking

ddsMat <- DESeqDataSetFromMatrix(countData = count_matrix,
                                 colData = coldata,
                                 design = ~ Group+Smoking)
dds <- DESeq(ddsMat)
resultsNames(dds) 
[1] "Intercept"                 "Group_Normal_vs_Disease"             
[3] "Smoking_Former_vs_Current"

res <- results(dds, name="Group_Normal_vs_Disease")

disease vs normal - patient as a random effect

ddsMat <- DESeqDataSetFromMatrix(countData = count_matrix,
                                 colData = coldata,
                                 design = ~ Patient + Group)
dds <- DESeq(ddsMat)
resultsNames(dds) 

[1] "Intercept"           "Patient_10_vs_1" "Patient_11_vs_1" .....

 "Group_Normal_vs_Disease"
res  <- results(dds, name="Group_Normal_vs_Disease")#are these adjusted for patients ?
DESeq2 • 63 views
ADD COMMENTlink
0
Entering edit mode
@mikelove
Last seen 2 days ago
United States

If you search around on the support site, you should be able to find previous answers addressing this topic in more depth. In short: DESeq2 can only use fixed effects and complete pairs, while limma's duplicateCorrelation() can accommodate random effects and incomplete pairs.

ADD COMMENTlink

Login before adding your answer.

Similar Posts
Loading Similar Posts
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.3