[BioC] DESeq2 - paired sample, interaction and fold change

Michael Love michaelisaiahlove at gmail.com
Wed Jun 4 19:49:04 CEST 2014


hi Samuel,

On Wed, Jun 4, 2014 at 4:38 AM, samuel collombet
<samuelcollombet at gmail.com> wrote:
> Dear all,
>
> I would like to make an analysis with a multilevel design with an
> interaction therm, with paired samples.
>
> If I have 2 patients, for which I have "tumour" and "control" samples, and
> for each I have them treated with treatment A or B. I want to know if
> treatment A as a specific effect on the tumor versus WT. As a toy example:
>> dds <- makeExampleDESeqDataSet(n = 1000, m = 8)
>> dds$patient=c("1","1","1","1","2","2","2","2")
>> dds$condition=c("WT","WT","tumor","tumor","WT","WT","tumor","tumor")
>> dds$treatment=c("A","Ct","A","Ct","A","Ct","A","Ct")

Maybe you left this out because it's a toy example, but we recommend
you use dds$treatment=factor(c("A","Ct","A","Ct","A","Ct","A","Ct"),
levels=c("Ct","A")), so that the comparisons will be treatment /
control. Also with WT / tumor.

>> dds <- DESeqDataSet(dds, design= ~ patient + condition*treatment )
>> dds <- DESeq(dds)
>
> for which I got:
>> colData(dds)
> DataFrame with 8 rows and 5 columns
>              sample condition  patient treatment sizeFactor
>         <character>  <factor> <factor> <factor>  <numeric>
> sample1     sample1        WT        1         A   1.047160
> sample2     sample2        WT        1         Ct   1.017620
> sample3     sample3     tumor        1         A   1.056423
> sample4     sample4     tumor        1         Ct   1.046753
> sample5     sample5        WT        2         A   1.014201
> sample6     sample6        WT        2         Ct   1.059479
> sample7     sample7     tumor        2         A   1.035853
> sample8     sample8     tumor        2         Ct   1.013360
>
> And:
>> resultsNames(dds)
> [1] "Intercept"              "patient_2_vs_1" "condition_WT_vs_tumor"
> "treatment_Ct_vs_A" "conditionWT.treatmentCt"
>
> If I do:
>> res <- results(dds, name="conditionWT.treatmentCt")
>
> I will get the gene for which there is a specific effect of treatment in the
> tumor, am I right?

yes (except for a sign change, see note above on factor levels).

>
> I understood that DESeq2 does make test taking into consideration paired
> samples, if the pairing information is put as a factor in the design formula
> (I understood it from
> http://seqanswers.com/forums/archive/index.php/t-34614.html, post by simon
> anders, 10-21-2013, 12:28 AM).

yes, by including the patient variable in the design, differences in
counts which are due to patient differences are accounted for.

>
> So in the example above, the fold change would be calculated for each
> patients, and the test made on these fold changes, I am wrong?

The test above is on the specific effect of treatment in the tumor,
accounting for patient differences.

> Is it possible to get the individual fold change for each patients?

Can you be more specific on which fold change? Are you interested in
the tumor-treatment interaction term for each patient? How many
replicates do you have for each combination of patient x condition x
treatment? If not many, I'd recommend sticking to the general effect
above.

Mike

>
> Thanks,
> Samuel
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives:
> http://news.gmane.org/gmane.science.biology.informatics.conductor



More information about the Bioconductor mailing list