diff --git a/README.md b/README.md index 47834be970c7b3e85fedd6048e2b7ff4253f5c18..9aeb455182451ce3274b5e2fe6fcf24d8a9eb3ab 100755 --- a/README.md +++ b/README.md @@ -5,8 +5,9 @@ NextFlow pipeline used by the Developmental Cognitive Neuroscience Lab (DCNL) to ## Table of Contents 1. [Getting Started](#getting-started) -1. [Pipeline paramters](#pipeline-parameters) +1. [Pipeline parameters](#pipeline-parameters) 1. [Pipeline output directory](#pipeline-output-directory) +1. [Clean-up](#clean-up) 1. [Examples](#examples) 1. [Useful links](#useful-links) @@ -246,6 +247,10 @@ The pipeline also supports running [pre-configured parameter files](https://www. [top](#table-of-contents) +## Clean-up + +Each step will generate multiple files under the `work/` subdir. Those files are used to resume execution in case of an error but they are otherwise unnecessary. To prevent nextflow from using too much disk space, the cleanup option is set to `true` in `src/nextflow.config`, which is equivalente to running `nextflow clean -f -k` after a successful run. the side effect of this is that you won't be able to resume a failed job, which is usually not an issue. however, if you do want to preserve the `-resume` option, make sure to comment out the config option or set it to `false`. For more details, see [Cache & Resume](https://training.nextflow.io/2.0.1/basic_training/cache_and_resume/). + ## Examples The following examples assume your current directory is the root directory of the project (`nanopore/`). @@ -277,8 +282,7 @@ The following examples assume your current directory is the root directory of th --basecall_compute "gpu" \ --basecall_demux "False" \ --queue_size 1 \ - --out_dir "$OUTPUT_DIR_NAME" \ - -resume + --out_dir "$OUTPUT_DIR_NAME" ``` 1. STEP 2A: Alignment Filtering and Quality Control from STEP 1 @@ -289,8 +293,7 @@ The following examples assume your current directory is the root directory of th --min_mapped_reads_thresh 500 \ --qscore_thresh 9 \ --mapq 10 \ - --step "2_from_step_1" \ - -resume + --step "2_from_step_1" ``` 1. STEP 2B (MinKNOW): Alignment Filtering and Quality Control from MinKNOW basecalling and alignment (bam files were generated by MinKNOW) @@ -302,8 +305,7 @@ The following examples assume your current directory is the root directory of th --is_barcoded "True" \ --qscore_thresh 9 \ --mapq 10 \ - --step "2_from_step_1" \ - -resume + --step "2_from_step_1" ``` 1. STEP 3: Methylation calling and MultiQC report @@ -312,8 +314,7 @@ The following examples assume your current directory is the root directory of th nextflow ./src/main.nf \ --steps_2_and_3_input_directory "./results/$OUTPUT_DIR_NAME/" \ --multiqc_config "./references/multiqc_config.yaml" \ - --step 3 \ - -resume + --step 3 ``` Alternatively, you can make use of an existing [parameter file](#parameter-files) to run one or more of the mentioned steps without the need to specify all parameters (each file is optimized for specific types of analysis). For example, the `parameters/human_blood/basecall.yaml` file runs the basecall analysis for a human blood sample, which can be executed from the project root directory as follows: diff --git a/src/nextflow.config b/src/nextflow.config index 41d22397149db2cd972c6cbea2069d6c26aa7051..a93bda593a416d0d08226f8467fbb706d4be00c3 100755 --- a/src/nextflow.config +++ b/src/nextflow.config @@ -1,6 +1,9 @@ // MAIN CONFIGURATION FILE // see src/configs for other parameters +// clean the work/ dir after a successful run +cleanup = true + params { // Project name (used to identify which project you're working on) project_name = "default"