Sample size calculation based on exact test for assessing differential expression analysis in RNA-seq data

Background Sample size calculation is an important issue in the experimental design of biomedical research. For RNA-seq experiments, the sample size calculation method based on the Poisson model has been proposed; however, when there are biological replicates, RNA-seq data could exhibit variation significantly greater than the mean (i.e. over-dispersion). The Poisson model cannot appropriately model the over-dispersion, and in such cases, the negative binomial model has been used as a natural extension of the Poisson model. Because the field currently lacks a sample size calculation method based on the negative binomial model for assessing differential expression analysis of RNA-seq data, we propose a method to calculate the sample size. Results We propose a sample size calculation method based on the exact test for assessing differential expression analysis of RNA-seq data. Conclusions The proposed sample size calculation method is straightforward and not computationally intensive. Simulation studies to evaluate the performance of the proposed sample size method are presented; the results indicate our method works well, with achievement of desired power.


Background
Next generation sequencing (NGS) technology has revolutionized genetic analysis; RNA-seq is a powerful NGS method that enables researchers to discover, profile, and quantify RNA transcripts across the entire transcriptome. In addition, unlike the microarray chip, which offers only quantification of gene expression level, RNA-seq provides expression level data as well as differentially spliced variants, gene fusion, and mutation profile data. Such advantages have gradually elevated RNA-seq as the technology of choice among researchers. Nevertheless, the advantages of RNA-seq are not without computational cost; as compared to microarray analysis, RNA-seq data analysis is much more complicated and difficult. In the past several years, the published literature has addressed the application of RNA-seq to multiple research questions, including abundance estimation [1][2][3], detection of *Correspondence: yu.shyr@vanderbilt.edu 3 Center for Quantitative Sciences, Vanderbilt University, 571 Preston Building Nashville, TN, USA Full list of author information is available at the end of the article alternative splicing [4][5][6], detection of novel transcripts [6,7], and the biology associated with gene expression profile differences between samples [8][9][10]. With this rapid growth of RNA-seq applications, discussion of experimental design issues has lagged behind, though more recent literature has begun to address some of the relevant principles (e.g., randomization, replication, and blocking) to guide decisions in the RNA-seq framework [11,12].
One of the principal questions in designing an RNAseq experiment is: What is the optimal number of biological replicates to achieve desired statistical power? (Note: In this article, the term "sample size" is used to refer to the number of biological replicates or number of subjects.) Because RNA-seq data are counts, the Poisson distribution has been widely used to model the number of reads obtained for each gene to identify differential gene expression [8,13]. Further, [12] used a Poisson distribution to model RNA-seq data and derive a sample size calculation formula based on the Wald http://www.biomedcentral.com/1471-2105/14/357 test for single-gene differential expression analysis. It is worth noting that a critical assumption of the Poisson model is that the mean and variance are equal. This assumption may not hold, however, as read counts could exhibit variation significantly greater than the mean [14]. That is, the data are over-dispersed relative to the Poisson model. In such cases, one natural alternative to Poisson is the negative binomial model. Based on the negative binomial model, [14,15] proposed a quantileadjusted conditional maximum likelihood procedure to create a pseudocount which lead to the development of an exact test for assessing the differential expression analysis of RNA-seq data. Furthermore, [16] provided a Bioconductor package, edgeR, based on the exact test.
Sample size determination based on the exact test has not yet been studied, however. Therefore, the first goal of this paper is to propose a sample size calculation method based on the exact test.
In reality, thousands of genes are examined in an RNA-seq experiment; differential expression among those genes is tested simultaneously, requiring the correction of error rates for multiple comparisons. For the high-dimensional multiple testing problem, several such corrected measures have been proposed, such as familywise error rate (FWER) and false discovery rate (FDR). In high-dimensional multiple testing circumstances, controlling FDR is preferable [17] because the Bonferroni correction for FWER is often too conservative [18]. Many methods have been proposed to control FDR in the analysis of high-dimensional data [17,19,20]. Those concepts have been extended to calculate sample size for microarray studies [21][22][23][24][25]. To our knowledge, however, the literature does not address determination of sample size while controlling FDR in RNA-seq data. Therefore, the second purpose of this paper is to propose a procedure to calculate sample size while controlling FDR for differential expression analysis of RNA-seq data.
In sum, in this article, we address the following two questions: (i) For a single-gene comparison, what is the minimum number of biological replicates needed to achieve a specified power for identifying differential gene expression between two groups? (ii) For multiple gene comparisons, what is the suitable sample size while controlling FDR? The article is organized as follows. In the Method section, a sample size calculation method is proposed for a single-gene comparison. We then extend the method to address the multiple comparison test issue. Performance comparisons via numerical studies are described in the Results section. Two real RNA-seq data sets are used to illustrate sample size calculation. Finally, discussion follows in the Conclusions section.

