Go Back   SEQanswers > Bioinformatics > Bioinformatics

Similar Threads
Thread Thread Starter Forum Replies Last Post
Start analysis from DESeq2-normalized read counts? friducha Bioinformatics 1 07-04-2015 05:40 AM
DESeq2 log2 fold change discrepancy aggp11 Bioinformatics 8 02-20-2015 08:32 AM
quantiled normalized data for DESeq2 Golsheed Bioinformatics 2 01-19-2015 10:30 AM
fold change for rna seq data without replicates Francy87 Bioinformatics 0 11-12-2014 09:47 AM
How DegSeq calculated log2(Fold change) when one of the read counts is zero... mhjung General 0 03-01-2013 10:22 AM

Thread Tools
Old 10-28-2016, 01:17 PM   #1
Junior Member
Location: Eugene, OR

Join Date: Sep 2013
Posts: 3
Default 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(, file="norm_counts.csv")
res_pos<-results(dds_pos, contrast=c("condition", "treated", "untreated"))
write.csv(, file="DESeq2_out.csv")

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???
mrandel is offline   Reply With Quote
Old 10-29-2016, 10:52 AM   #2
Devon Ryan
Location: Freiburg, Germany

Join Date: Jul 2011
Posts: 3,479

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()).
dpryan is offline   Reply With Quote

bioinformatics, deseq2, differential expression

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

All times are GMT -8. The time now is 08:44 PM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO