Background

The immune system’s ability to fight a large array of foreign particles is facilitated by the diversity of the T-cell receptor (TCR) repertoire [1]. This diversity is generated during thymocyte development by a process of somatic recombination. Inside the thymus, the constant (C) and variable (V) domains of the α and β chains of the TCR are assembled via random genetic rearrangements of the variable (V), diversity (D) and joining (J) gene segments [2]. Additional diversity is added through imprecise joining of the V and J regions along with random nucleotide additions and deletions at the V(D)J junctions [2, 3]. Consequently, most of the variability lies in the third complementary determining region (CDR3) which is encoded by the V(D)J junction and comes in contact with the antigenic peptide on the surface of peptide/major histocompatibility complex (pMHC) molecules [4, 5]. While the total number of lymphocytes in the blood can be directly measured, assessment of the diversity of the TCR repertoire requires more complex and indirect assays in a research setting. Such assays include flow cytometry, spectratyping and nucleotide sequencing.

Different T-cell clones use different V gene families in the rearrangement of their β chains. Through the use of commercially available monoclonal antibodies (named TCR V β), one can use standard flow cytometry on whole blood samples to determine the percentage of CD4 T-cells that use a given TCR BV family in subjects or controls. Measures of heterogeneity of TCR BV family usage in these CD4 T-cells can be used as a substitute for TCR repertoire diversity [6]. Flow cytometry is not only faster, cheaper, and technically simpler to use; the data reflects real population percentages.

Spectratyping uses messenger RNA (mRNA) from T-cells to amplify, by PCR, the complementary DNA (cDNA) across the CDR3 region. This generates information about the heterogeneity of the relative frequencies of different CDR3 length products within a functional TCR BV family. Because different T-cell clones have different sequences or lengths of CDR3, analysis of the CDR3 length distributions can be used to determine the overall TCR repertoire diversity [711]. Spectratyping has the advantage of providing a finer level of resolution than just analyzing BV gene family expression on the T-cells of flow cytometry. Although spectratyping provides the total number of CDR3 sizes and their pattern of distribution, the investigator cannot determine the frequency of cells used by a particular BV family. Amplifications of variations from a background distribution of each individual BV family may lead to over-representation of immunodominant clonotypes and therefore yield results that are not representative of the contribution of those cells in the entire T-cell repertoire.

TCR diversity can also be assessed by nucleotide sequencing of DNA CDR3 regions, but this is labor-intensive and generates an even lower level of resolution of the whole T-cell repertoire compared to spectratyping [12].

This paper focuses on the role of flow cytometry in measuring T-cell population diversity and compares it to T-cell population diversity as given by spectratyping. Traditionally, spectratyping data is quantified using a wide range of methods from visual [13, 14] to quantitative scoring [1517]. Our group previously described the use of a likelihood method for measuring deviation from a normal TCR repertoire [9, 11]. For each observed CDR3 length distribution by spectratyping, we compute the Kullback-Leibler divergences between the patient CDR3 length distribution and a known reference distribution [9, 11]. We have modified the Kullback-Leibler divergence to measure the deviation of T-cell receptor diversity from normal. This was done by accounting for both the TCR BV family usage as measured by flow cytometry and by comparing the utility of this method to CDR3 length distribution as measured by spectratyping [11].

Estimator bias is a concern when using this method of divergence scoring. In particular, it is desirable to determine how much deviation in the computation of the divergence occurs when the initial number of lymphocytes used in generating the data is varied. We have addressed this question in the context of divergence measures generated individually by flow cytometry and spectratyping. The results are especially useful when using the techniques for limited numbers of cells.

Results

We used the Kullback-Leibler divergence to quantify similarities between different frequency distributions in the T-cell repertoire diversity when measured by either flow cytometry or spectratyping. We started with two assumptions: 1) the reference distribution corresponds to a polyclonal TCR repertoire and 2) in individual subjects, a positive divergence determines the deviation from the normal TCR repertoire. The flow divergence, D f , is the distance between the individual and the perfectly sampled reference control distributions of all TCR BV family usage measured by flow cytometry. The spectratype divergence, D s , is the distance between the individual and the perfectly sampled reference control distributions of the CDR3 lengths of each TCR BV family and averaged over all TCR BV families as measured by spectratyping (see section Kullback-Leibler divergence and [9]).

