Skip to content

Commit

Permalink
add db and fastq_input parameter checks (#12)
Browse files Browse the repository at this point in the history
* added catch for missing db and fastq_input parameters

* added pip to fluviewer conda environment

* Revert "added catch for missing db and fastq_input parameters"

This reverts commit 0067cd6.

* added check for db and fastq_input parameters

---------

Co-authored-by: John Palmer <[email protected]>
  • Loading branch information
jpalmer37 and jpalmer37 authored Jul 4, 2024
1 parent 4437565 commit 9944834
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions environments/fluviewer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ dependencies:
- freebayes=1.3.6
- pandas=2.0.3
- seaborn=0.12.2
- pip=24.0
- pip:
- git+https://github.com/BCCDC-PHL/[email protected]
5 changes: 5 additions & 0 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ workflow {


main:

if (params.db == 'NO_FILE' || params.fastq_input == 'NO_FILE') {
error "ERROR: Missing required inputs. '--fastq_input' and '--db' parameters are mandatory."
}

// Provenance channel starts with just the sample IDs
// These will be joined to various provenance files as they are generated
ch_provenance = ch_fastq_input.map{ it -> it[0] }
Expand Down
2 changes: 1 addition & 1 deletion nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ params {
profile = false
cache = ''
outdir = 'results'
fastq_input = ''
fastq_input = 'NO_FILE'
illumina_suffixes = ['*_R{1,2}_001', '*_R{1,2}', '*_{1,2}' ]
fastq_exts = ['.fastq.gz', '.fq.gz', '.fastq', '.fq']
fastq_search_path = makeFastqSearchPath( illumina_suffixes, fastq_exts )
Expand Down

0 comments on commit 9944834

Please sign in to comment.