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.

Thanks Gordon for the estimateCommonDisp. I see your point. However what I want to do was to do post lookback to see if a certain effective size given my already fixed sample size has enough power. I know that its reverse but its something I wanted to do as a side to check if the log fold cutoff makes sense. On the same line of thought, how would you pick a logfold cutoff?

My advice regarding how to choose a log fold cutoff is not to use one. As I hinted in my answer to you above, I recommend against using fold change cutoffs in a DE analysis.

More generally, it is not clear to me how relevant RNAseqPower is to a voom analysis. RNAseqPower defines fold changes differently to those that are returned by voom (limma's logFCs are shrunk whereas RNAseqPower's are not) and the statistical analysis assumed by RNAseqPower is different to what is done by limma. So voom's power may differ from what RNAseqPower predicts.