diff --git a/workflow/Snakefile b/workflow/Snakefile index 5cb77890c..1048b9cbb 100644 --- a/workflow/Snakefile +++ b/workflow/Snakefile @@ -7,7 +7,7 @@ from helper_functions import * __author__ = "Arnold Kuzniar" -__version__ = "1.2.0" +__version__ = "1.2.1" __license__ = "Apache License, Version 2.0" diff --git a/workflow/rules/delly.smk b/workflow/rules/delly.smk index aa7db59b4..2d79c872c 100644 --- a/workflow/rules/delly.smk +++ b/workflow/rules/delly.smk @@ -10,7 +10,8 @@ rule delly_p: # paired-samples analysis excl_opt='-x "%s"' % get_bed() if exclude_regions() else "", output: os.path.join( - "{path}/{tumor}--{normal}", + "{path}", + "{tumor}--{normal}", get_outdir("delly"), "delly-{}{}".format("{sv_type}", config.file_exts.bcf), ), @@ -80,7 +81,8 @@ rule delly_s: # single-sample analysis excl_opt='-x "%s"' % get_bed() if exclude_regions() else "", output: os.path.join( - "{path}/{sample}", + "{path}", + "{sample}", get_outdir("delly"), "delly-{}{}".format("{sv_type}", config.file_exts.bcf), ), @@ -130,16 +132,18 @@ rule delly_merge: # used by both modes input: [ os.path.join( - "{path}/{tumor}--{normal}", + "{path}", + "{tumor}--{normal}", get_outdir("delly"), "delly-{}{}".format(sv, config.file_exts.bcf), ) for sv in config.callers.delly.sv_types ] - if config.mode.PAIRED_SAMPLE is True + if config.mode is config.mode.PAIRED_SAMPLE else [ os.path.join( - "{path}/{sample}", + "{path}", + "{sample}", get_outdir("delly"), "delly-{}{}".format(sv, config.file_exts.bcf), ) @@ -147,13 +151,15 @@ rule delly_merge: # used by both modes ], output: os.path.join( - "{path}/{tumor}--{normal}", + "{path}", + "{tumor}--{normal}", get_outdir("delly"), "delly{}".format(config.file_exts.vcf), ) - if config.mode.PAIRED_SAMPLE is True + if config.mode is config.mode.PAIRED_SAMPLE else os.path.join( - "{path}/{sample}", + "{path}", + "{sample}", get_outdir("delly"), "delly{}".format(config.file_exts.vcf), ), diff --git a/workflow/rules/gridss.smk b/workflow/rules/gridss.smk index 9194eac44..58dfdd9ee 100644 --- a/workflow/rules/gridss.smk +++ b/workflow/rules/gridss.smk @@ -10,7 +10,8 @@ rule gridss_p: # paired-samples analysis excl_opt="BLACKLIST={}".format(get_bed()) if exclude_regions() else "", output: os.path.join( - "{path}/{tumor}--{normal}", + "{path}", + "{tumor}--{normal}", get_outdir("gridss"), "gridss{}".format(config.file_exts.vcf), ), @@ -76,7 +77,8 @@ rule gridss_s: # single-sample analysis excl_opt="BLACKLIST={}".format(get_bed()) if exclude_regions() else "", output: os.path.join( - "{path}/{sample}", + "{path}", + "{sample}", get_outdir("gridss"), "gridss{}".format(config.file_exts.vcf), ), diff --git a/workflow/rules/lumpy.smk b/workflow/rules/lumpy.smk index f5a285b8f..269f95de5 100644 --- a/workflow/rules/lumpy.smk +++ b/workflow/rules/lumpy.smk @@ -10,7 +10,8 @@ rule lumpy_p: # paired-samples analysis excl_opt='-x "%s"' % get_bed() if exclude_regions() else "", output: os.path.join( - "{path}/{tumor}--{normal}", + "{path}", + "{tumor}--{normal}", get_outdir("lumpy"), "lumpy{}".format(config.file_exts.vcf), ), @@ -64,7 +65,8 @@ rule lumpy_s: # single-sample analysis excl_opt='-x "%s"' % get_bed() if exclude_regions() else "", output: os.path.join( - "{path}/{sample}", + "{path}", + "{sample}", get_outdir("lumpy"), "lumpy{}".format(config.file_exts.vcf), ), diff --git a/workflow/rules/manta.smk b/workflow/rules/manta.smk index 8e9193cbb..d07c80028 100644 --- a/workflow/rules/manta.smk +++ b/workflow/rules/manta.smk @@ -11,7 +11,8 @@ rule manta_p: # paired-samples analysis outfile="results/variants/somaticSV.vcf.gz", output: os.path.join( - "{path}/{tumor}--{normal}", + "{path}", + "{tumor}--{normal}", get_outdir("manta"), "manta{}".format(config.file_exts.vcf), ), @@ -66,7 +67,8 @@ rule manta_s: # single-sample analysis: germline or tumor-only else "results/variants/diploidSV.vcf.gz", output: os.path.join( - "{path}/{sample}", + "{path}", + "{sample}", get_outdir("manta"), "manta{}".format(config.file_exts.vcf), ), diff --git a/workflow/rules/survivor.smk b/workflow/rules/survivor.smk index ccb99e727..431745435 100644 --- a/workflow/rules/survivor.smk +++ b/workflow/rules/survivor.smk @@ -7,7 +7,7 @@ rule survivor_filter: # used by both modes "viola", "{}{}".format("{prefix}", config.file_exts.vcf), ) - if config.mode.PAIRED_SAMPLE is True + if config.mode is config.mode.PAIRED_SAMPLE else os.path.join( "{path}", "{sample}", @@ -23,7 +23,7 @@ rule survivor_filter: # used by both modes get_outdir("survivor"), "{}{}".format("{prefix}", config.file_exts.vcf), ) - if config.mode.PAIRED_SAMPLE is True + if config.mode is config.mode.PAIRED_SAMPLE else os.path.join( "{path}", "{sample}", @@ -69,7 +69,7 @@ rule survivor_merge: # used by both modes ) for c in config.enable_callers ] - if config.mode.PAIRED_SAMPLE is True + if config.mode is config.mode.PAIRED_SAMPLE else [ os.path.join( "{path}", @@ -87,7 +87,7 @@ rule survivor_merge: # used by both modes os.path.join("{path}", "{tumor}--{normal}", survivor_args("merge")[0]), os.path.join("{path}", "{tumor}--{normal}", survivor_args("merge")[-1]), ] - if config.mode.PAIRED_SAMPLE is True + if config.mode is config.mode.PAIRED_SAMPLE else [ os.path.join("{path}", "{sample}", survivor_args("merge")[0]), os.path.join("{path}", "{sample}", survivor_args("merge")[-1]), diff --git a/workflow/rules/viola.smk b/workflow/rules/viola.smk index 3ec1b4ff0..4c11d254d 100644 --- a/workflow/rules/viola.smk +++ b/workflow/rules/viola.smk @@ -6,7 +6,7 @@ rule viola: # used by both modes "{outdir}", "{}{}".format("{prefix}", config.file_exts.vcf), ) - if config.mode.PAIRED_SAMPLE is True + if config.mode is config.mode.PAIRED_SAMPLE else os.path.join( "{path}", "{sample}", @@ -21,7 +21,7 @@ rule viola: # used by both modes "viola", "{}{}".format("{prefix}", config.file_exts.vcf), ) - if config.mode.PAIRED_SAMPLE is True + if config.mode is config.mode.PAIRED_SAMPLE else os.path.join( "{path}", "{sample}",