We specifically wanted to assess the performance of the divergences D f and D s in predicting the diversity of the T-cell receptor repertoire under stressful, i.e. cell limited, circumstances. While D f and D s account for deviations from normal of distributions of TCR BV family usage and CDR3 lengths within each TCR BV family, additional variability is added due to the dependence on the number of measured events, n, for every individual patient/control (see Figures 1 and 2). Knowing the sample size n and the dimensions of the measured space, L i , we derived the corrected divergence value, Di,corr (see section ‘Sampling bias - theoretical derivation’) to be given by

D i , corr = D i - L i - 1 2 n ,
(1)
Figure 1
figure 1

Measured and corrected divergence measures as function of inverted sample number. (a) Measured flow divergence, D f , (red solid diamonds) and corrected flow divergence, Df,corr, (blue circles) as functions of the inverted sample number 1/n; (b) Measured spectratype divergence, D s , (red empty diamonds) and corrected spectratype divergence, Ds,corr, (blue circles) as a function of the inverted sample number 1/n0 in one DiGeorge patient.

Figure 2
figure 2

Flow divergence, D f , as a function of sample size n (∙), presented on a log-log scale.

where i = f,s for flow cytometry and spectratyping, respectively. L f is the number of BV families used in the flow cytometry assay (in our case 18) and L s is the number of CDR3 lengths used in the spectratype assay (in our case 14).

Therefore, only the number of measured events, n, and the dimension of the measured space, L i are needed to correct the divergence measures. We used this formula to assess the performance of D f and D s measures in an athymic DiGeorge subject (Figure 1) during a period of limited numbers of peripheral blood T-cells as the patient underwent immune reconstitution following thymus transplantation.

Flow cytometry results

Flow divergence measurements, D f , were determined at seven time points following thymus transplantation in DiGeorge subject 5 (Table 1). For each time point, the number of CD4 T-cell was known (Table 1). The corrected divergence Df,corr is found by subtracting (L f  - 1)/2n, where L f  = 18, from the measured divergence D f at each time point (Table 1). The measured and corrected divergences as a function of 1/n are plotted in Figure 1(a). When we use samples with low event numbers, we noted an overestimate in the measured D f compared to D f estimates from samples with high event numbers, for which the correction is not significant. Formula (1) helped address the effect of event number on the D f prediction.

Table 1 Average CD4 T-cell sample size, measured flow divergence D f , and corrected flow divergence D f , corr in a DiGeorge subject

To further test the dependence of D f on the sample size we assumed that D f is a function of the decreasing event numbers in the CD4 T-cell gate used for TCR BV analysis. For this analysis we used a single blood sample collection from each of four complete DiGeorge subjects after thymus transplantation and from each of four healthy controls. Each blood sample was serially diluted, followed by flow cytometry. The results are presented in Table 2 and the plot of D f as a function of n is presented in Figure 2.

Table 2 Summary of T-cell sample size and the corresponding flow divergence values D f

For each of these eight cases, we wanted to predict the corrected divergence value, Df,corr, using the measured D f s and determine their dependence on the sample size n. We define a three parameter linear model given by

y(n)=α+C/n+ε,
(2)

where, y(n) is the observed D f and n is the number of CD4 T-cells in the sample. The intercept α is the true divergence, Df,corr, and the slope C quantifies the rate at which the diversity is dependent on the sample size. In equation (1), slope C corresponds to the (L f  - 1)/2 value, which for an assay that uses 18 BV families, reduces to 8.5. The errors, ε, are independent and normally distributed.

We derived estimates and 95% confidence intervals for parameters α and C for each of eight individuals by fitting y(n), as given by (2), to the measured D f values in Table 1 for CD4 T-cell numbers n. For the fitting routine we used a descent method for univariate functions [18]. The parameter values and their confidence intervals are presented in Table 3. The regression curves and data are presented in Figure 3.

Table 3 Parameter values and confidence intervals for model (2)
Figure 3
figure 3

Flow divergence D f as a function of the inverted sample number 1/n in eight subjects. The solid line represents the fit of the three parameter linear model (2) to the data (∙). Results are presented on a log-log scale. The same model was fitted to a data set that excluded point (0.0017,0.366) for control 3 (dashed line). The best parameter estimates and their 90% confidence intervals are presented in Table 3.

Moreover, if we consider the slope C to be equal among the subjects we can simultaneously fit the following model to the data from all subjects.

y i (n)= α i +C/n+ ε i ,
(3)

where α i are the corrected divergence values for the patient i, with i = 1,...,8. The rate at which the diversity is dependent on the sample size, C, is considered constant among the subjects. The errors for each of the subjects, ε i , are independent and normally distributed.

The fitting procedure was done using a quasi-Newton method for finding the minimum of a multivariate function [18]. The predicted parameter values and their confidence intervals are presented in Table 4. The regression curves and data are presented in Figure 4.

Table 4 Parameter values and confidence intervals for model (3)
Figure 4
figure 4

Flow divergence D f as a function of the inverted sample number 1/n for the same slope C . The solid and dashed lines shows the fit of a three parameter linear model (3) to the data (∙). The results are presented on a log-log scale. The best parameter estimates and their 90% confidence intervals are presented in Table 4.

Events estimation

From the flow cytometry analysis we can estimate the minimum number of CD4 T-cells needed in a sample for an accurate Df,corr estimate. If we want our estimates to be 90% accurate, i.e., err = 0.1, then the ratio between the corrected and measured divergence has to be less than err,

1 / nC α + 1 / nC <err.
(4)

This translates into the following condition

n> C ( 1 - err ) err × α .
(5)

From our estimates C = 7.705 and α = 0.19 (median 0.12). This implies the sample size, n, must be larger than 364 (median 577) cells for an accurate Df,corr estimate. In our case, we gated the flow cytometry on CD4 T-cells, so more than 364 CD4 T-cells, or events, must be captured in the flow analysis.

Spectratype results

Spectratype divergence measurements, D s , were determined in five patients for three to seven time points following thymic transplantation (Table 5). For each time point, the number of CD3 T-cell used to isolate RNA, n0, is known (Table 5). Starting with a fixed amount of RNA, complementary DNA (cDNA) is generated in a reverse transcriptase reaction and used with each of π = 23 different primers to amplify the CDR3 region from each BV gene.

Table 5 CD3 T-cell sample size, measured spectratype divergence D s , and corrected spectratype divergence D s,,corr in a DiGeorge subject

The corrected Ds,corr is found by subtracting (L s  - 1)/2n, where n = n0/π, from the measured divergence at each time point, where L s  = 14 (Table 5). The measured and corrected divergences as a function of 1/n0 are plotted in Figure 1(b). We note that there is no correction in the measured spectratype divergence, D s , since the number n0 of CD3 T-cells that we are starting with is always high.

Total divergence

By combining the individual contributions of flow and spectratype divergence, we defined the total divergence, D (see section ‘Kullback-Leibler divergence’). D measures the divergence of the individual from the perfectly sampled reference control and accounts for differences in distributions of CDR3 lengths within each TCR BV family by spectratyping as well as differences in distributions of overall TCR BV families by flow cytometry. Corrections in the flow and spectratype divergences are sufficient to ensure that the total divergence is independent of the sample size.

Discussion

The data used in our study came from flow cytometry and spectratype assays in both DiGeorge subjects after thymus transplantation and healthy adult volunteers. This study presents significant information regarding the utility of flow cytometry, as well as spectratyping, to assess the diversity of the antigen receptor repertoire. Importantly, these data identify a bias in measurement errors which must be corrected. The paper presents the relationships between the number of gated events in the flow cytometry assay, as well as the number of CD3 T-cells in the spectratype assay, and the information-theory measures, D f and D s , used as surrogates of TCR diversity.

We addressed a critical issue of estimator bias. Starting with the assumption that such a bias exists, we have derived ways to account for the error in the measured divergences. We show that D f and D s can be corrected by substracting a number inversely proportional to the sample size.

For the flow cytometry data, the constant of proportionality can either be deduced theoretically as a function of the total number of BV TCR families used in the flow cytometry assay, or derived from a statistical model applied to individual data. Both methods predict similar results, with the constant equal to 8.5 in the theoretical approach and 7.7 in the statistical approach. It is important to note that we found a direct correlation between the measured D f and the sample size in five out of eight subjects (see Table 6).

Table 6 Correlation coefficient and p-values as given by a Pearson comparison test, between the inverse average number of CD4 T-cell used in flow cytometry assays and the flow divergence

Our study allows us to predict a lower bound for the number of CD4 T-cells needed in the flow cytometry gated events. We have shown that at least 364 CD4 T-cells have to be counted as gated events for a 90% confidence in the D f measures. With fewer gated events, the D f measurement cannot be used as a substitute for diversity. This is particularly important to keep in mind when assessing patients with limited numbers of T-cells, such as those undergoing immune reconstitution following thymus, stem cell or bone marrow transplantation. Each of these is a clinical situation in which the development of the T-cell repertoire correlates to immune competency. Thus, these data provide a quantitative basis by which T-cell repertoire diversity can be assessed by flow cytometry.

