Answers.Body: <p>You're really running out of degrees of freedom and the only actual replicate is a single sample from another patient, so please take the results with a huge grain of salt.</p>
  
  <p>You can use a design of <code>~cellType * coculture</code> where <code>cellType</code> has levels <code>NOF</code> and <code>CAF</code> and <code>coculture</code> has levels <code>yes</code> and <code>no</code> (ideally you'd block by patient, but that's not an option for you).</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-08T11:45:11.423Z
Answers.Text: Sorry, @Devon, this design would return the interaction of NOF and CAF with co_culture or returns gene different between NOF  and CAF by considering the interaction of cell_type and co_culture? Thank you for assigning your time to me
Answers.UserDisplayName: Zizogolu
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-08T12:18:17.057Z
Answers.Text: No, this design fits the interaction as well as the main effects, what coefficient you extract is up to you.
Answers.UserDisplayName: Devon Ryan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-08T09:50:33.527Z
Answers.LastActivityDate: 2019-01-08T09:50:33.527Z
Answers.UserDisplayName: Devon Ryan
Body: <p>I have a Normal esophageal Fibroblasts (NOFs) cultured in DMEM media; The same NOF also have been cultured with a tumor sample from a patient named 005 on DMEM media; I have also Cancer Associated Fibroblasts (CAFs) cultured on DMEM, on DMEM + tumor from a patient named as 005 and DMEM + tumor from a patient named 036 something like this picture;</p>
  
  <p><a href="https://i.sstatic.net/TwjbK.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/TwjbK.jpg" alt="enter image description here"></a></p>
  
  <p>I want to know if NOF and CAF are different in terms of gene expression but I am not sure about design for DESeq2 or Edger and ANOVA.</p>
  
  <p>By @Devon's help I have done so</p>
  
  <pre><code>&gt; mycols
     cell_type co_cultured
  G2       NOF          NO
  G3       NOF         YES
  G4       CAF          NO
  G5       CAF         YES
  G6       CAF         YES
  
  
  dds=DESeqDataSetFromMatrix(countData = NOFCAF,colData = mycols, design        =~ cell_type*co_cultured) 
  </code></pre>
  
  <p>Now, I am wondering what would be a suitable contrast for results function in DESeq2</p>
  
  <pre><code>&gt; resultsNames(dds)
  [1] "Intercept"                   "cell_type_NOF_vs_CAF"        "co_cultured_YES_vs_NO"      
  [4] "cell_typeNOF.co_culturedYES"
  
  
  
  &gt; res=results(dds)
  &gt; res
  log2 fold change (MLE): cell typeNOF.co culturedYES 
  Wald test p-value: cell typeNOF.co culturedYES 
  DataFrame with 2545 rows and 6 columns
  </code></pre>
  
  <p>Thanks a lot for correcting me</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-01-07T04:53:41.507Z
