i have RNA seq counts data when i apply TMM normalization why do i also get negative values beside positive one my source code is below:
library(edgeR)
RNAseq2 <-read.delim("C:\\Users\\hp folio\\Desktop\\BRCA.tsv",header = TRUE)
rnames <-RNAseq2[,1]
MA <- data.matrix(RNAseq2[,2:60])
MAA <- (2^MA)- 1
head(MAA)
dge <- DGEList(MAA)
dim(dge)
cal <- calcNormFactors(dge,method = "TMM")
RR <- cpm(cal,normalized.lib.sizes=TRUE ,log = TRUE,prior.count = 1)
hist(RR)
row.names(RR)<- rnames
write.table(RR,"C:\\Users\\hp folio\\Desktop\\TMM3.tsv",sep='\t',row.names=TRUE,col.names = TRUE)
pls:my data was log2(count+1) transformed so i have also reversed the transformation.i will be very thankful if anyone help me.
thanks a lot . i removed log=true and it worked.Can you please guide me that histogram of TMM normalized values must be in normal distribution form?
There is no reason to expect that the logCPM values would be normally distributed. Why do you think that they should? And do note that many normal distributions include negative values (for example the standard normal distribution), so if you were expecting your 'normalized' data to be normally distributed it shouldn't have bothered you that some values were negative.