Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…iplex into testdata
  • Loading branch information
drpatelh committed Jun 5, 2023
2 parents 40fdad3 + de32c26 commit c16411c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
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
### `Fixed`

- [#103](https://github.com/nf-core/demultiplex/issues/103) `-profile test` failing due to relative path in `flowcell_input.csv`
- [#122](https://github.com/nf-core/demultiplex/pull/122) Fails gracefully if an error is encountered

## 1.3.0 - 2023-05-31

Expand Down
14 changes: 7 additions & 7 deletions workflows/demultiplex.nf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def checkPathParamList = [
for (param in checkPathParamList) { if (param) { file(param, checkIfExists: true) } }

// Check mandatory parameters
if (params.input) { ch_input = file(params.input) } else { exit 1, 'Input samplesheet not specified!' }
if (params.input) { ch_input = file(params.input) } else { Nextflow.error 'Input samplesheet not specified!' }
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CONFIG FILES
Expand Down Expand Up @@ -192,7 +192,7 @@ workflow DEMULTIPLEX {
ch_versions = ch_versions.mix(SINGULAR_DEMULTIPLEX.out.versions)
break
default:
exit 1, "Unknown demultiplexer: ${demultiplexer}"
Nextflow.error "Unknown demultiplexer: ${demultiplexer}"
}
ch_raw_fastq.dump(tag: "DEMULTIPLEX::Demultiplexed Fastq",{FormattingService.prettyFormat(it)})

Expand Down Expand Up @@ -321,14 +321,14 @@ def extract_csv(input_csv, input_schema=null) {
diff in all_columns ? missing_columns.add(diff) : wrong_columns.add(diff)
}
if(missing_columns.size() > 0){
exit 1, "[Samplesheet Error] The column(s) $missing_columns is/are not present. The header should look like: $all_columns"
Nextflow.error "[Samplesheet Error] The column(s) $missing_columns is/are not present. The header should look like: $all_columns"
}
else {
exit 1, "[Samplesheet Error] The column(s) $wrong_columns should not be in the header. The header should look like: $all_columns"
Nextflow.error "[Samplesheet Error] The column(s) $wrong_columns should not be in the header. The header should look like: $all_columns"
}
}
else {
exit 1, "[Samplesheet Error] The columns $row are not in the right order. The header should look like: $all_columns"
Nextflow.error "[Samplesheet Error] The columns $row are not in the right order. The header should look like: $all_columns"
}

}
Expand All @@ -345,7 +345,7 @@ def extract_csv(input_csv, input_schema=null) {
row[column] ?: missing_mandatory_columns.add(column)
}
if(missing_mandatory_columns.size > 0){
exit 1, "[Samplesheet Error] The mandatory column(s) $missing_mandatory_columns is/are empty on line $row_count"
Nextflow.error "[Samplesheet Error] The mandatory column(s) $missing_mandatory_columns is/are empty on line $row_count"
}

def output = []
Expand All @@ -355,7 +355,7 @@ def extract_csv(input_csv, input_schema=null) {
content = row[key]

if(!(content ==~ col.value['pattern']) && col.value['pattern'] != '' && content != '') {
exit 1, "[Samplesheet Error] The content of column '$key' on line $row_count does not match the pattern '${col.value['pattern']}'"
Nextflow.error "[Samplesheet Error] The content of column '$key' on line $row_count does not match the pattern '${col.value['pattern']}'"
}

if(col.value['content'] == 'path'){
Expand Down

0 comments on commit c16411c

Please sign in to comment.