Skip to content

Commit

Permalink
feat(htsinfer): interface log and cluster log dirs via config.yaml (#146
Browse files Browse the repository at this point in the history
)
  • Loading branch information
ninsch3000 authored Sep 6, 2023
1 parent 6a37a8a commit 7acbac6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions tests/test_htsinfer_workflow/test.local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ snakemake \
--config outdir="results" \
samples="../input_files/htsinfer_samples.tsv" \
samples_out="samples_htsinfer.tsv" \
log_dir="logs" \
cluster_log_dir="logs/cluster_log" \
--notemp \
--keep-incomplete

6 changes: 3 additions & 3 deletions workflow/rules/htsinfer.smk
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ samples = pd.read_csv(
config["samples"], header=0, index_col=0, sep="\t", keep_default_na=False
)
OUT_DIR = config["outdir"]
LOG_DIR = os.path.join(OUT_DIR, "logs")
CLUSTER_LOG = os.path.join(LOG_DIR, "cluster_logs")
LOG_DIR = config["log_dir"]
CLUSTER_LOG = config["cluster_log_dir"]
# Write inferred params into new sample table.
SAMPLES_OUT = os.path.join(OUT_DIR, config["samples_out"])

Expand Down Expand Up @@ -59,7 +59,7 @@ rule run_htsinfer:
set +e
htsinfer --records={params.records} --output-directory={params.outdir} --temporary-directory={resources.tmpdir} --cleanup-regime=KEEP_ALL --threads={threads} {input.fq1_path} {params.fq2_path} > {output.htsinfer_json} 2> {log.stderr}
exitcode=$?
if [ $exitcode -eq 1]
if [ $exitcode -eq 1 ]
then
exit 0
fi
Expand Down

0 comments on commit 7acbac6

Please sign in to comment.