Skip to content

Main content

Pharmacogene Diplotype Copyallocation Budget Tool

Calculate pharmacogene diplotype copyallocation budget from explicit caller-supplied inputs.

Loading tool…

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

  1. Enter totalCopies, firstCopies, secondCopies, unresolvedCopies. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. 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 fieldMeaning and unitsAccepted input
totalCopiesTotal CopiesRequired. Safe integer; minimum 0.
firstCopiesFirst CopiesRequired. Safe integer; minimum 0.
secondCopiesSecond CopiesRequired. Safe integer; minimum 0.
unresolvedCopiesUnresolved CopiesRequired. Safe integer; minimum 0.
Output fieldInterpretationReturned shape
allocatedAllocatedRequired. Safe integer.
unaccountedUnaccountedRequired. Safe integer.
consistentConsistentRequired. Boolean.
json
{
  "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

  1. Calculation and input contract: pharmacogenomics/pharmacogene-diplotype-copyallocation-budget — tool.io

Similar or alternative tools