The results obtained by running the
results command from DESeq2 contain a "baseMean" column, which I assume is the mean across samples of the normalized counts for a given gene.
How can I access the normalized counts proper?
I tried the following (continuing with the example used here):
> dds <- DESeqDataSetFromMatrix(countData = counts_data, colData = col_data, design = ~ geno_treat) > dds <- DESeq(dds) estimating size factors estimating dispersions gene-wise dispersion estimates mean-dispersion relationship final dispersion estimates fitting model and testing > res <- results(dds, contrast=c("geno_treat", "prg1_HS30", "prg1_RT"))
Here is what I have for the first gene:
> res["WBGene00000001",]$baseMean  181.7862 > mean(assays(dds)$mu["WBGene00000001",])  231.4634 > mean(assays(dds)$counts["WBGene00000001",])  232.0833
assays(dds)$counts corresponds to the raw counts.
assays(dds)$mu seems to be a transformation of these counts approximately preserving their mean, but this mean is very different from the "baseMean" value, so these are likely not the normalized values.