Skip to content

Commit

Permalink
Include clean up script
Browse files Browse the repository at this point in the history
Former-commit-id: 6002103
  • Loading branch information
HarryHung committed Mar 15, 2023
1 parent 72c18ec commit c2e84c9
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 4 deletions.
19 changes: 15 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions clean_pipeline
Original file line number Diff line number Diff line change
@@ -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*

0 comments on commit c2e84c9

Please sign in to comment.