Skip to content

Commit

Permalink
Make --outdir mandatory nf-core/tools#1415
Browse files Browse the repository at this point in the history
  • Loading branch information
drpatelh committed Feb 18, 2022
1 parent 3461a61 commit 70d0c0b
Show file tree
Hide file tree
Showing 14 changed files with 36 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Learn more about contributing: [CONTRIBUTING.md](https://github.com/nf-core/vira
- [ ] If you've added a new tool - have you followed the pipeline conventions in the [contribution docs](https://github.com/nf-core/viralrecon/tree/master/.github/CONTRIBUTING.md)
- [ ] If necessary, also make a PR on the nf-core/viralrecon _branch_ on the [nf-core/test-datasets](https://github.com/nf-core/test-datasets) repository.
- [ ] Make sure your code lints (`nf-core lint`).
- [ ] Ensure the test suite passes (`nextflow run . -profile test,docker`).
- [ ] Ensure the test suite passes (`nextflow run . -profile test,docker --outdir <OUTDIR>`).
- [ ] Usage Documentation in `docs/usage.md` is updated.
- [ ] Output Documentation in `docs/output.md` is updated.
- [ ] `CHANGELOG.md` is updated.
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
- name: Run pipeline with test data
run: |
nextflow run ${GITHUB_WORKSPACE} -profile test,docker
nextflow run ${GITHUB_WORKSPACE} -profile test,docker --outdir ./results
parameters:
name: Test workflow parameters
Expand Down Expand Up @@ -74,7 +74,7 @@ jobs:
- name: Run pipeline with various parameters
run: |
nextflow run ${GITHUB_WORKSPACE} -profile test,docker ${{ matrix.parameters }}
nextflow run ${GITHUB_WORKSPACE} -profile test,docker ${{ matrix.parameters }} --outdir ./results
test_sispa:
name: Test SISPA workflow
Expand All @@ -96,7 +96,7 @@ jobs:
- name: Run pipeline with minimal SISPA data and various options
run: |
nextflow run ${GITHUB_WORKSPACE} -profile test_sispa,docker ${{ matrix.parameters }}
nextflow run ${GITHUB_WORKSPACE} -profile test_sispa,docker ${{ matrix.parameters }} --outdir ./results
test_nanopore:
name: Test Nanopore workflow
Expand All @@ -122,4 +122,4 @@ jobs:
- name: Run pipeline with minimal Nanopore data and various options
run: |
nextflow run ${GITHUB_WORKSPACE} -profile test_nanopore,docker ${{ matrix.parameters }}
nextflow run ${GITHUB_WORKSPACE} -profile test_nanopore,docker ${{ matrix.parameters }} --outdir ./results
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Enhancements & fixes

* [[#281](https://github.com/nf-core/viralrecon/issues/281)] - Nanopore medaka processing fails with error if model name, not model file, provided
* [nf-core/tools#1415](https://github.com/nf-core/tools/issues/1415) - Make `--outdir` a mandatory parameter

### Parameters

Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ A number of improvements were made to the pipeline recently, mainly with regard
3. Download the pipeline and test it on a minimal dataset with a single command:

```console
nextflow run nf-core/viralrecon -profile test,YOURPROFILE
nextflow run nf-core/viralrecon -profile test,YOURPROFILE --outdir <OUTDIR>
```

Note that some form of configuration will be needed so that Nextflow knows how to fetch the required software. This is usually done in the form of a config profile (`YOURPROFILE` in the example command above). You can chain multiple config profiles in a comma-separated string.
Expand All @@ -104,6 +104,7 @@ A number of improvements were made to the pipeline recently, mainly with regard
```bash
nextflow run nf-core/viralrecon \
--input samplesheet.csv \
--outdir <OUTDIR>
--platform illumina \
--protocol metagenomic \
--genome 'MN908947.3' \
Expand All @@ -115,6 +116,7 @@ A number of improvements were made to the pipeline recently, mainly with regard
```bash
nextflow run nf-core/viralrecon \
--input samplesheet.csv \
--outdir <OUTDIR>
--platform illumina \
--protocol amplicon \
--genome 'MN908947.3' \
Expand All @@ -129,6 +131,7 @@ A number of improvements were made to the pipeline recently, mainly with regard
```bash
nextflow run nf-core/viralrecon \
--input samplesheet.csv \
--outdir <OUTDIR>
--platform nanopore \
--genome 'MN908947.3' \
--primer_set_version 3 \
Expand Down
4 changes: 2 additions & 2 deletions conf/test.config
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Defines input files and everything required to run a fast and simple pipeline test.
Use as follows:
nextflow run nf-core/viralrecon -profile test,<docker/singularity>
nextflow run nf-core/viralrecon -profile test,<docker/singularity> --outdir <OUTDIR>
----------------------------------------------------------------------------------------
*/
Expand All @@ -32,7 +32,7 @@ params {

// Variant calling options
variant_caller = 'ivar'

// Assembly options
assemblers = 'spades,unicycler,minia'
skip_plasmidid = true // Skip this by default to bypass Github Actions disk quota errors
Expand Down
2 changes: 1 addition & 1 deletion conf/test_full.config
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Defines input files and everything required to run a full size pipeline test.
Use as follows:
nextflow run nf-core/viralrecon -profile test_full,<docker/singularity>
nextflow run nf-core/viralrecon -profile test_full,<docker/singularity> --outdir <OUTDIR>
----------------------------------------------------------------------------------------
*/
Expand Down
10 changes: 5 additions & 5 deletions conf/test_full_nanopore.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
========================================================================================
Nextflow config file for running full-size tests
========================================================================================
Defines input files and everything required to run a full size pipeline test.
Defines input files and everything required to run a full size pipeline test.
Use as follows:
nextflow run nf-core/viralrecon -profile test_full_nanopore,<docker/singularity>
nextflow run nf-core/viralrecon -profile test_full_nanopore,<docker/singularity> --outdir <OUTDIR>
----------------------------------------------------------------------------------------
*/
Expand All @@ -20,11 +20,11 @@ params {
fastq_dir = 's3://nf-core-awsmegatests/viralrecon/input_data/20210205_1526_X4_FAP51364_21fa8135/fastq_pass/'
fast5_dir = 's3://nf-core-awsmegatests/viralrecon/input_data/20210205_1526_X4_FAP51364_21fa8135/fast5_pass/'
sequencing_summary = 's3://nf-core-awsmegatests/viralrecon/input_data/20210205_1526_X4_FAP51364_21fa8135/sequencing_summary.txt'

// Genome references
genome = 'MN908947.3'
primer_set_version = 3

// Other parameters
artic_minion_medaka_model = 's3://nf-core-awsmegatests/viralrecon/input_data/20210205_1526_X4_FAP51364_21fa8135/r941_min_high_g360_model.hdf5'
}
}
8 changes: 4 additions & 4 deletions conf/test_full_sispa.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
========================================================================================
Nextflow config file for running full-size tests
========================================================================================
Defines input files and everything required to run a full size pipeline test.
Defines input files and everything required to run a full size pipeline test.
Use as follows:
nextflow run nf-core/viralrecon -profile test_full_sispa,<docker/singularity>
nextflow run nf-core/viralrecon -profile test_full_sispa,<docker/singularity> --outdir <OUTDIR>
----------------------------------------------------------------------------------------
*/
Expand Down Expand Up @@ -33,4 +33,4 @@ process {
withName: 'PLASMIDID' {
errorStrategy = 'ignore'
}
}
}
2 changes: 1 addition & 1 deletion conf/test_nanopore.config
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Defines input files and everything required to run a fast and simple pipeline test.
Use as follows:
nextflow run nf-core/viralrecon -profile test_nanopore,<docker/singularity>
nextflow run nf-core/viralrecon -profile test_nanopore,<docker/singularity> --outdir <OUTDIR>
----------------------------------------------------------------------------------------
*/
Expand Down
4 changes: 2 additions & 2 deletions conf/test_sispa.config
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Defines input files and everything required to run a fast and simple pipeline test.
Use as follows:
nextflow run nf-core/viralrecon -profile test_sispa,<docker/singularity>
nextflow run nf-core/viralrecon -profile test_sispa,<docker/singularity> --outdir <OUTDIR>
----------------------------------------------------------------------------------------
*/
Expand All @@ -30,7 +30,7 @@ params {

// Variant calling options
variant_caller = 'bcftools'

// Assembly options
assemblers = 'spades,unicycler,minia'
skip_plasmidid = true // Skip this by default to bypass Github Actions disk quota errors
Expand Down
6 changes: 5 additions & 1 deletion docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ The command to run the pipeline would then be:
```console
nextflow run nf-core/viralrecon \
--input samplesheet.csv \
--outdir <OUTDIR> \
--platform nanopore \
--genome 'MN908947.3' \
--primer_set_version 3 \
Expand All @@ -115,6 +116,7 @@ The command to run the pipeline would then be:
```console
nextflow run nf-core/viralrecon \
--input samplesheet.csv \
--outdir <OUTDIR> \
--platform nanopore \
--genome 'MN908947.3' \
--primer_set_version 3 \
Expand All @@ -139,6 +141,7 @@ An example command using v3 ARTIC primers with "MN908947.3":
```console
nextflow run nf-core/viralrecon \
--input samplesheet.csv \
--outdir <OUTDIR> \
--platform illumina \
--protocol amplicon \
--genome 'MN908947.3' \
Expand All @@ -157,6 +160,7 @@ An example command using SWIFT primers with "MN908947.3":
```console
nextflow run nf-core/viralrecon \
--input samplesheet.csv \
--outdir <OUTDIR> \
--platform illumina \
--protocol amplicon \
--genome 'MN908947.3' \
Expand All @@ -173,7 +177,7 @@ nextflow run nf-core/viralrecon \
The typical command for running the pipeline is as follows:

```console
nextflow run nf-core/viralrecon --input samplesheet.csv --genome 'MN908947.3' -profile docker
nextflow run nf-core/viralrecon --input samplesheet.csv --outdir <OUTDIR> --genome 'MN908947.3' -profile docker
```

This will launch the pipeline with the `docker` configuration profile. See below for more information about profiles.
Expand Down
2 changes: 1 addition & 1 deletion lib/WorkflowMain.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class WorkflowMain {
// Print help to screen if required
//
public static String help(workflow, params, log) {
def command = "nextflow run ${workflow.manifest.name} --input samplesheet.csv --genome 'MN908947.3' -profile docker"
def command = "nextflow run ${workflow.manifest.name} --input samplesheet.csv --outdir <OUTDIR> --genome 'MN908947.3' -profile docker"
def help_string = ''
help_string += NfcoreTemplate.logo(workflow, params.monochrome_logs)
help_string += NfcoreSchema.paramsHelp(workflow, params, command)
Expand Down
2 changes: 1 addition & 1 deletion nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ params {
skip_assembly = false

// Boilerplate options
outdir = './results'
outdir = null
tracedir = "${params.outdir}/pipeline_info"
publish_dir_mode = 'copy'
email = null
Expand Down
6 changes: 4 additions & 2 deletions nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
"type": "object",
"fa_icon": "fas fa-terminal",
"description": "Define where the pipeline should find input data and save output data.",
"required": [
"outdir"
],
"properties": {
"input": {
"type": "string",
Expand Down Expand Up @@ -42,8 +45,7 @@
"outdir": {
"type": "string",
"format": "directory-path",
"description": "The output directory where the results will be saved.",
"default": "./results",
"description": "The output directory where the results will be saved. You have to use absolute paths to storage on Cloud infrastructure.",
"fa_icon": "fas fa-folder-open"
},
"email": {
Expand Down

0 comments on commit 70d0c0b

Please sign in to comment.