Introduction

Quantitative polymerase chain-reaction measurements (qPCR) are the mainstay tool diagnosing COVID-19 [1], since they detect viral RNA up to a week before the formation of antibodies. However, preliminary studies indicate that the rate of false-negatives may be as high as 30% for SARS-CoV-2 testing [2], driven in large part by asymptomatic patients and/or those in the earliest stages of the disease [3]. Methods that can increase the sensitivity of qPCR techniques, improve confidence in measurements, and harmonize results between laboratories are therefore critical for helping to control the outbreak by providing a more accurate picture of infections.

The present manuscript addresses this problem by developing a mathematical procedure that enables more robust analysis and interpretation of qPCR measurements. We first derive a new theoretical result that, under general conditions, all qPCR amplification curves (including their plateau phases) are the same up to an affine transformation. Using this, we develop a data analysis approach employing constrained optimization to determine if an amplification curve exhibits characteristics that are representative of a true signal. This decision is made by projecting data onto a master curve, which leverages information about both the signal shape and noise-floor in a way that allows use of lower fluorescence thresholds. We illustrate the validity of this approach on experimental data and demonstrate how it can improve interpretation of late-cycle amplification curves corresponding to low initial DNA concentrations [4]. Moreover, we apply our analysis to qPCR measurements of a SARS-CoV-2 RNA construct to illustrate its potential benefits for testing of emerging diseases.

A key theme of this work is the idea that advanced uncertainty quantification (UQ) techniques are necessary to extract the full amount of information available in data.Footnote 1 For example, amplification curves with late-cycle growth may only have a few points above the baseline. Moreover, these data are often noisy, which confounds attempts to distinguish them from random effects not associated with DNA replication. In such cases, classification strategies based on subjective thresholds are prone to mistakes because they do not assess statistical significance of signal behavior. In contrast, the tools we develop address such issues, allowing one to more confidently use low-amplification data.

In a related vein, our underlying mathematical framework makes few and extremely general assumptions about the operation of a qPCR instrument. This feature is critical to ensuring robustness and validity of our results across the range of systems encountered in practical applications. Previous works (see, e.g. Ref.[5,6,7,8,9,10,11,12,13] and the references therein) have treated analysis of qPCR data as a task in mathematical modeling, wherein parameterized equations are assumed to fully describe the signal shape. While such approaches can be powerful tools for elucidating the mechanisms driving PCR reactions, they invariably introduce model-form errors, i.e. errors arising from an inability of the model to fully describe the underlying physics [14]. From a metrological perspective, such effects introduce unwanted uncertainties that can decrease the sensitivity of a measurement. However, this uncertainty is entirely eliminated when data analysis can be performed without prescribing a detailed model, as is our goal.

While a key focus of this work is improving measurement sensitivity, we do not directly address issues associated with limits of detection (LOD). Formal definitions of this concept have been established by certain standards organizations [15, 16]. However, there is a lack of consensus as to which definition is most suitable for qPCR measurements; compare, e.g. Refs. [16,17,18] and the references therein. Moreover, LOD often depends on the specifics of an assay and, for reverse-transcriptase qPCR (RT-qPCR), the RNA extraction-kit; see, for example, the FDA Emergency Use Authorizations for SARS-CoV-2 testing [19]. This motivates us to restrict our discussion to those aspects of analysis that hold in general and are not chemistry-specific. Thus, we only consider, for example, the extent to which one can lower the fluorescence threshold used to detect positive signals. Nonetheless, we anticipate that such improvements will have positive impacts on LODs.

Finally, we note that our analysis cannot undo systematic errors due to improper sample collection and preparation, contamination, or non-optimal assay conditions. In some cases, the constrained optimization can assist in the identification of systemic assay issues by failure to achieve data collapse, thereby adding an automated quality control to the measurement. However, false positives due to contamination may exhibit the same curve morphology and not be detected by our analysis. Moreover, the affine transformations cannot amplify signals or otherwise improve signal quality when the target concentration is far below limits of detection. In such cases, refining experimental protocols and amplification kits may be the only routes to improving quality of qPCR measurements.

The manuscript is organized as follows. “Universal Behavior of PCR Amplification Curves” derives the new, universal property of qPCR measurements (“Theoretical Derivation”) used in our analysis and validates it against experimental data (“Validation of Data Collapse”). “Decreasing Detection Thresholds” illustrates how this result and our analysis can be used to lower the fluorescence thresholds for qPCR. “Transferability of the Master Curve” explores the idea that a master curve is transferable reference data. “Application to SARS-CoV-2 RNA” applies our analysis to SARS-CoV-2 RNA constructs as proof-of-concept for improving detection of emerging diseases. “Discussion” discusses our work in the greater context of qPCR and points to open directions.

Universal Behavior of PCR Amplification Curves

Our data analysis leverages a universal property of qPCR, which states that under very general conditions, all amplification curves are the same up to an affine transformation, i.e. a multiplicative factor and horizontal shift. While this observation bears similarities to work by Pfaffl [20], we emphasize that our result is more general and develops mathematical properties of qPCR measurements that have not yet been studied. We begin with a derivation and experimental validation of this result.

Theoretical Derivation

The underlying conceptual framework is based on a generic formulation of a PCR measurement. We denote the number of DNA strands at the n th amplification cycle by dn, which, in a noise-less environment, is taken to be proportional to the fluorescence signal measured by the instrument. The outcome of a complete measurement is a vector of the form d = (d1,d2,...dN), where N is the maximum cycle number. We also assume that d = d(x,y) is a function of the initial template copy number x and the numbers of all other reagents, which we denote generically by y.

Within this framework, we require three assumptions.

First, we require that y be a scalar. Physically, this amounts to the assumption that there is a single experimental variable (besides initial DNA copies) that controls the progression of the reactions. In practice, this condition is satisfied if either (I) there is a single limiting reagent (e.g. primers), or (II) multiple limiting reagents have the same relative concentrations in all samples we wish to analyze. In the latter case, knowing the concentration of any limiting reactant determines them all, so that they are all specified by a single number. It was recently demonstrated that condition (I) may hold for a large class of commercial PCR kits in which the number of primers is the limiting reagent [21, 22],Footnote 2 whereas condition (II) is true for any PCR protocol that uses a master-mix.Footnote 3

Second, we require that there be a p > 1 such that to good approximation (e.g. better than 1 in 10 000), a p-fold increase in the initial template number shifts the PCR curve to the left by one cycle.Footnote 4 Within our analytical framework, this amounts to

$$ \begin{array}{@{}rcl@{}} d_{n-q}(p^{q},y)=d_{n}(1,y) + \mathcal O(p^{q}/y), \end{array} $$
(1)

where the notation \(\mathcal O(p^{q}/y)\) indicates that dnq(pq,y) and dn(1,y) are the same up to an error that is of the same order of magnitude as pq/y. This error arises from the fact that \(\mathcal O(p^{q})\) primers will be consumed in the first q reactions. Thus, a system starting with one template copy will have \(\mathcal O(p^{q}/y)\) fewer relative primers by the time it reaches the same template number as a system initialized with pq such copies. Given that PCR is always run in a regime where yx, such errors should be negligible. We emphasize that Eq. 1 only requires the amplification efficiency to remain constant over some initial set of cycles \(q_{\max \limits }\) corresponding to the maximum initial template copy number expected in any given experimental system. For later convenience, we note that Eq. 1 implies

$$ \begin{array}{@{}rcl@{}} d_{n-\log_{p} (q/q^{\prime})}(q,N) = d_{n}(q^{\prime},N), \end{array} $$
(2)

where we have omitted the error term.

Our third and most important assumption is the requirement that signal generation be a linear process. By this, we mean that: (i) each sample (e.g. in a well-plate) can be thought of as comprised of multiple sub-samples defined in such a way that the relative fractions of initial DNA and reagents is in proportion to their volumes; and (ii) the total signal generated by a sample is equal to the sum of signals generated by these sub-samples if they had been separated into different wells.Footnote 5 Because both the initial template copy and reagent numbers are partitioned into these sub-samples, the linearity assumption amounts to the mathematical statement that

$$ \begin{array}{@{}rcl@{}} d_{n}(\kappa,\kappa N) = \kappa d_{n}(1,N), \end{array} $$
(3)

for any κ > 0. Physically we interpret Eq. 3 as the requirement that the processes driving replication only depend on intensive variables, i.e. ones that are independent of the absolute magnitude of the system size [23]. See, e.g. Ref. [21] for more discussion on related concepts.

We now arrive at our key result. Consider two systems with initial values (x,y) and (χ,γ). Using Eq. 2 and Eq. 3, it is straightforward to show that

$$ \begin{array}{@{}rcl@{}} d_{n}(\chi,\gamma) &=&(\gamma/y)d_{n}(\chi y/\gamma,y) \\ &=&(\gamma/y) d_{n-\log_{p}[\chi y / (\gamma x)]}(x,y) \\ &=& ad_{n-b}(x,y). \end{array} $$
(4)

Critically Eq. 4 implies that under the assumptions listed above, all PCR signals are the same up to a multiplicative factor a = γ/y and horizontal shift \(b=\log _{p}[\chi y / (\gamma x)]\). The usefulness of this result arises from the fact that this universal property holds irrespective of knowledge of the actual shape of the amplification curve and under a few generic assumptions. Thus, it can be used to facilitate robust analysis of data. Note that in the last line of Eq. 4, the amplification efficiency does not appear, highlighting that it does not play a role in our derivation.

Validation of Data Collapse

Experimental Methods

To validate Eq. 4 we conducted a series of PCR measurements using the Quantifiler Trio (Thermo Fisher) commercial qPCR chemistry.Footnote 6 Extraction blanks were created by extracting six individual sterile cotton swabs (Puritain) using the Qiagen EZ1 Advanced XL and DNA Investigator kit (Qiagen). 290 μ L of G2 buffer and 10 μ L of Proteinase K were added to the tube and incubated in a thermal mixer (Eppendorf) at 56 C for 15 minutes prior to being loaded onto the purification robot. The “Trace Tip Dance” protocol was run on the EZ1 Advanced LX with elution of the DNA into 50 μ L of TE (Qiagen). After elution, all EBs were pooled into one tube for downstream analysis.

Human DNA Quantitation Standard (Standard Reference Material 2372a) [24] Component A and Component B were each diluted 10-fold. Component A was diluted by adding 10 μ L of DNA to 90 μ L of 10 mmol/L 2 amino 2 (hydroxymethyl) 1,3 propanediol hydrochloride (Tris HCl) and 0.1 mmol/L ethylenediaminetetraacetic acid disodium salt (disodium EDTA) using deionized water adjusted to pH 8.0 (TE− 4, pH 8.0 buffer) from its certified concentration. Component B was diluted by adding 8.65 μ L of DNA to 91.35 μ L of TE− 4. From the initial 10-fold dilution, additional serial dilutions were performed down to 0.0024 pg into a regime to produce samples with high Cq values (> 35).

For all qPCR reactions, Quantifiler Trio was used. Each reaction consisted of 10 μ L qPCR Reaction mix, 8 μ L Primer mix, and 2 μ L of sample [i.e. DNA, non-template control (NTC), or extraction blank (EB)] setup in a 96-well optical qPCR plate (Phoenix) and sealed with optical adhesive film (VWR). After sealing the plate, it was briefly centrifuged to eliminate bubbles in the wells. qPCR was performed on an Applied Biosystems 7500HID instrument with the following 2-step thermal cycling protocol: 95 C for 2 min followed by 40 cycles of 95 C for 9 sec and 60 C for 30 sec. Data collection takes place at the 60 C stage for 30 sec for each of the cycles across all wells. Upon completion of every run, data was analyzed in the HID Real Time qPCR Analysis Software v 1.2 (Thermo Fisher) with a fluorescence threshold of 0.2. Raw and multicomponent data was exported into Excel for further analysis.

Data Analysis

As an initial preconditioning step, all fluorescence signals were normalized so that the maximum fluorescence of any amplification curve is of order 1. Depending on the amplification chemistry, this was accomplished by either: (i) dividing the raw fluorescence signals by the signal associated with a passive reporter dye (e.g. ROX); or in the event that there is no passive dye, (ii) dividing all signals by the same (arbitrary) constant. In the latter case, the actual constant used is unimportant, provided the maximum signals are on the numerical scale of unity. Moreover, EBs and non-template controls NTCs were normalized in the same way. This preconditioning is important because subsequent analyses introduce dimensionless parameters and linear combinations of signals that are referenced to a scale that is dimensionless and of order 1. Moreover, such steps stabilize optimization discussed below, since numerical tolerances are often specified relative to such a scale.

Baseline subtraction was performed using an optimization procedure that leverages information obtained from NTCs and/or EBs. The main idea behind this approach is to postulate that the fluorescence signal can be expressed in the form

$$ \begin{array}{@{}rcl@{}} d_{n} = s_{n} + \beta b_{n} + c + \eta_{n} \end{array} $$
(5)

where sn is the “true,” noiseless signal, bn is the average over EB signals (or NTCs in the absence of EB measurements), the β, c are unknown parameters quantifying the amount of systematic background effects and offset (e.g. due to photodetector dark currents) contributing to the measured signal, and η is zero-mean, delta-correlated background noise; that is, the average over realizations of η satisfies \(\langle \eta _{n} \eta _{n^{\prime }}\rangle = \sigma ^{2} \delta _{n,n^{\prime }}\), where \(\delta _{n,n^{\prime }}\) is the Kronecker delta and σ2 is independent of n. Next, we minimize an objective function of the form

$$ \begin{array}{@{}rcl@{}} \mathcal L_{b}(\beta,c) &=& \epsilon(\beta-1)^{2}+ \sum\limits_{n=N_{0}}^{N_{h}} \frac{(d_{n} - \beta b_{n} - c)^{2}}{\Delta N -1} \\ && + \left[\frac{1}{\Delta N}\sum\limits_{n=N_{0}}^{N_{h}} d_{n} - \beta b_{n} - c \right]^{2} \end{array} $$
(6)

with respect to β and c, which determines optimal values of these parameters. In Eq. 6, 𝜖 is a regularization parameter satisfying 0 < 𝜖 ≪ 1 (we always set 𝜖 = 10− 3), ΔN = NhN0, and N0 and Nh are lower and upper cycles for which sn is expected to be zero. The parameter N0 is set to 5 to accommodate transient effects associated with the first few cycles. The Nh is determined iteratively by: (I) setting Nh = 15 and minimizing Eq. 6; Cq as the (integer) cycle closest to a threshold of 0.1; and (III) defining Nh as the nearest integer to Cqz. Here we set z = 6, which, assuming perfect amplification, corresponds to Nh falling within the cycles for which dn is dominated by the noise ηn. In general this value and the corresponding threshold can be changed as needed, but the precise details are unimportant provided z is large enough to ensure that the above criterion is satisfied. Note that optimization of Eq. 6 amounts to calculating the amount of EB signal that, when subtracted from dn, minimizes the mean-squared and variance of sn in the region where it is expected to be dominated by the noise η. See also Ref. [25] for a thorough treatment of unconstrained optimization.

As a next step, we fixed a reference signal δ by fitting a cubic spline to the amplification curve with the smallest Cq value as determined by thresholding the fluorescence at 0.1. While interpolation will introduce some small uncertainty at non-integer cycle numbers, we find that such effects are negligible in downstream computations. Moreover, comparison of amplification curves with initial template numbers that do not differ by multiples of p requires estimation of δ at non-integer cycles, necessitating some form of interpolation. Cubic splines are an attractive choice because they minimize curvature and exhibit non-oscillatory behavior for the data sets under consideration [26].

To test for data collapse, we formulated an objective function of the form

$$ \begin{array}{@{}rcl@{}} \L(a,c,k,\beta)\! &=\!\! \sum\limits_{N_{\min}}^{N_{\max}} [\delta(n - k) - ad_{n} - c - \beta b_{n}]^{2} \end{array} $$
(7)

where a, c, β, and k are unspecified parameters, and \(N_{\min \limits }\) and \(N_{\max \limits }\) are indices characterizing the cycles for which dn is above the noise floor. Minimizing Ł with respect to its arguments yields the transformation that best matches dn onto the reference curve δ(n). The background signal bn is included in this optimization to ensure that any over or under-correction of the baseline relative to δ is undone.

The quantity \(N_{\min \limits }\) is taken to be the last cycle for which dn < μ + 3σ, where

$$ \begin{array}{@{}rcl@{}} \mu &= \frac{1}{10}\sum\limits_{n=5}^{14} d_{n} & \sigma^{2} = \frac{1}{9}{\sum}_{n=5}^{14} (\mu-d_{n})^{2} \end{array} $$
(8)

are estimates of the mean and variance associated with the noise η. In principle, μ should be zero, but in practice, background subtraction does not exactly enforce this criterion; thus, we choose to incorporate μ into our analysis. If \(N_{\min \limits }\) was less than or equal to 30, we set \(N_{\max \limits }=37\); otherwise we set \(N_{\max \limits }=40\). While it is generally possible to set \(N_{\max \limits }=40\) for all data sets, on rare occasions we find that an amplification curve with a lower nominal Cq may saturate faster than δ. In this case, it is necessary to decrease \(N_{\max \limits }\) so that the interval \([N_{\min \limits },N_{\max \limits }]\) falls entirely within the domain of cycles spanned by δ. In practice, we find that, except in the cases noted above, the solutions do not meaningfully change if we impose this restriction for all curves with nominal Cq values less than or equal to 30.

The objective Eq. 7 is minimized subject to constraints that ensure the solution provides fidelity of the data collapse. In particular, we require that

$$ \begin{array}{@{}rcl@{}} -3\sigma - \mu &&\le c \le 3 \sigma + \mu \end{array} $$
(9a)
$$ \begin{array}{@{}rcl@{}} -3\sigma - \mu &&\le \beta \le 3 \sigma + \mu \end{array} $$
(9b)
$$ \begin{array}{@{}rcl@{}} -3\sigma - \mu &&\le c +\beta \le 3 \sigma + \mu \end{array} $$
(9c)
$$ \begin{array}{@{}rcl@{}} a_{\min} &&\le a \le a_{\max} \end{array} $$
(9d)
$$ \begin{array}{@{}rcl@{}} -10 &&\le k \le 40 \end{array} $$
(9e)
$$ \begin{array}{@{}rcl@{}} \tau &&\le ad_{N_{\max}} +c + \beta b_{N_{\max}} \end{array} $$
(9f)
$$ \begin{array}{@{}rcl@{}} |\delta(n+k)&&-ad_{n} -c - \beta b_{n}| \le \varsigma. \end{array} $$
(9g)

Inequalities Eq. 9a–Eq. 9c require that the constant offset, noise correction, and linear combination thereof be within the 99% confidence interval of the noise-floor plus any potential offset in the mean (which should be close to zero). Inequality Eq. 9d prohibits the multiplicative scale factor from adopting extreme values that would make noise appear to be true exponential growth; unless otherwise stated, we take \(a_{\min \limits }=0.7\) and \(a_{\max \limits }=1.3\). Note that range of admissible values of a corresponds to the maximum variability in the absolute number of reagents per well, which is partially controlled by pipetting errors. Inequality Eq. 9e controls the range of physically reasonable horizontal offsets. Inequality Eq. 9f requires that the last data-point of \(ad_{N_{\max \limits }}\) be above some threshold τ. Finally, inequality Eq. 9g requires that the absolute error between the reference and scaled curves be less than or equal to ς. In an idealized measurement, we would set ς = 3σ, but in multichannel systems, imperfections in demultiplexing and/or inherent photodetector noise can introduce additional uncertainties that limit resolution. In the first example below, we take ς = 0.03, which corresponds to roughly 1% of the full scale of the measurement. While we state Eq. 9g in terms of absolute values, it can be restated in a differentiable form as two separate inequalities. See also Ref. [27] for a related model.

Having determined the optimal transformation parameters a, c, k, and β, the transformed signal is defined as

$$ \begin{array}{@{}rcl@{}} d_{\star}(x) = a_{\star} d_{x+k_{\star}} + c_{\star} + \beta_{\star} b_{x+k_{\star}}, \end{array} $$
(10)

where x + k is required to be an integer in the interval \([N_{\min \limits },N_{\max \limits }]\). Figures 1 and 2 demonstrates the remarkable validity of Eq. 10 for a collection of datasets using a threshold τ = 0.05; in this and subsequent computations, the Matlab general nonlinear programming solver, fmincon, was used [28]. Note that the agreement is excellent down to fluorescence values of roughly 0.01, which is more than a decade below typical threshold values used to compute Cq for this amplification chemistry. In the next section, we pursue the question of how to leverage affine transformations to increase measurement sensitivity.

Fig. 1
figure 1

Data collapse via optimization of Eq. 7. Top: A collection of 43 curves having Cq values of less than 37 according to a threshold of 0.1. Bottom: The same data sets after collapse onto the left-most curve. Note that the errors are less than 0.03 on the normalized fluorescence scale down to the noise floor. This corresponds to less than 1% disagreement relative to the maximum scale. See also Fig. 2

Fig. 2
figure 2

Differences between the reference and transformed curves for the same collection of datasets in Fig. 1

Decreasing Detection Thresholds

A key strength of the constrained optimization problem specified in expressions Eq. 7 – Eq. 9g is the ability to determine when the data set gives rise to a consistent set of constraints [29]. In particular, inequality Eq. 9g requires that the transformed signal be within a noise-threshold of the reference, guaranteeing exponential growth. In more mathematical language, a non-empty feasible region of the constraints provides a necessary and sufficient condition for determining which data sets have behavior that can be considered statistically meaningful, which in turn can be used to lower the fluorescence thresholds.

To demonstrate this, we consider an empirical test as follows. Taking the data sets used to generate Fig. 1, we remove all data points above a normalized fluorescence value of 0.05, which is a factor of two to four below the typical values used for this system. Then we repeat the affine transformation according to expressions Eq. 7–Eq. 9g, applied to only the last six data points; we also set ς = 3σ and τ = μ + 6σ in inequality Eq. 9f. Note that the value of ς is determined entirely by the noise floor in this example as we do not anticipate spectral overlap to be significant at such low fluorescence values.

Figure 3 shows the truncated data used in this test, while Fig. 4 shows the results of the affine transformation for the 43 datasets. Notably, the collapse is successfully achieved using the tightened uncertainty threshold given in terms of the noise-floor. The inset shows that the errors relative to the reference curve are less than 0.01 on the normalized fluorescence scale.

Fig. 3
figure 3

Truncated data used to test for feasibility of dat collapse using a lower threshold. The solid black curve is the master curve. The remaining curves have been truncated at the last cycle for which they are below 0.05

Fig. 4
figure 4

Data collapse of the amplification curves shown in Fig. 3. Note that the ostensibly large variation in the data below cycle 15 is an artifact of the logarithmic scale that reflects the magnitude of the background noise. The inset shows that the errors relative to the master curve are less than 10− 2. For fluorescence values between 10− 2 and 0.05, the transformed curves are difficult to distinguish by eye

To demonstrate that optimization of the transformation parameters does not generate false positives, we performed the analysis described above on 17 non-template control (NTC) datasets that were baseline-corrected according to the same procedure used on the amplification curves. For background subtraction, we used Nh = 30. As before, the last six datapoints of the background-corrected NTCs were used for optimization of Eq. 7. Figure 5 illustrates the outcome of this exercise. When τ is too small, solving the optimization problem maps the NTCs into the background of the reference curve, illustrating the critical role of inequality Eq. 9f. When τ is large, the optimization programs are all infeasible; i.e. there is no transformation satisfying the constraints.

Fig. 5
figure 5

Transformations of the NTC data for τ = 0 (low-threshold) and τ = μ + 5σ (high-threshold), where σ was computed individually for each NTC. Note that for τ = 0, the data is mapped into the noise of the reference curve, whereas for τ = μ + 5σ the optimization programs are infeasible. In the latter case, the plotted curves are the software’s best attempts at satisfying the constraints

Figure 6 repeats this exercise for the 43 amplification curves and 17 NTCs for values of τμ ranging from 0 to μ + 10σ. Unsurprisingly, for small values of τμ, a large fraction of the NTCs can be transformed into the noise of the reference curve, and thereby yield feasible optimization programs. However, from τ = μ + σ to τ = μ + 4σ the number of such false positives drops precipitously. While more work is needed to assess the universality of this result, Fig. 6 suggests that there may be a window between τ = μ + 5σ and τ = μ + 8σ for which the affine transformation yields neither false positives nor false negatives.

Fig. 6
figure 6

Feasibility of transforming amplification curves (blue ×) and NTCs (red o) as a function of the mean value of the threshold τ. The mean value was estimated by setting τ = μ + nσ for n = 1,2,...,10 for each amplification curve and averaging over the corresponding realizations of τ for a fixed n. This process was repeated separately for the NTCs, including n = 0. The inset shows the average of τ values with one-standard-deviation confidence intervals for each value of n for the amplification curves. Note that setting 5στμ ≤ 8σ yields neither false negatives nor false positives

Transferability of the Master Curve

The generality of the assumptions underpinning Eq. 4 suggests that a master curve may be useful for characterizing qPCR data irrespective of when or where either was collected. Such universality would be a powerful property because it would facilitate transfer of our analysis between labs without the need to generate independent master curves. The latter could be developed once with the creation of an assay and used as a type of standard reference data. Such approaches could further harmonize analyses across labs and thereby reduce uncertainty in qPCR testing.

While a more in-depth study of such issues is beyond the scope of this manuscript, we performed a preliminary analysis to test the reasonableness of this universality. In particular, we analyzed 223 datasets collected over 3.5 years, from November 2017 to April 2020. A single, low Cq curve measured in early 2018 was chosen at random from this set as a master curve, and we performed data collapse of the remaining 222 according to the optimization program given by expressions Eq. 7–Eq. 9g. In all cases, the DNA and amplification chemistry was the same as those in our previous examples. Moreover, the majority (176) of these amplification curves were generated before conception of this work.

Figure 7 illustrates the results of this exercise. Remarkably, we find that a master curve can be used for accurate data collapse over the entire time-frame of the measurements considered. Moreover, use of a reference from 2018 to characterize data from both 2017 and 2020 indicates backwards and forwards compatibility of our analysis. In this example, we find that, as before, the collapse is accurate to within about 1% of the full scale for nearly all of the measurements (we set ς = 0.04). In this example, it was necessary to set the minimum and maximum values of a to be 0.1 and 3 to account for large variations in peak fluorescence. We also note that because these data were collected before we had developed our background subtraction algorithm, there were fewer high-quality NTC measurements for use in Eq. 6. (No EB data from that time was available.) Thus, we speculate that the variation inherent in this data can likely be reduced in future studies by more careful characterization of control experiments.

Fig. 7
figure 7

Affine analysis applied to data spanning a 3.5 year time-frame. Top: 223 amplification curves after background subtraction. Bottom: All datasets collapsed onto one of the amplification curves. The inset shows the absolute errors after transformation

Application to SARS-CoV-2 RNA

SARS-CoV-2 RNA Constructs

To test the validity of our analysis on RT-qPCR of emerging diseases, we applied our analysis to corresponding measurements of the N1 and N2 fragments of SARS-CoV-2 RNA. The underlying samples were derived from an in-house, in-vitro transcribed RNA fragment containing approximately 4000 bases of SARS-CoV-2 RNA sequence. This non-infectious fragment contains the complete N gene and E gene, as well as the intervening sequence. As this material is intended to help researchers and laboratory professionals develop and benchmark assays, discussion of its production and characterization are reserved for another manuscript.

Neat samples of this material were diluted 1:100, 1:500, 1:1000 and 1:1500 in RNA Storage Solution (Thermo Fisher) with 5 ng/μ L Jurkat RNA (Thermo Fisher) prior to being run for qPCR. qPCR measurements were performed using the 2019-nCoV CDC Assays (IDT). The N1 and N2 targets on the N gene were measured [30]. Each reaction consisted of 8.5 μ L water, 5 μ L TaqPath RT-qPCR Master Mix, 1.5 μ L of the IDT primer and probe mix for either N1 or N2, and 5 μ L of sample setup in a 96-well optical qCPR plate (Phoenix) and sealed with optical adhesive film (VWR). After sealing the plate, it was briefly centrifuged to eliminate bubbles in the wells. qPCR was performed on an Applied Biosystems 7500 HID instrument with the following thermal cycling protocol: 25 C for 2 min, 50 C for 15 min, 95 C for 2 min followed by 45 cycle of 95 C for 3 sec and 55 C for 30 sec. Data collection takes place at the 55 C stage for 30 sec for each of the cycles across all wells. Upon completion of every run, data was exported into an Excel for further analysis in Matlab.

Analysis of RT-qPCR Measurements

Data analysis proceeded using NTCs in lieu of EBs for the background signal bn. Figure 8 shows the results of this analysis applied to the N1 fragment of a SARS-CoV-2 RNA construct. As before, the level of agreement between curves after data collapse confirms that these signals are virtually identical up to an affine transformation. We find analogous results for the N2 assay; see Fig. 9.

Fig. 8
figure 8

Illustration of our analysis applied to RT-qPCR measurements of the N1 fragment of a SARS-CoV-2 RNA construct. Top: qPCR curves after background subtraction. Bottom: curves after data collapse. The inset shows the error on an absolute scale relative to the master curve

Figure 9 also illustrates an interesting aspect of our analysis. In particular, we attempt to transform the N2 amplification curves onto the N1 master curve in the bottom plot. However, these transformations are not feasible; the N1 master curve is different in shape from its N2 counterparts. This demonstrates that while the master curve may be transferable across labs, it is still specific to the particular amplification chemistry and target under consideration.

Fig. 9
figure 9

Illustration of our analysis applied to RT-qPCR measurements of the N2 fragment of a SARS-CoV-2 RNA construct. Top: qPCR curves after background subtraction. The inset shows the data collapse after affine transformations. Bottom: Attempt to transform the N2 amplification curves onto the N1 master curve. Note that the transformations are not feasible, indicating that the master curve is specific to the N1 construct. (Transformed curves are optimization routines best attempts to achieve collapse)

Discussion

Relationship to Thresholding

While thresholding is the most common method for identifying exponential growth, there is no clear best practice on using this technique. In fact, the accepted guidance is sometimes to ignore a fixed rule and adjust the threshold by eye [19]. That being said, an often quoted (although in our experience, rarely followed) rule is to set the threshold ten standard deviations σ of the background above the noise floor. For reference, a 10σ event has a probability of roughly 1 × 10− 23 of being random if the underlying distribution is Gaussian, which should be a reasonable model of noise in the photodetectors of a PCR instrument.

While this probability appears absurdly small, it is worth considering why the 10σ criterion is reasonable. If we assume that the first fluorescence value having reasonable probability (e.g. 95%) of being non-random occurs at 2σ above the noise-floor, then the next three data points should occur at 4σ, 8σ, and 16σ, assuming doubling per cycle. Thus, the 10σ criterion practically amounts to the requirement that at least four data-points have a confidence of 95% or greater of being non-random. That being said, thresholding neither requires that more than one point be statistically meaningful nor directly checks for exponential growth.

While it could be argued that operators will detect such errors, this becomes impossible with automated testing routines and/or without uniform training. Moreover, it is possible for systematic effects associated with improper background subtraction to artificially raise the baseline at late cycles. Such effects can be difficult to distinguish from low-efficiency amplification and negate the usefulness of detection criteria based only on 10σ thresholds.

A constrained optimization approach as formulated in terms of expressions Eq. 6–Eq. 9g overcomes many of these obstacles by directly testing for exponential growth. Provided the master curve is of suitable quality, the signal must increase p-fold every cycle to within noise. As a result, systematic errors, e.g. due to improper baseline subtraction can be detected on-the-fly. For values of \(\tau \gtrsim \mu + 8 \sigma \), this necessarily strengthens any conclusions inferred from the analysis because multiple datapoints are required to lie above the 3σ (i.e. 99%) confidence envelope around the baseline. For concreteness, setting τ = μ + 10σ and ς = 3σ entails that the first data-point below the threshold will be at least 2σ and at most 8σ (i.e. 5σ ± 3σ) away from baseline essentially 100% of the time. There is less than a 2.5% chance that such a point could be a baseline. When considered with the point to the right, which is above the threshold, the probability that the signal is noise drops to virtually zero.

When \(\tau \lesssim \mu + 6\sigma \), the significance of any points below the threshold becomes questionable. For example, if τ = μ + 6σ and ς = 3σ, the first data point below the threshold can be anywhere from 0 to 6σ above the baseline. The corresponding probability that the data point could be due to the background noise η is approximately 50%. But when taken with the measurement above the threshold, the probability that both measurements are due to η is again virtually zero.

While it appears that this second scenario reverts to standard thresholding, it is important to note that the constrained optimization incorporates additional consistency checks above and beyond standard practice. Specifically, the optimization requires that the first point below the threshold be explainable as background noise, which excludes the possibility of constant or slowly varying signals above the threshold. As shown in Fig. 5 optimization attempts to raise such signals to the level of the threshold. In doing so, either (i) no point will fall below the threshold, in which case inequality Eq. 9g is violated, or, (ii) the signal must be raised too far, violating inequalities Eq. 9a–Eq. 9c. This explains the precipitous drop in false positives in Fig. 6. Moreover, it highlights the importance of considering at least six data-points in the optimization in order to activate inequality Eq. 9g in the event that inequalities Eq. 9a–Eq. 9c can be satisfied.

