Delta CT Rule
Version: v3.0.0 Status: Normative (text), Illustrative (diagrams only) Scope: DELTA_CT rule for validating CT value consistency between configured target pairs Domain: RULES-DELTACT Precedence: Part of Analytics Rules Engine
Statement
The system shall evaluate CT value differences between configured target pairs and flag observations that violate delta thresholds or have mismatched classifications.
The rule ensures quality control by detecting potential PCR errors where paired targets checking for the same disease should produce consistent results. When the absolute CT difference between a configured pair exceeds the threshold, or when their classifications differ, a BAD_CT_DELTA error is raised.
Quick Reference
| ID | Core Behavior | Priority | Status |
|---|---|---|---|
| REQ-RULES-DELTACT-001 | Validates CT consistency between target pairs and flags threshold violations or classification mismatches | HIGH | Draft |
Key Integration Points: Well observation data, Kit Configuration (Delta CT Configurations), Analytics Rules Engine
Rule Summary
| Property | Value |
|---|---|
| Name | DELTA_CT |
| Triggers | When evaluating configured target pairs within a well |
| Output | BAD_CT_DELTA error on affected observation pair |
| Error Code | BAD_CT_DELTA |
Rule Flowchart (Illustrative)
This diagram illustrates the delta CT validation logic. Target pair matching is bidirectional (A,B matches both orderings).
Definitions
| Term | Definition |
|---|---|
| CT (Cycle Threshold) | The PCR cycle number at which fluorescence exceeds a detection threshold |
| Delta CT | The absolute difference between CT values of two targets in a configured pair |
| IC (Internal Control) | A target used to validate PCR process integrity, excluded from delta CT validation |
| BAD_CT_DELTA | Error code raised when delta CT validation fails due to threshold violation or classification mismatch |
| Classification (cls) | Result classification of an observation (e.g., Positive, Negative) |
| Target Pair | Two targets configured for delta CT comparison within a kit configuration |
Assumptions
- Delta CT configurations are established in Kit Configuration before rule execution
- Well observation data includes target identification, classification, and CT values
- Target pairs configured for delta CT validation are checking for the same disease
- IC targets are identifiable and excluded from delta CT validation
Requirements
Delta CT Validation (REQ-RULES-DELTACT-001)
FR-DELTACT-001: Validate CT Consistency Between Target Pairs
The system shall evaluate CT value differences between configured target pairs and flag observations that violate delta thresholds or have mismatched classifications.
Inputs/Outputs
| Direction | Data | Source/Target |
|---|---|---|
| Input | Well observations (target, classification, CT values) | PCR analysis |
| Input | Delta CT configurations (target pairs, thresholds) | Kit Configuration |
| Output | BAD_CT_DELTA error | Affected observation pair |
Acceptance Criteria
Threshold Validation:
- Given a configured target pair (A, B) with delta threshold D, when both targets are observed in the same well and the absolute CT difference |CT_A - CT_B| is greater than or equal to D, then a BAD_CT_DELTA error shall be raised
- The system shall use greater-than-or-equal (>=) operator for delta CT threshold comparison; an exact threshold match shall trigger an error
Classification Validation:
- Given a configured target pair (A, B), when both targets are observed in the same well with different classifications (e.g., Positive vs Negative), then a BAD_CT_DELTA error shall be raised regardless of CT values
- The system shall detect classification mismatches independently of CT value comparison; either condition alone shall trigger an error
Pair Matching:
- When observed targets in a well do not match any configured delta CT combination pair, no delta CT validation error shall be raised
- The system shall apply target pair matching bidirectionally; a configuration for (A, B) shall apply to observations of both A and B in either order
IC Exclusion:
- The rule shall only evaluate non-IC (Internal Control) targets within a well
- The system shall exclude IC targets from validation; if either target in a pair is IC, the pair shall be skipped
Error Handling
- CT delta exceeds or equals threshold: The system shall raise BAD_CT_DELTA error for the affected observation pair
- Classification mismatch between paired targets: The system shall raise BAD_CT_DELTA error for the affected observation pair
- Missing observation for configured target: The system shall skip validation for that target pair (no error)
- Invalid CT value (null/NaN): The system shall skip validation for that target pair (no error)
- No matching configuration for observed targets: The system shall skip validation (no error)
Trace: Source: 3.0.0-Delta CT Rule (Row 1 - Main requirement, Sub-requirements) | Jira: CST-237, BT-3298, BT-3255 | Tests: BT-1209, See scenarios
Configuration Options
| Option | Default | Description | Affects |
|---|---|---|---|
delta_ct_threshold | Per-pair | Configurable threshold for each target pair defining maximum allowed CT difference | REQ-RULES-DELTACT-001 |
delta_ct_enabled | true | Enable/disable delta CT validation for specific target pairs | REQ-RULES-DELTACT-001 |
Configuration Location: KIT-configuration menu -> Delta CT Configurations
UI Notes (Illustrative)
REQ-RULES-DELTACT-001 UI Specifications
- Delta CT Configurations page accessible via KIT-configuration menu
- Target pair configurations displayed in tabular format with Target A, Target B, and Threshold columns
- Administrators can add, modify, or disable target pair validations
- Flow diagram visualization available (image153.png)
Implementation (Illustrative)
| Component | Location | Purpose |
|---|---|---|
| DeltaCtRule | Analyzer/Rules/DeltaCtRule.php | Core rule implementation - target pair validation, delta threshold check, classification mismatch detection |
Traceability Matrix
| Requirement | Title | Verification | Implementation | Test Cases | Status |
|---|---|---|---|---|---|
| REQ-RULES-DELTACT-001 | Validate CT Consistency Between Target Pairs | Test | DeltaCtRule.php | TC-DELTACT-001, TC-DELTACT-002, TC-DELTACT-003, TC-DELTACT-004 | Draft |
Notes
- Rule ID: DELTA_CT
- This rule ensures quality control by verifying that two targets checking for the same disease have similar CT quantities, helping detect potential PCR errors
- Related documentation: Delta CT Configurations
Acceptance Tests
Test: REQ-RULES-DELTACT-001
Test TC-DELTACT-001: No Error for Unconfigured Target Pair
Given: Delta CT Combinations configured:
Target A, Target B -> 3 (threshold)
When: Well observations contain:
Target B: Positive / CT 30
Target C: Positive / CT 35
Then: No Error is raised
Rationale: Target pair (B, C) is not in the configured delta CT combinations, so the rule does not apply.
Test TC-DELTACT-002: BAD_CT_DELTA When Delta Equals Threshold
Given: Delta CT Combinations configured:
Target A, Target B -> 3 (threshold)
When: Well observations contain:
Target A: Positive / CT 30
Target B: Positive / CT 33
Then: BAD_CT_DELTA error is raised
Rationale: CT difference (33 - 30 = 3) equals the configured threshold, triggering the error.
Test TC-DELTACT-003: BAD_CT_DELTA When Delta Exceeds Threshold
Given: Delta CT Combinations configured:
Target A, Target B -> 3 (threshold)
When: Well observations contain:
Target A: Positive / CT 30
Target B: Positive / CT 34
Then: BAD_CT_DELTA error is raised
Rationale: CT difference (34 - 30 = 4) exceeds the configured threshold (3), triggering the error.
Test TC-DELTACT-004: BAD_CT_DELTA When Classifications Differ
Given: Delta CT Combinations configured:
Target A, Target B -> 3 (threshold)
When: Well observations contain:
Target A: Positive / CT 30
Target B: Negative / CT 30
Then: BAD_CT_DELTA error is raised
Rationale: Target A is Positive and Target B is Negative. Different classifications trigger the error regardless of CT values being identical.
Related Design Documents
| Design Document | Relevant Sections |
|---|---|
| SDD Algorithms | Analytics Rules Engine |
Appendix: Process Artifacts
Completion Checklist
- All requirements are capability-level (describe behavior, not UI)
- Requirement variants consolidated (no requirement explosion)
- UI details are fully demoted to Illustrative section
- Configuration options are not encoded as requirements
- Acceptance criteria describe behavior, not UI mechanics
- Every requirement has acceptance criteria and source traceability
- Error handling addressed for I/O, validation, and external system requirements
- Open questions documented with owners assigned (N/A - none)
- Consolidations documented in Reviewer Notes with reversibility info
- Module can survive a full UI redesign unchanged
- Refinements do not introduce new capabilities
- Traceability matrix is complete
Reviewer Notes
Source Analysis: REQ-RULES-DELTACT-001
This domain contained a single well-structured requirement with clear acceptance criteria. No consolidation was required.
| Original Item | Source Reference | Disposition |
|---|---|---|
| REQ-RULES-DELTACT-001 | 3.0.0-Delta CT Rule (Row 1) | Preserved as REQ-RULES-DELTACT-001 |
| AC: Delta threshold check | Row 1 Sub-requirements | Preserved as AC (Threshold Validation group) |
| AC: Classification mismatch | Row 1 Sub-requirements | Preserved as AC (Classification Validation group) |
| AC: Unconfigured pair skip | Row 1 Sub-requirements | Preserved as AC (Pair Matching group) |
| AC: IC exclusion | Row 1 Sub-requirements | Preserved as AC (IC Exclusion group) |
Rationale: This is a focused analytics rule with a single capability (delta CT validation) and four distinct testable conditions. The source structure aligns with SRS best practices. All acceptance criteria are preserved as they represent distinct, testable behaviors essential for analytics precision.
Reversibility: Original structure preserved - no restoration needed.
- Source:
output/pilot/rules/rule-delta-ct/rule-delta-ct-restructured.md - SDD:
output/pilot/rules/rule-delta-ct/sdd/rule-delta-ct-design.md