Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • mrandel
    Junior Member
    • Sep 2013
    • 3

    DESeq2 fold change does not match normalized counts data

    I am trying to understand how DESeq2 calculates Log2foldchange, because it does not match my calculations of fold change from my normalized counts.

    My script:
    CountTable_POS = read.table("DIF_pos_counts", header=TRUE, sep="")
    Design = data.frame( row.names = colnames( CountTable_POS ),
    condition = c( "untreated", "untreated", "untreated",
    "treated", "treated", "treated" ),
    type = c( "single-end", "single-end", "single-end",
    "single-end", "single-end","single-end" ) )
    dds_pos<-DESeqDataSetFromMatrix(countData = CountTable_POS,
    colData = Design,
    design = ~ condition)
    dds_pos<-DESeq(dds_pos, fitType="local")
    norm<-counts(dds_pos, normalized=T)
    write.csv(as.data.frame(norm), file="norm_counts.csv")
    res_pos<-results(dds_pos, contrast=c("condition", "treated", "untreated"))
    write.csv(as.data.frame(res_pos), file="DESeq2_out.csv")

    RESULTS
    from norm_counts.csv:
    Locus Control1 Control2 Control3 Treated1 Treated2 Treated3 Mean_Control Mean_Treated Basemean Fold change
    2R_188654 3.8127 5.7220 5.7191 1.9351 4.9898 2.9518 5.0846 3.2922 4.1884 0.6475
    2R_188736 3.8127 3.8147 6.6723 1.9351 4.9898 5.9036 4.7666 4.2762 4.5214 0.8971

    From DESeq2_out:
    Locus Basemean Log2foldchange P value Fold change
    2R_188654 4.1884 -0.3108 0.4093 0.8062
    2R_188736 4.5214 -0.0819 0.8279 0.9448

    As you can see, the basemeans (mean of control and treated counts) match- which tells me there is no internal error- but the fold changes do not. Why is this???
  • dpryan
    Devon Ryan
    • Jul 2011
    • 3478

    #2
    Fold-changes are shrunken, so they won't match what you calculate by hand (the shrinkage produces more reliable results). If you want the number that will more or less match what you're calculating them have it output the MLE results (use "addMLE=T" in results()).

    Comment

    Latest Articles

    Collapse

    • SEQadmin2
      Proteomic Platforms: How to Choose the Right Analytical Strategy to Improve Detection and Clinical Applications
      by SEQadmin2


      Proteomics platforms are evolving rapidly, with advances in mass spectrometry and affinity-based approaches expanding what researchers can detect and at what scale. As the field moves toward deeper proteome coverage and clinical applications, scientists face an increasingly complex landscape of tools. This article will explore how researchers are navigating these choices to find the right platform for their work.

      The systematic characterization of the human proteome has
      ...
      Today, 11:48 AM
    • SEQadmin2
      Advanced Sequencing Platforms Tackle Neuroscience’s Toughest Genomics Problems
      by SEQadmin2



      Genomics studies in neuroscience face a special challenge due to the brain’s complexity and scarcity of samples. Mapping changes in cell type and state using conventional next-generation sequencing methods remains challenging. Advances in technologies like single-cell sequencing, spatial transcriptomics, and long-read sequencing have opened the door to deeper studies of the brain and diseases like Alzheimer’s, amyotrophic lateral sclerosis (ALS), and schizophrenia.
      ...
      07-09-2026, 11:10 AM
    • SEQadmin2
      Cancer Drug Resistance: The Lingering Barrier to Rising Survival
      by SEQadmin2



      Cancer survival rates have significantly increased in the last few decades in the United States, reaching a combined 70% 5-year survival rate by 2021. Behind this number, there are years of research to find new therapies, drug targets, and early detection methods. But there is one core challenge that keeps slowing down these advances, and it’s about drug resistance.

      There is no single reason why many patients don’t respond to treatment as expected. Cancer is...
      07-08-2026, 05:17 AM

    ad_right_rmr

    Collapse

    News

    Collapse

    Topics Statistics Last Post
    Started by SEQadmin2, Today, 11:10 AM
    0 responses
    8 views
    0 reactions
    Last Post SEQadmin2  
    Started by SEQadmin2, 07-13-2026, 10:26 AM
    0 responses
    30 views
    0 reactions
    Last Post SEQadmin2  
    Started by SEQadmin2, 07-09-2026, 10:04 AM
    0 responses
    39 views
    0 reactions
    Last Post SEQadmin2  
    Started by SEQadmin2, 07-08-2026, 10:08 AM
    0 responses
    25 views
    0 reactions
    Last Post SEQadmin2  
    Working...