Skip to content

Commit

Permalink
Merge pull request #26 from karinlag/master
Browse files Browse the repository at this point in the history
Solving issue 25 re work directory
  • Loading branch information
karinlag authored Dec 9, 2018
2 parents 29ac375 + 3eba993 commit 3fe9e70
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions run_track.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash -x
#!/bin/bash

# Wrapper script for running nextflow pipelines more reproducibly

Expand All @@ -12,14 +12,12 @@ track_script=$1
template=$2
profile=$3
out_directory=$4
workdir=${5:-$USERWORK/bifrost_work}

mkdir -p ${out_directory}/config_files
git --git-dir ${script_directory}/.git branch -v |grep "\*" | awk '{print $2, $3}' > ${out_directory}/config_files/pipeline_version.log
cp ${script_directory}/${track_script} ${out_directory}/config_files
cp ${template} ${out_directory}/config_files
cp ${script_directory}/conf/${profile}.config ${out_directory}/config_files

nextflow -c ${template} run -resume ${script_directory}/${track_script} -profile ${profile} --out_dir=${out_directory}
# spades sometimes gets weird permissions. Doing this to help removal
chmod -R 755 work 2> /dev/null
chmod -R -x+X work 2> /dev/null
echo "TEMPORARY WORKING DIRECTORY IS ${workdir}"
nextflow -c ${template} run -resume ${script_directory}/${track_script} -profile ${profile} --out_dir=${out_directory} -work-dir ${workdir}

0 comments on commit 3fe9e70

Please sign in to comment.