Answers.Body: <p>All factors you mention bar the batch effects can be addressed by some sort of normalization (I use a modified version of <a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5411036/" rel="nofollow noreferrer">UQpgQ2</a>). Batch effects can be addressed using ComBat/SVA/ComBat-seq but my team's experience with them has been bad - they introduce artifacts and skew the data quite a bit especially if the batch effect is not pronounced.</p>
  <p>Unfortunately, there is no way to do simple comparisons without huge caveats. You're better off using DESeq2 to perform statistically sound comparisons using the batch variable as a covariate.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-02-03T17:59:38.107Z
Answers.LastActivityDate: 2024-02-03T17:59:38.107Z
Answers.UserDisplayName: Ram RS
Answers.Body: <p>Have a look through the DESeq2 manual. It goes into a lot of detail about how it works, and how you can use it to do all the things you're asking about:</p>
  <p><a href="https://www.bioconductor.org/packages/devel/bioc/vignettes/DESeq2/inst/doc/DESeq2.html" rel="nofollow noreferrer">https://www.bioconductor.org/packages/devel/bioc/vignettes/DESeq2/inst/doc/DESeq2.html</a></p>
  <p>The standard workflow already has all these things strung together, and works fairly well for the most common differential expression tasks:</p>
  <blockquote>
  <h1>Quick start</h1>
  <p>Here we show the most basic steps for a differential expression analysis. There are a variety of steps upstream of DESeq2 that result in the generation of counts or estimated counts for each sample, which we will discuss in the sections below. This code chunk assumes that you have a count matrix called cts and a table of sample information called coldata. The design indicates how to model the samples, here, that we want to measure the effect of the condition, controlling for batch differences. The two factor variables batch and condition should be columns of coldata.</p>
  <pre><code>dds &lt;- DESeqDataSetFromMatrix(countData = cts,
                               colData = coldata,
                               design= ~ batch + condition)
  dds &lt;- DESeq(dds)
  resultsNames(dds) # lists the coefficients
  res &lt;- results(dds, name=&quot;condition_trt_vs_untrt&quot;)
  # or to shrink log fold changes association with condition:
  res &lt;- lfcShrink(dds, coef=&quot;condition_trt_vs_untrt&quot;, type=&quot;apeglm&quot;)
  </code></pre>
  </blockquote>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-02-04T19:03:46.140Z
Answers.LastActivityDate: 2024-02-04T19:03:46.140Z
Answers.UserDisplayName: gringer
Body: <p>I'm currently working on a project where I'm comparing aggregate measurements (mean, median, etc.) of expression data (RNA-seq) from different groups of genes across various samples with different characteristics (tissue type, health status, etc.). Additionally, the raw counts were collected from several different labs using various techniques.</p>
  <p>Since I am conducting between-gene measurements, the data should be normalised to account for differences in transcript length and coverage depth (TPM, RPKM, FPKM). However, I am also interested in comparisons across samples based on tissue type and other factors. Therefore, the data should also be normalised to account for library size (TMM, quantile, etc.), and, as the data were collected from multiple sources, it should be corrected for batch effects.</p>
  <p>I have read through many papers but am unsure and confused about how to proceed with the normalisation procedure starting with the raw counts. Can I simply string the methods together, starting with batch effect correction, followed by library size normalisation, and then the within-sample normalisations?</p>
  <p>I would appreciate any insights or suggestions on this. Thanks</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-02-04T19:01:15.050Z
Comments.Text: Please be more specific about your experimental design (e.g. number of samples, factors involved, inputs, desired outputs). General questions don't usually get answered well on Bioinformatics Stack Exchange.
Comments.UserDisplayName: gringer
Tags: <rna-seq><normalization>
Title: How to normalise Bulk RNA-seq data to account for transcript length, coverage depth, library size and batch effects?
ThreadText: # How to normalise Bulk RNA-seq data to account for transcript length, coverage depth, library size and batch effects?
  
  (Asked by: username_0 on 2024-02-03)
  
  I'm currently working on a project where I'm comparing aggregate measurements (mean, median, etc.) of expression data (RNA-seq) from different groups of genes across various samples with different characteristics (tissue type, health status, etc.). Additionally, the raw counts were collected from several different labs using various techniques.
  
  Since I am conducting between-gene measurements, the data should be normalised to account for differences in transcript length and coverage depth (TPM, RPKM, FPKM). However, I am also interested in comparisons across samples based on tissue type and other factors. Therefore, the data should also be normalised to account for library size (TMM, quantile, etc.), and, as the data were collected from multiple sources, it should be corrected for batch effects.
  
  I have read through many papers but am unsure and confused about how to proceed with the normalisation procedure starting with the raw counts. Can I simply string the methods together, starting with batch effect correction, followed by library size normalisation, and then the within-sample normalisations?
  
  I would appreciate any insights or suggestions on this. Thanks
  
  **Tags:** rna-seq, normalization
  
  > **Comments:**
  > **username_1**: Please be more specific about your experimental design (e.g. number of samples, factors involved, inputs, desired outputs). General questions don't usually get answered well on Bioinformatics Stack Exchange.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2024-02-03. Score: 2
  
  All factors you mention bar the batch effects can be addressed by some sort of normalization (I use a modified version of [UQpgQ2](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5411036/)). Batch effects can be addressed using ComBat/SVA/ComBat-seq but my team's experience with them has been bad - they introduce artifacts and skew the data quite a bit especially if the batch effect is not pronounced.
  
  Unfortunately, there is no way to do simple comparisons without huge caveats. You're better off using DESeq2 to perform statistically sound comparisons using the batch variable as a covariate.
  
  
  ---
  
  ### Answer by username_1 on 2024-02-04. Score: 1
  
  Have a look through the DESeq2 manual. It goes into a lot of detail about how it works, and how you can use it to do all the things you're asking about:
  
  <https://www.bioconductor.org/packages/devel/bioc/vignettes/DESeq2/inst/doc/DESeq2.html>
  
  The standard workflow already has all these things strung together, and works fairly well for the most common differential expression tasks:
  
  > # Quick start
  >
  > Here we show the most basic steps for a differential expression analysis. There are a variety of steps upstream of DESeq2 that result in the generation of counts or estimated counts for each sample, which we will discuss in the sections below. This code chunk assumes that you have a count matrix called cts and a table of sample information called coldata. The design indicates how to model the samples, here, that we want to measure the effect of the condition, controlling for batch differences. The two factor variables batch and condition should be columns of coldata.
  >
  > ```
  > dds <- DESeqDataSetFromMatrix(countData = cts,
  >                              colData = coldata,
  >                              design= ~ batch + condition)
  > dds <- DESeq(dds)
  > resultsNames(dds) # lists the coefficients
  > res <- results(dds, name="condition_trt_vs_untrt")
  > # or to shrink log fold changes association with condition:
  > res <- lfcShrink(dds, coef="condition_trt_vs_untrt", type="apeglm")
  >
  > ```
  
  
  ---
  
  