Hi I'm using VOOM from limma to calculate DEG. However, for the statistical cutoff, effective size ( log2 fold change), I wanted to first use RNAseqPower to calculate the appropriate log fold changes.
The instruction is pretty straightforward, however what I'm confused about is how to calculate coefficient of variation of counts within each of the two groups, cv as input.
I know how to calculate CV for each gene from the cpm but I guess I'm confused about how to calculate the overall CV for the entire group? For example the gene KRAS I just need to calculate (Standard Deviation / Mean) but how do I do this for all genes and come up with a CV for each of my group?
is it for example just:
apply ( cpm, 2, function (x) sd(x)/mean(x))
thanks in advance! A.