Question: DeSeq2 Ribosome Profiling: multiple factor design
0
gravatar for indrik.wijaya
11 months ago by
indrik.wijaya20 wrote:

Hi all, I am planning to run differential gene expression analysis with this kind of design matrix (4 time points, 2 replicates each, 2 different assays and 2 different types):

> sample_name   time    assay   type 
> rna_0_r1  t0  rna cyto 
> rna_1_r1  t1  rna cyto
> rna_2_r1  t2  rna cyto
> rna_3_r1  t3  rna cyto 
> rna_0_r2  t0  rna cyto
> rna_1_r2  t1  rna cyto
> rna_2_r2  t2  rna cyto 
> rna_3_r2  t3  rna cyto
> rpf_0_r1  t0  rpf cyto
> rpf_1_r1  t1  rpf cyto 
> rpf_2_r1  t2  rpf cyto
> rpf_3_r1  t3  rpf cyto
> rpf_0_r2  t0  rpf cyto 
> rpf_1_r2  t1  rpf cyto
> rpf_2_r2  t2  rpf cyto
> rpf_3_r2  t3  rpf cyto 
> rna_0_r1  t0  rna crude
> rna_1_r1  t1  rna crude
> rna_2_r1  t2  rna crude 
> rna_3_r1  t3  rna crude
> rna_0_r2  t0  rna crude
> rna_1_r2  t1  rna crude 
> rna_2_r2  t2  rna crude
> rna_3_r2  t3  rna crude 
> rpf_0_r1  t0  rpf crude 
> rpf_1_r1  t1  rpf crude
> rpf_2_r1  t2  rpf crude 
> rpf_3_r1  t3  rpf crude 
> rpf_0_r2  t0  rpf crude
> rpf_1_r2  t1  rpf crude 
> rpf_2_r2  t2  rpf crude 
> rpf_3_r2  t3  rpf crude

I would like to study the effect of (rpfcrude/rpfcyto)/(rnacrude/rnacyto) at every time point. How should I write the formula for this problem? Is it time + assay + type + assay:time + assay:type + type:assay?

Thank you

deseq2 design timeseries • 356 views
ADD COMMENTlink modified 11 months ago by Michael Love26k • written 11 months ago by indrik.wijaya20
Answer: DeSeq2 Ribosome Profiling: multiple factor design
0
gravatar for Michael Love
11 months ago by
Michael Love26k
United States
Michael Love26k wrote:

I have some example code here:

https://support.bioconductor.org/p/61509/

[edit: asking further about how time should be incorporated)

ADD COMMENTlink modified 11 months ago • written 11 months ago by Michael Love26k

A question about how you want to incorporate time: do you want to compare time points to t0? Or do you want to compare that ratio within each time point alone?

ADD REPLYlink written 11 months ago by Michael Love26k

Hi Mike,

Thanks for the reply, I want to compare both ie to t0 and ratio within each time point alone.

ADD REPLYlink modified 11 months ago • written 11 months ago by indrik.wijaya20

I think you want a design of ~time + assay + cond + cond:assay + time:assay + time:cond + time:cond:assay.

If you arrange the colData such that the times are grouped together, it's clearer that the above design gives you a simple 2x2 interaction model for time=0, and then the other time points also have 2x2 interactions but comparing to time=0.

On the other hand, to get simple 2x2 for each time point, where the time points are not compared to time=0, you can use ~time + time:assay + time:cond + time:cond:assay.

ADD REPLYlink written 11 months ago by Michael Love26k

Hi Mike,

Thank for the help! I'm sorry if I want to clarify other things. I ran the it with design ~ time + assay + cond + cond:assay + time:assay + time:cond + time:cond:assay as you suggested. I changed 'cyto' to 'a' and 'crude' to 'b' for simplicity. This is the resultsNames that I get

"Intercept" "time _t1 _vs _t0" "time _t2 _vs _t0"

[4] "time _t3 _vs _t0" "assay _rpf _vs _rna" "cond _b _vs _a"

[7] "assayrpf.typeb" "timet1.assayrpf" "timet2.assayrpf"

[10] "timet3.assayrpf" "timet1.condb" "timet2.condb"

[13] "timet3.condb" "timet1.assayrpf.condb" "timet2.assayrpf.condb"

[16] "timet3.assayrpf.condb"

  1. Does "time _t1 _vs _t0" mean looking at "RNA _a time1" vs "RNA _a time0" ?

  2. Does "timet1.assayrpf" mean looking at "RPF _a time1/RNA _a time1" vs "RPF _a time0/RNA _a time0" (or equivalently, "RPF _a time1/RPF _a time0" vs "RNA _a time1/RNA _a time0")?

  3. Does "timet1.condb" mean looking at "RNA _b time1/RNA _b time0" vs "RNA _a time1/RNA _a time0" ?

  4. Does "timet1.assayrpf.condb" mean looking at "RPF _b time1/RPF _a time1" vs "RNA _b time1/RNA _a time1" with all terms compared to time0?

Thank so much for the help!

ADD REPLYlink modified 11 months ago • written 11 months ago by indrik.wijaya20

For the interpretation of the coefficients, I’d recommend working with a statistician. If you take a look at the design matrix itself (plugging in to model.matrix for example), you can get an idea how the coefficients are used to explain various differences across samples.

ADD REPLYlink modified 11 months ago • written 11 months ago by Michael Love26k

Hi, Mike,

Okay, will do! Thanks so much for the help :)

ADD REPLYlink written 11 months ago by indrik.wijaya20
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 159 users visited in the last hour