<p>The DESeq2 documentation has the answers you seek: <a href="https://bioconductor.org/packages/devel/bioc/vignettes/DESeq2/inst/doc/DESeq2.html#how-can-i-include-a-continuous-covariate-in-the-design-formula" rel="nofollow noreferrer">https://bioconductor.org/packages/devel/bioc/vignettes/DESeq2/inst/doc/DESeq2.html#how-can-i-include-a-continuous-covariate-in-the-design-formula</a>.</p>
<p>Also read the section on paired samples. In short you should have subject as a formula term.</p>

CC BY-SA 4.0
2024-11-04T21:01:47.660Z
2024-11-04T21:01:47.660Z
Teodor
<p>I have samples from 45 individuals at 2 time points and these individuals were given a specific diet. The BMI of these individuals were recorded at both time points. The responders to the diet are the ones that show decrease in BMI from T1 to T2. I want to use continuous variable (BMI) to identify genes that are predictors of response to diet. I also have other covariates that need to be controlled like age &amp; gender. The metadata table looks like following</p>
<p><a href="https://i.sstatic.net/y7znl.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/y7znl.png" alt="enter image description here" /></a></p>
<p>I am not sure the design that I should go for. The one that I think is appropriate is</p>
<pre class="lang-r prettyprint-override"><code>dds &lt;- DESeqDataSetFromMatrix(countData=cts,colData=meta,design=~0+Time+Gender+AGE+Time:BMI)
dds &lt;- DESeq(dds,test=&quot;LRT&quot;, reduced=~Gender+AGE)
res=results(dds, contrast=list(&quot;T1.BMI&quot;,&quot;T2.BMI&quot;))
</code></pre>
<p>Is this the correct way to go ahead and to identify responder genes to the diet?</p>
<p>All suggestions are very welcome.</p>
<p>Thank you</p>

<rna-seq><deseq2>
Continuous predictor variable to identify responder genes using DESeq2
# Continuous predictor variable to identify responder genes using DESeq2

(Asked by: username_0 on 2024-02-01)

I have samples from 45 individuals at 2 time points and these individuals were given a specific diet. The BMI of these individuals were recorded at both time points. The responders to the diet are the ones that show decrease in BMI from T1 to T2. I want to use continuous variable (BMI) to identify genes that are predictors of response to diet. I also have other covariates that need to be controlled like age & gender. The metadata table looks like following

I am not sure the design that I should go for. The one that I think is appropriate is
dds <- DESeqDataSetFromMatrix(countData=cts,colData=meta,design=~0+Time+Gender+AGE+Time:BMI)
dds <- DESeq(dds,test="LRT", reduced=~Gender+AGE)
res=results(dds, contrast=list("T1.BMI","T2.BMI"))

Is this the correct way to go ahead and to identify responder genes to the diet?
All suggestions are very welcome.
Thank you

**Tags:** rna-seq, deseq2

---

## 1 answers

### Answer by username_1 on 2024-11-04. Score: 0

The DESeq2 documentation has the answers you seek: <https://bioconductor.org/packages/devel/bioc/vignettes/DESeq2/inst/doc/DESeq2.html#how-can-i-include-a-continuous-covariate-in-the-design-formula>.

Also read the section on paired samples. In short you should have subject as a formula term.


---

