diff --git a/snappy_pipeline/workflows/common/gcnv/gcnv_run.py b/snappy_pipeline/workflows/common/gcnv/gcnv_run.py index f25dbdc96..1875a7a0a 100644 --- a/snappy_pipeline/workflows/common/gcnv/gcnv_run.py +++ b/snappy_pipeline/workflows/common/gcnv/gcnv_run.py @@ -258,6 +258,12 @@ def _get_input_files_contig_ploidy(self, wildcards: Wildcards): name_pattern = f"{wildcards.mapper}.gcnv_coverage.{lib}" tsvs.append(f"work/{name_pattern}/out/{name_pattern}.{ext}") yield ext, tsvs + # Yield path to pedigree file + peds = [] + for library_name in sorted(self.index_ngs_library_to_pedigree): + name_pattern = f"write_pedigree.{library_name}" + peds.append(f"work/{name_pattern}/out/{library_name}.ped") + yield "ped", peds @dictify def _get_output_files_contig_ploidy(self): diff --git a/snappy_pipeline/workflows/sv_calling_wgs/Snakefile b/snappy_pipeline/workflows/sv_calling_wgs/Snakefile index 44dc53a06..93fd116f8 100644 --- a/snappy_pipeline/workflows/sv_calling_wgs/Snakefile +++ b/snappy_pipeline/workflows/sv_calling_wgs/Snakefile @@ -28,6 +28,11 @@ wf = SvCallingWgsWorkflow(workflow, config, lookup_paths, config_paths, os.getcw # Rules ======================================================================= +localrules: + # Writing out pedigrees can be done locally + sv_calling_wgs_write_pedigree_run, + + rule all: input: wf.get_result_files(), diff --git a/tests/snappy_pipeline/workflows/test_workflows_sv_calling_targeted.py b/tests/snappy_pipeline/workflows/test_workflows_sv_calling_targeted.py index c90149d0d..0a95e5681 100644 --- a/tests/snappy_pipeline/workflows/test_workflows_sv_calling_targeted.py +++ b/tests/snappy_pipeline/workflows/test_workflows_sv_calling_targeted.py @@ -633,7 +633,13 @@ def test_gcnv_contig_ploidy_step_part_get_input_files(sv_calling_targeted_workfl "work/bwa.gcnv_coverage.P00{i}-N1-DNA1-WGS1/out/bwa.gcnv_coverage.P00{i}-N1-DNA1-WGS1.tsv" ) tsv_list_out = [tsv_pattern.format(i=i) for i in range(1, 7)] # P001 - P006 - expected = {"tsv": tsv_list_out} + expected = { + "tsv": tsv_list_out, + "ped": [ + "work/write_pedigree.P001-N1-DNA1-WGS1/out/P001-N1-DNA1-WGS1.ped", + "work/write_pedigree.P004-N1-DNA1-WGS1/out/P004-N1-DNA1-WGS1.ped", + ], + } # Get actual wildcards = Wildcards( fromdict={"mapper": "bwa", "library_kit": "Agilent_SureSelect_Human_All_Exon_V6"}