Comments.Text: Do you have replicates of any of these?
Comments.UserDisplayName: Devon Ryan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-01-07T08:18:39.953Z
Comments.Text: Following Devon comment, you don't need biological replicates, technical replicates are worthy. It would help to know how many samples do you have available of each type. In addition, it is important to consider potential batch effects (where all samples extracted and sequenced at once?) and con-founders (are some sample from older patients? Is sex equally distributed)
Comments.UserDisplayName: llrs
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-01-07T17:11:25.117Z
Comments.Text: No, you really need biological replicates.  The conclusions you can draw from technical replicates only is limited.
Comments.UserDisplayName: swbarnes2
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-01-07T19:48:58.090Z
Comments.Text: Thank you, age and sex of patients is the same. In total I have 5 samples (one for each). The sequesing has been done with HTG EdgeSeq Oncology Biomarker Panel for all. Now, I have a matrix of raw read counts with 5 columns and 2545 genes. I want to find the differentially expressed genes between NOFs and CAFs. Any help please?
Comments.UserDisplayName: Zizogolu
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-01-08T11:22:53.537Z
Comments.Text: You can figure out that error from `DESeqDataSetFromMatrix` yourself, you shouldn't need any help (hint: `design` is stated incorrectly).
Comments.UserDisplayName: Devon Ryan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-01-08T11:43:20.877Z
Comments.Text: Sorry, will I need the cell_type , co_culture and interaction of them or I just need the interaction of cell_type and co_culture to find the genes different between NOF and CAF?
Comments.UserDisplayName: Zizogolu
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-01-08T12:19:17.823Z
Comments.Text: You don't require any further help on this, you need to fly free a bit more.
Comments.UserDisplayName: Devon Ryan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-01-08T12:46:23.763Z
Comments.Text: You want `name=cell_type_NOF_vs_CAF` in results().
Comments.UserDisplayName: Devon Ryan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-01-08T16:06:21.047Z
Comments.Text: @swbarnes2 sometimes it is impossible to get biological replicates (with human samples). Two different biopsies from the bowel wouldn't be medically advised, or it is not done initially and then later on it is impossible to have it without adding more complexity to the analysis IMHO. That said, if you can get more replicates (preferably biological and technical) better.
Comments.UserDisplayName: llrs
Tags: <r><rna-seq><deseq2><edger><design>
Title: Experimental Design for Differential expreression analysis
ThreadText: # Experimental Design for Differential expreression analysis
  
  (Asked by: username_0 on 2019-01-06)
  
  I have a Normal esophageal Fibroblasts (NOFs) cultured in DMEM media; The same NOF also have been cultured with a tumor sample from a patient named 005 on DMEM media; I have also Cancer Associated Fibroblasts (CAFs) cultured on DMEM, on DMEM + tumor from a patient named as 005 and DMEM + tumor from a patient named 036 something like this picture;
  
  [![enter image description here](https://i.sstatic.net/TwjbK.jpg)](https://i.sstatic.net/TwjbK.jpg)
  
  I want to know if NOF and CAF are different in terms of gene expression but I am not sure about design for DESeq2 or Edger and ANOVA.
  
  By @username_1's help I have done so
  
  ```
  > mycols
     cell_type co_cultured
  G2       NOF          NO
  G3       NOF         YES
  G4       CAF          NO
  G5       CAF         YES
  G6       CAF         YES
  
  dds=DESeqDataSetFromMatrix(countData = NOFCAF,colData = mycols, design        =~ cell_type*co_cultured) 
  
  ```
  
  Now, I am wondering what would be a suitable contrast for results function in DESeq2
  
  ```
  > resultsNames(dds)
  [1] "Intercept"                   "cell_type_NOF_vs_CAF"        "co_cultured_YES_vs_NO"      
  [4] "cell_typeNOF.co_culturedYES"
  
  > res=results(dds)
  > res
  log2 fold change (MLE): cell typeNOF.co culturedYES 
  Wald test p-value: cell typeNOF.co culturedYES 
  DataFrame with 2545 rows and 6 columns
  
  ```
  
  Thanks a lot for correcting me
  
  **Tags:** r, rna-seq, deseq2, edger, design
  
  > **Comments:**
  > **username_1**: Do you have replicates of any of these?  
  > **username_2**: Following username_1 comment, you don't need biological replicates, technical replicates are worthy. It would help to know how many samples do you have available of each type. In addition, it is important to consider potential batch effects (where all samples extracted and sequenced at once?) and con-founders (are some sample from older patients? Is sex equally distributed)  
  > **username_3**: No, you really need biological replicates.  The conclusions you can draw from technical replicates only is limited.  
  > **username_0**: Thank you, age and sex of patients is the same. In total I have 5 samples (one for each). The sequesing has been done with HTG EdgeSeq Oncology Biomarker Panel for all. Now, I have a matrix of raw read counts with 5 columns and 2545 genes. I want to find the differentially expressed genes between NOFs and CAFs. Any help please?  
  > **username_1**: You can figure out that error from `DESeqDataSetFromMatrix` yourself, you shouldn't need any help (hint: `design` is stated incorrectly).  
  > **username_0**: Sorry, will I need the cell_type , co_culture and interaction of them or I just need the interaction of cell_type and co_culture to find the genes different between NOF and CAF?  
  > **username_1**: You don't require any further help on this, you need to fly free a bit more.  
  > **username_1**: You want `name=cell_type_NOF_vs_CAF` in results().  
  > **username_2**: @username_3 sometimes it is impossible to get biological replicates (with human samples). Two different biopsies from the bowel wouldn't be medically advised, or it is not done initially and then later on it is impossible to have it without adding more complexity to the analysis IMHO. That said, if you can get more replicates (preferably biological and technical) better.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-01-08. Score: 3
  
  You're really running out of degrees of freedom and the only actual replicate is a single sample from another patient, so please take the results with a huge grain of salt.
  
  You can use a design of `~cellType * coculture` where `cellType` has levels `NOF` and `CAF` and `coculture` has levels `yes` and `no` (ideally you'd block by patient, but that's not an option for you).
  
  > **Comments:**
  > **username_0**: Sorry, @username_1, this design would return the interaction of NOF and CAF with co_culture or returns gene different between NOF  and CAF by considering the interaction of cell_type and co_culture? Thank you for assigning your time to me  
  > **username_1**: No, this design fits the interaction as well as the main effects, what coefficient you extract is up to you.  
  
  ---
  
  