Skip to content

Commit

Permalink
fix #97
Browse files Browse the repository at this point in the history
  • Loading branch information
slsevilla committed Feb 8, 2024
1 parent eefec38 commit 16a4d7a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
10 changes: 9 additions & 1 deletion carlisle
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ function usage() {
*) runlocal : run without submitting to sbatch
*) runtest: run on cluster with included hg38 test dataset
2. WORKDIR: [Type: String]: Absolute or relative path to the output folder with write permissions.
Optional Arguments:
*) -f / --force: Force flag will re-initialize a previously initialized workdir
"
}

Expand All @@ -88,7 +91,9 @@ function init() {
# 2. copying essential files like config.yaml and samples.tsv into the workdir
# 3. setting up logs and stats folders
# create output folder
if [ -d $WORKDIR ];then err "Folder $WORKDIR already exists!"; fi
if [[ -d $WORKDIR ]] && [[ -z $FORCEFLAG ]]; then
err "Folder $WORKDIR already exists! If you'd like to re-initialize use the -f/--force flag $FORCEFLAG|"
fi
mkdir -p $WORKDIR

# copy essential files
Expand Down Expand Up @@ -384,6 +389,9 @@ function main(){
-w=*|--workdir=*)
WORKDIR="${i#*=}"
;;
-f|--force)
FORCEFLAG="ON"
;;
-v|--version)
get_version && exit 0
;;
Expand Down
1 change: 1 addition & 0 deletions docs/user-guide/run.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ The following explains each of the command options:

- Preparation Commands
- init (REQUIRED): This must be performed before any Snakemake run (dry, local, cluster) can be performed. This will copy the necessary config, manifest and Snakefiles needed to run the pipeline to the provided output directory.
- the -f/--force flag can be used in order to re-initialize a workdir that has already been created
- dryrun (OPTIONAL): This is an optional step, to be performed before any Snakemake run (local, cluster). This will check for errors within the pipeline, and ensure that you have read/write access to the files needed to run the full pipeline.
- Processing Commands
- local: This will run the pipeline on a local node. NOTE: This should only be performed on an interactive node.
Expand Down

0 comments on commit 16a4d7a

Please sign in to comment.