Description
For nonnegative integer totalCopies, firstCopies, secondCopies, and unresolvedCopies return allocated=firstCopies+secondCopies, unaccounted=totalCopies-firstCopies-secondCopies-unresolvedCopies, and consistent on exact balance.
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 nonnegative integer totalCopies, firstCopies, secondCopies, and unresolvedCopies return allocated=firstCopies+secondCopies, unaccounted=totalCopies-firstCopies-secondCopies-unresolvedCopies, and consistent on exact balance.
When to use this tool
Use Pharmacogene Diplotype Copyallocation Budget 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 totalCopies, firstCopies, secondCopies, unresolvedCopies. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read allocated, unaccounted, consistent. Inspect consistent before interpreting the associated values.
For nonnegative integer totalCopies, firstCopies, secondCopies, and unresolvedCopies return allocated=firstCopies+secondCopies, unaccounted=totalCopies-firstCopies-secondCopies-unresolvedCopies, and consistent on exact balance.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| totalCopies | Total Copies | Required. Safe integer; minimum 0. |
| firstCopies | First Copies | Required. Safe integer; minimum 0. |
| secondCopies | Second Copies | Required. Safe integer; minimum 0. |
| unresolvedCopies | Unresolved Copies | Required. Safe integer; minimum 0. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| allocated | Allocated | Required. Safe integer. |
| unaccounted | Unaccounted | Required. Safe integer. |
| consistent | Consistent | Required. Boolean. |
{
"input": {
"totalCopies": 4,
"firstCopies": 2,
"secondCopies": 1,
"unresolvedCopies": 1
},
"output": {
"allocated": 3,
"unaccounted": 0,
"consistent": true
}
} Limitations and assumptions
- Over-allocation is reported as a negative remainder and consistent=false rather than rejected. Copy balance does not validate allele assignments, structural variants, or chromosome phase.
- 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
- Pharmacogene Diplotype Order Canonicalizer
Order simple star alleles numerically while preserving suballele spellings.
- Pharmacogene Haplotype Member Count Budget
For nonnegative integer members, required, optional, and excluded<=members return eligible=members-excluded, requiredGap=eligible-required, and optionalCapacity=max(0,eligible-required-optional).