diff --git a/config/output_files.yaml b/config/output_files.yaml index f5e7c27..0212fe4 100644 --- a/config/output_files.yaml +++ b/config/output_files.yaml @@ -2,15 +2,27 @@ files: - name: "_copy_detected_variants" input: "pgx/detected_variants/{sample}_{type}.annotated.csv" output: "results/dna/additional_files/pgx/{sample}_{type}.detected_variants.csv" + types: + - T + - N - name: "_copy_depth_of_baits" input: "pgx/depth_of_coverage/depth_of_baits/{sample}_{type}.output.gdf" output: "results/dna/additional_files/pgx/{sample}_{type}.depth_of_baits.gdf" + types: + - T + - N - name: "_copy_depth_at_missing" input: "pgx/append_id_to_gdf/{sample}_{type}.depth_at_missing_annotated.gdf" output: "results/dna/additional_files/pgx/{sample}_{type}.depth_at_missing_annotated.gdf" + types: + - T + - N - name: "_copy_pgx_report" input: "pgx/generate_pgx_report/{sample}_{type}_pgx_report.txt" output: "results/dna/pgx/{sample}_{type}.pgx_report.txt" + types: + - T + - N diff --git a/workflow/rules/common.smk b/workflow/rules/common.smk index bb1498b..31084a6 100644 --- a/workflow/rules/common.smk +++ b/workflow/rules/common.smk @@ -75,6 +75,7 @@ wildcard_constraints: def compile_output_file_list(wildcards): outdir = pathlib.Path(output_spec.get("directory", "./")) output_files = [] + types = set([unit.type for unit in units.itertuples()]) for f in output_spec["files"]: # Please remember to add any additional values down below @@ -84,6 +85,7 @@ def compile_output_file_list(wildcards): f["output"].format(sample=sample, type=unit_type) for sample in get_samples(samples) for unit_type in get_unit_types(units, sample) + if unit_type in set(f["types"]).intersection(types) ] ) for op in outputpaths: