Skip to main content
Version: 3.0.1

QSSC - Quantify Using Stored Standard Curve

Version: v3.0.0 Status: Normative (text), Illustrative (diagrams only) Scope: QSSC rule for calculating quantity values from CT using stored standard curve parameters Domain: RULES-QSSC


Statement

The system shall calculate quantity values from Cycle Threshold (CT) measurements using stored standard curve slope and intercept parameters retrieved from the database.

The rule supports three processing paths: resolution code bypass for direct status assignment, normal quantity calculation using the exponential formula, and error handling when configuration is missing. When a QSSC resolution code is present, it takes precedence and bypasses calculation entirely.


Quick Reference

IDCore BehaviorPriorityStatus
REQ-RULES-QSSC-001Assigns LIMS status from resolution code, bypassing calculationHIGHDraft
REQ-RULES-QSSC-002Calculates quantity using exponential formula with stored slope/interceptHIGHDraft
REQ-RULES-QSSC-003Sets QUANT_STANDARDS_MISSING error when configuration is absentHIGHDraft

Key Integration Points: Well/Observation data (CT values), Calculated Quantification Settings, Resolution Code Configuration

Rule Summary

PropertyValue
NameQSSC
TriggersWhen observation requires quantity calculation from CT
OutputSets quantity on observation, or LIMS status, or error code

Rule Flowchart (Illustrative)

This diagram illustrates the three processing paths. It does not specify UI layout, configuration interfaces, or implementation details.


Definitions

TermDefinition
CT (Cycle Threshold)The PCR cycle number at which fluorescence crosses a threshold; lower CT indicates higher initial quantity
Standard CurveA mathematical relationship (slope/intercept) derived from known standards, used to calculate unknown quantities
Calculated Quantification SettingsStored database configuration containing slope and intercept values per target for quantity calculation
Resolution CodeA workflow status code that can override normal rule processing and directly assign LIMS status
Quantity MultiplierA well-level scaling factor applied to calculated quantities
LIMS StatusLaboratory Information Management System status assigned to wells/observations

Assumptions

  • Calculated Quantification Settings are pre-configured in the database before QSSC rule execution
  • Resolution Code configurations are established by system administrators
  • CT values provided to the rule have full decimal precision (not pre-rounded)
  • The exponential formula is the authoritative calculation method (supersedes earlier linear formulas)

Requirements

Resolution Code Handling (REQ-RULES-QSSC-001)

FR-QSSC-001: Execute QSSC Rule with Resolution Code Status Assignment

The system shall set the LIMS status from resolution code configuration when the QSSC resolution code is present on a well, bypassing quantity calculation.

Inputs/Outputs

DirectionDataSource/Target
InputWell resolution codesWell record
InputResolution code configurationSystem configuration
OutputLIMS statusWell record

Acceptance Criteria

Resolution Code Detection:

  • Check if the well's resolution codes contain QSSC
  • When QSSC resolution code is present, look up the corresponding LIMS status from the resolution code configuration

Status Assignment:

  • Apply the configured LIMS status to the well
  • No quantification calculation shall be performed when resolution code handling applies
  • No error shall be set on the well when LIMS status is successfully assigned

Error Handling

  • Resolution code present but no configuration: System behavior undefined (configuration assumed valid)

Trace: Source: 3.0.0-Qssc Rule - multiply calculated quantity by quantity multiplier (Row 1) | Jira: BT-3899 | Tests: See scenarios


Quantity Calculation (REQ-RULES-QSSC-002)

FR-QSSC-002: Calculate Quantity Using Stored Standard Curve Settings

The system shall calculate the quantity for an observation using the exponential formula with slope, intercept from Calculated Quantification Settings, and the accurate (non-rounded) CT value.

Inputs/Outputs

DirectionDataSource/Target
InputObservation CT value (full precision)Observation record
InputTarget identifierObservation record
InputSlope, interceptCalculated Quantification Settings
InputQuantity multiplierWell record
OutputCalculated quantityObservation record

Acceptance Criteria

Parameter Retrieval:

  • Retrieve slope and intercept from Calculated Quantification Settings for the matching target

Calculation Formula:

  • Apply the formula: quantity = multiplier * pow(10, ((ct - intercept) / slope))
  • Use the accurate CT value (not rounded) for calculation
  • Apply the well's quantity multiplier to the result
  • Use base-10 logarithmic relationship standard in PCR quantification

Precision Requirements:

  • Preserve full decimal accuracy of CT values throughout calculation
  • The exponential formula is the authoritative calculation method, superseding earlier linear formulas

Validation Examples:

CT ValueSlopeInterceptMultiplierExpected Quantity
28.1235-130175.248873017358
28.12345678-130175.256361986851

Error Handling

  • Missing quantification settings: Handled by REQ-RULES-QSSC-003
  • Invalid CT value: Not specified (assumed valid input)

Trace: Source: 3.0.0-QSSC Rule (Row 1, 2); 3.0.0-Qssc Rule - multiply calculated quantity by quantity multiplier (Row 2); 3.0.0-Qssc Rule - Revert Invalid Requirement or Quantity Calculation (Row 1); 3.0.0-Use accurate CT for Quantity Calculation (Row 1) | Jira: BT-3899, BT-4001, BT-5076 | Tests: See scenarios


Error Handling (REQ-RULES-QSSC-003)

FR-QSSC-003: Set Error When Quantification Standards Are Missing

The system shall set the QUANT_STANDARDS_MISSING error on the well when no matching Calculated Quantification Setting exists for the observation's target.

Inputs/Outputs

DirectionDataSource/Target
InputObservation targetObservation record
InputCalculated Quantification SettingsDatabase
OutputError code (QUANT_STANDARDS_MISSING)Well record

Acceptance Criteria

Configuration Validation:

  • Verify that a Calculated Quantification Setting exists for the observation's target before calculation
  • If no matching setting is found, set error code QUANT_STANDARDS_MISSING on the well

Processing Behavior:

  • No quantity calculation shall be attempted when configuration is missing
  • The error shall be retrievable from the well for downstream processing

Error Handling

  • No Calculated Quantification Setting for target: Set QUANT_STANDARDS_MISSING error code on the well

Trace: Source: 3.0.0-Qssc Rule - multiply calculated quantity by quantity multiplier (Row 2, error case) | Jira: [Not specified] | Tests: See scenarios


Configuration Options

OptionDefaultDescriptionAffects
QSSC resolution codeQSSCResolution code identifier that triggers status assignmentREQ-RULES-QSSC-001
QUANT_STANDARDS_MISSING error codeSystem-definedError code for missing quantification settingsREQ-RULES-QSSC-003

UI Notes (Illustrative)

Quantity Multiplier Configuration

The quantity multiplier feature supports per-well scaling of calculated quantities. The configuration interface is documented in the SDD.

Reference: BT-3893 - Nottingham custom quantity multiplier


Implementation (Illustrative)

ComponentLocation
Rule ClassAnalyzer/Rules/QsscRule.php
Quantity CalculatorAnalyzer/Rules/Concerns/CalculateQuantityUsingQuantificationSettings.php
Error SetterAnalyzer/Rules/Concerns/SetErrorToWell.php

Traceability Matrix

RequirementTitleVerificationImplementationTest CasesStatus
REQ-RULES-QSSC-001Resolution Code Status AssignmentTestQsscRuletests-REQ-RULES-QSSC-001Draft
REQ-RULES-QSSC-002Quantity CalculationTestQsscRuletests-REQ-RULES-QSSC-002, BT-5077Draft
REQ-RULES-QSSC-003Missing Standards ErrorTestQsscRuletests-REQ-RULES-QSSC-003Draft

Notes

  • The exponential formula was introduced in BT-4001 to correct an invalid calculation that used a linear model
  • CT precision requirement was introduced in BT-5076 to prevent rounding errors affecting quantity accuracy
  • Resolution code handling takes precedence over quantity calculation - this supports direct status assignment workflows
  • The QUANT_STANDARDS_MISSING error code is standardized for consistent error handling across the analytical rules engine

Open Questions

No open questions identified.


Acceptance Tests

Test: REQ-RULES-QSSC-001

Back to requirement

Test: LIMS status assignment from resolution code

Given: Resolution Code configuration with resolution_code=QSSC, lims_status=DETECTED
And: Well with resolution_codes containing QSSC
When: QSSC rule is executed
Then: Well has DETECTED lims status
And: Well has no error

Test: REQ-RULES-QSSC-002

Back to requirement

Test: Quantity calculation with multiplier

Given: Target A with Calculated Quantification Setting (slope=0.123, intercept=0.234)
And: Well with quantity_multiplier=100
And: Observation with final_ct=36, target=Target A
When: QSSC rule is executed for Observation
Then: Quantity of observation is 466

Test: Exponential formula verification

Given: Calculated Quantification Setting for Target A (slope=-1, intercept=30)
And: Well with quantity_multiplier=1
And: Observation with target=Target A, ct=40
When: Observation is processed through QSSC rule
Then: Observation quantity = 0.0000000001

Test: CT precision - Case 1

Given: Well with intercept=30, slope=-1, quantity_multiplier=1
When: ct=28.1235
Then: quantity=75.248873017358

Test: CT precision - Case 2

Given: Well with intercept=30, slope=-1, quantity_multiplier=1
When: ct=28.12345678
Then: quantity=75.256361986851

Test: REQ-RULES-QSSC-003

Back to requirement

Test: Missing configuration error

Given: Error Code configuration with error_code=QUANT_STANDARDS_MISSING
And: Target A
And: Well with Observation (target=Target A)
And: No Calculated Quantification Setting for Target A
When: QSSC rule is executed
Then: Well has QUANT_STANDARDS_MISSING error

Design DocumentRelevant Sections
SDD AlgorithmsQuantification Algorithms

Appendix: Process Artifacts

Completion Checklist

  • All requirements are capability-level (describe behavior, not UI)
  • Requirement variants consolidated (no requirement explosion) - N/A, requirements are distinct
  • 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 - No open questions identified
  • 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

Conservative Preservation: QSSC Rule Requirements

The three source requirements represent distinct, non-overlapping capabilities and were preserved without consolidation:

Original IDCapabilityDisposition
REQ-RULES-QSSC-001Resolution code status assignmentPreserved as REQ-RULES-QSSC-001
REQ-RULES-QSSC-002Quantity calculation formulaPreserved as REQ-RULES-QSSC-002
REQ-RULES-QSSC-003Missing configuration error handlingPreserved as REQ-RULES-QSSC-003

Rationale: These requirements represent three distinct processing paths in the QSSC rule:

  1. Resolution code bypass (status assignment without calculation)
  2. Normal calculation flow (exponential formula)
  3. Error path (missing configuration)

Each is independently testable and represents different system responsibilities. Consolidation would reduce traceability and obscure the distinct error handling path.

CT Precision Test Criteria: AC-05 and AC-06 of REQ-RULES-QSSC-002 contain specific numeric validation criteria. These are preserved as acceptance criteria (not demoted to refinements) because they define the precision boundary that distinguishes correct from incorrect implementation.

Reversibility: Source file: output/srs/rules/rule-qssc.md