powerEQTL.SLR {powerEQTL} | R Documentation |
Power Calculation for EQTL Analysis Based on Simple Linear Regression
Description
Power calculation for eQTL analysis that tests if a SNP is associated to a gene probe by using simple linear regression. This function can be used to calculate one of the 4 parameters (power, sample size, minimum detectable slope, and minimum allowable MAF) by setting the corresponding parameter as NULL and providing values for the other 3 parameters.
Usage
powerEQTL.SLR(
MAF,
slope = 0.13,
n = 200,
power = NULL,
sigma.y = 0.13,
FWER = 0.05,
nTests = 2e+05,
n.lower = 2.01,
n.upper = 1e+30)
Arguments
MAF |
numeric. Minor allele frequency. |
slope |
numeric. Slope of the simple linear regression. |
n |
integer. Total number of subjects. |
power |
numeric. Power for testing if the slope is equal to zero. |
sigma.y |
numeric. Standard deviation of the outcome |
FWER |
numeric. Family-wise Type I error rate. |
nTests |
integer. Number of tests (i.e., number of all (SNP, gene) pairs) in eQTL analysis. |
n.lower |
numeric. Lower bound of the total number of subjects. Only used when calculating total number of subjects. |
n.upper |
numeric. Upper bound of the total number of subjects. Only used when calculating total number of subjects. |
Details
To test if a SNP is associated with a gene probe, we use the simple linear regression
where is the gene expression level of the
-th subject,
is the genotype of the
-th subject, and
is the random error term with mean zero and standard deviation
. Additive coding for genotype is used. That is,
indicates wildtype homozygotes;
indicates heterozygotes; and
indicates mutation heterozygotes.
To test if the SNP is associated with the gene probe, we test the null hypothesis versus the alternative hypothesis
, where
.
Denote as the minor allele frequency (MAF) of the SNP. Under Hardy-Weinberg equilibrium, we can calculate the variance of genotype of the SNP:
,
where
is the variance of the
predictor (i.e. the SNP)
.
The exact power calculation formula can be derived as
where is the value at
of cumulative distribution function of non-central t distribution with
degrees of freedom
and non-centrality parameter
. And
.
Dupont and Plummer (1998) mentioned the following relationship:
So we can plug in the above equation to the power calculation formula.
Under Hardy-Weinberg equilibrium, we have ,
where
is the minor allele frequency (MAF).
Hence, the non-centrality parameter can be rewritten as
We adopted the parameters from the GTEx cohort (see the Power analysis" section of Nature Genetics, 2013; https://www.nature.com/articles/ng.2653), where they modeled the expression data as having a log-normal distribution with a log standard deviation of 0.13 within each genotype class (AA, AB, BB). This level of noise is based on estimates from initial GTEx data. In their power analysis, they assumed the across-genotype difference delta = 0.13 (i.e., equivalent to detecting a log expression change similar to the standard deviation within a single genotype class).
Value
power if the input parameter power = NULL
.
sample size (total number of subjects) if the input parameter n = NULL
;
minimum detectable slope if the input parameter slope = NULL
;
minimum allowable MAF if the input parameter MAF = NULL
.
Author(s)
Xianjun Dong <XDONG@rics.bwh.harvard.edu>, Xiaoqi Li<xli85@bwh.harvard.edu>, Tzuu-Wang Chang <Chang.Tzuu-Wang@mgh.harvard.edu>, Scott T. Weiss <restw@channing.harvard.edu>, Weiliang Qiu <weiliang.qiu@gmail.com>
References
Dupont, W.D. and Plummer, W.D.. Power and Sample Size Calculations for Studies Involving Linear Regression. Controlled Clinical Trials. 1998;19:589-601.
Dong X, Li X, Chang T-W, Scherzer CR, Weiss ST, and Qiu W. powerEQTL: An R package and shiny application for sample size and power calculation of bulk tissue and single-cell eQTL analysis. Bioinformatics, 2021;, btab385
Examples
# calculate power
powerEQTL.SLR(
MAF = 0.1,
slope = 0.13,
n = 179,
power = NULL,
sigma.y = 0.13,
FWER = 0.05,
nTests = 2e+05)
# calculate sample size (total number of subjects)
powerEQTL.SLR(
MAF = 0.1,
slope = 0.13,
n = NULL,
power = 0.8,
sigma.y = 0.13,
FWER = 0.05,
nTests = 2e+05)
# calculate minimum detectable slope
powerEQTL.SLR(
MAF = 0.1,
slope = NULL,
n = 179,
power = 0.8,
sigma.y = 0.13,
FWER = 0.05,
nTests = 2e+05)
# calculate minimum allowable MAF
powerEQTL.SLR(
MAF = NULL,
slope = 0.13,
n = 179,
power = 0.8,
sigma.y = 0.13,
FWER = 0.05,
nTests = 2e+05)