Skip to content

Commit

Permalink
Raise error if primer template is invalid if not using db
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmero committed May 19, 2024
1 parent df832bf commit 617b9c8
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,19 @@ if (params.use_db) {

workflow {

// check that index template file is valid if not using db
if (!params.use_db) {
new File(params.index_template_file).readLines().each { line ->
if (line.split(",").size() < 3) {
error("""
Index template invalid! Must be comma-separated file
containing index_name, direction (F/R) and sequence.
If intending to use the Genomics database instead,
set use_db to true. """)
}
}
}

Channel.fromPath("${params.input_dir}/*.{fq,fastq}{,.gz}")
.ifEmpty {
error("""
Expand Down

0 comments on commit 617b9c8

Please sign in to comment.