From 15cd954097dc4d90576479f871b45c29a9f4f0e8 Mon Sep 17 00:00:00 2001 From: Eric Blanc Date: Fri, 11 Feb 2022 14:19:10 +0100 Subject: [PATCH] Collect target coverage disabled when no target coverage files requested --- snappy_pipeline/workflows/ngs_mapping/__init__.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/snappy_pipeline/workflows/ngs_mapping/__init__.py b/snappy_pipeline/workflows/ngs_mapping/__init__.py index 02972e403..cccc9b4f0 100644 --- a/snappy_pipeline/workflows/ngs_mapping/__init__.py +++ b/snappy_pipeline/workflows/ngs_mapping/__init__.py @@ -1269,9 +1269,11 @@ def get_result_files(self): ) ) + target_coverage = False for sheet in self.shortcut_sheets: for ngs_library in sheet.all_ngs_libraries: if ngs_library.name in self.ngs_library_to_kit: + target_coverage = True extraction_type = ngs_library.test_sample.extra_infos["extractionType"] suffix = ( "_long" @@ -1287,8 +1289,9 @@ def get_result_files(self): ngs_library=[ngs_library], ext=["txt", "txt.md5"], ) - yield "output/target_cov_report/out/target_cov_report.txt" - yield "output/target_cov_report/out/target_cov_report.txt.md5" + if target_coverage: + yield "output/target_cov_report/out/target_cov_report.txt" + yield "output/target_cov_report/out/target_cov_report.txt.md5" if ( self.config["picard_hs_metrics"]["path_targets_interval_list"] and self.config["picard_hs_metrics"]["path_baits_interval_list"]