Description
For frequencies and expectedSum within zero through one and nonnegative tolerance return sum, residual=sum-expectedSum, and within=(abs(residual)<=tolerance).
Pharmacogenomic records distinguish allele labels, copy counts, reference-sequence versions, coordinate systems, and evidence about chromosome phase. A balanced count or matching token can check a record without establishing the underlying genotype. Supplied activity values and interpretation rules remain separate from a current gene-specific clinical guideline.
For frequencies and expectedSum within zero through one and nonnegative tolerance return sum, residual=sum-expectedSum, and within=(abs(residual)<=tolerance).
When to use this tool
Use Pharmacogene Allele Frequency Sum Residual when you need this specific allele-token, reference-coordinate, copy-budget, or source-support check.
How to use the tool and how it works
- Enter frequencies, expectedSum, tolerance. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read sum, residual, within. Inspect within before interpreting the associated values.
For frequencies and expectedSum within zero through one and nonnegative tolerance return sum, residual=sum-expectedSum, and within=(abs(residual)<=tolerance).1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| frequencies | Frequencies | Required. Array of finite number; maximum items 256. |
| expectedSum | Expected Sum | Required. Finite number; minimum 0; maximum 1. |
| tolerance | Nonnegative absolute tolerance in the compared quantity's unit. | Required. Finite number; minimum 0. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| sum | Sum | Required. Finite number. |
| residual | Sum minus supplied expectedSum, without normalization. | Required. Finite number. |
| within | Within | Required. Boolean. |
{
"input": {
"frequencies": [
0.2,
0.3,
0.4
],
"expectedSum": 1,
"tolerance": 0.05
},
"output": {
"sum": 0.9,
"residual": -0.09999999999999998,
"within": false
}
} Limitations and assumptions
- Sum itself can exceed one. Frequencies are not normalized or checked for shared population, disjoint alleles, sampling uncertainty, or a complete allele catalog.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Signed zero is exported as zero.
Alternative or Complementary methods
Use a current gene-specific nomenclature and a validated interpretation process when allele identity, phase, function, or clinical decisions matter. Verify source versions and reference coordinates before combining records.
References
Similar or alternative tools
- Genotype Panel Support Share
Count supplied locus-call and reference-matching support without phenotype or medication recommendations.
- Allele Call Confidence Margin
Compare caller-supplied research call confidence to an explicit boundary without phenotype or drug guidance.