Positive Sigmoid Control Rule
Version: v3.0.0 Status: Normative (text), Illustrative (diagrams only) Scope: POSITIVE_SIGMOID_CONTROL rule for validating sigmoid curve direction consistency for positive control wells Domain: RULES-POSSIGMOIDCTRL Precedence: N/A (standalone validation rule)
Statement
The system shall validate that control wells classified as positive exhibit the expected upward sigmoid amplification curve pattern. When a control well classified as positive displays a downward sigmoid curve (indicative of a negative result pattern), the system flags this as an invalid condition by assigning error codes to both the well and target.
This rule enforces consistency between the sigmoid curve direction and the final classification for control wells only. Patient wells are excluded from this validation. The rule can be bypassed via resolution code or manual classification override.
Quick Reference
| ID | Core Behavior | Priority | Status |
|---|---|---|---|
| REQ-RULES-POSSIGMOIDCTRL-001 | Detects and flags sigmoid/classification inconsistency on control wells | HIGH | Draft |
| REQ-RULES-POSSIGMOIDCTRL-002 | Displays sigmoid validation errors in Assay Summary view | HIGH | Draft |
Key Integration Points: Analytics Engine (sigmoid analysis), Well Classification System, Assay Summary Display, Resolution System
Rule Summary
| Property | Value |
|---|---|
| Name | POSITIVE_SIGMOID_CONTROL |
| Precedence | N/A (standalone validation) |
| Triggers | Control wells with positive classification |
| Output | Sets error codes INCORRECT_POSITIVE_SIGMOID (well) and INCORRECT_POSITIVE_SIGMOID_TARGET (target) |
Rule Flowchart (Illustrative)
This diagram illustrates the decision logic for sigmoid validation. It does not specify UI layout, styling, or interaction details.
Definitions
| Term | Definition |
|---|---|
| Sigmoid Curve | The characteristic S-shaped amplification curve produced during PCR |
| Upward Sigmoid | A sigmoid curve with increasing fluorescence indicating target detection (expected for positive classification) |
| Downward Sigmoid | A sigmoid curve with decreasing or inverted pattern indicating no target detection (unexpected for positive classification) |
| Control Well | A well containing known positive or negative control samples used to validate assay performance |
| Final Classification | The computed classification result for a well (positive, negative, or indeterminate) |
| Resolution Code | A code applied to a well to indicate that a specific validation rule should be skipped |
| Manual Classification | A classification assigned by an operator that overrides the computed classification |
Assumptions
- The sigmoid curve direction analysis has been performed on the well readings prior to rule execution
- Well type classification (Control vs Patient) is available for each well
- Final classification status is computed before this rule executes
- Resolution codes and manual classifications are persisted and accessible during rule evaluation
Requirements
Sigmoid Curve Validation (REQ-RULES-POSSIGMOIDCTRL-001)
FR-POSSIGMOIDCTRL-001: Detect Incorrect Sigmoid Curve Direction for Positive Control Wells
The system shall detect and flag control wells where the sigmoid curve direction is inconsistent with the positive final classification by assigning appropriate error codes.
Inputs/Outputs
| Direction | Data | Source/Target |
|---|---|---|
| Input | Sigmoid curve direction (upward/downward) | Analytics Engine |
| Input | Final classification (positive/negative) | Well Classification System |
| Input | Well type (control/patient) | Well metadata |
| Input | Resolution codes, manual classification | Resolution System |
| Output | Error code INCORRECT_POSITIVE_SIGMOID | Well record |
| Output | Error code INCORRECT_POSITIVE_SIGMOID_TARGET | Target record |
Acceptance Criteria
Error Assignment:
- When a control well has readings showing a downward sigmoid curve AND the final classification is positive, the system shall assign error code
INCORRECT_POSITIVE_SIGMOIDto the well - When a control well has readings showing a downward sigmoid curve AND the final classification is positive, the system shall assign error code
INCORRECT_POSITIVE_SIGMOID_TARGETto the associated target
Valid Conditions (No Error):
- When a control well has readings showing a downward sigmoid curve AND the final classification is negative, the system shall NOT assign any sigmoid-related error codes
- When a control well has readings showing an upward sigmoid curve AND the final classification is negative, the system shall NOT assign any sigmoid-related error codes
- When a control well has readings showing an upward sigmoid curve AND the final classification is positive, the system shall NOT assign any sigmoid-related error codes (valid condition)
Scope Restrictions:
- The rule shall execute only for Control wells
- The rule shall NOT execute for Patient wells
Skip Conditions:
- The rule shall NOT execute when the well has resolution code
POSITIVE_SIGMOID_CONTROLapplied - The rule shall NOT execute when the well has a manual classification assigned
Error Handling
- Downward sigmoid + positive classification + control well: Assign error codes INCORRECT_POSITIVE_SIGMOID (well) and INCORRECT_POSITIVE_SIGMOID_TARGET (target)
- Missing sigmoid direction data: Wells without sigmoid direction data are not recognized by the system (no action)
Trace: Source: 3.0.0-Positive Sigmoid Control Rule (Rows 1-4) | Jira: BT-5015 (Epic), BT-5014 (Task) | Tests: TC-001 through TC-007
Error Display (REQ-RULES-POSSIGMOIDCTRL-002)
FR-POSSIGMOIDCTRL-002: Display Incorrect Positive Sigmoid Errors in Assay Summary
The system shall display incorrect positive sigmoid errors in the Assay Summary view when a control well has been flagged with the sigmoid validation error.
Acceptance Criteria
Display Requirements:
- When a control well has error code
INCORRECT_POSITIVE_SIGMOIDfor a specific target within a mix, the Assay Summary shall displayINCORRECT_POSITIVE_SIGMOID_TARGETfor that target under the corresponding mix section - The error display shall include the mix identifier to enable precise identification of the affected well
- The error display shall include the target identifier to enable precise identification of the affected well
Assumptions
- REQ-RULES-POSSIGMOIDCTRL-001 has executed and assigned error codes prior to Assay Summary display
Trace: Source: 3.0.0-Positive Sigmoid Control Rule (Row 5) | Jira: BT-5015 (Epic) | Tests: TC-008
Configuration Options
| Option | Default | Description | Affects |
|---|---|---|---|
| Rule Name | POSITIVE_SIGMOID_CONTROL | Programmatic identifier for the rule | REQ-RULES-POSSIGMOIDCTRL-001 |
| Resolution Code | POSITIVE_SIGMOID_CONTROL | Code to skip rule execution for a specific well | REQ-RULES-POSSIGMOIDCTRL-001 |
UI Notes (Illustrative)
FR-POSSIGMOIDCTRL-002 UI Specifications
Assay Summary Display:
- Error is displayed at the target level within the context of the associated mix
- Display location: Assay Summary view, organized by Mix and Target
- Error code
INCORRECT_POSITIVE_SIGMOID_TARGETis shown for the affected target
Implementation (Illustrative)
| Component | Location |
|---|---|
| Rule Class | Analyzer/Rules/PositiveSigmoidControlRule.php |
| Sigmoid Identifier | Support/SigmoidIdentifier.php |
| Error Setter | Analyzer/Rules/Concerns/SetErrorToWell.php |
Traceability Matrix
| Requirement | Title | Verification | Implementation | Test Cases | Status |
|---|---|---|---|---|---|
| REQ-RULES-POSSIGMOIDCTRL-001 | Detect Incorrect Sigmoid Curve Direction | Test | PositiveSigmoidControlRule | TC-001 through TC-007 | Draft |
| REQ-RULES-POSSIGMOIDCTRL-002 | Display Errors in Assay Summary | Test | PositiveSigmoidControlRule | TC-008 | Draft |
Notes
- This rule is part of the Sigmoid Rule Update initiative (BT-5015) that separates sigmoid validation logic for positive and negative wells
- Rationale: A positive classification indicates the target was detected, which should produce an upward sigmoid amplification curve. A downward sigmoid pattern with a positive classification indicates an inconsistency that requires operator attention
- Related rule: Negative Sigmoid Control rule handles the inverse case (upward sigmoid with negative classification)
- X-ray Test reference: BT-5044 - Verify Positive Sigmoid Control rule
Open Questions
| ID | Question | Source | Owner | Date Raised |
|---|---|---|---|---|
| - | (None - resolved during review) | - | - | - |
Resolved: Wells without sigmoid direction data are not recognized by the system; no error handling required for this case.
Acceptance Tests
Test: REQ-RULES-POSSIGMOIDCTRL-001
Test TC-001: Error condition - downward sigmoid with positive classification
Given: A control well with observation
And: Readings show downward sigmoid curve
And: Final classification is positive
When: The Positive Sigmoid Control rule executes
Then: The system shall assign error code INCORRECT_POSITIVE_SIGMOID to the well
And: The system shall assign error code INCORRECT_POSITIVE_SIGMOID_TARGET to the target
Test TC-002: No error - downward sigmoid with negative classification
Given: A control well with observation
And: Readings show downward sigmoid curve
And: Final classification is negative
When: The Positive Sigmoid Control rule executes
Then: The system shall NOT assign any sigmoid-related error codes
Test TC-003: No error - upward sigmoid with negative classification
Given: A control well with observation
And: Readings show upward sigmoid curve
And: Final classification is negative
When: The Positive Sigmoid Control rule executes
Then: The system shall NOT assign any sigmoid-related error codes
Test TC-004: No error - upward sigmoid with positive classification (valid condition)
Given: A control well with observation
And: Readings show upward sigmoid curve
And: Final classification is positive
When: The Positive Sigmoid Control rule executes
Then: The system shall NOT assign any sigmoid-related error codes
Test TC-005: Patient well exclusion
Given: A patient well with observation
And: Readings show downward sigmoid curve
And: Final classification is positive
When: The Positive Sigmoid Control rule evaluates the well
Then: The system shall NOT assign any sigmoid-related error codes
Test TC-006: Resolution code skip
Given: A control well with observation
And: Readings show downward sigmoid curve
And: Final classification is positive
And: Resolution code POSITIVE_SIGMOID_CONTROL is applied
When: The Positive Sigmoid Control rule evaluates the well
Then: The system shall NOT assign any sigmoid-related error codes
Test TC-007: Manual classification skip
Given: A control well with observation
And: Readings show downward sigmoid curve
And: Final classification is positive
And: Manual classification is assigned (positive)
When: The Positive Sigmoid Control rule evaluates the well
Then: The system shall NOT assign any sigmoid-related error codes
Test: REQ-RULES-POSSIGMOIDCTRL-002
Test TC-008: Assay Summary error display
Given: A control well in Mix A
And: Error code INCORRECT_POSITIVE_SIGMOID is assigned
And: The observation target is Target A
When: User views the Assay Summary
Then: The system shall display INCORRECT_POSITIVE_SIGMOID_TARGET for Target A under Mix A section
Related Design Documents
| Design Document | Relevant Sections |
|---|---|
| SDD Algorithms | Sigmoid Validation Rules |
Appendix: Process Artifacts
Completion Checklist
- All requirements are capability-level (describe behavior, not UI)
- Requirement variants consolidated (no requirement explosion) - N/A, only 2 distinct requirements
- 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 - Resolved: wells without sigmoid data are not recognized by system
- Consolidations documented in Reviewer Notes with reversibility info
- Module can survive a full UI redesign unchanged
- Refinements folded into acceptance criteria (RF-01 through RF-03 were duplicates of AC-06 through AC-09)
- Traceability matrix is complete
Reviewer Notes
No Consolidation Required
The two requirements in this domain represent distinct system capabilities:
| Requirement | Capability | Disposition |
|---|---|---|
| REQ-RULES-POSSIGMOIDCTRL-001 | Error detection and assignment | Retained as-is |
| REQ-RULES-POSSIGMOIDCTRL-002 | Error display in Assay Summary | Retained as-is |
Rationale: These requirements address different system responsibilities (detection vs display) and cannot be meaningfully consolidated without losing clarity. Per RULES domain guidance, conservative consolidation is applied and all test criteria are preserved as acceptance criteria.
Reversibility: Source requirements preserved 1:1.
- Source:
output/pilot/rules/rule-positive-sigmoid-control/rule-positive-sigmoid-control-restructured.md