From c2e84c9864c4633348bdc092646c65e1e9a9c7a2 Mon Sep 17 00:00:00 2001 From: Harry Hung <4848896+HarryHung@users.noreply.github.com> Date: Wed, 15 Mar 2023 10:34:38 +0000 Subject: [PATCH] Include clean up script Former-commit-id: 6002103a38d9ef253953a409715fca80dd37cb79 --- README.md | 19 +++++++++++++++---- clean_pipeline | 8 ++++++++ 2 files changed, 23 insertions(+), 4 deletions(-) create mode 100755 clean_pipeline diff --git a/README.md b/README.md index 2572b37..8b82a36 100644 --- a/README.md +++ b/README.md @@ -101,16 +101,27 @@ The development of this pipeline is part of the GPS Project ([Global Pneumococca ## Clean Up - During the run of the pipeline, Nextflow generates a considerable amount of intermediate files -- If the run has been completed and you do not intend to use the `-resume` option, you can remove the intermediate files by one of following two ways: - - Manual removal - remove the `work` directory within the `gps-unified-pipeline` local repository +- If the run has been completed and you do not intend to use the `-resume` option, you can remove the intermediate files by one of following three ways: + - Run `clean_pipeline` script + - It runs the commands in manual removal for you + - It removes the `work` directory and log files within the `gps-unified-pipeline` local repository + ``` + ./clean_pipeline + ``` + - Manual removal + - Remove the `work` directory and log files within the `gps-unified-pipeline` local repository ``` rm -rf work + rm -rf .nextflow.log* ``` - - `nextflow clean` command - use this built-in command to clean up cache and work directories (default: the latest run only) + - Run `nextflow clean` command + - This built-in command clean up cache and work directories + - By default, it only clean up the latest run + - For details and available options of `nextflow clean`, refer to the [Nextflow documentation](https://www.nextflow.io/docs/latest/cli.html#clean) ``` ./nextflow clean ``` - For options of `nextflow clean`, refer to the [Nextflow documentation](https://www.nextflow.io/docs/latest/cli.html#clean) +   # Pipeline Options diff --git a/clean_pipeline b/clean_pipeline new file mode 100755 index 0000000..31c70e3 --- /dev/null +++ b/clean_pipeline @@ -0,0 +1,8 @@ +#! /bin/sh + +# Basic wrapper script, clean-up tasks temporary files and log files + +pipelineDir=$(dirname -- "$(readlink -f -- "$0")") + +rm -rf $pipelineDir/work +rm -rf $pipelineDir/.nextflow.log* \ No newline at end of file