For the spectratype data, the results are quite different. Although, using the same theoretical approach, we derive a constant, C = 6.5, that accounts for measurement bias; thus, the corrected spectratype divergence is identical to the observed divergence. Moreover, we find no correlation between the measured spectratype divergence, D s , and the sample size in four out of five patients (Table 7).

Table 7 Correlation coefficient and p-values as given by a Pearson comparison test, between the inverse total number of CD3 T-cell used in spectratype assays and the spectratye divergence

The total divergence actively incorporates the flow divergence. Correction in the flow divergence, D f , guarantees independence of the total divergence, D, from the sample size.

Conclusions

In conclusion, sample size is a sensitive parameter in the predicted flow divergence values, but not in the spectratype divergence values. Although using flow cytometry to assess T-cell repertoire diversity is a valuable tool, one must have sufficient cells, or events, in the flow cytometry gate before using either the flow or the total divergence as a prediction for the TCR repertoire diversity.

Methods

Human subjects

Blood samples used in our study come from healthy adult controls and from infants with complete DiGeorge anomaly after thymus transplantation [19]. Blood was obtained under protocols approved by Duke University Medical Center Internal Review Board (IRB). T-cell repertoire evaluation was done by flow cytometry. Whole blood samples were evaluated using 22 monoclonal antibodies directed against CD4 and a total of 18 TCR BV families (Beckman Coulter and BD Biosciences - see Tables 8 and 9).

Table 8 List of TCR BV families and antibodies used in the flow cytometry assay
Table 9 List of TCR VB families and antibodies excluded from the flow cytometry studies

Human subjects

Subjects were enrolled in protocols that were approved by the Duke University Health System Institutional Review Board and were reviewed by the Food and Drug Administration under an Investigational New Drug application. All subjects were children. The parent(s) of each subject provided written informed consent.

Flow cytometry

Reference distributions of TCR BV family usage determined by flow cytometry were generated from peripheral blood samples of fifty healthy individuals (see Table 10). Similar distributions of TCR BV usage were derived from four additional controls and four DiGeorge subjects [19] who underwent thymus transplantation.

Table 10 Mean % of CD4 T-cells that use a TCR BV family as predicted by the flow cytometry assay

Spectratyping

CD3 T-cells from the peripheral blood of patients were isolated. RNA was prepared and used for cDNA synthesis. The cDNA was used as a template for 23 TCR BV specific primer pairs to amplify the complete CDR3 region by PCR [10]. Each PCR product, representing a different TCR BV family, was size separated by electrophoresis and the product lengths were identified using the GeneScan software (Applied Biosciences). An example of spectratype data in a healthy adult is presented in Figure 5, which shows the histograms of the number of CD4 T-cells versus CDR3 length for each TCR BV family.

Figure 5
figure 5

CD4 T-cell spectratype data. Spectratype histograms show the number of CD4 T-cells bearing receptors versus CDR3 length for each TCR BV families tested.

Kullback-Leibler divergence

Flow Kullback-Leibler divergence

Let P = {P i ,i = 1,...,n F } be the relative frequencies corresponding to the ideal, perfectly sampled reference distribution of BV family i usage, where n F is the number of BV families (in our case 18). Let P = {P i ,i = 1,...,n F } be the relative frequency of cells that use BV family i in individual control/subjects. The null hypothesis is that a normal polyclonal TCR repertoire has a distribution identical with that of the reference distribution. Deviation from the normal repertoire seen in subjects can be quantified by the flow Kullback-Leibler divergence [9]

D f = i = 1 n F p i log p i P i .
(6)

The flow Kullback-Leibler divergence is a measure of the distance between the two frequency distributions or, equivalently, it is the inefficiency of assuming that the distribution of BV family usage is p i , i = 1,...,n F , when the true frequency usage is P i ,i = 1,...,n F .

Spectratype Kullback-Leibler divergence

Similarly, let p = {p ij  = q i rj/i,i = 1,...,n F and j = 1,...,n C }, and P = {P ij  = Q i Rj/i,i = 1,...n F and j = 1,...n C }, respectively, be the relative numbers of T-cells of CDR3 lengths j, given that the BV family i is used in individual patient/controls and reference controls as determined by spectratype. Here n C is the number of CDR3 lengths (in our case 14), (q,Q) i are the relative frequencies of cells which use the BV family i and (r,R)j/i the relative frequencies of of cells that have CDR3 length j, given that they use the BV family i. The null hypothesis is that a normal polyclonal TCR repertoire has a distribution of CDR3 lengths identical with that of the reference distribution. Deviation of from the normal repertoire, as seen in patients, can be quantified by the spectratype divergence for each TCR BV family i as follows

