<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>

CC BY-SA 4.0
2019-01-08T11:45:11.423Z
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
Zizogolu
CC BY-SA 4.0
2019-01-08T12:18:17.057Z
No, this design fits the interaction as well as the main effects, what coefficient you extract is up to you.
Devon Ryan
CC BY-SA 4.0
2019-01-08T09:50:33.527Z
2019-01-08T09:50:33.527Z
Devon Ryan
<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>

CC BY-SA 4.0
2019-01-07T04:53:41.507Z
Do you have replicates of any of these?
Devon Ryan
CC BY-SA 4.0
2019-01-07T08:18:39.953Z
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)
llrs
CC BY-SA 4.0
2019-01-07T17:11:25.117Z
No, you really need biological replicates.  The conclusions you can draw from technical replicates only is limited.
swbarnes2
CC BY-SA 4.0
2019-01-07T19:48:58.090Z
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?
Zizogolu
CC BY-SA 4.0
2019-01-08T11:22:53.537Z
You can figure out that error from `DESeqDataSetFromMatrix` yourself, you shouldn't need any help (hint: `design` is stated incorrectly).
Devon Ryan
CC BY-SA 4.0
2019-01-08T11:43:20.877Z
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?
Zizogolu
CC BY-SA 4.0
2019-01-08T12:19:17.823Z
You don't require any further help on this, you need to fly free a bit more.
Devon Ryan
CC BY-SA 4.0
2019-01-08T12:46:23.763Z
You want `name=cell_type_NOF_vs_CAF` in results().
Devon Ryan
CC BY-SA 4.0
2019-01-08T16:06:21.047Z
@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.
llrs
<r><rna-seq><deseq2><edger><design>
Experimental Design for Differential expreression analysis
# 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;

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 @Devon'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 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)  
> **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**: @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.  

---

## 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, @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  
> **username_1**: No, this design fits the interaction as well as the main effects, what coefficient you extract is up to you.  

---

