From 3a7120efc862525abb3966e2eb1a21a85a727726 Mon Sep 17 00:00:00 2001 From: beatrizsavinhas Date: Tue, 3 Sep 2024 15:59:25 +0200 Subject: [PATCH] Add check for negative controls when storing fastq files. --- cg/services/illumina/post_processing/housekeeper_storage.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cg/services/illumina/post_processing/housekeeper_storage.py b/cg/services/illumina/post_processing/housekeeper_storage.py index d2557504b5..c4123151df 100644 --- a/cg/services/illumina/post_processing/housekeeper_storage.py +++ b/cg/services/illumina/post_processing/housekeeper_storage.py @@ -15,6 +15,7 @@ get_undetermined_fastqs, rename_fastq_file_if_needed, ) +from cg.store.models import Sample from cg.store.store import Store from cg.utils.files import get_files_matching_pattern @@ -32,6 +33,11 @@ def _should_fastq_path_be_stored_in_housekeeper( Check if a sample fastq file should be tracked in Housekeeper. Only fastq files that pass the q30 threshold should be tracked. """ + sample: Sample = store.get_sample_by_internal_id(internal_id=sample_id) + + if sample.is_negative_control: + return True + lane = get_lane_from_sample_fastq(sample_fastq_path) q30_threshold: int = get_q30_threshold(sequencer_type)