D s / i = i = 1 n C r j / i log r j / i R j / i ,
(7)

and the total spectratype divergence, which is the average of spectratype divergences of TCR BV families i, i∈{1,...,n F } is given by

D s = 1 n F i = 1 n F D KL , spec / i .
(8)

Total Kullback-Leibler divergence

We can combine these two measures to obtain a total divergence measure from normal repertoire, derived as follows

D = i = 1 n F j = 1 n C p ij log p ij P ij = i = 1 n F j = 1 n C q i r j / i log q i r j / i Q i R j / i = i = 1 n F q i log q i Q i + i = 1 n F q i j = 1 n C r j / i log r j / i R j / i = D f + i = 1 n F q i D s / i ,
(9)

Sampling bias - theoretical derivation

The distribution of BV family usage (CDR3 length within a BV family) of a perfectly sampled reference control can be described by a L f (L s )-dimensional multinomial distribution with the parameter vector P, where p i is the relative numbers of T-cells that use the BV family (CDR3 length) i. The distribution of the actual, but not yet observed, BV family (CDR3 length) usage in individual patient/controls are subsamples q of the ideal distribution, where q i are the relative numbers of T-cells that use the BV family (CDR3 length) i. The distance between these two distributions is given by the parameter d-1, with a large d accounting for a closer similarity between P and q. Finally, the observed distribution of BV family usage (CDR3 length), p, are samples of n measured events for every individual patient/control, where p i are the relative numbers of T-cells that use the BV family (CDR3 length) i. Here L f (L s ) is the dimension of the measured space, i.e. the number of BV families used in the flow cytometry assay, in our case 18 (the number of CDR3 lengths used in spectratyping assay, in our case 14).

For a large sampling number, n, we can consider the relative frequencies P, q and p to be continuous variables and define their probability distribution functions, pdf, as

f(p|P,n, d - 1 )=f(p|q,n)f(q|P, d - 1 ) d L i q
(10)

where i = f,s. The pdf of p, for np i large enough, can be approximated using Stirling’s formula (see [9] for a complete computation). Therefore,

f ( p | q , n ) = n L i - 1 Γ ( n + 1 ) Γ ( n p i + 1 ) i = 1 L i q i p i n n ( L i - 1 ) / 2 e - nD ( p | q ) ( 2 π ) L i - 1 i = 1 L i p i δ ( i p i - 1 ) ,
(11)

where δ is the Dirac delta function and

D(p|q)= i = 1 L i p i log p i q i ,
(12)

is the Kullback-Leibler divergence between p and q.

As shown in Kepler et al. [9] Laplace’s integration method with constraints [20] can be used to asymptotically approximate the integral (10) as follows

f ( p | P , n , d - 1 ) = 2 π 1 n + d - ( L i - 1 ) / 2 × i = 1 L i 1 p i e - nD ( p | q ) - d - 1 D ( q | P )
(13)

and

log f ( p | P , n , d - 1 ) = - nD ( p | q ) - d - 1 D ( q | P ) - L i - 1 2 log 1 n + d - L i - 1 2 log 2 π - 1 2 i = 1 L i log p i ,
(14)

Moreover, as shown in Kepler et al. [9], a Taylor expansion in ϵ = (n d)-1 of q i around p i , leads to the following expression for (14)

log f ( p | P , n , d - 1 ) = - d - 1 D ( p | P ) - s D 2 nd - L i - 1 2 log 1 n + d - L i - 1 2 log 2 π - 1 2 i = 1 L i log p i + O ( ϵ 2 )
(15)

where

D(p|P)= p i log p i P i ,
(16)

and

s D = p i log p i P i - D ( p | P ) 2 .
(17)

From this, one can derive the expected values, E, of D(p|P) and s D up to order ϵ to be (for a complete derivation refer to [9])

E D ( p | P ) = L i - 1 2 1 n + d , E s D = ( L i - 1 ) d - 1 n + O ( d ϵ 2 ) .
(18)

From here we can derive the corrected individual divergence,

D i , corr = D f - L i - 1 2 n ,
(19)

which relaxes the concern of variability due to sampling error.