Is normalized counts stored in "$pseudo.alt" after estimating common dispersion?
## edgeR run script
library(edgeR)
setwd("C:/Documents and Settings/user/My Documents/")
# define input Expression file name to read
input <- "test.exp.txt"
# input Expression file
raw.data <- read.delim(input)
# read the sample columns
d <- raw.data[,2:204] # Edit it accordingly
# read row or gene names
rownames(d) <- raw.data[,1]
# define the groups
group <- c(rep("A",68),rep("B",65),rep("C",70)) # Edit it accordingly
##edgeR stores data in a simple list-based data object called a DGEList. The function readDGE makes a DGEList object directly.
d <- DGEList(counts = d, group=group)
## By default, calcNormFactors uses the TMM method and the sample whose 75%-ile (of library-scale-scaled counts) is closest to the mean of 75%-iles as the reference.
d = calcNormFactors(d)
##To estimate common dispersion:
## The common dispersion is the "squared coefficient of variation", where the coefficient of variation gives the amount of variability in the true abundance for each gene between replicates
#The square root of the common dispersion gives the coefficientcient of variation of biological variation (BCV)#
d = estimateCommonDisp(d, verbose=TRUE)
# Normalized counts ???
d$pseudo.alt
# export Normalized counts table to a file
write.table(d$pseudo.alt, file="TMM_edgeR_Normalized.test.exp.txt", row.names = TRUE, col.names = TRUE, sep = "\t" )
Can't you simply test this explicitly by plotting the data against the input counts? Or examining the summary characteristics (i.e. mean, median)?
I am having the same issue, I don't understand how to extract normalized count table after finding calcNormFactors, as the manual says 'users are advised not to interpret the psuedo-counts as general-purpose normalized counts
How did you resolved this?'.
A: output TMM normalized counts with edgeR