Skip to main content
NIHPA Author Manuscripts logoLink to NIHPA Author Manuscripts
. Author manuscript; available in PMC: 2021 Mar 9.
Published in final edited form as: J R Stat Soc Ser C Appl Stat. 2018 Dec 9;68(3):683–704. doi: 10.1111/rssc.12330

RNASeqDesign: A framework for RNA-Seq genome-wide power calculation and study design issues

Chien-Wei Lin 1,*, Serena G Liao 2,*, Peng Liu 3, Yong Seok Park 4, Mei-Ling Ting Lee 5, George C Tseng 6
PMCID: PMC7941184  NIHMSID: NIHMS1626256  PMID: 33692596

Abstract

Massively parallel sequencing (a.k.a. next-generation sequencing, NGS) technology has emerged as a powerful tool in characterizing genomic profiles. Among many NGS applications, RNA sequencing (RNA-Seq) has gradually become a standard tool for global transcriptomic monitoring. Although the cost of NGS experiments has dropped constantly, the high sequencing cost and bioinformatic complexity are still obstacles for many biomedical projects. Unlike earlier fluorescence-based technologies such as microarray, modelling of NGS data should consider discrete count data. In addition to sample size, sequencing depth also directly relates to the experimental cost. Consequently, given total budget and pre-specified unit experimental cost, the study design issue in RNA-Seq is conceptually a more complex multi-dimensional constrained optimization problem rather than one-dimensional sample size calculation in traditional hypothesis setting. In this paper, we propose a statistical framework, namely “RNASeqDesign”, to utilize pilot data for power calculation and study design of RNA-Seq experiments. The approach is based on mixture model fitting of p-value distribution from pilot data and a parametric bootstrap procedure based on approximated Wald test statistics to infer genome-wide power for optimal sample size and sequencing depth. We further illustrate five practical study design tasks for practitioners. We perform simulations and three real applications to evaluate the performance and compare to existing methods.

Keywords: power calculation, next-generation sequencing (NGS), RNA-Seq, study design

1. INTRODUCTION

With the advent of next-generation sequencing (NGS) technology, RNA-Seq has been rapidly developed to characterize transcriptomic profiling, which is now impacting almost every field of life science (Ozsolak and Milos, 2011; Conesa et al., 2016). Compared to the once popular microarray technology, RNA-Seq has many advantages, such as higher per-base resolution, better reading accuracy, wider detection range, and ability to discover novel transcripts/isoforms. As the sequencing cost has constantly dropped, quantification of expression profiles by RNA-Seq experiment has become more feasible, which provides more accurate detection of differentially expressed (DE) genes. When designing RNA-Seq experiments, sample size calculation is critical because of the still high sequencing cost and limited budget.

Traditional power calculation considers relationships between four elements: effect size, α (type-I error), statistical power (1 – type-II error (β)) and sample size. For example, for a given effect size (usually estimated from pilot or published data) and α (normally 5%), one is interested in calculating the sample size to reach a pre-specified statistical power (e.g. power=80%) or, equivalently, to estimate statistical power given certain sample size (e.g. N = 50). When analyzing high-throughput genome-wide experimental data, the situation becomes more complicated because of the well-known multiple comparison consideration. Since thousands of hypotheses are tested simultaneously, controlling type-I error rate and reducing false discovery in a genome-wide sense becomes critical. As a result, conservative family-wise error rate (FWER) and the scientifically more applicable false discoverate rate (FDR; Benjamini and Hochberg (1995)) have been proposed in the literature to replace type-I error α. Lee and Whitmore (2002) first addressed the importance of power and sample size calculation for microarray data and provided a procedure based on ANOVA for controlling FWER. Since then, several other methods were proposed to control FWER for microarray power calculation (Jung et al., 2005; Dobbin and Simon, 2005; Jung and Young, 2012). In addition, Ferreira and Zwinderman (2006), Liu and Hwang (2007) and van Iterson et al. (2009) incorporated the concept of FDR and utilized pilot data to account for genome-wide scenario for more realistic power calculation. Gadbury et al. (2004) introduced the concept of expected discovery rate (EDR; see definition in Section 2.1) to replace univariate power 1-β for addressing genome-wide detection power. They proposed a method combining parametric mixture modeling and parametric bootstrap to estimate the required sample size. However, their method only considered an arbitrary p-value cut-off to declare DE genes instead of controlling FDR. Conceptually, FDR is the genome-wide analogue of type-I error α from univariate hypothesis testing and EDR is the genome-wide analogue to statistical power 1 − β. Since genome-wide screeing considers the whole set of DE genes, specifying one single effect size for power calculation is not adequate and considering the effect size distribution of DE genes is biologically more reasonable. A good power calculation method for high-throughput experimental data should replace α and 1 − β with FDR and EDR and consider the distribution of effect sizes among DE genes.

Compared to microarray power calculation, RNA-Seq data have three unique features that bring new statistical challenges and require novel study design concepts. Firstly, RNA-Seq analysis aligns randomly sequenced short reads to the transcribed regions of each gene and produces count data by nature. Continuous measurements from microarray intensities are often modeled with a normality assumption after log transformation. This normality assumption restricted direct extension of many methods from microarray to RNA-Seq experiments. RNA-Seq data need to be modeled with discrete distributions, and both sampling and biological variation should be considered. For this reason, the negative binomial model (Robinson et al., 2010) has gained popularity compared to the Poisson distribution. Secondly, the genome-wide distribution of expression levels tends to be skewed with the majority of sequencing reads focused on a small portion of highly expressed genes (often housekeeping genes), leaving most genes with low counts. Transcripts with short lengths also tend to have low sequencing counts. A desirable power calculation method should accommodate the detection bias for low-expressed or short-length transcripts. Finally and most importantly, RNA-Seq experiments usually adopt a multiplex sequencing technique by adding “barcode” sequences to each sample so they can be distinguished and sorted in downstream data analysis. For example, the Illumina HiSeq 2500 platform runs eight lanes in each experiment (known as a flow cell) with a fixed cost. A researcher can choose to process one sample per lane, which results in roughly 250 million reads or three samples per lane each with 83 million reads. In other words, a researcher can choose to triple the sample size (denoted by N hereafter) by reducing the sequencing depth (denoted by R) to one-third for the same sequencing cost. The power calculation solution space increases from a classical one-dimensional (sample size, N) decision to a two-dimensional (N and R) optimization that leads to a new study design problem. Figure 1A illustrates a scenario for RNA-Seq power calculation and study design. Denote by C = B(N, R) the pre-specified cost function based on selected sample size N and sequencing depth R, and Pow(N, R) the estimated genome-wide power EDR. The problem can be formulated as searching the best combination of N* and R* to optimize genome-wide power Pow(N, R) under a given budget constraint C = B(N, R). Figure 1B illustrates the importance of extending the four key elements of univariate power calculation (type-I error α, power 1-β, univariate effect size, sample size N) to RNA-Seq genome-wide power calculation using FDR, EDR, effect size distribution among DE genes, and two dimensional sample size N and sequencing depth R, respectively.

Figure 1.

Figure 1

(A) Illustration of two-dimensional optimal design. The X and Y axes represent sample size N and sequencing depth R respectively, and Z axis is genome-wide power EDR. Genome-wide power hypersurface Pow(N, R) is a function of N and R. Increasing N and R produces higher power (from dark color to light color). When given a fixed cost/budget C, we seek the optimal design(N*(C), R*(C)) that maximizes Pow(N, R) under the constraint of pre-specified cost function B(N, R) ≤ C. (B) Comparison of the four key elements between univariate power calculation and RNA-Seq genome-wide power calculation. (C) Multiple testing comparisons framework.

Several methods have been proposed for RNA-Seq power calculation. Busby et al. (2013) developed an interactive web tool, called “Scotty”, for RNA-Seq power calculation, where the method was based on t-test with normal assumption. Hart et al. (2013) developed the “RNASeqPower” package and proposed a power calculation formula based on negative binomial model and a score test under generalized linear model framework. This method, however, is based on univariate hypothesis testing and does not consider FDR and EDR control. Li et al. (2013) proposed a power calculation method based on exact test of negative binomial model. The method failed to consider multiple comparisons, genome-wide power and sequencing depth. Ching et al. (2014) proposed a method which calculated power by simulating data. Wu et al. (2015) proposed another simulation-based method “PROPER”, which considered sequencing depth as a stratified factor rather than a second dimension for power evaluation. Both these two methods suffered heavy computing burden. Bi and Liu (2016) applied voom transformation to the count data and performed power calculation based on t-test framework.

In this paper, we develop a unified statistical framework, namely “RNASeqDesign”. Supplement Table S1 shows comparison of features of some existing RNA-Seq power calculation tools and RNASeqDesign. We will consider multiple comparison FDR control, genome-wide EDR power, distribution of DE gene effect sizes, count data modeling, simultaneous optimization of sample size and sequencing depth, and incorporation of pilot data information. Additionally, RNASeqDesign allows unequal case/control sample sizes, provides a variability estimate of the power curve, and performs study design tasks and cost-benefit analysis. Unlike other methods, RNASeqDesign estimates all required parameters in the model from pilot data and does not need user-defined arbitrary input parameters such as fold change cut-off, proportion of null genes or fold change distribution of DE genes.

The paper is structured as follows. In Section 2, we present the statistical framework of RNASeqDesign using Wald test from pilot data, model fitting of the resulting p-value distribution, parametric bootstrapping and two-dimensional smoothing for fast N and R optimization. In Section 3, we apply the methodology to develop practical cost-benefit analysis and solve five selected study design tasks. Simulations and three real data applications are shown in Section 4. Section 5 provides final conclusions and discussion. An R package “RNASeqDesign” and all data and code are available on author’s website (http://tsenglab.biostat.pitt.edu/software.htm) and github (https://github.com/MasakiLin/RNASeqDesign).

2. GENOME-WIDE POWER CALCULATION IN RNA-SEQ

2.1. Notations and terminology

Consider D0={Y=(ygj)G×(n0+n1),X=(xj)1×(n0+n1)} (1 ≤ g ≤ G, 1 ≤ j ≤ n0 + n1) a pilot RNA-Seq dataset, where ygj represents the read count for gene g of subject j, xj is the case-control indicator (xj=0 for controls and xj=1 for cases), and n0 and n1 are the number of controls and cases in the pilot data. Denote by θp = n1/n0 the sample size ratio between the number of cases (n1) and controls (n0). Let Rj=∑g=1Gygj be the total number of reads observed in subject j (a.k.a. library size). We assume equal library size R0 for all pilot subjects (for real data, this can be achieved by between-lane normalization). As discussed in the previous section, we consider genome-wide power calculation under genome-wide type-I error control using FDR=E(number of claimed false positives/number of claimed positives given non-zero claimed positives)× P(non-zero claimed positives) (i.e. FDR = E(V/R|R > 0)×P(R > 0) in Figure 1C). Note that R=0 is a rare event that never happened in all the computing in this paper. Hence to simplify the notation, we use FDR = E(V/R|R > 0) hereafter (also known as the definition of positive FDR). Following Gadbury et al. (2004), we define expected discovery rate, EDR=E(number of claimed true positives/number of total true positives) (i.e. EDR = E(S/(m − m0)) in Figure 1C), as the genome-wide average power that we aim to estimate. The basic statistical framework of RNASeqDesign is to estimate the genome-wide power EDR^(N0,N1,R∣D0) (equivalent to the notation Pow(N, R) in Section 1) based on the pilot data D0 for designing a future experiment with targeted sample sizes in control and case groups (N0 and N1; denote θ = N1/N0 as the case-control ratio in targeted samples) and targeted sequencing depth R, under certain FDR control (e.g. FDR=5%). We assume equal sequencing depth R for all subjects in the planned experiment.

2.2. Four sequential steps for genome-wide RNA-Seq power calculation

We propose four sequential steps in RNASeqDesign to estimate EDR as the desired genome-wide power. In Step I, p-values and effect size distribution of all genes from pilot data are obtained using a negative binomial generalized linear model (GLM) and Wald test. In Step II, a two beta mixture model is applied to characterize the genome-wide p-value distribution and to estimate the proportion of true DE genes. In Step III, a parametric bootstrapping method based on DE posterior probability is used to simulate and transform the genome-wide p-value distribution towards the targeted sample size and sequencing depth. In the final step, two-dimensional smoothing and hypersurface fitting is applied to stabilize the estimation of EDR^(N,R∣D0) for any N and R. Below, we describe the details of each step.

Step I. Differential expression analysis in pilot data

We assume that ygj ∼ NB(μgj, δ), where μgj is the mean and δ is a common dispersion parameter for gene g and subject j. The probability mass function of ygj is

P(ygj)=Γ(δ+ygj)Γ(δ)ygj!(δ−1μgj1+δ−1μgj)ygj(11+δ−1μgj)δ,

where Γ(t)=∫0∞xt−1e−xdx. Based on a GLM framework, we adopt a link function log(μgj)=log(Rj)+βg0+βg1⋅xj, where Rj is the library size for subject j and xj is the case-control indicator.

The log-likelihood becomes:

Lg=∑j=1n[logΓ(δ+ygj)Γ(δ)ygj!+ygjlog(δ−1μgj)−(ygj+δ)log(1+δ−1μgj)].

βg0 and βg1 can be estimated using maximum likelihood estimator (MLE) and variance-covariance matrix of the MLE is approximated by inverse of the estimated Fisher information matrix. To simplify the formula, we assume all samples have the same total reads R0, i.e. Rj = R0, 1 ≤ j ≤ n.

For a given gene g, our goal is to test H0:βg1=0 versus H1:βg1≠0. The Wald test procedure is used in our method in order to apply a parametric boostrapping approach in Step III. The Wald test statistic Zg approximately follows a standard normal distribution, i.e.

Zg=β^g1Var(β^g1)∼N(0,1)

under the null hypothesis that no differential expression exists in gene g. MLE estimators β^g0 and β^g1 can be obtained by solving the equations

{∑i=01∑j=1ni[ygij−(ygij+δ)×qij(1+qij)]=0∑i=01∑j=1ni[xijygij−(ygij+δ)×xijqij(1+qij)]=0,

where qij=δ−1R0eβg0+βg1xij.

The Fisher information matrix for gene g is

Fg=−E(∂2Lg∂(βg0,βg1))=(n0R0eβg01+δ−1R0eβg0+n1R0eβg0+βg11+δ−1R0eβg0+βg1n1R0eβg0+βg11+δ−1R0eβg0+βg1n1R0eβg0+βg11+δ−1R0eβg0+βg1n1R0eβg0+βg11+δ−1R0eβg0+βg1).

The covariance matrix of (β^g0,β^g1)T is

Cov(β^g0β^g1)=Fg−1(β^g0,β^g1)

Therefore variance estimator of β^g1 is

Var(β^g1)=1n0×(1+θpeβ^g1θpR0eβ^g0+β^g1+1+θpθpδ^), (1)

where θp = n1/n0 (Zhu and Lakkis, 2014).

Here, the over-dispersion parameter is estimated by the conditional maximum likelihood in “edgeR” (Robinson and Smyth, 2008) assuming common dispersion across all genes. The reason for using common dispersion parameter is that when sample size is small (which is usually the case in pilot studies), estimation of tag-wise dispersion parameter is not precise with large variation. The detailed discussion about common dispersion and tag-wise dispersion is included in Supplement Section 1. Denote by pg the p-value of gene g from the aforementioned Wald test. As we will see in Step III, the formula of variance estimator from Wald test statistic (Z-statistics) in Equation (1) has a convenient form to project the observed Z-statistics distribution from pilot data to the targeted sample size N0 and N1 and sequencing depth R, whereas other DE methods, such as edgeR and DEseq, do not have this theoretical convenience. In Section 4, we will compare performance of Wald test with exact test and likelihood ratio test to justify that Wald test not only provides a convenient mathematical form for power calculation but also generates comparable hypothesis testing performance.

Step II. Mixture model fitting for p-value distribution

Traditionally, a beta-uniform mixture (BUM) model (Allison et al., 2002) was used to fit the p-value distribution; that is, using a beta distribution for DE gene p-values and a uniform distribution for non-DE gene p-values. However, when sample size is small (which is often the case of pilot data for power calculation) and data are discrete instead of continuous, the p-value distribution of non-DE genes often shows a heavy right tail, which suggests an improper fitting of uniform distribution under null hypothesis (see example in Supplement Figure S1). For example, Efron (2004) mentioned the need to estimate the null distribution and applied a non-parametric approach. Here, we propose to fit another beta distribution for non-DE genes, which results in a two beta mixture model to fit the p-value distribution (p1, p2, · · · ,pG) from pilot data in Step I. Specifically, the two beta model contains a non-DE gene f0(p) component and a DE gene f1(p) component. Among non-DE genes, f0 is a beta distribution with shape parameter r0 and s0 with constraints 1 ≤ r0 and s0 ≤ 1. When r0 = s0 = 1, the non-DE beta distribution is equivalent to a uniform distribution. For DE genes, f1 is a beta distribution with shape parameter r1 and s1 with constraints r1 ≤ 0.9 and 1 ≤ s1. The density of p-value distribution is f(p|r0, s0, r1, s1, λ) = λf0(p|r0, s0)+(1−λ)f1(p|r1, s1), where λ is the proportion of non-DE genes. Note that the constraints for r0, r1, s0, and s1 are necessary to guarantee the proper shapes of the p-value distributions of non-DE and DE genes, respectively.

For estimation of the five parameters (r0, s0, r1, s1, and λ), estimation of λ (the proportion of non-DE genes) has been a well-known difficult task in the literature. In our extensive simulation experience, we have found that the beta-uniform mixture (BUM) model and two beta mixture model have their pros and cons depending on whether the non-DE p-value distribution from real data deviates from uniform distribution or not. Below, we describe a robust two-step estimation procedure we adopted: we first used maximum likelihood approach and checked if the resulting non-DE beta distribution deviated from the uniform distribution, by comparing the cumulative distribution function (CDF) from 0.5 to 1. If the partial CDF difference was less than 0.1, the non-DE p-value distribution was similar to uniform. We then used a convex decreasing density estimate (CDD) method (Langaas et al., 2005) (implemented by “convest” function in R package “limma”) to re-estimate λ. Then we fixed λ and used MLE again to estimate the four remaining shape parameters. If the partial CDF difference between non-DE beta distribution and uniform distribution was large enough (> 0.1), we simply reported the MLEs of the five parameters based on a two beta model. To compare the performance of CDD and pure MLE methods, we performed a simulation setting of beta-uniform (simulation I) and four settings with different two-beta mixture (simulation II-V; see Supplement Figure S2). The result showed that CDD outperformed pure MLE in simulation I in estimating λ but pure MLE outperformed CDD in simulation II-V (Supplement Figure S3). The result justified the threshold selection of 0.1 for partial CDF difference above.

Step III. Parametric bootstrapping based on DE posterior probability to estimate EDR

Conceptually, the p-value distribution for non-DE genes with zero effect size follows a uniform distribution (or a beta distribution as estimated in Step II) and does not change when the sample size and sequencing depth change. On the other hand, the p-value distribution for those DE genes become more significant as sample sizes and/or sequencing depth increase. Equation (1) is the key formula to allow transformation of Z-statistics of DE genes to the targeted sample size N0 and sequencing depth R. Let Ig be the latent variable representing gene g to be DE (Ig=1) or non-DE (Ig=0), where Ig follows Bernoulli distribution with parameter p equivalent to the posterior probability calculated based on the estimated two beta mixture model from Step 2. Then we resample the DE status for each gene based on the posterior probability to transform the Z-statistics to a new Z-statistics at targeted N0 and R. Intuitively, if posterior probability of Ig for a gene is large, then it is more likely to be a DE gene. Note that the p-value distribution for DE genes shrinks towards 0 when sample size and sequencing depth increases (as a result from Equation (1)), whereas for non-DE genes the p-value distribution stays unchanged as a uniform distribution. Based on this idea, Z-statistics and p-values are updated for DE genes in each parametric bootstrap but they stay unchanged for non-DE genes. Parametric bootstrapping procedures are described as below.

  1. The posterior probability of the DE indicator Ig is calculated as
    P(Ig=1∣λ^,r^0,s^0,r^1,s^1,pg)=(1−λ^)f^1(pg∣r^1,s^1)λ^f^0(pg∣r^0,s^0)+(1−λ^)f^1(pg∣r^1,s^1),
    where λ^, r^0, s^0, r^1 and s^1 are estimated from Step 2. In the b-th simulation (1 ≤ b ≤ B), we randomly simulate Ig(b) from P(Ig=1∣λ^,r^0,s^0,r^1,s^1,pg) for 1 ≤ g ≤ G.
  2. Only Z-statistics from DE genes are transformed. Specifically we derive
    Zg(b)=Ig(b)×Zg×N0×(1+θpeβ^g1θpR0eβ^g0+β^g1+(1+θp)θpδ^)n0×(1+θeβ^g1θReβ^g0+β^g1+(1+θ)θδ^)+(1−Ig(b))×Zg.

    In Equation (1), Var(β^1) can be considered as a function of n0, θp and R0. If we assume the effect size of a DE gene remains the same as n0 and R0 change, the above formula can transform the test statistics of DE genes to targeted N0, θ and R.

  3. Compute p-value based on the 2-sided test: pg(b)=2×(1−Φ(|Zg(b)|)) if gene g with Ig(b)=1, where Φ is a CDF of a standard normal distribution. When Ig(b)=0, pg(b)=pg.

  4. Control FDR at level α:
    1. In the bth simulation, calculate FDR(b)(u)=∑g=1G(1−Ig(b))⋅χ(pg(b)≤u)∑q=1Gχ(pg(b)≤u) for a given p-value threshold u, where χ(·) is an indicator function that takes value one when the statement is true and zero otherwise. The denominator counts the number of claimed positives and the numerator is the number of false positives based on the simulated Ig.
    2. Let u(b)=argmaxu(FDR(b)(u))≤α), where u(b) is the p-value threshold that controls FDR at α level for the bth simulation.
  5. The estimated EDR for the bth simulation can be calculated as EDR^(b)=∑g=1GIg(b)⋅χ(pg(b)<u(b))∑g=1GIg(b). Finally, the robust estimated EDR for all B simulations is: EDR^(N0,N1,R∣D0)=medianb(EDR^(b)). The first and third quantile of estimated EDR can be also derived and used to account for the variability of EDR estimation. For simplicity of presentation, we assume N0 = N1 = N hereafter although the restriction can be relaxed easily and use EDR(N, R|D0) to represent EDR(N0, N1, R|D0).

Step IV. Two-dimensional smoothing and hypersurface fitting

The inverse power law model has been widely applied in the machine learning field to model learning accuracy curves with increasing sample size (Mukherjee et al., 2003; Ding et al., 2014). Here we propose a two-way inverse power law hypersurface model to fit the EDR hypersurface:

EDR(N,R∣D0)=1−b×N−c−d×R−e. (2)

We first calculate ED^R(N,R∣D0) from Step I-III for grid selections of N and R. The inverse power law hypersurface is then fitted by minimizing sum of squared errors using BFGS quasi-Newton method (Lewis and Overton, 2009) in R with “optim” function to estimate parameters b, c, d and e. With smoothing and hypersurface fitting, the EDR estimation is more stable and can be calculated for any N and R that are used for cost-benefit analysis in the next section. In Step III, we use a small B = 10 for faster computing and rely on hypersurface smoothing to reduce variability.

3. COST-BENEFIT ANALYSIS AND STUDY DESIGN

3.1. Cost function and cost-benefit analysis

In most power calculations, the experimental cost grows linearly with sample size and no complicated cost-benefit analysis is needed. In RNA-Seq analysis, however, the trade-off between sample size N and sequencing depth R brings new challenges. A common goal of study design is to pursue the best N and R balance to achieve the maximum EDR under a fixed budget constraint, as described in Figure 1. The decision is given by (N*,R*)=argmax(N,R)EDR^(N,R∣D0) under the constraint that B(N, R) ≤ C, where C is a pre-specified maximum budget.

To illustrate the cost function B(N, R), we checked the cost of an RNA-Seq experiment at the Sequencing and Microarray Facility core at MD Anderson. As of Dec 30, 2016, the sample preparation cost is $500 dollars per sample. Sequencing cost for HiSeq 2000 100bp single-end reads is $1,500 per lane for their internal users. Each lane normally generates ∼250 million single-end reads. For illustration purposes, we take the most popular sequencing platforms Illumina HiSeq 2000/2500 as an example and define R as the number of lanes used for a sample. For example, if we pool three samples per lane, R = 1/3 lane. The resulting cost function becomes: B(N, R) = A+(2×N)×S1+(2×N)×S2×R, where A is the fixed cost (e.g. personnel expense), S1 is the sample collection cost per sample that includes cost of tissue collection, sample preparation and bioinformatics cost and so on, and S2 is the sequencing cost per lane.

In Figure 2, we develop paired plots to display dynamic changes of four variables N, R, B(N, R) and EDR(N, R), and to illustrate the cost-benefit analysis. The lower panel of N-R plots show all feasible designs of (N, R) and the upper panel of B-EDR plots show the corresponding budget B(N, R) versus genome-wide power EDR(N, R) for each (N, R) design. In practice, R is allowed with limited discrete selections (e.g. R=1/6, 1/5, 1/4, 1/3, 1/2, 1, 1.5 and 2). For a given (N, R) design, if there exists another allowed (N0, R0) design with lower cost and larger EDR, we consider this (N, R) design inadmissible. (N, R) design is admissible if and only if there exists no other feasible (N′, R′) on Quadrant II when (N, R) is treated as the origin in the B-EDR plot (see Supplement Figure S4 for illustration). In Figure 2, admissible (N, R) designs are plotted in black and inadmissible designs are shown in light grey.

Figure 2.

Figure 2

Illustration of two-dimensional optimal design in five tasks (T1-T5). First row demonstrates B-EDR plots which show the relationship between cost (B, unit in thousand dollars) and EDR, and second row is N-R plot which shows the corresponding designs (N, R). Each symbol represents a specific combination of N and R. There is an one-to-one correspondence between each symbol in B-EDR plot and N-R plot. The third row shows in each task which factors (among N, R, EDR, FDR, and B) are fixed, target (the subject of optimization), and output. Gray symbols in figures refer to inadmissible designs and black ones refer to admissible designs. Blue lines illustrate fixed conditions in each task, e.g., fixed budget 20 million dollars in T1, and targeted 85% power in T2. Symbols in red refer to the final decision in T1 and T2, and examples to illustrate ideas in T3, T4 and T5. In T3, symbols A and B are two designs given same maximum sample size (N = 80) where design A achieves maximum EDR with deepest sequencing. Although design A has higher EDR than B, it costs a lot more as well. In T4, circle symbols represent maximum sample size as 80 whereas cross symbols represent the case of more samples are available (up to N = 130). Consequently, recruiting more samples can achieve higher EDR and reduce cost. T5 evaluates the gain of power as sequencing depth gets deeper.

3.2. Study design issues

As shown in Supplement Table S1, existing methods for RNA-Seq data fail to consider many key features relevant to experimental data distribution, genome-wide inference and biological objectives. Particularly, no other tool has developed guidance on decision making under different practical scenarios. This is understandable because no other method has simultaneously studied N, R, B(N, R) and EDR(N, R) under pre-specified FDR control. Here we propose the following five tasks under practical scenarios and utilize our power calculation framework to provide study design guidance. Figure 2 shows corresponding output of N-R and B-EDR paired plots for each task, which is implemented in the “RNASeqDesign” R package. Results in the figure are generated from simulated pilot data and will be discussed further in Section 4.

  • Task 1 (T1): Given a fixed maximum budget C, what is the optimal design (N*, R*)? This is the most common design that has been illustrated in the Introduction Section. The red cross in Column T1 of Figure 2 shows the optimal design.

  • Task 2 (T2): For a desired power U, how much money should I request in the grant and what is the corresponding design? The decision is given by (N*, R*) = argmin(N,R) B(N, R) such that EDR(N, R) ≥ U. In Column T2 of Figure 2, the red cross shows the solution.

  • Task 3 (T3): For a fixed maximum sample size V (e.g. due to limitation of tissue availability), what is the maximum achievable EDR and the corresponding cost and R? The decision is given by (N*, R*) = argmax(N,R) EDR(N, R) such that N ≤ V. The red circle A in Column T3 of Figure 2 shows the highest achievable EDR.

  • Task 4 (T4): For a given available sample size (maximum number of currently available tissues) V1, is it worthwhile to recruit more samples (i.e. increase number of available tissues to V2)? Will it significantly increase power and reduce cost? In this case, we will calculate (N(1), R1) = argmax(N,R) EDR(N, R) such that N ≤ V1 and similarly (N(2), R2) = argmax(N,R) EDR(N, R) such that N ≤ V2. The additional power we will gain is ΔEDR = EDR(N(2), R2)−EDR(N(1), R1) and the cost difference is ΔB = B(N(2), R2)−B(N(1), R1) (or plus the recruitment cost of additional samples if necessary). In Column T4 of Figure 2, increasing allowable N from V1 to V2 helps achieve higher EDR with lower budget (red cross versus red circle).

  • Task 5 (T5): For an existing RNA-Seq experimental data with sample size N and sequencing depth R, is it worthwhile to sequence deeper (increase from R to R′) to gain more power, if remaining tissues of these N samples are available for additional sequencing? In this scenario, consider multiple possible R′ > R. Calculate the gain of power ΔEDR = EDR(N, R′) − EDR(N, R) and evaluate the additional cost ΔB = B(N, R′) − B(N, R) (see Column T5 of Figure 2).

The summary of which factors (among N, R, EDR, FDR, and B) are fixed, target (the subject to optimize), and output in each of five tasks are shown in Figure 2. Note that in all the five tasks above, maximizing power under constraint is often the goal but it may not always be the case. In many real applications, spending a lot more (ΔB) for a small increase in detection power (i.e. ΔEDR) is not desirable. To compare two potential design choices (N, R) and (N′, R′), the marginal utility index ΔU((N, R),(N′, R′)) = ΔEDR/ΔB = (EDR(N′, R′) − EDR(N, R))/(B(N′, R′) − B(N, R)) indicates the additional detection power that can be gained while spending an additional unit of budget and can provide a good measure for decision. If ΔU((N, R), (N′, R′)) < 0, (N′, R′) is inadmissible and should never be chosen.

4. SIMULATION AND REAL DATA ANALYSIS

4.1. Simulation setting

To simulate data mimicking real situations, parameter settings for our simulations are based on estimates from a real dataset downloaded from GEO (GEO accession number: GSE47474). The RNA-Seq study was designed to detect differential expression in brain regions of F344 control rats and HIV-1 transgenic rats (Li et al., 2013). RNA transcripts were sequenced in three brain regions: prefrontal cortex (PFC), hippocampus (HIP), and striatum (STR) for both HIV-1Tg and F344 rats. It includes 72 RNA samples in total (12 animals per group × 2 strains × 3 brain regions).

Similar to the data processing procedure used in the original paper, Bowtie /Tophat /Cufflinks (version 2.0.10) suites were applied to align the reads onto gene regions with the Rn4 rat reference genome. Htseq-count was used to summarize number of reads aligned to each gene. We further applied normalization method in “EDASeq” to perform both within- and between-lane normalization procedures to adjust for GC-content effect on read counts (or other gene-level effects) and unequal sequencing depths across subjects (Risso et al., 2011).

We started with HIP data (sample size N=12, total number of reads R=μ×G≈ 8.85×106, total number of genes G=14,750, average counts for each gene μ ≈ 600). Mean count per gene(μg) was calculated to generate its empirical distribution. For log fold change distribution (denoted as lfc, in log2 scale), we sampled from the tails of a truncated normal distribution with mean 0, standard deviation 0.2 and truncated at 0.49/−0.49 (corresponding to at least 40% fold change) for DE genes with positive effect and negative effect in simulation study respectively. The total number of genes (G) was set to 25,000. The proportion of DE genes was set to 15%. Among DE genes, 50% had positive effect sizes and the other 50% had negative effect sizes. The average number of mean counts was set to 800 (we scaled the empirical distribution of mean counts proportionally to match this number). We assumed there are 80 million effective reads (reads successfully aligned to gene regions) among 250 million reads per lane. The total number of reads per sample was simulated with 20 million (about 4 samples per lane) and mean count at 800 (20,000,000 reads / 25,000 genes = 800 reads/gene). The common dispersion parameter from rat dataset was estimated as 50 which reflected less biological variation in the data. To evaluate the performance in a human dataset, which tends to have larger biological variation, we simulated the data with common dispersion parameter as 5. Note that the mean counts at 800 is realistic, which corresponds to mixing four samples in one lane. Although the mean count seems high, majority of reads are aligned to highly expressed house-keeping genes and many important biomarkers only had moderate sequencing depth. To investigate the impact of lower sequencing depth, we conducted an additional simulation with mean count 400 (i.e. 10 million reads; 8 samples per lane). RNASeqDesign still performed well (see Supplement Figure S5).

The detailed steps to simulate pilot data with (n0, R0) and targeted data with (N, R) are shown below.

  1. Mean counts: Randomly sample mean counts μg for each gene from empirical distribution estimated by HIP data.

  2. DE index: Generate random number rg from Uniform(0,1) for each gene, if rg ≤0.15 then gth gene is DE gene, otherwise, it is non-DE gene.

  3. Log fold change(lfc): Generate lfc from truncated normal distribution for each DE gene. In other words, the lfc for non-DE genes is set to 0.

  4. Generate count data for pilot data for each sample: If the g-th gene is DE and the j-th subject belongs to case group, then the count yg1j∼NB(μg×2lfcg/2,δ). If the subject belongs to control group, then yg0j∼NB(μg×2−lfcg/2,δ). If the g-th gene is non-DE gene, then yg.j∼NB(μg,δ).

  5. Generate count data for true data for each sample: If the g-th gene is DE and the j-th subject belongs to case group, then the count yg1j∼NB(μg×2lfcg/2×RR0,δ). If the subject belongs to control group, then yg0j∼NB(μg×2−lfcg/2×RR0,δ). If the g-th gene is a non-DE gene, then ygi.∼NB(μg×RR0,δ)

4.2. Comparison of Wald test with exact test and likelihood ratio test

The Wald test is applied using approximations (plugged-in standard deviation and chi-squared approximation) that sometimes raise concerns of accuracy as compared to the exact test. To demonstrate validity of Wald test, we first compared it with exact test under negative binomial distribution using “exactTest” function in “edgeR” package. Since the true labels of DE genes under simulation settings are known, we can compare the receiver operating characteristic (ROC) curve and the area under curve (AUC) of the Wald test and the exact test. We compared the two tests under 12 different simulation settings: common dispersion parameter was chosen to be 40, 50, or 60; fold change was chosen to be ≥ 1.15, 1.20, 1.25, or 1.30. Pilot data sample size n0 was fixed as 4 for illustration of small sample size. In each setting, 50 datasets were generated to assess the performance variation. Given each simulated data, two tests were performed separately and ROC curves were generated by comparing the declared genes with the true DE labels. Supplement Figure S6 showed the ROC curves (with boxplot of 50 datasets). The ROC curves of exact and Wald test almost overlapped with each other, indicating good concordance between these two tests even when n0 is as small as 4. The mean and standard deviation of AUC were presented in Supplement Table S2 for both tests.

In addition to comparisons using simulation data, we also used rat sequencing data mentioned above to compare the p-value distribution of Wald test and exact/likelihood ratio test (implemented by R function “exactTest” and “glmLRT” in “edgeR”, respectively). The results (shown in Supplement Figure S7) indicated an almost perfect concordance of p-value distribution between (1) Exact test vs. likelihood ratio test and (2) Wald test vs. exact test in all three brain regions.

4.3. Performance Evaluation

In Section 2, we introduced several existing methods for power calculation of RNA-Seq data. Here, we compare our proposed method with seven other methods: (1) Poisson exact test (Li et al., 2013), (2) Negative binomial (NB) test (Li et al., 2013), (3) RNASeqPower, (4) Scotty, (5) RNAseqCalculator, (6) PROPER, and (7) ssizeRNA under the simulation setting mentioned in Section 4.1. Different methods have their own model specifications and parameters. The detailed specification of each method is described in Supplement Section 2.

We simulated B=20 pilot datasets (b = 1, 2, ...B) with pilot sample size n0= 2, 4 and 8 with R0=20M reads. For each pilot dataset with (n0, R0), the projected power for target sample size Nj=5, 10, 20, 30, 40, 50, 100 (j=1, 2, …, 7) and R from a power calculation method is denoted as EDR^(Nj,R;n0,R0). Since the underlying truth is known, the true EDR for each (Nj, R) can be estimated as EDR^(Nj,R)=∑b=1BEDR^(b)(Nj,R)B where EDR^(b)(Nj,R) is the actual EDR in the b-th simulation when sample size Nj and R are simulated. We propose the following benchmarks based on root mean squared error (RMSE) to evaluate performance of different power calculation methods:

  1. Benchmark 1: Consider R = R0 for one-dimensional power calculation from n0 to Nj (j = 1, 2, …,7). The RMSE of estimated EDR from power calculation is
    ∑b=1B∑j=17[EDR^j(b)(Nj,R;n0,R0)−EDR^(Nj,R)]2B⋅7.
  2. Benchmark 2: Similar to Benchmark 1 but consider RMSE of N^(b)(EDR=80%,R;n0,R0), the sample size needed to achieve 80% EDR in the b-th simulation.

  3. Benchmark 3: Similar to Benchmark 1 but consider different targeted sequencing depth from R0=20M (quarter lane) to Ri=40M (half lane), 80M (one lane), 120M (one and half lanes), 160M (two lanes) (i = 1, 2, 3, 4). The RMSE of EDR becomes

∑b=1B∑j=17∑i=14[EDR^ij(b)(Nj,Ri;n0,R0)−EDR^(Nj,Ri)]2B⋅7⋅4.

Figure 3 shows estimated EDR curves and true EDR curves when comparing RNASeqDesign with seven other existing methods. Supplement Table S3 shows the RMSEs of Benchmark 1 and Benchmark 2 and computing time. The predictive EDR curves from RNASeqDesign was closest to the true EDR curve and the performance improved when sample size of pilot data (n0) increased, as expected. The result also showed affordable computing time (6–7 minutes using a regular laptop) for this realistic simulation setting. Note that, ssizeRNA performed relatively well when n0 = 2. This is because true values of several parameters (e.g. non-DE gene proportion and fold change distribution of DE genes) are given to ssizeRNA as they are requirements of the method. Power curves of the method do not change when n0 increases.

Figure 3.

Figure 3

Methods comparison in simulation study. RNASeqP.Cal. stands for RNASeqPowerCalculator. Different columns represented different methods. Different rows represented different pilot data sample size (n0=2, 4, and 8 respectively). Gray curve was true EDR and black curve was predicted EDR from each method. We ran 20 pilot data under same settings to assess the variation of performance. Confidence interval of the predicted EDR at each targeted sample size (one of N=5, 10, 20, 30, 40, 50, 100) was derived by mean predicted EDR plus/minus 1.96 × standard error of mean predicted EDR. *: RNASeqP.Cal. estimated the proportion of null genes as 100% when n0 = 2 and 4 and the method returned NA for predicted power.

We ran another simulation to show the performance of our method by altering dispersion parameter from 5 to 2, 10 and 20 and the result showed similar conclusions in Supplement Figure S8. Smaller dispersion values corresponded to larger biological coefficients of variation. In our experience, we have observed larger dispersion in TCGA human experiments and smaller variation in the HIV rat data. Additionally, the performance is also similar when total counts per sample is only 10 million (equivalent to 8 samples per lane; shown in Supplement Figure S5).

In Benchmark 3, we address the goodness of fit of predicted EDR to true EDR in two-dimensional (N and R) scheme. Most existing methods do not take into account the varying sequencing depths except for Scotty. Since Scotty already performed poorly in varying N in Figure 3 and Supplement Table S3, we did not expect them to perform well in Benchmark 3. Thus, we only presented Benchmark 3 for RNASeqDesign. Here we varied fold change to 1.15, 1.20 and 1.25, and repeated 10 times. As shown in Supplement Figure S9, RNASeqDesign generated small RMSE of estimated EDR when simultaneously varying N and R and the performance improved when pilot sample size (n0) increased.

4.4. Study design and N-R/B-EDR paired plots

In Section 3 we introduced the N-R and B-EDR paired plot as a decision tool to help researchers in different design tasks. Here we illustrate with simulation results how RNASeqDesign can guide in decision making for each task in Figure 2.

For task T1 in Figure 2, say when the budget was limited to $200,000, how can we find the optimized EDR and corresponding design (N*, R*)? From B-EDR plot, the optimized EDR was 0.87 and from N-R plot, the corresponding design was (N* = 110, R* = 1/4 lane). For task T2, which was in the situation when a desired power was set to 0.85, we were interested in how much minimum money was needed. From B-EDR plot, the minimum cost was $175,000 and from corresponding N-R plot, the design was (N* = 100, R* = 1/4 lane). For task T3, when only limited sample size was available, say 80, the maximum EDR and corresponding cost and R were of interest. If two design decisions (A and B) were compared, where A referred to R = 2 lanes and B was R = 1/2 lane. From B-EDR plot, decisions A and B reached similar level of EDR (EDR = 0.88 for A and EDR = 0.86 for B). However, the cost of decision A was 2.5 times of the cost from decision B. Therefore, best design when R = 1/2 lane should be a better choice of final design. For task T4, suppose we have an initial cohort started with N = 80 (represented as circles) and we were considering whether recruiting 50 more samples (represented as crosses) would help to increase power and/or reduce cost. From the plots, we can see that recruiting more samples with shallower depth actually reached higher power with lower cost than smaller sample size with deeper sequencing ((N, R) = (130, 1) to reach B = $520,000 and EDR = 0.93 versus (N, R) = (80, 2) to reach B = $560,000 and EDR = 0.88). For task T5, it mimicked the situation when there was only a fixed number of samples, say 60, and ask if sequencing deeper would gain more power. Different symbols corresponded to different sequencing depths (circle: R=1/4 lane; triangle: R=1/2 lane; plus: R=1 lane; cross: R=3/2 lane; diamond: R=2 lane). From the plots, the EDR increased as the sequencing depth became deeper. However, after R reached 1 lane, the increment of EDR started to diminish and sequencing deeper became a waste of budget.

5. REAL APPLICATIONS

In this section, we demonstrate the performance of RNASeqDesign compared to other methods in three real applications: HIV-transgenic rat data, TCGA ER+ versus ER− data, and TCGA early versus late stage data. The settings of the other existing methods were similar to what were used in simulations unless otherwise specified.

HIV-transgenic rat data

We first used aforementioned rat data from HIP brain region. Since it is a relatively weak signal dataset, we set the input parameter of proportion of DE genes to 10% for other methods. In real applications, the true underlying EDR is unknown. We instead showed how different methods performed by comparing the predicted EDR from smaller sample size (pretended as pilot data) to full sample size (N=12). We randomly subsampled n0=2, 4 and 10 from full data to treat as pilot data and repeated independent subsampling for 10 times for each n0. For full data, we also derived predicted EDR and treated it as a reference to compare with predicted EDR from pilot data (shown in the Figure 4(A)). This comparison was repeated for each method separately. When n0 = 10, we observed that RNASeqPower, RNASeqPowerCalculator and PROPER reached almost 100% predicted EDR at small targeted sample size (e.g. N = 2), which was not reasonable in practical setting. For most existing methods, when pilot sample size increased, the predicted EDR curves from pilot data did not change accordingly. We suspected that it was because those methods only utilized minimal level of effective information from pilot data and hence the benefits from incorporating larger pilot data were limited. Although no underlying truth was available for this application, predicted EDR from RNASeqDesign seemed to give more reasonable results.

Figure 4.

Figure 4

Real data analysis: (A) HIP dataset (B) TCGA ER dataset, (C) TCGA Stage dataset. RNASeqP.Cal. stands for RNASeqPowerCalculator. Different columns correspond to different methods. Rows refer to different pilot sample sizes. Predicted EDR from each method is in black color, and the predicted EDR from full data (HIP, N=12) or surrogate EDR (TCGA ER and Stage dataset) are in gray color. *: RNASeqP.Cal. estimated the proportion of null genes as 100% when n0 = 2 and 4 in (A) and the method returned NA for predicted power.

TCGA breast cancer ER+ versus ER−

We next evaluated different methods on the publicly available TCGA breast cancer dataset with 775 tumor samples. In breast cancer, ER status is probably the most indicative biomarker in disease progression, survival prediction and treatment selection. Based on clinical information, 567 ER+ and 171 ER− tumor samples (about 3:1 ratio) were available. Although the underlying true EDR curve is still unknown, with the large sample size in this example we applied a subsampling technique to estimate the converging number of true DE genes and a “surrogate EDR curve”, which we reasonably believe is close to the underlying true EDR curve. We first subsampled N=2 to 100 ER− samples with proportional ER+/ER− ratio at 3 folds (i.e. N=6 to 300 ER+ samples) and detected DE genes using Wald test at FDR=5% with more than 40% fold change to remove spurious genes with small biological effect. We performed 30 independent subsampling for each varying sample size, the number of detected DE genes were then multiplied by 0.95 to remove false positives (since FDR was controlled at 5%), and the scatter plot was shown in Supplement Figure S10. By calculating the median number of detected DE genes at each sample size, we estimated the converging number of DE genes to be around 6500 and obtained the “surrogate EDR curve” by scaling the curve to [0,1] (i.e. y-axis divided by 6500).

To perform power calculation, we subsampled n0=4, 10 and 20 from ER− patients and proportionally 3 folds (i.e. 12, 30 and 60) of ER+ patients as pilot data. We kept the sample size ratio between ER+ and ER− groups for a realistic power calculation and to demonstrate the capability of RNASeqDesign on handling unbalanced sample size design. ER status comparison is well-known to be a strong contrast with many DE genes and thus we set input parameters of 30% of DE genes when implementing power calculation with the seven existing methods. From Figure 4(B)), we compared the predicted EDR from each methods to the surrogate EDR curve. The result clearly show best performance of RNASeqDesign, followed by PROPER. In RNASeqDesign, the performance improved as n0 increased from 4 to 20, as expected. For PROPER, the predicted EDR curves remained the same for different n0 and deviated greatly from the surrogate EDR curve at a critical sample size region around N = 20 ∼ 40.

TCGA breast cancer early versus late stage

For early versus late stage comparison, we classified stage I, IA and IB as early stage tumors (N=126), removed patients with stage II and assigned stage III, IIIA, IIIB, IIIC and IV as late stage tumors (N=181). The input parameter of proportion of DE genes is set as 10% for the seven existing power calculation methods. We similarly subsampled n0=4, 10 and 20 pilot data for each group and repeated for 10 times. To obtain the surrogate EDR curve, we followed the similar subsampling procedure in ER comparison and presented the result in Supplement Figure S11. The converging number of DE genes was estimated at 1,500. Figure 4(C) shows the surrogate EDR curve and predicted EDR curves from each power calculation method. Similar to the ER comparison example, RNASeqDesign clearly performed the best and the performance improved when pilot sample size n0 increased.

Note that the surrogate curve goes down a little when pilot sample size n0 is close to 100. To recall, we remove spurious genes with small biological effect by using both q-values and fold changes, however, when N gets large enough, p-values do not change much (hence q-values do not change much either), but the fold changes on the cut-off boundary are less stable, which results in the decrease of the number of declared DE genes and the following surrogate EDR (see Supplement Figure S11).

6. DISCUSSION AND CONCLUSION

Careful power calculations and study design are critical in high-throughput experiments to save cost and maximize the yield of experimental effort. Due to simultaneous testing of thousands of genes, power calculation of high-throughput experiments needs to consider multiple comparison control, genome-wide statistical power and distribution of effect sizes in DE genes. For RNA-Seq, we need to further consider the nature of count data and the balance between sample size and sequencing depth, which leads to a constrained optimization problem in the study design. Although several methods have been proposed for RNA-Seq power calculation, these methods miss many of the necessary elements described above. In this paper, we propose a RNASeqDesign statistical framework to accommodate all the features using information from a pilot dataset. RNASeqDesign have several unique advantages over existing methods: (1) better model fitting: Our method is based on widely accepted negative binomial model for count data, instead of Poisson or Gaussian assumption; (2) genome-wide type I error control and power: We use genome-wide type I error control (FDR) and genome-wide power (EDR), which consider DE gene detection in the realm of whole genome, instead of at the single gene level; (3) better accuracy: Simulation and real data analysis demonstrate high accuracy of RNASeqDesign; (4) optimal study design guidance: We consider cost-benefit analysis and the influence of both sample size and read depth on genome-wide power, which provides guidance for scientists making decisions in five commonly encountered study design tasks (i.e. T1 to T5); (5) better utilization of pilot data: Our method performs self-learning and better utilizes the pilot data, compared to existing methods and there is no need to specify arbitrary fold change for DE gene detection or proportion of true DE genes. To our knowledge, RNASeqDesign is the first statistical tool that comprehensively addresses the power calculation and study design issues for RNA-Seq data with the key elements mentioned in Supplement Table S1. As the sequencing cost keeps dropping, RNA-Seq experiments will become more and more prevalent and projects of large sample sizes will be expected. Thoughtful study planning, including the five tasks included in this paper, will be essential. We believe RNASeqDesign will provide guidance for an economical and effective study design under a realistic setting.

When a pilot dataset from the same lab is available, it is the most desirable situation and our RNASeqDesign framework can provide the most accurate power calculation solution. When pilot dataset is not available, one can attempt to identify existing public datasets (such as from GEO) with similar biological setting (e.g. similar tissue, disease or treatment) and apply RNASeqDesign. Simulating data based on prior knowledge is also an option. When both are not possible, one should consider to use simulation-based method PROPER, which is the best performer in our extensive evaluation when pilot data are not available. If possible, a recommended strategy is to perform a two-stage design by first generating suitable pilot data (e.g. n0=n1=6 with adequately deep sequencing). RNASeqDesign can then help determine the optimal sample size and sequencing depth needed to achieve the optimal power under a certain budget. The budget description and modelling in this paper implicitly used the popular Illumina HiSeq platforms but the framework is generalizable and applicable to any single-end or paired-end NGS platform.

Currently we present our framework based on DE analysis in two group comparison. However, given the GLM framework, it is easy to generalize the framework to more complicated designs (e.g. multiple groups or continuous outcomes) by modifying the design matrix in GLM and deriving the appropriate test statistics to extrapolate the statistical power under larger sample size N or varying sequencing depth R.

There are a few technical considerations and limitations in our model and performance evaluation. In RNASeqDesign, we consider problem of thousands of simultaneous hypothesis tests and we use EDR (defined as the proportion of true detected positives among all true DE genes) as the genome-wide power. In contrast, in RNASeqPower and other methods, they usually pursue statistical power or type I error control for a single test setting. Consequently, the power from different methods are not directly comparable although we have made best effort to match them. Secondly, the Wald test in RNASeqDesign is based on Gaussian approximation of the Z-statistics. Our simulation result has shown comparable performance of Wald test with the exact test used in edgeR. One possible reason of the good approximation and performance in Wald test could be the nature of sequencing, i.e., most genes have large enough number of counts. Hence although the pilot sample size could be small, rich counts sufficed for the normality approximation of the Wald test to hold. Finally, RNASeqDesign adopts the mixture model fitting on p-value distribution. It is possible that some applications may generate p-value distributions that deviate from the parametric mixture model. More sophisticated semi-parametric model fitting will be necessary for realistic power calculation. An R package “RNASeqDesign” and all source code are available on the authors’ website (http://tsenglab.biostat.pitt.edu/software.htm) and github (https://github.com/MasakiLin/RNASeqDesign) for reproducing results in this paper or applying to future applications.

Supplementary Material

supinfo1

ACKNOWLEDGEMENT

The authors are supported by the National Institutes of Health NIH R01CA190766.

Contributor Information

Chien-Wei Lin, Division of Biostatistics, Medical College of Wisconsin, Milwaukee, WI 53226.

Serena G. Liao, Department of Biostatistics, University of Pittsburgh, Pittsburgh, PA 15261.

Peng Liu, Department of Biostatistics, University of Pittsburgh, Pittsburgh, PA 15261.

Yong Seok Park, Department of Biostatistics, University of Pittsburgh, Pittsburgh, PA 15261.

Mei-Ling Ting Lee, Department of Epidemiology and Biostatistics, University of Maryland, College Park, MD 20742.

George C. Tseng, Department of Biostatistics, University of Pittsburgh, Pittsburgh, PA 15261

References

  1. Allison Gadbury, Heo Fernandez, Lee Prolla, and Weindruch (2002). A mixture model approach for the analysis of microarray gene expression data. Computational Statistics & Data Analysis 39, 1–20. [Google Scholar]
  2. Benjamini Y and Hochberg Y (1995). Controlling the False Discovery Rate: A Practical and Powerful Approach to Multiple Testing. Journal of the Royal Statistical Society. Series B (Methodological) 57, 289–300. [Google Scholar]
  3. Bi R and Liu P (2016). Sample size calculation while controlling false discovery rate for differential expression analysis with RNA-sequencing experiments. BMC bioinformatics 17, 146. [DOI] [PMC free article] [PubMed] [Google Scholar]
  4. Busby M. a., Stewart C, Miller C. a., Grzeda KR, and Marth GT (2013). Scotty: A web tool for designing RNA-Seq experiments to measure differential gene expression. Bioinformatics 29, 656–657. [DOI] [PMC free article] [PubMed] [Google Scholar]
  5. Ching T, Huang S, and Garmire LX (2014). Power analysis and sample size estimation for RNA-Seq differential expression. RNA (New York, N.Y.) 20, 1684–96. [DOI] [PMC free article] [PubMed] [Google Scholar]
  6. Conesa A, Madrigal P, Tarazona S, Gomez-Cabrero D, Cervera A, McPherson A, Szcześniak MW, Gaffney DJ, Elo LL, Zhang X, and Mortazavi A (2016). A survey of best practices for RNA-seq data analysis. Genome Biology 17, 13. [DOI] [PMC free article] [PubMed] [Google Scholar]
  7. Ding Y, Tang S, Liao SG, Jia J, Oesterreich S, Lin Y, and Tseng GC (2014). Bias correction for selecting the minimal-error classifier from many machine learning models. Bioinformatics (Oxford, England) 30, 3152–8. [DOI] [PMC free article] [PubMed] [Google Scholar]
  8. Dobbin K and Simon R (2005). Sample size determination in microarray experiments for class comparison and prognostic classification. Biostatistics 6, 27–38. [DOI] [PubMed] [Google Scholar]
  9. Efron B (2004). Large-scale simultaneous hypothesis testing: The choice of a null hypothesis. Journal of the American Statistical Association 99, 96–104. [Google Scholar]
  10. Ferreira JA and Zwinderman A (2006). Approximate Sample Size Calculations with Microarray Data: An Illustration. Statistical Applications in Genetics and Molecular Biology 5,. [DOI] [PubMed] [Google Scholar]
  11. Gadbury GL, Page GP, Edwards J, Kayo T, Prolla TA, Weindruch R, Permana PA, Mountz JD, and Allison DB (2004). Power and sample size estimation in high dimensional biology. Statistical Methods in Medical Research 13, 325–338. [Google Scholar]
  12. Hart SN, Therneau TM, Zhang Y, Poland GA, and Kocher J-P (2013). Calculating Sample Size Estimates for RNA Sequencing Data. Journal of Computational Biology 20, 970–978. [DOI] [PMC free article] [PubMed] [Google Scholar]
  13. Jung S-H, Bang H, and Young S (2005). Sample size calculation for multiple testing in microarray data analysis. Biostatistics 6, 157–169. [DOI] [PubMed] [Google Scholar]
  14. Jung S-H and Young SS (2012). Power and sample size calculation for microarray studies. Journal of biopharmaceutical statistics 22, 30–42. [DOI] [PMC free article] [PubMed] [Google Scholar]
  15. Langaas M, Lindqvist B, and Ferkingstad E (2005). Estimating the proportion of true null hypotheses, with application to DNA microarray data. Journal of the Royal Statistical Society: Series B (Statistical Methodology) 67, 555–572. [Google Scholar]
  16. Lee MTM-LT and Whitmore GA (2002). Power and sample size for DNA microarray studies. Statistics in Medicine 21, 3543–3570. [DOI] [PubMed] [Google Scholar]
  17. Lewis A and Overton M (2009). Nonsmooth optimization via BFGS. Submitted to SIAM J. Optimiz pages 1–35. [Google Scholar]
  18. Li C-I, Su P-F, Guo Y, and Shyr Y (2013). Sample size calculation for differential expression analysis of RNA-seq data under Poisson distribution. International journal of computational biology and drug design 6, 358–375. [DOI] [PMC free article] [PubMed] [Google Scholar]
  19. Li C-I, Su P-F, and Shyr Y (2013). Sample size calculation based on exact test for assessing differential expression analysis in RNA-seq data. BMC bioinformatics 14, 357. [DOI] [PMC free article] [PubMed] [Google Scholar]
  20. Li MD, Cao J, Wang S, Wang J, Sarkar S, Vigorito M, Ma JZ, and Chang SL (2013). Transcriptome Sequencing of Gene Expression in the Brain of the HIV-1 Transgenic Rat. PLoS ONE 8, e59582. [DOI] [PMC free article] [PubMed] [Google Scholar]
  21. Liu P and Hwang JTG (2007). Quick calculation for sample size while controlling false discovery rate with application to microarray analysis. Bioinformatics 23, 739–746. [DOI] [PubMed] [Google Scholar]
  22. Mukherjee S, Tamayo P, Rogers S, Rifkin R, Engle A, Campbell C, Golub TR, and Mesirov JP (2003). Estimating dataset size requirements for classifying DNA microarray data. Journal of computational biology : a journal of computational molecular cell biology 10, 119–142. [DOI] [PubMed] [Google Scholar]
  23. Ozsolak F and Milos PM (2011). 2010 - Ozsolak - Nat Rev Genet - RNA sequencing advances, challenges and opportunities.PDF. Nature Reviews Genetics 12, 87–98. [DOI] [PMC free article] [PubMed] [Google Scholar]
  24. Risso D, Schwartz K, Sherlock G, and Dudoit S (2011). GC-Content Normalization for RNA-Seq Data. BMC Bioinformatics 12, 480. [DOI] [PMC free article] [PubMed] [Google Scholar]
  25. Robinson MD, McCarthy DJ, and Smyth GK (2010). edgeR: a Bioconductor package for differential expression analysis of digital gene expression data. Bioinformatics 26, 139–140. [DOI] [PMC free article] [PubMed] [Google Scholar]
  26. Robinson MD and Smyth GK (2008). Small-sample estimation of negative binomial dispersion, with applications to SAGE data. Biostatistics (Oxford, England) 9, 321–32. [DOI] [PubMed] [Google Scholar]
  27. van Iterson M, ‘t Hoen P, Pedotti P, Hooiveld G, den Dunnen J, van Ommen G, Boer J, and Menezes R (2009). Relative power and sample size analysis on gene expression profiling data. BMC Genomics 10, 439. [DOI] [PMC free article] [PubMed] [Google Scholar]
  28. Wu H, Wang C, and Wu Z (2015). PROPER: comprehensive power evaluation for differential expression using RNA-seq. Bioinformatics (Oxford, England) 31, 233–41. [DOI] [PMC free article] [PubMed] [Google Scholar]
  29. Zhu H and Lakkis H (2014). Sample size calculation for comparing two negative binomial rates. Statistics in Medicine 33, 376–387. [DOI] [PubMed] [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Supplementary Materials

supinfo1

RESOURCES