Skip to main content
Version: Next

Negative Sigmoid Control Rule

Version: v3.0.0 Status: Normative (text), Illustrative (diagrams only) Scope: NEGATIVE_SIGMOID_CONTROL rule for validating sigmoid curve patterns in negative control wells Domain: RULES-NEGSIGMOIDCTRL Precedence: After well classification


Statement

The system shall detect and flag control wells that exhibit an upward sigmoid amplification pattern but have a negative final classification, indicating a potential quality issue requiring investigation.

The rule applies only to control wells (not patient wells) and can be bypassed via resolution codes or manual classification overrides. When triggered, the rule assigns error codes at both well and target levels, which are displayed in the Assay Summary report grouped by mix and target.


Quick Reference

IDCore BehaviorPriorityStatus
REQ-RULES-NEGSIGMOIDCTRL-001Detects upward sigmoid + negative classification and assigns error codesHIGHDraft
REQ-RULES-NEGSIGMOIDCTRL-002Excludes patient wells from rule executionHIGHDraft
REQ-RULES-NEGSIGMOIDCTRL-003Skips rule when bypassed by resolution codeHIGHDraft
REQ-RULES-NEGSIGMOIDCTRL-004Skips rule when manual classification existsHIGHDraft
REQ-RULES-NEGSIGMOIDCTRL-005Displays errors in Assay Summary by mix/targetMEDIUMDraft

Key Integration Points: Well data processing, Resolution code system, Manual classification, Assay Summary

Rule Summary

PropertyValue
NameNEGATIVE_SIGMOID_CONTROL
TriggersUpward sigmoid pattern + negative classification on control wells
OutputWell error INCORRECT_NEGATIVE_SIGMOID, Target error INCORRECT_NEGATIVE_SIGMOID_TARGET

Rule Flowchart (Illustrative)

This diagram illustrates the rule execution flow. It does not specify UI layout, styling, or interaction details.


Definitions

TermDefinition
Sigmoid PatternThe shape of the amplification curve over time (upward or downward)
Upward SigmoidAmplification curve that increases over time; typical of positive wells
Downward SigmoidAmplification curve that decreases over time; expected for negative wells
Final ClassificationThe system-determined classification of a well (Positive or Negative) after automated analysis
Manual ClassificationA user-assigned classification that overrides automated classification
Resolution CodeA code applied to a well to acknowledge and bypass specific validation rules
Control WellA well used for quality control purposes (non-patient)
Patient WellA well containing patient sample material

Assumptions

  • Wells have been processed and have a final classification assigned before rule execution
  • Sigmoid pattern analysis has been performed and pattern type (upward/downward) is available
  • Well type (Patient, Control) has been determined
  • Resolution codes and manual classifications, if present, are available for evaluation

Requirements

Core Validation (REQ-RULES-NEGSIGMOIDCTRL-001)

FR-NEGSIGMOIDCTRL-001: Detect Invalid Upward Sigmoid Patterns in Negative Wells

The system shall detect and flag control wells where the amplification curve exhibits an upward sigmoid pattern but the final classification is negative.

Acceptance Criteria

Detection Logic:

  • Given a control well has an upward sigmoid reading pattern AND a negative final classification, the system shall assign error code INCORRECT_NEGATIVE_SIGMOID to the well
  • Given a control well has an upward sigmoid reading pattern AND a negative final classification, the system shall assign error code INCORRECT_NEGATIVE_SIGMOID_TARGET to the associated target
  • When the rule triggers, the system shall assign both well-level and target-level error codes simultaneously
  • The system shall trigger the rule only on the specific combination of upward sigmoid pattern AND negative classification

Non-Triggering Conditions:

  • Given a control well has an upward sigmoid reading pattern AND a positive final classification, the system shall NOT assign any error code
  • Given a control well has a downward sigmoid reading pattern AND a negative final classification, the system shall NOT assign any error code
  • Given a control well has a downward sigmoid reading pattern AND a positive final classification, the system shall NOT assign any error code
  • The system shall NOT trigger the rule for downward sigmoid patterns regardless of classification

Error Handling

  • No sigmoid pattern available: do not execute rule (precondition not met)
  • No classification available: do not execute rule (precondition not met)

Trace: Source: 3.0.0-Negative Sigmoid Control Rule (Row 1) | Jira: BT-5014 | X-ray: BT-5045 | Epic: BT-5015 | Tests: See scenarios


Well Type Exclusions (REQ-RULES-NEGSIGMOIDCTRL-002)

FR-NEGSIGMOIDCTRL-002: Exclude Patient Wells from Rule Execution

The system shall not execute the Negative Sigmoid Control rule for wells designated as Patient well type.

Acceptance Criteria

Patient Well Exclusion:

  • Given a well with upward sigmoid readings and negative final classification, when the well type is Patient, the system shall NOT assign the INCORRECT_NEGATIVE_SIGMOID error code
  • Given a well with upward sigmoid readings and negative final classification, when the well type is Patient, the system shall NOT assign the INCORRECT_NEGATIVE_SIGMOID_TARGET error code

Trace: Source: 3.0.0-Negative Sigmoid Control Rule (Row 2) | Jira: [Pending] | Tests: See scenarios


Rule Bypass Mechanisms (REQ-RULES-NEGSIGMOIDCTRL-003 & 004)

FR-NEGSIGMOIDCTRL-003: Skip Rule Execution When Bypassed by Resolution Code

The system shall not execute the Negative Sigmoid Control rule when the well has an active resolution code of NEGATIVE_SIGMOID_CONTROL.

Acceptance Criteria

Resolution Code Bypass:

  • Given a well with upward sigmoid readings and negative final classification, when the well has resolution code NEGATIVE_SIGMOID_CONTROL applied, the system shall NOT assign the INCORRECT_NEGATIVE_SIGMOID error code
  • Given a well with upward sigmoid readings and negative final classification, when the well has resolution code NEGATIVE_SIGMOID_CONTROL applied, the system shall NOT assign the INCORRECT_NEGATIVE_SIGMOID_TARGET error code

Trace: Source: 3.0.0-Negative Sigmoid Control Rule (Row 3) | Jira: [Pending] | Tests: See scenarios


FR-NEGSIGMOIDCTRL-004: Skip Rule Execution When Manual Classification Exists

The system shall not execute the Negative Sigmoid Control rule when the well has a manual classification assigned.

Acceptance Criteria

Manual Classification Bypass:

  • Given a well with upward sigmoid readings and negative final classification, when the well has a manual classification assigned, the system shall NOT assign the INCORRECT_NEGATIVE_SIGMOID error code
  • Given a well with upward sigmoid readings and negative final classification, when the well has a manual classification assigned, the system shall NOT assign the INCORRECT_NEGATIVE_SIGMOID_TARGET error code
  • The system shall bypass the rule when a manual classification of any value (positive or negative) is assigned

Trace: Source: 3.0.0-Negative Sigmoid Control Rule (Row 4) | Jira: [Pending] | Tests: See scenarios


Error Reporting (REQ-RULES-NEGSIGMOIDCTRL-005)

FR-NEGSIGMOIDCTRL-005: Display Negative Sigmoid Control Errors in Assay Summary

The system shall display Negative Sigmoid Control errors in the Assay Summary report, aggregated by mix and target.

Acceptance Criteria

Assay Summary Display:

  • Given a control well has error code INCORRECT_NEGATIVE_SIGMOID for a specific mix and target, the Assay Summary shall display INCORRECT_NEGATIVE_SIGMOID_TARGET under that mix and target combination
  • The error display shall be associated with the specific mix and target combination where the error occurred

Trace: Source: 3.0.0-Negative Sigmoid Control Rule (Row 5) | Jira: [Pending] | Tests: See scenarios


Configuration Options

OptionDefaultDescriptionAffects
Rule NameNEGATIVE_SIGMOID_CONTROLProgrammatic identifier for the ruleAll requirements
Resolution CodeNEGATIVE_SIGMOID_CONTROLCode used to skip rule execution via resolutionsREQ-RULES-NEGSIGMOIDCTRL-003

UI Notes (Illustrative)

FR-NEGSIGMOIDCTRL-005 UI Specifications

Assay Summary Display:

  • Errors are grouped by Mix (e.g., "Mix A")
  • Within each mix, errors are displayed by Target (e.g., "Target A")
  • The target-level error code (INCORRECT_NEGATIVE_SIGMOID_TARGET) is displayed

Implementation (Illustrative)

ComponentLocation
Rule ClassAnalyzer/Rules/NegativeSigmoidControlRule.php
Sigmoid IdentifierSupport/SigmoidIdentifier.php
Error SetterAnalyzer/Rules/Concerns/SetErrorToWell.php

Traceability Matrix

RequirementTitleVerificationImplementationTest CasesStatus
REQ-RULES-NEGSIGMOIDCTRL-001Detect Invalid Upward Sigmoid PatternsTestNegativeSigmoidControlRuleBT-5045Draft
REQ-RULES-NEGSIGMOIDCTRL-002Exclude Patient WellsTestNegativeSigmoidControlRule[Pending]Draft
REQ-RULES-NEGSIGMOIDCTRL-003Skip on Resolution CodeTestNegativeSigmoidControlRule[Pending]Draft
REQ-RULES-NEGSIGMOIDCTRL-004Skip on Manual ClassificationTestNegativeSigmoidControlRule[Pending]Draft
REQ-RULES-NEGSIGMOIDCTRL-005Display in Assay SummaryTestNegativeSigmoidControlRule[Pending]Draft

Notes

  • This rule is part of the Sigmoid Rule Update epic (BT-5015), which separates sigmoid validation logic for positive and negative wells
  • Related rule: Positive Sigmoid Control Rule (validates sigmoid patterns in positive wells)
  • The rule execution order follows: Well Type check -> Manual Classification check -> Resolution Code check -> Classification check -> Sigmoid Pattern check

Known Issue: Source Documentation Contradiction (Row 2 Case 2)

The source documentation for Row 2 (Patient Well Exclusion) contains two test cases with contradictory expected results:

  • Case 1: Patient well = NO ERROR (correct per requirement statement)
  • Case 2: Patient well = ERROR (contradicts requirement statement)

Analysis: The requirement clearly states "does not execute for patient wells." Case 2 may be a documentation error, a counter-example, or an incomplete conditional scenario.

Resolution: Implementation follows the requirement statement. Patient wells shall not trigger errors. This is flagged for validation during testing.


Open Questions

IDQuestionSourceOwnerDate Raised
OQ-001Row 2 Case 2 documentation contradiction - verify intended behavior for patient wellsSource Validation@tbd2026-01-23

Acceptance Tests

Test: REQ-RULES-NEGSIGMOIDCTRL-001

Back to requirement

Test: Upward sigmoid with negative classification triggers error

Given: A control well exists
And: The well has upward sigmoid readings
And: The well has negative final classification
When: The Negative Sigmoid Control rule executes
Then: The system shall assign error code INCORRECT_NEGATIVE_SIGMOID to the well
And: The system shall assign error code INCORRECT_NEGATIVE_SIGMOID_TARGET to the target

Test: Upward sigmoid with positive classification does not trigger error

Given: A control well exists
And: The well has upward sigmoid readings
And: The well has positive final classification
When: The Negative Sigmoid Control rule executes
Then: The system shall NOT assign any error code

Test: Downward sigmoid with negative classification does not trigger error

Given: A control well exists
And: The well has downward sigmoid readings
And: The well has negative final classification
When: The Negative Sigmoid Control rule executes
Then: The system shall NOT assign any error code

Test: Downward sigmoid with positive classification does not trigger error

Given: A control well exists
And: The well has downward sigmoid readings
And: The well has positive final classification
When: The Negative Sigmoid Control rule executes
Then: The system shall NOT assign any error code

Test: REQ-RULES-NEGSIGMOIDCTRL-002

Back to requirement

Test: Patient wells are excluded from rule execution

Given: A patient well exists
And: The well has upward sigmoid readings
And: The well has negative final classification
When: The Negative Sigmoid Control rule executes
Then: The system shall NOT assign the INCORRECT_NEGATIVE_SIGMOID error code
And: The system shall NOT assign the INCORRECT_NEGATIVE_SIGMOID_TARGET error code

Test: REQ-RULES-NEGSIGMOIDCTRL-003

Back to requirement

Test: Resolution code bypasses rule execution

Given: A control well exists
And: The well has upward sigmoid readings
And: The well has negative final classification
And: The well has resolution code NEGATIVE_SIGMOID_CONTROL applied
When: The Negative Sigmoid Control rule executes
Then: The system shall NOT assign the INCORRECT_NEGATIVE_SIGMOID error code
And: The system shall NOT assign the INCORRECT_NEGATIVE_SIGMOID_TARGET error code

Test: REQ-RULES-NEGSIGMOIDCTRL-004

Back to requirement

Test: Manual classification bypasses rule execution

Given: A control well exists
And: The well has upward sigmoid readings
And: The well has negative final classification
And: The well has a manual classification assigned
When: The Negative Sigmoid Control rule executes
Then: The system shall NOT assign the INCORRECT_NEGATIVE_SIGMOID error code
And: The system shall NOT assign the INCORRECT_NEGATIVE_SIGMOID_TARGET error code

Test: REQ-RULES-NEGSIGMOIDCTRL-005

Back to requirement

Test: Error displays in Assay Summary by mix and target

Given: A control well exists in Mix A
And: The well has error code INCORRECT_NEGATIVE_SIGMOID
And: The well has an observation with Target A
When: The user views the Assay Summary
Then: The Assay Summary shall display INCORRECT_NEGATIVE_SIGMOID_TARGET under Mix A, Target A

Design DocumentRelevant Sections
SDD AlgorithmsSigmoid Analysis Algorithm

Appendix: Process Artifacts

Completion Checklist

  • All requirements are capability-level (describe behavior, not UI)
  • Requirement variants consolidated (no requirement explosion) - N/A: distinct behaviors preserved per RULES guidance
  • 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 - N/A: rule does not involve I/O
  • Open questions documented with owners assigned
  • Consolidations documented in Reviewer Notes with reversibility info
  • Module can survive a full UI redesign unchanged
  • Refinements folded into acceptance criteria
  • Traceability matrix is complete
  • Statement section present
  • Mermaid diagram present and marked as (Illustrative)
  • No "non-normative" text (replaced with "Illustrative")
  • Tests at end with back-links

Reviewer Notes

No Consolidation Required

The five requirements in this domain represent distinct, non-overlapping rule behaviors:

RequirementBehavior TypeRationale for Preservation
REQ-RULES-NEGSIGMOIDCTRL-001Core detection logicPrimary rule behavior - independently testable
REQ-RULES-NEGSIGMOIDCTRL-002Exclusion conditionDistinct bypass condition (well type)
REQ-RULES-NEGSIGMOIDCTRL-003Bypass conditionDistinct bypass condition (resolution code)
REQ-RULES-NEGSIGMOIDCTRL-004Bypass conditionDistinct bypass condition (manual classification)
REQ-RULES-NEGSIGMOIDCTRL-005Reporting behaviorDistinct output/display behavior

Rationale: Per RULES domain guidance, analytics rules require conservative consolidation to preserve test precision. Each requirement represents a separately testable rule behavior with distinct trigger conditions.

Reversibility: Source requirements preserved 1:1.

  • Source: output/pilot/rules/rule-negative-sigmoid-control/rule-negative-sigmoid-control-restructured.md
  • Original SRS: output/srs/rules/rule-negative-sigmoid-control.md