DESeq2 paired analysis matrix
1
0
Entering edit mode
georgina.fqw ▴ 10
@georginafqw-23788
Last seen 3.1 years 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 • 569 views
ADD COMMENT
0
Entering edit mode
@mikelove
Last seen 1 hour 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 COMMENT

Login before adding your answer.

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