How to design formula
1
0
Entering edit mode
Jessica ▴ 10
@jessica-24203
Last seen 3.6 years ago

Hello, I have a question about how to design a formula.

I have the following samples with three factors, Names, sample and condition. A total of 18 samples, divided into 9 groups(A-I), I want to use DESeq2 to analysis paired samples, like difference of sample A before and after treatment(trt vs untrt).

 Names sample condition
X1  1   A      untrt
X2  2   A       trt
X3  3   B      untrt
X4  4   B       trt
X5  5   C     untrt
X6  6   C       trt
X7  7   D     untrt
X8  8   D       trt
X9  9   E     untrt
X10 10  E       trt
X11 11  F     untrt
X12 12  F       trt
X13 13  G     untrt
X14 14  G       trt
X15 15  H     untrt
X16 16  H       trt
X17 17  I     untrt
X18 18  I       trt

I am not sure how to design the formula. Is that right?

dds_1 <- DESeqDataSetFromTximport(txi_import, colData = sampleTable, design = ~ sample + condition)
deseq2 • 644 views
ADD COMMENT
4
Entering edit mode
Kevin Blighe ★ 3.9k
@kevin
Last seen 12 days ago
Republic of Ireland

Hi xiaqiu0809,

Yes, this represents a paired design. So, once you derive your test statistics for condition, these will be controlled for the sample pairing. Please ensure that sample is encoded categorically (as a factor)..

There is a previous answer here, to which I will link you: https://support.bioconductor.org/p/84241/#84256

Kevin

ADD COMMENT
1
Entering edit mode

Thanks for your help, Kevin!

ADD REPLY

Login before adding your answer.

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