diff --git a/config/config.yaml b/config/config.yaml index f6407d0..2164aef 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -159,6 +159,7 @@ spikein_reference: adapters: "PIPELINE_HOME/resources/other/adapters.fa" +tools_path: "/data/CCBR_Pipeliner/Tools/ccbr_tools/v0.1/bin/" ##################################################################################### # CONTAINERS ##################################################################################### diff --git a/workflow/Snakefile b/workflow/Snakefile index eef0478..05dd5d4 100644 --- a/workflow/Snakefile +++ b/workflow/Snakefile @@ -255,23 +255,25 @@ rule all: unpack(get_rose), unpack(get_enrichment) -# create jobby tables -jobby_cmd = 'run_jobby_on_snakemake_log logs/snakemake.log | tee logs/snakemake.log.jobby | cut -f2,3,18 > logs/snakemake.log.jobby.short' -spook_cmd = f'spooker {WORKDIR} CARLISLE' +on_complete = f""" +for cmd in spooker run_jobby_on_snakemake_log; do + if ! command -v run_jobby_on_snakemake_log 2>&1 >/dev/null; then + export PATH="$PATH:{config['tools_path']}" + fi +done +run_jobby_on_snakemake_log logs/snakemake.log | tee logs/snakemake.log.jobby | cut -f2,3,18 > logs/snakemake.log.jobby.short +spooker {WORKDIR} CARLISLE +""" onsuccess: print("OnSuccess") - print(jobby_cmd) - shell(jobby_cmd) - print(spook_cmd) - shell(spook_cmd) + print(on_complete) + shell(on_complete) onerror: print("OnError") - print(jobby_cmd) - shell(jobby_cmd) - print(spook_cmd) - shell(spook_cmd) + print(on_complete) + shell(on_complete) """ ##########################################