Skip to content

Commit

Permalink
Merge pull request #63 from genomic-medicine-sweden/handle_sample_types
Browse files Browse the repository at this point in the history
feat: only run pgx on specific sample types
  • Loading branch information
jonca79 authored Oct 3, 2023
2 parents d06ec47 + 02a222d commit 5afcf04
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
12 changes: 12 additions & 0 deletions config/output_files.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 2 additions & 0 deletions workflow/rules/common.smk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down

0 comments on commit 5afcf04

Please sign in to comment.