Skip to content

Commit

Permalink
refactor: use named input for svdb merge
Browse files Browse the repository at this point in the history
  • Loading branch information
padraicc committed Apr 16, 2024
1 parent 615027d commit 198f8f8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
8 changes: 3 additions & 5 deletions workflow/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,9 @@ use rule smn_manifest from cnv_sv as cnv_sv_smn_manifest with:

use rule svdb_merge from cnv_sv as cnv_sv_svdb_merge with:
input:
vcfs=[
"cnv_sv/tiddit/{sample}_{type}.vcf",
"cnv_sv/manta_run_workflow_n/{sample}/results/variants/diploidSV.vcf.gz",
"cnv_sv/cnvpytor/{sample}_{type}.softfiltered.vcf",
],
tiddit="cnv_sv/tiddit/{sample}_{type}.vcf",
manta="cnv_sv/manta_run_workflow_n/{sample}/results/variants/diploidSV.vcf.gz",
cnvpytor="cnv_sv/cnvpytor/{sample}_{type}.softfiltered.vcf",
output:
vcf=temp("cnv_sv/svdb_merge/{sample}_{type}.merged.vcf"),
params:
Expand Down
6 changes: 3 additions & 3 deletions workflow/rules/common.smk
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,9 @@ def get_glnexus_input(wildcards, input):

def get_vcfs_for_svdb_merge(wildcards, input):
vcfs_with_suffix = []
for v in input.vcfs:
caller = os.path.dirname(v).split("/")[1].split("_")[0]
vcfs_with_suffix.append(f"{v}:{caller}")
vcfs_with_suffix.append(f"{input.tiddit}:tiddit")
vcfs_with_suffix.append(f"{input.manta}:manta")
vcfs_with_suffix.append(f"{input.cnvpytor}:cnvpytor")

return vcfs_with_suffix

Expand Down

0 comments on commit 198f8f8

Please sign in to comment.