checkQC.handlers.error_rate_handler module

class checkQC.handlers.error_rate_handler.ErrorRateHandler(*args, **kwargs)[source]

Bases: checkQC.handlers.qc_handler.QCHandler

This handler will check that the error rate per lane and read are below the specified threshold. Sometimes an error rate estimate is not available, e.g. when no PhiX has been included on the lane which is being analyzed. If you want to allow this to pass anyway, ensure that the ErrorRateHandler has ‘allow_missing_error_rate’ set to ‘True’.

ALLOW_MISSING_ERROR_RATE = 'allow_missing_error_rate'

The check_qc method provides the core behaviour of the QCHandler. It should check the values provided to it and yield instances of QCHandlerReport (or continue, if there was nothing to report)

Returns:An instance of QCHandlerReport

The implementing subclass should provide this method. It is up to instance receiving the data to decide how to handle it. Below is an example of how to handle a tuple with a key-value pair.

class MySubscriber(Subscriber):

    def __init__(self):
        self.results = []

    def collect(self, signal):
        key, value = signal
        if key == "my_key":

Override this method in subclass to provide additional configuration behaviour.

Raises:ConfigurationError if there is a problem with the configuration

The ErrorRateHandler fetches its data from the Interop files.

Returns:an InteropParser callable