Why an Implausible Result Needs a Traceable Diagnosis
A pharmacogenetic PBPK simulation can produce a striking exposure difference for several very different reasons. The biology may support it, the chosen parameter model may amplify it, or the cohort-generation and coding steps may have introduced an error. A high mean exposure among poor metabolizers, for example, is not by itself evidence of a problem. The result becomes diagnostically useful only when the path from genotype records to phenotype assignment, PBPK parameters, and exposure summaries can be checked.
This tutorial treats diagnosis as a sequence of internal-consistency checks. The calculations use hypothetical values and simplified genotype rules for teaching. In an application, allele-function assignments, phenotype thresholds, and parameter relationships must be the ones specified for the drug, gene, and model under study; the illustrative rules below are not universal clinical standards.
A Practical Audit Order
Start with records and counts, then follow the model’s dependency chain. This order helps locate the earliest point where an unexpected value appears. If genotype records already imply an impossible number of allele copies, exposure summaries are downstream symptoms rather than the right place to begin debugging.
Confirm that each subject has the expected number of alleles for the modelled locus, that genotype counts sum to the cohort size, and that allele counts calculated from genotypes agree with any separately stored allele frequencies.
Apply the stated allele-function and phenotype rules to the genotype records themselves. Compare the recomputed scores and phenotype proportions with the variables passed to the PBPK model.
Check parameter values against the specified mapping, units, allowed range, and intended variability. Look for values assigned to the wrong genotype or phenotype, repeated values where variation was intended, or implausible tails.
Compare genotype-stratified exposure summaries and the overall summary. Confirm that the overall calculation uses the intended population weights and that exposure direction is compatible with the implemented parameter effects.
These checks assume that the genotype definition, scoring rule, phenotype thresholds, parameter mapping, and cohort target have been specified in advance. If a study deliberately oversamples a genotype, for example, the raw simulated cohort proportions need not match population proportions. The question is whether the reported summary is for that oversampled design or has been appropriately weighted to represent another target population.
Worked Checks From Genotype Records to Exposure
Worked Example: Detecting a Duplicated Allele
A hypothetical diploid-locus simulation contains 100 subjects. The genotype tally is 50 subjects with *1/*1, 30 with *1/*2, and 20 with *2/*2. A separate software output reports 140 copies of *1 and 70 copies of *2. Check whether those allele totals agree with the genotype tally.
Each subject is expected to contribute two allele copies, so the tally implies \(2(100)=200\) copies. Counting from the genotype groups gives:
The reported software totals instead give \(140+70=210\) copies, which cannot describe 100 diploid subjects at one locus. The genotype tally implies allele proportions \(130/200=0.6500\) for *1 and \(70/200=0.3500\) for *2. The separate output’s proportions, \(140/210=0.6667\) and \(70/210=0.3333\), are based on the wrong total.
A plausible coding fault is that ten *1/*1 records were each counted as having an extra *1 copy: this adds ten *1 copies without changing the genotype tally. The diagnosis is not proven by the arithmetic alone, but the disagreement pinpoints the allele-counting step for inspection. Do not repair the reported frequencies by merely renormalizing them; first correct the underlying record or counting logic.
Worked Example: Finding an Activity-Score and Phenotype Mismatch
Consider a hypothetical cohort of 1,000 diploid subjects with the following genotype counts. For illustration, assign allele scores *1 = 1, *2 = 0, and *17 = 1.5; the subject activity score is the sum of the two allele scores. Use these illustrative phenotype bins: poor metabolizer at score 0, intermediate at scores above 0 and below 1, normal at scores from 1 through 2, and rapid at scores above 2.
| Genotype | Count | Activity score | Illustrative phenotype |
|---|---|---|---|
| *1/*1 | 490 | 2 | Normal |
| *1/*2 | 280 | 1 | Normal |
| *1/*17 | 140 | 2.5 | Rapid |
| *2/*2 | 40 | 0 | Poor |
| *2/*17 | 40 | 1.5 | Normal |
| *17/*17 | 10 | 3 | Rapid |
The genotype counts sum to \(490+280+140+40+40+10=1{,}000\). Applying the stated bins gives 40 poor, 0 intermediate, 810 normal, and 150 rapid subjects. For example, the normal count is \(490+280+40=810\), not 800; the rapid count is \(140+10=150\). Thus the recomputed proportions are 0.0400 poor, 0 intermediate, 0.8100 normal, and 0.1500 rapid. These values sum to 1.
Suppose the simulation output instead reports 80 poor, 0 intermediate, 760 normal, and 160 rapid subjects. Those proportions also sum to 1, so a sum-to-one check would not catch the problem. But the reported poor count is 40 too high and the normal count 50 too low, with a net difference of 0 subjects after accounting for the reported rapid count. Rechecking each row’s score and category should reveal where assignment diverged. For instance, if all 40 *2/*17 subjects were incorrectly assigned score 0, 40 subjects would move from normal to poor; a further discrepancy would remain to investigate. This comparison illustrates why genotype-by-genotype checks are more informative than phenotype totals alone.
There is an arithmetic inconsistency to avoid when auditing phenotype summaries: the correct normal count in the table is \(490+280+40=810\), while the rapid count is \(140+10=150\). Therefore, the correct proportions are 0.0400 poor, 0 intermediate, 0.8100 normal, and 0.1500 rapid. A proposed output of 80 poor, 0 intermediate, 760 normal, and 160 rapid sums to 1,000, but differs in more than one category; it must be traced to the individual records rather than explained by a single reassignment.
Worked Example: Checking a Parameter Distribution and Its Upper Tail
Suppose a hypothetical positive PBPK parameter is intended to follow a lognormal distribution with median 1.00 parameter units and geometric standard deviation 1.50. For a lognormal distribution, the 90th percentile is the median multiplied by the geometric standard deviation raised to the standard-normal 90th percentile, \(z_{0.90}=1.2816\).
The calculation follows because the logarithm of the parameter is normally distributed: its 90th percentile is the log-median plus \(1.2816\) times the log-scale standard deviation. Exponentiating returns the percentile on the original, positive scale. If a simulation reports a 90th percentile of 1.10 under these exact distribution settings, that is inconsistent with the intended distribution and suggests checking the scale parameter, transformation, or quantile calculation. If the parameter is genotype-dependent, perform the check within genotype strata as well as in the pooled cohort; a pooled distribution can conceal a faulty subgroup assignment.
Worked Example: Detecting Unintended Genotype Weighting in Exposure
Use the 1,000-subject hypothetical genotype cohort above. To isolate the weighting issue, suppose all other PBPK inputs are fixed and the model uses the explicitly hypothetical clearance multiplier \(m_g=0.25+0.75(AS_g/2)\), where \(AS_g\) is the genotype activity score. Let the corresponding exposure be \(AUC_g=100/m_g\) mg·h/L. This relationship is a simplified model assumption for this example, not a general pharmacogenetic rule.
| Genotype | Count | Score | \(m_g\) | \(AUC_g\) (mg·h/L) |
|---|---|---|---|---|
| *1/*1 | 490 | 2 | 1.000 | 100.0 |
| *1/*2 | 280 | 1 | 0.6250 | 160.0 |
| *1/*17 | 140 | 2.5 | 1.1875 | 84.21 |
| *2/*2 | 40 | 0 | 0.2500 | 400.0 |
| *2/*17 | 40 | 1.5 | 0.8125 | 123.1 |
| *17/*17 | 10 | 3 | 1.375 | 72.73 |
The genotype-weighted mean exposure is calculated using the cohort counts, not by giving each genotype row equal weight:
Using unrounded genotype exposures gives approximately 127.24 mg·h/L. If someone averages the six genotype-specific means equally, the result is approximately \((100+160+84.21+400+123.08+72.73)/6=156.67\) mg·h/L. That is a different estimand: it represents a hypothetical design with equal weight for each genotype, not the stated cohort composition. For the cohort-weighted mean, the population proportions must weight each genotype-specific mean. A deliberate stratified design can use equal numbers per genotype for estimation, but its unweighted pooled mean should not be presented as the target population mean unless equal genotype weighting is the target.
Justifying the Cohort-Weighted Summary
The weighting rule follows directly from partitioning the cohort into mutually exclusive genotype groups. Let \(w_g\) be the proportion of the target cohort in genotype group \(g\), and let \(\mu_g\) be the mean exposure in that group. The overall mean is the sum of each group’s contribution to the total exposure divided by the cohort size.
To see why, write the total exposure as the sum of exposures across genotype groups. If group \(g\) contains \(n_g\) subjects out of \(N\), its total exposure is \(n_g\bar{AUC}_g\). Dividing the sum of group totals by \(N\) gives:
This identity assumes that the groups partition the analysed subjects and that their weights correspond to the target population being summarized. If the simulation uses stratified sampling, \(n_g/N\) may describe the sampling design rather than the intended population. In that case, use target-population weights for a population-level summary and report the design and weighting choice clearly.
Diagnostics, Alternatives, and Limits
A useful diagnostic compares intermediate outputs, not only the final exposure result. For each genotype, retain or reconstruct the record count, score, phenotype label, relevant PBPK parameter values, and exposure summaries. Then ask whether changes occur in the expected order: a genotype-count error can alter phenotype proportions; an activity-score mapping error can alter parameter assignment; a parameter error can alter exposure even when the phenotype labels are correct.
- Counts and proportions: verify that genotype counts sum to the number of subjects, allele copies agree with ploidy, and phenotype counts sum to the number of classified subjects. Missing, unclassified, or filtered records should be reported rather than silently dropped.
- Parameter distributions: check units, support, intended central tendency, spread, and extreme values. For a positive parameter, negative draws indicate a transformation or distribution error unless negative values are explicitly meaningful for that parameter. Compare both pooled and genotype-stratified summaries.
- Exposure summaries: inspect genotype-specific results before pooling. Verify that reported means, medians, and percentiles are calculated from the intended subjects and that units and dose conditions match. A mean and a median need not be close when the exposure distribution is skewed.
- Simulation variability: if model structure and assignments pass deterministic checks, repeat or enlarge the simulation to assess Monte Carlo variation. A small cohort can yield noisy proportions and tail summaries; such variation is not evidence of a coding error by itself.
These checks complement, rather than replace, other approaches. Reviewing code and data transformations can locate implementation faults; recalculating summaries independently can catch aggregation errors; and comparing simulations with external clinical or biological evidence can assess model plausibility. An internal audit is especially effective at finding contradictions within the simulation, but a perfectly consistent implementation can still use incorrect allele functions, inappropriate phenotype thresholds, or an unsuitable PBPK structure.
A common mistake is to label an unexpected exposure pattern “impossible” because it contradicts a familiar genotype ordering. The correction is to trace the stated model: confirm the genotype assignment, parameter mapping, and exposure relationship first, then assess whether those assumptions are scientifically appropriate. Another mistake is to treat a phenotype proportion that sums to one as proof of correct classification. The worked example shows why row-level recomputation is needed: incorrect assignments can preserve the total while shifting subjects between categories.
Check Your Understanding
Use the stated assumptions in each question; the answers follow the questions.
- A diploid cohort has 250 subjects. What total allele-copy count should a complete single-locus genotype tally imply?
- In a genotype cohort with 20% of subjects in group A and 80% in group B, their mean exposures are 300 and 100 mg·h/L. What is the cohort-weighted mean?
- Why can phenotype proportions that sum to one still be incorrect?
- A positive parameter is intended to be lognormal with median 1.00 and geometric standard deviation 1.50. What is its approximate 90th percentile using \(z_{0.90}=1.2816\)?
Solutions. (1) \(2(250)=500\) allele copies. (2) \(0.20(300)+0.80(100)=140\) mg·h/L. (3) Subjects can be assigned to the wrong categories while the categories still partition the cohort; recompute labels from genotype records and the stated rules. (4) \(1.00\exp[1.2816\ln(1.50)]\approx1.68143\), or approximately 1.681 parameter units.