Hi, when I got my DESeq2 analysis result, I found the log2Foldchange values are between -1 to 1. But when I checked the normalized read counts, I found they are hugely different between my two types of tissue (3 replicates for each type). Is that normal?
My code is like:
dat <- read.table("gene_count_matrix.txt", header = T, sep = 't',row.names = 1)
info <- read.table("coldata_new_gene_count_matrix.txt",header = T, sep = 't')
dds <- DESeqDataSetFromMatrix(dat, info, ~condition)
keep <- rowSums(counts(dds)) >= 10
dds <- dds[keep,]
ddsDE <- DESeq(dds)
res <- results(ddsDE, alpha = 0.05)
resOrdered <- res[order(res$log2FoldChange),]
write.csv(resOrdered, "ordered-deseq-bylog2Foldchange.csv")
normCounts <- counts(ddsDE, normalized = T)
significant <- subset(deseqRes, padj <= 0.05)
allsig <- merge(normCounts, significant, by = 0)
write.csv(allsig, "allsig.csv")
and below are the first few lines of file allsig.csv after sorting by log2Foldchange values:
Row.names tissue1-1 tissue1-2 tissue1-3 tissue2-1 tissue2-2 tissue2-3 baseMean log2FoldChange lfcSE stat pvalue padj sig
MSTRG.7961 150507.7668 17694.19986 187132.2524 0 0 0 59222.36983 0.410154233 0.038185186 10.74118738 6.52E-27 1.19E-25 yes
MSTRG.8280 11661.75168 10264.81487 10922.62702 0 0 0 5474.865595 0.338591246 0.024689173 13.71415893 8.35E-43 2.30E-41 yes
MSTRG.6510 9063.094413 7807.907894 9338.368434 0 0 0 4368.228457 0.331803813 0.024749546 13.4064605 5.54E-41 1.48E-39 yes
MSTRG.1623 14123.13734 3114.782577 8844.780332 0 0 0 4347.116708 0.331657578 0.027596673 12.01802772 2.86E-33 6.29E-32 yes
MSTRG.3693 11115.83303 5507.43843 7914.658668 0 0 0 4089.655021 0.329823637 0.025579678 12.89397164 4.87E-38 1.22E-36 yes
MSTRG.1234 3798.200001 8256.268973 9145.975222 0 0 0 3533.407366 0.325426244 0.026074106 12.48082062 9.50E-36 2.24E-34 yes
MSTRG.6628 279.822908 5962.783327 14490.52595 0 0 0 3455.522032 0.324753543 0.048297713 6.723994259 1.77E-11 1.57E-10 yes
MSTRG.14705 12592.03086 3181.827224 3776.214345 0 0 0 3258.345405 0.322993152 0.027958812 11.55246341 7.17E-31 1.48E-29 yes
MSTRG.9867 28742.56436 30643.59415 22767.4146 1.941760083 0 0 13692.58581 0.315937168 0.017910255 17.64001513 1.21E-69 5.39E-68 yes
Read more here: Source link