Normalisation in edgeR
1
0
Entering edit mode
thkapell ▴ 10
@tkapell-14647
Last seen 22 months ago
Helmholtz Center Munich, Germany

I tried to normalize my data in edgeR as instructed in the respective vignette. I calculated CalcNormFactors and then proceeded with estimating the dispersion as usual. However, when I visualized my data in a boxplot, they still look the same as the unnormalized. My dataset was a single factor experiment with 4 different levels. So, my question is: does CalcNormFactors simply calculate the size factors to be applied to the different libraries or does it actually normalize them? I therefore wondered whether one should apply a cpm or another method on top or not.

Thanks,

Theo
 

edgeR normalization calcnormfactors • 1.5k views
ADD COMMENT
0
Entering edit mode

Read the posting guide and give us some code.

ADD REPLY
0
Entering edit mode

We don't know what you mean by "visualized my data". Until you tell us what you did in more detail, we can't answer your question. Obviously, calcNormFactors does not change the raw data so, if you're just looking at that, you won't see any change.

ADD REPLY
0
Entering edit mode

By "visualised the data" I mean plotting boxplots of the stacked gene values of all my samples. Below is the code I used for the "visualisation" of the unnormalised data:

unnorm.data<-stack(as.data.frame(log2(data.dge.removed$counts+1)))
colnames(unnorm.data)<-c("Reads",'Sample')
unnorm.data$Condition<-sample_info$condition[unnorm.data$Sample]

ggplot(unnorm.data, aes(x=Sample,y=Reads, fill=Condition))+
  geom_boxplot()+
  labs(title="Unnormalized reads")+
  theme(panel.background = element_rect(fill=NA, color = "black"),
        plot.background = element_blank(),
        aspect.ratio = 0.5,
        legend.background = element_blank(),
        plot.title = element_text(face = "bold", hjust = 0.5),
        strip.background = element_rect(fill = NA, color = "black"),
        axis.text.x = element_text(angle = 270, vjust=0.5),
        axis.line = element_line(colour = "black", size = 1),
        axis.text = element_text(colour = "black", size = 10, face = "bold"),
        axis.ticks = element_line(color = "black",size = 1),
        axis.title.x = element_blank(),
        axis.title.y = element_text(colour = "black", size = 10, face = "bold"),
        legend.key = element_rect(fill = "white"))

 

ADD REPLY
3
Entering edit mode
@gordon-smyth
Last seen 3 hours ago
WEHI, Melbourne, Australia

does CalcNormFactors simply calculate the size factors to be applied to the different libraries

Yes, that is exactly what it does. It does what the documentation says it does!

or does it actually normalize them?

There is no such thing as a "normalized count", as I have said many times on this help forum. The edgeR User's Guide tells you that:

"Note that normalization in edgeR is model-based, and the original read counts are not themselves transformed."

I therefore wondered whether one should apply a cpm or another method on top or not.

Yes, certainly you need to use cpm() or rpkm() if you want to see normalization effects. Just follow the documentation and examples.

 

ADD COMMENT

Login before adding your answer.

Traffic: 639 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6