Answers.Body: <p>It makes no difference if you process the BAM files one at a time with featureCounts or all together, except that it changes how you have to read the files into R.</p>
  <p>You can supply edgeR with lists of contrasts to have it compute fold-changes and p-values for. Please have a look at the <a href="https://www.bioconductor.org/packages/release/bioc/vignettes/edgeR/inst/doc/edgeRUsersGuide.pdf" rel="nofollow noreferrer">edgeR user guide</a> for examples.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-03-23T14:13:12.847Z
Answers.Text: Thanks @Devon !! So, I can simply merge the count files, right? Also, I am taking fastq from different SRA runs, so they can be considered as replicates? I am asking because I have some dataset that contains 10 SRA runs for one sample and 4 SRA runs for another sample.
Answers.UserDisplayName: SBDK8219
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-03-23T14:46:23.683Z
Answers.Text: It depends on whether they're runs of the same sample or not. If they're from the same sample then they're not replicates (they can be merged together).
Answers.UserDisplayName: Devon Ryan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-03-23T15:15:41.470Z
Answers.Text: Thanks. Yes, they are from the same sample. In my original question, group G1 is the name of the sample and it has few SRA runs. Just one more question, will it be an issue if I use different number of SRA runs for two different groups? Also, one pipeline uses RUVr for normalizing the counts, so is it advised to run RUVr for merged featureCount results before running EdgeR? Please pardon my lack of knowledge about RNA-Seq analysis as I am bit new to this.
Answers.UserDisplayName: SBDK8219
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-03-24T08:31:44.210Z
Answers.Text: EdgeR and similar packages will handle the library size normalization. Nothing should be done on the individual runs before merging them.
Answers.UserDisplayName: Devon Ryan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-03-23T07:32:49.440Z
Answers.LastActivityDate: 2021-03-23T07:32:49.440Z
Answers.UserDisplayName: Devon Ryan
Body: <p>I am using a pipeline (bam -&gt; featurecount-&gt; EdgeR) to do some RNASeq analysis of several groups and sub-groups. For example, I have the following dataset with two types (T1 and T2) and T1 has three groups G1, G2 and G3, T2 has G5 and G6 groups. I would like to find TPM numbers, fold-change and FDR for all the genes and Groups.</p>
  <pre><code>Type Group SRA_Run#
  T1   G1.   &lt;some SRA ids e.g. SRR123456, SRR112233&gt;
  T1   G2.   &lt;some SRA&gt;
  T1.  G3.   &lt;some SRA&gt;
  T2.  G5.   &lt;some SRA&gt;
  T2.  G6.   &lt;some SRA&gt;
  </code></pre>
  <p>I have individual BAM files generated for each SRA Run. I also individual read counts from featureCount for each SRA Run. I was not sure if I need to merge individual read counts for each group or run featureCount using all bam files of a group at once. Does it make any difference in  the analysis that follows.</p>
  <p>I also would like to know if I can run EdgeR at once for all the types and groups at once for doing differential gene expression for each group of Type 1 (T1) against every other group of Type 2 (T2). I am bit stuck at this point how to proceed. Any help would be appreciated.</p>
  
Tags: <rna-seq><edger><featurecounts>
Title: RNASeq analysis using featureCount and EdgeR
ThreadText: # RNASeq analysis using featureCount and EdgeR
  
  (Asked by: username_0 on 2021-03-23)
  
  I am using a pipeline (bam -> featurecount-> EdgeR) to do some RNASeq analysis of several groups and sub-groups. For example, I have the following dataset with two types (T1 and T2) and T1 has three groups G1, G2 and G3, T2 has G5 and G6 groups. I would like to find TPM numbers, fold-change and FDR for all the genes and Groups.
  
  ```
  Type Group SRA_Run#
  T1   G1.   <some SRA ids e.g. SRR123456, SRR112233>
  T1   G2.   <some SRA>
  T1.  G3.   <some SRA>
  T2.  G5.   <some SRA>
  T2.  G6.   <some SRA>
  
  ```
  
  I have individual BAM files generated for each SRA Run. I also individual read counts from featureCount for each SRA Run. I was not sure if I need to merge individual read counts for each group or run featureCount using all bam files of a group at once. Does it make any difference in the analysis that follows.
  
  I also would like to know if I can run EdgeR at once for all the types and groups at once for doing differential gene expression for each group of Type 1 (T1) against every other group of Type 2 (T2). I am bit stuck at this point how to proceed. Any help would be appreciated.
  
  **Tags:** rna-seq, edger, featurecounts
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2021-03-23. Score: 1
  
  It makes no difference if you process the BAM files one at a time with featureCounts or all together, except that it changes how you have to read the files into R.
  
  You can supply edgeR with lists of contrasts to have it compute fold-changes and p-values for. Please have a look at the [edgeR user guide](https://www.bioconductor.org/packages/release/bioc/vignettes/edgeR/inst/doc/edgeRUsersGuide.pdf) for examples.
  
  > **Comments:**
  > **username_0**: Thanks @username_1 !! So, I can simply merge the count files, right? Also, I am taking fastq from different SRA runs, so they can be considered as replicates? I am asking because I have some dataset that contains 10 SRA runs for one sample and 4 SRA runs for another sample.  
  > **username_1**: It depends on whether they're runs of the same sample or not. If they're from the same sample then they're not replicates (they can be merged together).  
  > **username_0**: Thanks. Yes, they are from the same sample. In my original question, group G1 is the name of the sample and it has few SRA runs. Just one more question, will it be an issue if I use different number of SRA runs for two different groups? Also, one pipeline uses RUVr for normalizing the counts, so is it advised to run RUVr for merged featureCount results before running EdgeR? Please pardon my lack of knowledge about RNA-Seq analysis as I am bit new to this.  
  > **username_1**: EdgeR and similar packages will handle the library size normalization. Nothing should be done on the individual runs before merging them.  
  
  ---
  
  