Skip to main content
Version: Next

STD: Standard Curve Validation Rule (STDQT)

Version: v1.0.0 Status: Draft SRS Source: docusaurus/docs/srs/rules/rule-standard-curve-validation.md Rule Name: STDQT Domain: RULES-STDCURVE


Overview

This document specifies tests for the Standard Curve Validation rule using decision tables and test vectors. The rule validates CT (cycle threshold) values against configured limits and verifies PCR amplification curve correlation (R-squared) with the standard curve before calculating quantity values.

Rule Characteristics:

  • Pure business logic (no UI)
  • Sequential validation (applicability, CT range, R2, quantity calculation)
  • Configurable limits per mix/target
  • Mathematical calculation (R2, quantity formula)

Test Method: TM-API (per Test Plan section 3.3 - Rules use automated API tests)

Verification Approach: Rule verification is performed using data-driven test vectors. Each row in a decision table represents a complete verification scenario with defined inputs and expected outputs. This format enables exhaustive condition coverage while remaining concise and auditable.


Coverage Summary

REQ IDTitleConditionsTest VectorsCoverageGaps
REQ-RULES-STDCURVE-001Validate CT Values Against Standard Curve Parameters1522100%None

Totals: 1 REQ, 15 Conditions, 22 Test Vectors, 100% Coverage


REQ-RULES-STDCURVE-001: Validate CT Values Against Standard Curve Parameters

Input Variables

VariableTypeValid ValuesDescription
config.has_std_curvebooltrue, falseWhether mix/target has standard curve configuration
config.ct_lower_limitfloat?null, numericMinimum acceptable CT value
config.ct_upper_limitfloat?null, numericMaximum acceptable CT value
config.r2_thresholdfloat0.0-1.0 (default 0.99)Minimum R-squared correlation coefficient
config.slopefloatnumeric (non-zero)Standard curve regression slope
config.interceptfloatnumericStandard curve regression intercept
obs.ct_valuefloat?null, NaN, numericObserved cycle threshold value
obs.curve_dataarraydata pointsStandard curve data for R2 calculation
calc.r2_valuefloat0.0-1.0Calculated R-squared from regression

Output Variables

VariableTypeDescription
rule.triggeredboolWhether the rule validation failed
rule.failure_reasonstring?CT_BELOW_LOWER_LIMIT, CT_ABOVE_UPPER_LIMIT, POOR_CURVE_FIT, or null
rule.statusstringNOT_APPLICABLE, PASSED, FAILED, ERROR
well.quantityfloat?Calculated quantity (only if validation passes)

Decision Table: Applicability Check

TVhas_std_curvect_limits_configct_valuestatustriggeredCovers
TV-001-001false--NOT_APPLICABLEfalseAC: Skip rule for mixes/targets without standard curve configuration
TV-001-002truemissing25ERRORfalseAC: Missing CT limits configuration logs error and skips rule
TV-001-003truepresentnullERRORfalseAC: Invalid CT value (null) logs error and skips validation
TV-001-004truepresentNaNERRORfalseAC: Invalid CT value (NaN) logs error and skips validation

Decision Table: CT Range Validation

TVct_lowerct_upperct_valuetriggeredfailure_reasonCovers
TV-001-005153512trueCT_BELOW_LOWER_LIMITAC: CT below lower limit triggers rule
TV-001-006153514.99trueCT_BELOW_LOWER_LIMITAC: CT just below lower limit triggers rule
TV-001-007153515falsenullAC: CT at lower limit passes (boundary)
TV-001-008153525falsenullAC: CT within range passes
TV-001-009153535falsenullAC: CT at upper limit passes (boundary)
TV-001-010153535.01trueCT_ABOVE_UPPER_LIMITAC: CT just above upper limit triggers rule
TV-001-011153538trueCT_ABOVE_UPPER_LIMITAC: CT above upper limit triggers rule

Decision Table: R-squared Validation

TVct_in_ranger2_thresholdcalc_r2triggeredfailure_reasonCovers
TV-001-012true0.990.85truePOOR_CURVE_FITAC: R2 below threshold triggers rule
TV-001-013true0.990.95truePOOR_CURVE_FITAC: R2 below threshold triggers rule
TV-001-014true0.990.989truePOOR_CURVE_FITAC: R2 just below threshold triggers rule
TV-001-015true0.990.99falsenullAC: R2 at threshold passes (boundary)
TV-001-016true0.990.995falsenullAC: R2 above threshold passes
TV-001-017true0.991.0falsenullAC: R2 at maximum passes

Decision Table: R2 Calculation Formula

TVSS_resSS_totexpected_r2Covers
TV-001-01801001.0AC: Perfect fit (R2 = 1 - 0/100 = 1.0)
TV-001-01911000.99AC: R2 = 1 - 1/100 = 0.99
TV-001-02051000.95AC: R2 = 1 - 5/100 = 0.95

Decision Table: Quantity Calculation

TVct_validr2_validslopeinterceptct_valueexpected_qtystatusCovers
TV-001-021truetrue-3.3240251584.89PASSEDAC: Qty = 10^((25-40)/-3.32) when both validations pass
TV-001-022truetrue-3.035203162.28PASSEDAC: Qty = 10^((20-35)/-3.0) = 10^5

Decision Table: Sequential Validation Flow

TVhas_std_curvect_limitsct_validct_in_ranger2_meets_thresholdfinal_statusquantity_calculatedCovers
TV-001-023false----NOT_APPLICABLEfalseAC: No std curve config skips rule
TV-001-024truemissing---ERRORfalseAC: Missing limits logs error
TV-001-025truepresentfalse--ERRORfalseAC: Invalid CT skips validation
TV-001-026truepresenttruefalse-FAILEDfalseAC: CT out of range fails
TV-001-027truepresenttruetruefalseFAILEDfalseAC: R2 below threshold fails
TV-001-028truepresenttruetruetruePASSEDtrueAC: All validations pass, quantity calculated

Test File Locations

RequirementTest FileAutomation Status
REQ-RULES-STDCURVE-001tests/Unit/Rules/StdqtRuleTest.phpAutomated

Traceability to Existing Tests

RequirementJira TestsStatus
REQ-RULES-STDCURVE-001PendingGap

Gap Analysis

Identified Gaps

GapRequirementDescriptionPriorityOwner
GAP-001REQ-RULES-STDCURVE-001No Jira test ticket for standard curve validationHighTBD

Remediation Plan

  1. GAP-001: Create test ticket covering TV-001-001 through TV-001-028, with emphasis on:
    • Boundary conditions (CT at limits, R2 at threshold)
    • Error handling (missing config, invalid CT)
    • Quantity calculation verification