Skip to content

Commit

Permalink
fix: add jobby & spooker to path if not available
Browse files Browse the repository at this point in the history
resolves #152
  • Loading branch information
kelly-sovacool committed Jan 22, 2025
1 parent 24c9183 commit fc1f32a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
1 change: 1 addition & 0 deletions config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
#####################################################################################
Expand Down
24 changes: 13 additions & 11 deletions workflow/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)

"""
##########################################
Expand Down

0 comments on commit fc1f32a

Please sign in to comment.