Skip to content

neptoon.quality_control

saqc_methods_and_params

Classes:

Functions:

QAMethod

Bases: Enum

The methods that can be selected in neptoon. Methods are implemented using SaQC.

For methods that use the same underlying SaQC function but with different configurations (like ABOVE_N0 and BELOW_N0_FACTOR both using flagGeneric), we use a tuple to store both the SaQC method and a discriminator.

saqc_method property

saqc_method

Returns the underlying SaQC method name.

variant property

variant

Returns the variant discriminator if any.

QATarget

Bases: Enum

The target data for the quality assessment selection.

ParameterSpec dataclass

ParameterSpec(name, description, optional=False, units=None, default=None, saqc_name=None)

Specification for a single parameter.

Attributes:

Name Type Description
name str

Parameter name

description str

Parameter description

units Optional[str]

Parameter units (if applicable)

default Any

Default value (if optional)

MethodParameters

Base class for method parameter specifications. Subclasses define parameter requirements for each method.

BelowFactorofN0Parameters

Bases: MethodParameters

Parameter specifications for below N0 factor check method.

RangeCheckParameters

Bases: MethodParameters

Parameter specifications for range check method.

UniLOFParameters

Bases: MethodParameters

Parameter specifications for range check method.

WhatParamsDoINeed

WhatParamsDoINeed(method)

Helper class for discovering parameter requirements for QA methods.

Parameters:

Name Type Description Default
method SaQCMethodMap

The quality assessment method to investigate

required
Example

from neptoon.quality_control import WhatParamsDoINeed, QAMethod

WhatParamsDoINeed(QAMethod.RANGE_CHECK)

show_required_params

show_required_params()

Display essential parameters for the method.

show_optional_params

show_optional_params()

Display optional parameters for the method.

show_link_to_site()

Adds a link to the SaQC documentation

show_all_params

show_all_params()

Display the params for the method.

ParameterRegistry

Central registry for mapping quality assessment methods to their parameter types.

This class manages the relationships between methods and their parameter specifications, providing type safety and validation.

get_parameter_class classmethod

get_parameter_class(method)

Get the parameter class for a given method.

Parameters:

Name Type Description Default
method SaQCMethodMap

The quality assessment method

required

Returns:

Type Description
Type[BaseParameters]

The corresponding parameter class

Raises:

Type Description
KeyError

If the method is not registered

QAConfigRegistry

Registry system for mapping strings as found in the configuration file to specific QATarget and QAMethods.