Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • saint_667
    Junior Member
    • Aug 2013
    • 5

    #1

    Within Sample Correlation of 2 genes - Rna-seq

    Hi Guys,

    I am doing some differential expression analysis of rna seq data using deseq2 . I have 12 different samples and i am using the raw count data and then inputting the matrix in deseq2.

    my question is that if i wanted to compare a correlation of Gene A and Gene B within samples (not between samples - as they are co-expressed): do I do this on the raw counts or normalized counts.

    so I have 12 values for Gene A across 12 samples
    and 12 values for Gene B across 12 samples

    doing a raw count correlation gives me around rho 0.8 something
    however normalizing using the method in DESeq2 will scale each sample differently by size factors and the rho goes down to 0.5

    anyway i am not sure how i should be doing the correlation (raw or normalized), if normalized then which method is preferable for within sample comparisons for 2 different genes.

    Thank you for taking the time to read this and hope someone can give me some advice.
  • saint_667
    Junior Member
    • Aug 2013
    • 5

    #2
    bump!!

    just bumping the post up - as i posted it very late in the evening.

    Comment

    • Michael Love
      Senior Member
      • Jul 2013
      • 333

      #3
      hi,

      Note that DESeq2 doesn't really help you out with this question, as it focuses on gene-by-gene differential expression, and the transformations are most useful for visualizing and clustering samples.

      You don't want the sequencing depth as a factor in the correlation. Consider a situation where gene A and B are not correlated, but you sequence the samples so that each sample has double the number of reads as the previous sample. Then you will get a really high correlation which has no biological significance.

      So you could* do:

      nc <- counts(dds,normalized=TRUE)
      cor(nc[idx,])

      where idx gives the index of genes you want to find correlations for.

      *However, I would also consider batch effects if you are calculating gene-gene correlations and the samples were processed in batches. This would be another way to get spurious large-in-absolute-value correlations. You can check for batch effects using either of the transformations and the plotPCA workflow in the DESeq2 vignette.

      If the samples cluster by batch, then the cqn package vignette explains how to get "normalized expression values", where the normalization takes care of sequencing depth, GC-content bias and gene length bias:

      Comment

      • saint_667
        Junior Member
        • Aug 2013
        • 5

        #4
        Thank you for clearing this up

        hi michael,

        thank you for clearing this up and giving a comprehensive response to this problem. i was thinking along the same lines. someone suggested to use the vsd transformed data from deseq2 and then plot these correlations

        - that however gives really high correlations, almost in line with non-normalized data. i understand that transformations from deseq2 are useful if we want to perform clustering

        - the method that you suggest i.e. using the normalized data makes sense to me. and then look for batch effects as well.

        thanks again

        Comment

        Latest Articles

        Collapse

        • SEQadmin2
          Multiomic Liquid Biopsy: What DNA/RNA Panels Reveal That DNA Alone Can’t
          by SEQadmin2



          Tumors contain complex mixtures of cell populations that evolve in response to treatment and host-specific factors. Tissue biopsies provide only static snapshots of a tumor’s state. But what if we could follow that evolution over time using a minimally invasive technique?

          Liquid biopsies can detect tumor-derived material circulating in the bloodstream, providing a way to study treatment response, detect emerging resistance, and discover new biomarkers. Circulating
          ...
          10-14-2026, 09:55 AM
        • SEQadmin2
          New Genomics Technologies Take Aim at Long-Standing Limits
          by SEQadmin2


          Researchers using sequencing and genomics tools often have to make trade-offs. They can choose between speed or scale, short reads or long-range information, or targeted panels or a view of the whole transcriptome. New technologies that have been released this year are built to address those tough choices.

          We asked six companies the same four questions to learn about their latest products. The new technologies bring a lot to the table, including rethinking sequencing
          ...
          09-28-2026, 10:25 AM

        ad_right_rmr

        Collapse

        News

        Collapse

        Topics Statistics Last Post
        Started by SEQadmin2, 10-22-2026, 11:13 AM
        0 responses
        40 views
        0 reactions
        Last Post SEQadmin2  
        Started by SEQadmin2, 10-22-2026, 10:48 AM
        0 responses
        29 views
        0 reactions
        Last Post SEQadmin2  
        Started by SEQadmin2, 10-15-2026, 10:52 AM
        0 responses
        41 views
        0 reactions
        Last Post SEQadmin2  
        Started by SEQadmin2, 10-14-2026, 05:39 AM
        0 responses
        45 views
        0 reactions
        Last Post SEQadmin2  
        Working...