Hi all,
I have to do two way anova on the RNA-seq data and find out the variability that can be explained by each factor:
Time <- factor(rep(1:3,4),levels=3:1)
Sex <- factor(rep(c("Female","Male"),each=6),levels=c("Male","Female"))
design <- model.matrix(~Sex*Time)
I want to calculate the amount of the variance can be explained by factor Sex, the amount of the variance can be explained by factor Time, the amount of the variance can be explained by interaction between Sex and Time.
Would this be possible to do it using edgeR, DESeq, or limma? and if yes, how?
Thanks a lot and looking forward.
N,
Thanks a lot for your response.
Yes, I want the SS and MS for each gene separately like in anova. I need to calculate the variabilities of each factor and their interactions separately for each gene, like the following example by using anova:
Would this be possible that I do voom normalization on my data and then do exactly the same analysis as above on the voom-normalized results?
however I would like to do it also with edgeR to check for the similarities at least between two methods like limma and edgeR, or edgeR and DESeq.
Thanks.
Do what analysis? Your quantity v1 is just the proportion of SS explained by Sex, but v2 looks like a nonsense quantity. It doesn't seem to me to measure anything.
v2 is a less biased indicator of variance explained in the population by a predictor variable:
(SS_factor - df*(MS_residual))/ (SS_total + MS_residual)
It's basically the same as V1 but the normalized version if it's possible to call it so :)
OK, v2 seems to be a ratio of estimated variance components.
None of the packages will estimate variance components for you. In fact, fitting variance component models is problematic with weights (voom) or in a generalized linear model context (edgeR, DESeq).
You can simply compute a matrix of logCPM values, then repeat your anova calculation for each row.
Then this means that I can do the same anova analysis on logCPM values for each gene.
Thanks a lot.
would you mind please guide me on how I can do it?
tnx