Finally, we note that the intermediate regime 6στ ≤ 8σ represents a compromise in which there are grounds to argue that the first point below the threshold is a meaningful (but noisy) characterization of the DNA number. As before, the consistency checks enforce that data further to the left fall within the noise. While it is beyond the scope of this manuscript to argue for a specific threshold, this intermediate regime may provide reasonable settings for which confidence in the data analysis is high, but not unreasonably so. Moreover, as the inset to Fig. 6 shows, the fluorescence threshold can (for this particular system) be reduced from 0.2 to 0.03 on average, with a spread from 0.01 to 0.05. Remarkably, this corresponds to anywhere from a factor of 4 to a factor of 10 decrease using data analysis alone. Provided a given setting requires fewer false negatives, there may be grounds to consider levels as low as τ = 5σ.

It is also important to note that inequalities Eq. 9a – Eq. 9d play a fundamental role insofar as they preclude non-physical affine transformations. In more detail, we interpret β and c as small systematic errors in the baseline, which should therefore be within a few σ of zero. Recalling that a is the ratio of limiting reactants [see Eq. 4], we see immediately that this parameter will explore the typical variability (across all sources) of reactant numbers.Footnote 7 While variation within 20% to 30% may be expected, it is not reasonable that a can change by decades.

To illustrate what happens without these constraints, we considered a situation in which systematic background effects can be transformed to yield exponential-like growth. The top plot of Fig. 10 shows a master curve alongside 17 NTC datasets with an added linear component. Eliminating the inequality constraints Eq. 9a – Eq. 9d leads to feasible transformations for 7 of these curves (bottom subplot), but the constant offsets and multiplicative factor are unphysical; e.g. c and β are \(\mathcal O(1)\). Such systematic errors in the baseline would be sufficient to call into question the stability of the instrument electronics. In all cases, reintroducing the constraints yields an infeasible collection of constraints, thus illustrating the importance of inequalities Eq. 9a – Eq. 9d.

Fig. 10
figure 10

Affine transformations of NTCs with an added linear component. The black curve is the master curve. Top: Data before transformation. Bottom: Data after transformation omitting inequality constraints Eq. 9a – Eq. 9d. Of the original 17 NTCs, only 7 lead to feasible optimization programs. Results associated with infeasible programs are not shown

Extensions to Quantitation

Conventional approaches to quantifying initial DNA copy numbers require the creation of a calibration curve that relates Cq values to samples with known initial DNA concentrations. Importantly, this approach can only be expected to interpolate Cq values within the range dictated by the calibration process. Measurements of Cq falling outside this range may have added uncertainty. Moreover, it is well known in the community that even within the domain of interpolation, concentration uncertainties are often as high as 20% to 30%.

Equation 3 and Eq. 4 are therefore powerful results insofar as they may allow for more accurate quantification of initial template copies. Equation 3 quantifies the extent to which changing the reagent concentration alters the amplification curve. In the case that κ < 1 (κ > 1) the entire curve will be shifted down (up), which, in the case of small changes, can be conflated with a shift to the right (left). Thus, Eq. 3 suggests that a significant portion of the uncertainty in quantitation measurements may be due to variation in the relative concentrations of reagents arising from pipetting errors.

Equation 4 provides a means of reducing this uncertainty insofar as it directly quantifies the effect of reagents through the scale parameter a. Moreover, the affine transformation approach does not rely on a calibration curve using multiple samples with known DNA concentrations. In effect, it provides a physics-based model which can be used for extrapolation. Our approach thereby allows one to use a single master curve with a large initial template copy number as a reference to which all other measurements are scaled. As shown in our examples above, the requirement for data collapse provides an additional consistency check that may be able to detect contamination and/or other deleterious processes affecting the data.

Ultimately a detailed investigation is needed to establish the validity of Eq. 3 and Eq. 4 as tools for quantitation. As this will require development of uncertainty quantification methods for both conventional approaches and our own, we leave such tasks for future work.

Limitations and Open Questions

A key requirement of our work is a master amplification curve to be used as a reference for all transformations. The quality of data collapse and subsequent improvements in fluorescence thresholds are therefore tied to the quality of this reference. Master curves that are excessively noisy and/or exhibit systematic deviations from exponential growth at fluorescence values a few sigma above the baseline may lead to false negatives. Likewise, systematic effects present in late cycle amplification data but not found in the master curve can lead to infeasible optimization problems. Robust background subtraction is therefore a critical element of our analysis.

In spite of this, empirically measured master curves (as we have used here) may exhibit random fluctuations that cannot be entirely eliminated at low fluorescence values. While we find that it is often best to work directly with raw data, there may be circumstances in which it is desirable to smooth a master curve within a few σ of the noise floor, especially when physically informed models based on exponential growth can be leveraged.