diff --git a/cg_lims/EPPs/qc/sequencing_quality_checker.py b/cg_lims/EPPs/qc/sequencing_quality_checker.py index d618e45b..a3a5328a 100644 --- a/cg_lims/EPPs/qc/sequencing_quality_checker.py +++ b/cg_lims/EPPs/qc/sequencing_quality_checker.py @@ -63,7 +63,7 @@ def _update_sample_with_quality_results( sample_id=metrics.sample_internal_id, lane=metrics.flow_cell_lane_number, reads=metrics.sample_total_reads_in_lane, - q30_score=metrics.sample_base_fraction_passing_q30, + q30_score=metrics.sample_base_fraction_passing_q30 * 100, passed_quality_control=passed_quality_control, ) @@ -75,7 +75,7 @@ def _quality_control(self, metrics: SampleLaneSequencingMetrics) -> bool: def _passes_quality_thresholds(self, q30_score: float, reads: int) -> bool: """Check if the provided metrics pass the minimum quality thresholds.""" - passes_q30_threshold = q30_score >= self.q30_threshold + passes_q30_threshold = q30_score * 100 >= self.q30_threshold passes_read_threshold = reads >= self.READS_MIN_THRESHOLD return passes_q30_threshold and passes_read_threshold diff --git a/tests/conftest.py b/tests/conftest.py index 4d94f5c9..bf84841c 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -289,7 +289,7 @@ def novaseq_metrics_passing_thresholds_json( sample_ids=novaseq_sample_ids, lanes=novaseq_lanes, total_reads_in_lane=10000, - base_fraction_passing_q30=100, + base_fraction_passing_q30=0.95, ) @@ -315,7 +315,7 @@ def novaseq_metrics_failing_reads_json( sample_ids=novaseq_sample_ids, lanes=novaseq_lanes, total_reads_in_lane=0, - base_fraction_passing_q30=100, + base_fraction_passing_q30=0.95, ) @@ -328,7 +328,7 @@ def novaseq_metrics_two_failing( sample_ids=novaseq_sample_ids, lanes=novaseq_lanes, total_reads_in_lane=10000, - base_fraction_passing_q30=100, + base_fraction_passing_q30=0.95, ) metrics[0]["sample_base_fraction_passing_q30"] = 0 @@ -365,7 +365,7 @@ def novaseq_metrics_missing_for_sample_in_lane( sample_ids=novaseq_sample_ids, lanes=novaseq_lanes, total_reads_in_lane=10000, - base_fraction_passing_q30=100, + base_fraction_passing_q30=0.95, ) for metric in metrics: if ( @@ -390,7 +390,7 @@ def novaseq_missing_sample( sample_ids=novaseq_sample_ids, lanes=novaseq_lanes, total_reads_in_lane=10000, - base_fraction_passing_q30=100, + base_fraction_passing_q30=0.95, ) return metrics