Answers.Body: <p>Partial answer: because your replicates involved a physical splitting of the input, I would consider them to be sufficiently distinct to be considered biological replicates. EdgeR should consider distinct samples to be replicates if all modeled fields are identical, so you <em>should not</em> include the replicate field in the model design.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-05-30T20:40:58.153Z
Answers.LastActivityDate: 2024-05-30T20:40:58.153Z
Answers.UserDisplayName: gringer
Body: <p>I am performing the analysis of cell cultures in suspension, untreated(U) and treatment A and B, at t0, t1 and t2, 4 replicates per treatment.</p>
  <p>The experiment started with 12 cultures, 4U, 4A and 4B, and cultures were sampled at the three times. I fathom this is different from starting with 36 independent cultures, each contributing to a single library, but I have trouble figuring out how to set my &quot;design&quot; object to use it in edgeR.</p>
  <p>Having a samples.df with columns: sample(36 unique identifiers), time(3), treatment(3), treatment_time(9) and replicate(4),  I built my DGEList in edgeR using group as a factor of treatment_time, since I am primarily interested in exploring differences between treatments A and B using U as baseline at any time point, although the two treatments might show similarities in the mechanism of action, so for example At1-Ut1 might be also compared to Bt2-Ut2 and so on.</p>
  <p>The replicates are not independent though, hence I tried set my design as model:</p>
  <pre><code>matrix(~0 + treatment_time + replicate)
  </code></pre>
  <p>Is this accurate and am I good for any downstream analysis as per the simple edgeR workflow as described in the manual?</p>
  <p>Replicates originate from splitting, after treatment, the same cell culture into four separate vessels, but this is not my main concern. What is not independent is the time points of any given treatment for any given replicate. Imagine replicate 2 treatment A is, say, contamined, then every time point for that culture is contamined. Now, contamination is expected to have a huge effect on the library profiles, and I am using this example just to emphasize the concept. What I wonder is, how do I treat the data? Setting contrast matrix is all it takes?</p>
  <p>Any suggestions, even deviating from my chosen route, are welcome!</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-05-29T14:01:58.950Z
Comments.Text: Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
Comments.UserDisplayName: Community
Tags: <rna-seq><r><differential-expression><edger>
Title: time*treatment series with repeated (i.e: NOT independent) sampling of replicates
ThreadText: # time*treatment series with repeated (i.e: NOT independent) sampling of replicates
  
  (Asked by: username_0 on 2024-05-29)
  
  I am performing the analysis of cell cultures in suspension, untreated(U) and treatment A and B, at t0, t1 and t2, 4 replicates per treatment.
  
  The experiment started with 12 cultures, 4U, 4A and 4B, and cultures were sampled at the three times. I fathom this is different from starting with 36 independent cultures, each contributing to a single library, but I have trouble figuring out how to set my "design" object to use it in edgeR.
  
  Having a samples.df with columns: sample(36 unique identifiers), time(3), treatment(3), treatment\_time(9) and replicate(4), I built my DGEList in edgeR using group as a factor of treatment\_time, since I am primarily interested in exploring differences between treatments A and B using U as baseline at any time point, although the two treatments might show similarities in the mechanism of action, so for example At1-Ut1 might be also compared to Bt2-Ut2 and so on.
  
  The replicates are not independent though, hence I tried set my design as model:
  
  ```
  matrix(~0 + treatment_time + replicate)
  
  ```
  
  Is this accurate and am I good for any downstream analysis as per the simple edgeR workflow as described in the manual?
  
  Replicates originate from splitting, after treatment, the same cell culture into four separate vessels, but this is not my main concern. What is not independent is the time points of any given treatment for any given replicate. Imagine replicate 2 treatment A is, say, contamined, then every time point for that culture is contamined. Now, contamination is expected to have a huge effect on the library profiles, and I am using this example just to emphasize the concept. What I wonder is, how do I treat the data? Setting contrast matrix is all it takes?
  
  Any suggestions, even deviating from my chosen route, are welcome!
  
  **Tags:** rna-seq, r, differential-expression, edger
  
  > **Comments:**
  > **username_1**: Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2024-05-30. Score: 0
  
  Partial answer: because your replicates involved a physical splitting of the input, I would consider them to be sufficiently distinct to be considered biological replicates. EdgeR should consider distinct samples to be replicates if all modeled fields are identical, so you *should not* include the replicate field in the model design.
  
  
  ---
  
  