Skip to content

Commit

Permalink
adding rescript option to recopy scritps folder to workdir
Browse files Browse the repository at this point in the history
  • Loading branch information
kopardev committed Jan 4, 2022
1 parent 6544a9c commit 6dc9eda
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions run
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ module purge
# these are relative to the workflows' base folder
# these are copied into the WORKDIR
ESSENTIAL_FILES="config/config.yaml config/samples.tsv config/contrasts.tsv resources/cluster.json resources/tools.yaml"
ESSENTIAL_FOLDERS="workflow/scripts"
SCRIPTSDIR="workflow/scripts"
ESSENTIAL_FOLDERS="$SCRIPTSDIR"

SCRIPTNAME="$0"
SCRIPTBASENAME=$(readlink -f $(basename $0))
Expand Down Expand Up @@ -135,6 +136,12 @@ function check_essential_files() {

}

function rescript() {
check_essential_files
rsync -az --progress $SCRIPTSDIR $WORKDIR/
echo "$WORKDIR scripts folder has been updated!"
}

function reconfig(){
# Rebuild config file and replace the config.yaml in the WORKDIR
# this is only for dev purposes when new key-value pairs are being added to the config file
Expand Down Expand Up @@ -391,9 +398,10 @@ function main(){
run) runslurm && exit 0;;
runlocal) runlocal && exit 0;;
reset) reset && exit 0;;
dry) dryrun && exit 0;; # hidden option
local) runlocal && exit 0;; # hidden option
reconfig) reconfig && exit 0;; # hidden option for debugging
dry) dryrun && exit 0;; # hidden option ... short for dryrun
local) runlocal && exit 0;; # hidden option ... short for runlocal
reconfig) reconfig && exit 0;; # hidden option ... recopy newer version of config file in the output folder
rescript) rescript && exit 0;; # hidden option ... recopy over scripts folder to output folder (use when script is updated or new script is added)
printbinds) printbinds && exit 0;; # hidden option
*) err "Unknown RUNMODE \"$RUNMODE\"";;
esac
Expand Down

0 comments on commit 6dc9eda

Please sign in to comment.