checkQC.handlers.reads_per_sample_handler module

class checkQC.handlers.reads_per_sample_handler.ReadsPerSampleHandler(*args, **kwargs)[source]

Bases: checkQC.handlers.qc_handler.QCHandler

This handler will check that the number of reads assigned to a sample is high enough. The value specified in the configuration is interpreted as the number of reads demanded for a single sample, i.e. the number of reads per sample on a lane which has multiple samples is the threshold divided by the total number of samples on the lane.


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":

The ReadsPerSampleHandler fetches its information from the Stats.json file

Returns:A StatsJsonParser callable