Skip to content

Commit

Permalink
Fixed log definition in wrappers.
Browse files Browse the repository at this point in the history
  • Loading branch information
eudesbarbosa committed Jun 28, 2022
1 parent 59315cd commit be05d60
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions snappy_wrappers/wrappers/mutect2/contamination/wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
export LD_LIBRARY_PATH=$(dirname $(which bgzip))/../lib
# Also pipe everything to log file
if [[ -n "{snakemake.log}" ]]; then
if [[ -n "{snakemake.log.log}" ]]; then
if [[ "$(set +e; tty; set -e)" != "" ]]; then
rm -f "{snakemake.log}" && mkdir -p $(dirname {snakemake.log})
exec &> >(tee -a "{snakemake.log}" >&2)
rm -f "{snakemake.log.log}" && mkdir -p $(dirname {snakemake.log.log})
exec &> >(tee -a "{snakemake.log.log}" >&2)
else
rm -f "{snakemake.log}" && mkdir -p $(dirname {snakemake.log})
echo "No tty, logging disabled" >"{snakemake.log}"
rm -f "{snakemake.log.log}" && mkdir -p $(dirname {snakemake.log.log})
echo "No tty, logging disabled" >"{snakemake.log.log}"
fi
fi
Expand Down
10 changes: 5 additions & 5 deletions snappy_wrappers/wrappers/mutect2/filter/wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
export LD_LIBRARY_PATH=$(dirname $(which bgzip))/../lib
# Also pipe everything to log file
if [[ -n "{snakemake.log}" ]]; then
if [[ -n "{snakemake.log.log}" ]]; then
if [[ "$(set +e; tty; set -e)" != "" ]]; then
rm -f "{snakemake.log}" && mkdir -p $(dirname {snakemake.log})
exec &> >(tee -a "{snakemake.log}" >&2)
rm -f "{snakemake.log.log}" && mkdir -p $(dirname {snakemake.log.log})
exec &> >(tee -a "{snakemake.log.log}" >&2)
else
rm -f "{snakemake.log}" && mkdir -p $(dirname {snakemake.log})
echo "No tty, logging disabled" >"{snakemake.log}"
rm -f "{snakemake.log.log}" && mkdir -p $(dirname {snakemake.log.log})
echo "No tty, logging disabled" >"{snakemake.log.log}"
fi
fi
Expand Down

0 comments on commit be05d60

Please sign in to comment.