Exact test
In an RNA-seq experiment, the total number of reads, also referred to as library size, mapped to the genome are different among the samples. In such cases, the counts in each group are not identically distributed, and it is difficult to develop an exact test for assessing the differential expression analysis of RNA-seq data. To handle this issue, [14,15] proposed a quantile-adjusted conditional maximum likelihood procedure to create pseudocounts which are approximately identically distributed and which lead to the development of an exact test. In the following, the proposed sample size calculation method is based the exact test for a single-gene comparison. Let Y ij be the random variable corresponding to the pseudocount, with y ij being the observed value of Y ij , of the jth (j = 1, 2, . . . , n i ) sample of the ith (i = 0, 1) group where n 0 and n 1 are the numbers of samples from the control and treatment group, respectively. Assume pseudocount Y ij can be modeled as a negative binomial (NB) distribution, NB(d ij γ i , φ). Here, γ i represents the normalized gene expression level of group i, d ij represents a normalization factor for the total number of reads mapped in the jth sample of the ith group, and φ is the dispersion. We use the NB parameterization where the mean is μ ij = d ij γ i and variance is Because the question of interest is to identify the differential gene expression between two groups, the corresponding testing hypothesis is Because the pseudocounts in each group have an approximately identical negative binomial distribution [14,15], the sum of pseudocounts of each group, is the geometric mean of normalization factors in group i. Under the null hypothesis (1), the sum of the total pseudocount, Y 1 + Y 0 , follows a negative binomial distribution. In analogy with Fisher's exact test, [14,15] proposed an exact test for replacing the hypergeometric probabilities with negative binomial probabilities. Because [16] developed a Bioconductor software package edgeR which is an implementation of methodology developed by [14,15], the p-value can be easily calculated for conducting the exact test.
In the following simulation and application sections, we used edgeR version 3.0.6 for estimating model parameters and performing the exact test.

Sample size calculation for controlling type I error rate
In this section, we focus on sample size calculation based on the exact test for a single-gene comparison as described in the test statistics section. For simplicity, we assume the RNA-seq experiment uses a balanced design (i.e., n 0 = n 1 = n), which is a special but common case. http://www.biomedcentral.com/1471-2105/14/357 The following method could be easily extended to the unbalanced case (i.e. let n 0 = n and n 1 = kn where k is a predetermined ratio of the sample size of the control group to the treatment group). In order to perform sample size calculations, it is necessary to construct a power function for the testing described above. The power of a test is the probability that the null hypothesis is rejected when the alternative hypothesis is true. Since the distribution of the exact test statistic under the alternative hypothesis is unknown, however, it is difficult to derive a closed-form expression of the power function. Instead of deriving the distribution of test statistic under the alternative hypothesis, [26] proposed a method to calculate the power for the exact test based on a given p-value. Here, we borrow their concept to calculate power. For a given p-value, p(y 1 , y 0 ) where y 0 and y 1 are the observed pseudo-sums, described in the previous section, the power can be expressed as is the ratio of the geometric means of normalization factors between two groups, ρ = γ 1 /γ 0 is the fold change, μ 0 = d * 0 γ 0 is the average number of reads in the control group, f (μ, φ) is the probability mass function of the negative binomial distribution with mean μ as well as dispersion φ, α is the the level of significance, and I(.) denotes the indicator function. For a given desired power 1 − β, the power of the test can be represented as the function of sample size in the form Thus, the required sample size n to attain the given power 1 − β at level of significance α can then be calculated by solving (2) through a numerical approach, such as a gradient-search or bisection procedure.

Sample size calculation for controlling false discovery rate
In reality, thousands of genes are examined in an RNAseq experiment, and those genes are tested simultaneously for significance of differential expression. In such cases, the sample size calculation for a single-gene comparison discussed above cannot be applied directly. Jung, 2005 [23] incorporated FDR controlling based on a two-sample t-test under the Gaussian distribution assumption. In this section, we borrowed their concept to incorporate FDR controlling based on the test statistics described in the test statistics section.
For the multiple testing problem, [19] suggested the use of false discovery rate (FDR) which is defined as the expected proportion of false discoveries among rejected null hypotheses. Storey, 2002 [17] further proposed an improvement to FDR to achieve higher power, in the form where R 0 is the number of false discoveries and R is the number of results declared significant (i.e., rejections of the null hypothesis).
To calculate the sample size for microarray data analysis, [23] proposed an FDR-controlled method which is based on the expression of FDR under independence (or weak dependence) among test statistics, as , [17,27], where m 0 is the number of true null hypotheses and E(R 1 ) is the expected number of true rejections. By borrowing their concepts, the expected number of true rejections for RNA-seq data can be calculated as where ρ g is the fold change, φ g is the dispersion, and μ 0g is the average read count in the control group for gene g ∈ M 1 (the set of prognostic genes), respectively. Thus, to guarantee an expected number of true rejections, say r 1 , and control FDR at a specified level f, we have and By solving equation (3) with respect to α, we have where α * is the marginal type I error level for the expected number of true rejections r 1 at a given FDR f. Replacing α with α * in (4), we have the function with respect to n as Then, by solving g 1 (n) = 0 via a numerical approach, the required sample size for controlling FDR at level f can be obtained.
To calculate the sample size, we have to estimate all of the fold changes ρ g , dispersions φ g , and average read counts μ 0g of gene g for the set of prognostic genes g ∈ M 1 prior to the RNA-seq experiment. However, we may not have enough information to estimate all of those parameters in practice. To address this issue, we propose the following method to obtain a conservative estimate of the required sample size. Because the power increases as | log 2 (ρ g )| or μ 0g increases and φ g decreases, we suggest http://www.biomedcentral.com/1471-2105/14/357 using a common ρ * = arg min g∈M 1 {| log 2 (ρ g )|} minimum fold change, μ * 0 = min g∈M 1 {μ 0g } minimum average read count, and φ * = max g∈M 1 {φ g } maximum dispersion to estimate each ρ g , μ 0g , and φ g , respectively. In such cases, it gives a more conservative estimate of the required sample size.
When we use ρ * , μ * 0 , and φ * to estimate each ρ g , μ 0g , and φ g , g ∈ M 1 , in the multiple testing context, α * and β * can be calculated as r 1 f /(m 0 (1−f )) and 1−r 1 /m 1 , respectively, where m 1 is the number of prognostic genes. In other words, the power function (2) can be applied in the case of multiple gene comparison, with the replacement of α and β with α * and β * .
The procedures for sample size calculation detailed in this section can be summarized as follows: 1. Specify the following parameters: m : total number genes for testing; m 1 : number of prognostic genes; r 1 : number of true rejections; f : FDR level; w : ratio of normalization factors between two groups; {μ 0g , g ∈ M 1 } : average read counts for prognostic gene g in control group; {ρ g , g ∈ M 1 } : fold changes for prognostic genes g in control group; {φ g , g ∈ M 1 } : dispersion for prognostic genes g in control group; 2. Calculate sample size: (a) If all the parameters μ 0g , ρ g , and φ g for each prognostic gene g are known, use a numerical approach to solve the equation below with respect to n.

Numerical studies
In this section, we conducted simulation studies to evaluate the accuracy of the proposed sample size formula. The parameter settings in simulation studies are based on empirical data sets.
Then, we substituted α * and β * into the formulas (2) and calculated sample size by solving this equation. In addition, for each design setting, we generated 5000 samples from independent negative binomial distributions based on the calculated sample size n; for the control group, the count of each gene is generated by R program from a negative binomial distribution with mean μ * 0 and dispersion φ * ; for the treatment group, the count of each gene is generated from a negative binomial distribution with mean ρ * μ * 0 and dispersion φ * . Then, edgeR is used to estimate model parameters and perform the exact test. The number of true rejections was counted using the qvalue procedure proposed by [20]. The expected number of true rejections was estimated as the sample mean of the number of rejections of the 5000 simulation samples (r 1 ).
In Table 1, we showed the calculated sample size with correspondingr 1 in parentheses under the case w = 1. For a fixed log 2 -fold change, dispersion, and FDR, sample size increases when μ 0 decreases. This result is as expected; a small average read count provides less information, such that a larger sample size is required to detect the difference. For a fixed μ * 0 , φ * , and FDR, sample size increases when log 2 (ρ * ) decreases (i.e. the smaller log 2fold changes requires greater sample sizes with all else being equal). This result is as expected; a larger sample size is required for detecting a smaller difference. For a fixed μ * 0 , log 2 (ρ * ), and FDR, sample size increases when φ * increases. This result, also, is as expected; the variation increases when dispersion increases, such that a larger sample size is required to detect the difference. Note that allr 1 in Table 1 are close to the pre-specified number of true rejections (r 1 = 80); thus, the proposed method estimated a sample size that achieves correct power at the specified FDR level. http://www.biomedcentral.com/1471-2105/14/357 Table 1 Sample size calculation for simulation study (andr 1 ) with r 1 = 80 at FDR = 1%, 5% and 10% when w= 1, m = 10000, m 1 = 100

Liver and kidney RNA-seq data set
To identify differentially expressed genes between human liver and kidney RNA samples, [8] explored an RNA-seq data set containing 5 human kidney samples and 5 human liver samples. In the following, we used this data set as pilot data for designing a new study with the same study objective. For the purpose of demonstration, we assumed that the human kidney is the control group. After filtering genes with no more than 5 total reads in liver samples or kidney samples, there were 17306 genes left. We assumed that the top 175 ( ≈ 1% of 17306) genes are prognostic. From the pilot data, the minimum average read counts among the prognostic genes in the control group were estimated as μ * 0 = 5, the maximum dispersion was estimated as φ * = 0.0029, and the ratio of the geometric mean of normalization factors between the two groups was estimated as w = 0.9 using edgeR. Suppose we want to identify 80% of the prognostic genes (i.e. r 1 = 0.8 × 175 = 140), while controlling FDR at 1% (i.e. f = 0.01). Based on the pilot data, we set m = 17306, m 1 = 175, m 0 = 17131, r 1 = 140, and f = 0.01. In this case, we have After substituting those parameters into equation (2) and solving it with respect to n, the required sample size can be obtained. In the second column from the left of Table 2, we report the sample size while controlling FDR at 1% under various desired minimum fold changes ρ * = 0.10, 0.25, 0.50, 0.75, 1.25, 1.50, 2.00, 2.50, and 3.0. From Table 2, we found that the original RNA-seq experiment described in [8] with sample size 5 in each group can identify 80% of the prognostic genes at FDR= 1% if the desired minimum fold change ρ * is 3.0.
Li, 2013 [28] proposed several sample size calculation methods for RNA-seq data under the Poisson model. To compare the difference in sample size calculation between the negative binomial method and Poisson method, in the last six right columns of Table 2 we report the sample size calculation based on Poisson model (i.e. the sample size based on the Wald test n w , score test n s , log transformation of Wald statistic n lw , log transformation of score statistic n ls , transformation of Poisson n tp , and likelihood ratio test n lr ) with the same settings as the negative binomial method. As we can see, the sample size calculation based on the negative binomial and Poisson methods are similar. This result is as expected since the data set explored by [8] has technical and not biological replicates (i.e. the maximum dispersion estimated from the liver and kidney RNA-seq data set is close to zero). Thus, it is not surprising that the results of the negative binomial and Poisson methods are similar when the dispersion parameter is close to zero. Moreover, in Table 2, the estimated sample size is about the same size for very small fold changes (ρ * = 0.10) and very large fold changes (ρ * = 3.0). This result is expected since it tends to the same conclusion no matter what statistical model is used when the treatment effect is very large (i.e. the fold change is very large or small). Blekhman, 2010 [29] used RNA-seq to study transcript regulation in humans, chimpanzees, and rhesus macaques using liver RNA samples from three males and three females from each species. For the purpose of demonstration, we assumed that the goal of the study is to identify differential gene expression between male and female in humans and that the female is considered the control group. There were 13267 genes in the data set after performing quality control analyses. Suppose that the top 133 ( ≈ 1% of 13267) genes are prognostic. After filtering genes with no more than 5 total reads in male samples or female samples, there were 7658 genes left. Those genes are considered pilot data, and we assessed the differential expression by using edgeR. From the pilot data, the minimum average read counts among the prognostic genes in the control group were estimated as μ * 0 = 1.67, φ * = 0.6513, and the ratio of the geometric mean of normalization factors between the two groups was estimated as w = 1.08. Suppose we want to identify 80% of the prognostic genes (i.e. r 1 = 0.8 × 133 = 107), while controlling the FDR at 10%. Based on the pilot data, we set m = 13267, m 1 = 133, m 0 = 13134, r 1 = 107 and f = 0.1. In this case, we have α * = 9.0512 × 10 −4 and β * = 0.2. In the second column from the left of Table 3, we report the required sample sizes under various desired minimum fold changes while controlling the FDR at 10% under the negative binomial distribution. We also report the required sample size based on the Poisson model proposed by [28] under the same settings in the last six columns on the right of Table 3. As we can see, the required sample size based on the negative binomial method is greater than the Poisson method. In the transcript regulation data set, the maximum dispersion was estimated as φ * = 0.6513 > 0. This indicates that the read counts in this data set exhibit over-dispersion. In such a situation, it is inappropriate to model this data set based on the Poisson, and the sample size calculation based on the Poisson model will be underestimated due to underestimation of variance (i.e. the study based on the corresponding sample size will be underpowered).

Discussion
In this research, we assume independent gene expression levels; however, this assumption may not hold in reality. For correlated RNA-seq gene expression data, evaluation of the accuracy of our method is an important future research question; however, generating a negative binomial distribution for correlated high-dimensional data will be a challenge. Moreover, most of the major R packages dedicated to RNA-seq differential analyses (edgeR, DESeq, etc.) are now starting to enable multi-group comparisons. However, the proposed method is developed for comparing two-group means. Thus, the sample size calculation for multi-group comparisons would be an interesting research topic for us in the future. In addition, it has already been noted that typical RNA-seq differential analyses have very low power; see for example the simulation studies in [30], where power for edgeR was always less than 60%, or [31], where power ranged from about 45% to 55% (both with 10 samples per condition). In our simulation and application sections, the minimum sample sizes required to achieve 80% power would be prohibitively large for RNA-seq experiments in practice, given their current cost. In such situations, the findings in [30,31] can provide useful information for specifying achievable power. It is well known that low study power will decrease the reproducibility of scientific research. We hope that this paper can benefit researchers by allowing them to understand their study power.

Conclusions
In recent years, RNA-seq technology has emerged as an attractive alternative to microarray studies, due to its ability to produce digital signals (counts) rather than analog signals (intensities), and to produce more highly reproducible results with relatively little technical variation [32,33]. With a large sample size, RNA-seq can become costly; on the other hand, insufficient sample size may lead to unreliable answers to the research question of interest. To manage the trade-off between cost and accuracy, sample size determination is a critical issue for RNA-seq experimental design. For comparing the differential expression of a single gene, we have proposed a sample size calculation method based on an exact test proposed by [14,15]. To address multiple testing (i.e., multiple genes), we further extended our proposed method to incorporate FDR control. Our methods are not computationally intensive for pilot data or other relevant data with a specified desired minimum fold change, minimum average read count, and maximum