From a901a807fac816db4ccbf8e85bfeba4e8201ea1a Mon Sep 17 00:00:00 2001 From: Ivan Blagoev Topolsky Date: Wed, 26 Jul 2023 23:58:25 +0200 Subject: [PATCH] BugFix: paths for snakedeploy (fix: #147) - "function.sh" script path: when running directly from github, caching path logic is different and causes a 404 when run from main Snakefile - cache input that could be fetched from resources/ gene GFF --- workflow/Snakefile | 7 ------- workflow/rules/common.smk | 11 +++++++++++ workflow/rules/consensus.smk | 2 +- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/workflow/Snakefile b/workflow/Snakefile index 94344d05..435db60e 100644 --- a/workflow/Snakefile +++ b/workflow/Snakefile @@ -12,13 +12,6 @@ LOGGER.info("VPIPE_BASEDIR = %s", VPIPE_BASEDIR) include: "rules/common.smk" -functions = cachepath( - "scripts/functions.sh", - executable=True, - localsource=True, -) - - # DUMMY RULES rule all: input: diff --git a/workflow/rules/common.smk b/workflow/rules/common.smk index 67e2240a..f673c269 100644 --- a/workflow/rules/common.smk +++ b/workflow/rules/common.smk @@ -948,3 +948,14 @@ def temp_prefix(p): def temp_with_prefix(p): return temp(temp_prefix(p)) + + +############### +# Globals # +############### + +functions = cachepath( + "../scripts/functions.sh", + executable=True, + localsource=True, +) diff --git a/workflow/rules/consensus.smk b/workflow/rules/consensus.smk index df4f5c64..66d5b4eb 100644 --- a/workflow/rules/consensus.smk +++ b/workflow/rules/consensus.smk @@ -186,7 +186,7 @@ rule frameshift_deletions_checks: BAM=alignment_wildcard, #REF_majority_dels="{dataset}/references/ref_majority_dels.fasta", REF_majority_dels="{dataset}/references/consensus.bcftools.fasta", - GENES_GFF=(config.input["genes_gff"] if config.input["genes_gff"] else []), + GENES_GFF=(cachepath(config.input["genes_gff"]) if config.input["genes_gff"] else []), output: FRAMESHIFT_DEL_CHECK_TSV="{dataset}/references/frameshift_deletions_check.tsv", params: