Power and Sample Size Calculation for Bulk Tissue and Single-Cell eQTL Analysis

Power and sample size calculation for bulk tissue and single-cell eQTL analysis based on ANOVA, simple linear regression, or linear mixed effects model. It can also calculate power/sample size for testing the association of a SNP to a continuous type phenotype. Please see the reference: Dong X, Li X, Chang T-W, Scherzer CR, Weiss ST, Qiu W. (2021) .

R package for power analysis for eQTL study

== TOADD ==

  • Below is example code using the package to generate the similar power analysis curve as GTEx study[^1]

[^1]: Lonsdale J and Thomas J, et al. The Genotype-Tissue Expression (GTEx) project. Nature Genetics, 45:580-585, 2013.

# library(devtools);install_github("sterding/powerEQTL")  
# sample size
N <- c(50,100,150,200,250,300)
nn <- length(N)
MAF <- seq(0.5,20,0.1)/100
nq <- length(MAF)
# number of SNPs tested (10 SNPs per gene x 24 genes in total)
# significant level (FP)
# obtain power
power_unbalanced <- array(numeric(nn*nq), dim=c(nn,nq))
for (i in 1:nn){
    for (j in 1:nq){
        # unbalanced
        result <- powerEQTL.ANOVA(MAF=MAF[j], 
                                  deltaVec = c(0.13, 0.13),
                                  verbose = F)
        power_unbalanced[i,j] <-result;
# set up graph
xrange <- range(MAF*100)
yrange <- c(0:1)
colors <- rainbow(length(N))
plot(xrange, yrange, log='x', type="n",
     xlab="MAF (%)",
     main="Power Estimation for eQTL Studies\nSig=0.05, nSNP=240 (one-way unbalanced ANOVA)")
abline(v=0, h=seq(0,1,.1), lty=2, col="grey89")
abline(h=0, v=c(1:10), lty=2,col="grey89")
# add power curves
for (i in 1:nn){
    lines(MAF*100, power_unbalanced[i,], type="l", lwd=4, col=colors[i])
legend("topleft", title="Sample size (n)", as.character(N),fill=colors, bty='n')


v0.1.3 created on Jan. 24, 2017

add GitHub URL (https://github.com/sterding/powerEQTL)


v0.1.2 created on Jan. 23, 2017

(1) revise "Description" section in DESCRIPTION file

(2) In example of "minMAFeQTL.ANOVA.Rd": "replace myntotal = 200" by "myntotal = 234"

v0.1.1 created on Jan. 19, 2017

(1) fixed a typo in minMAFeQTL.sLR.Rd: value should be minimum detectable MAF

v0.1.0 created on Jan. 15, 2017

(1) move "powerMediation" from Depends to Imports

(2) add functions 'minMAFeQTL.ANOVA' and 'minMAFeQTL.SLR'

v0.0.9 created on Jan. 13, 2017

(1) revised 'minEffectEQTL.ANOVA'

v0.0.8 created on Dec. 31, 2016

(1) edited online helps

v0.0.7 created on Dec. 30, 2016

(1) added author "Scott T. Weiss"

(2) edited online helps

v0.0.6 created on Dec. 27, 2016

(1) add intermediate output to 'minEffectEQTL.ANOVA'

(2) edited online menu for 'minEffectEQTL.ANOVA'

v0.0.5 created on Dec. 26, 2016

(1) change depends to R (>= 3.3.0)

(2) change the author order

v0.0.4 created on Dec. 12, 2016

(1) added functions 'powerEQTL.ANOVA2' and 'ssEQTL.ANOVA2'

v0.0.3 created on Dec. 12, 2016

(1) fixed a bug in powerEQTL.ANOVA.R:

gm1 = deltaVec[1]

should be

gm1 = -deltaVec[1]

(2) fixed a bug in minEffectEQTL.ANOVA: need to directly use simplified power calculation formula. So add function 'powerEQTL.ANOVA'

v0.0.2 created on Dec. 11, 2016

(1) relax the assumption in ANOVA approach: mu2-mu1 can be different from mu3-mu2

(2) add function minEffectEQTL.ANOVA to calculate minimum detectable effect size

delta/sigma. This would be helpful in design stage where we have no prior

info about delta and sigma. delta=mu2-mu1=mu3-mu2.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


0.3.4 by Weiliang Qiu, 11 days ago

https://github.com/sterding/powerEQTL and https://bwhbioinfo.shinyapps.io/powerEQTL/

Browse source code at https://github.com/cran/powerEQTL

Authors: Xianjun Dong [aut, ctb] , Xiaoqi Li [aut, ctb] , Tzuu-Wang Chang [aut, ctb] , Scott T. Weiss [aut, ctb] , Weiliang Qiu [aut, cre]

Documentation:   PDF Manual  

GPL (>= 2) license

Imports stats, nlme, GLMMadaptive, parallel

See at CRAN