Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev -> Master for 1.3.1 patch release #124

Merged
merged 13 commits into from
Jun 5, 2023
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 1.3.1 - 2023-06-05

### `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

### `Added`
Expand Down
10 changes: 0 additions & 10 deletions assets/inputs/SampleSheet.csv

This file was deleted.

2 changes: 0 additions & 2 deletions assets/inputs/b2fq-samplesheet.csv

This file was deleted.

2 changes: 0 additions & 2 deletions assets/inputs/flowcell_input.csv

This file was deleted.

2 changes: 0 additions & 2 deletions assets/inputs/fqtk-samplesheet.csv

This file was deleted.

2 changes: 0 additions & 2 deletions assets/inputs/sgdemux-samplesheet.csv

This file was deleted.

2 changes: 1 addition & 1 deletion conf/test.config
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ params {
max_time = '6.h'

// Input data
input = "${projectDir}/assets/inputs/flowcell_input.csv"
input = 'https://raw.githubusercontent.com/nf-core/test-datasets/demultiplex/samplesheet/1.3.0/flowcell_input.csv'
demultiplexer = 'bclconvert'

}
Expand Down
2 changes: 1 addition & 1 deletion conf/test_bases2fastq.config
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ params {
max_time = '6.h'

// Input data
input = "${projectDir}/assets/inputs/b2fq-samplesheet.csv"
input = 'https://raw.githubusercontent.com/nf-core/test-datasets/demultiplex/samplesheet/1.3.0/b2fq-samplesheet.csv'
demultiplexer = 'bases2fastq'
}
2 changes: 1 addition & 1 deletion conf/test_bcl2fastq.config
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ params {
max_time = '6.h'

// Input data
input = "${projectDir}/assets/inputs/flowcell_input.csv"
input = 'https://raw.githubusercontent.com/nf-core/test-datasets/demultiplex/samplesheet/1.3.0/flowcell_input.csv'
demultiplexer = 'bcl2fastq'

}
Expand Down
2 changes: 1 addition & 1 deletion conf/test_fqtk.config
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ params {
max_time = '1.h'

// Input data
input = "${projectDir}/assets/inputs/fqtk-samplesheet.csv"
input = 'https://raw.githubusercontent.com/nf-core/test-datasets/demultiplex/samplesheet/1.3.0/fqtk-samplesheet.csv'
demultiplexer = 'fqtk'
}
4 changes: 2 additions & 2 deletions conf/test_full.config
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ cleanup = true
params {
config_profile_name = 'Full test profile'
config_profile_description = 'Full test dataset to check pipeline function'
input = 'https://raw.githubusercontent.com/nf-core/test-datasets/demultiplex/samplesheet/1.1.0/samplesheet.csv'
demultiplexer = "bcl2fastq"
input = 'https://raw.githubusercontent.com/nf-core/test-datasets/demultiplex/samplesheet/1.3.0/samplesheet_full.csv'
demultiplexer = 'bcl2fastq'
}
2 changes: 1 addition & 1 deletion conf/test_sgdemux.config
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ params {
max_time = '1.h'

// Input data
input = "${projectDir}/assets/inputs/sgdemux-samplesheet.csv"
input = 'https://raw.githubusercontent.com/nf-core/test-datasets/demultiplex/samplesheet/1.3.0/sgdemux-samplesheet.csv'
demultiplexer = 'sgdemux'
}
2 changes: 1 addition & 1 deletion docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ DDMMYY_SERIAL_NUMBER_FC3,/path/to/SampleSheet3.csv,3,/path/to/sequencer/output3
| `lane` | Optional lane number. When a lane number is provided, only the given lane will be demultiplexed |
| `run_dir` | Full path to the Illumina sequencer output directory or a `tar.gz` file containing the contents of said directory |

An [example samplesheet](../assets/inputs/flowcell_input.csv) has been provided with the pipeline.
An [example samplesheet](https://raw.githubusercontent.com/nf-core/test-datasets/demultiplex/samplesheet/1.3.0/flowcell_input.csv) has been provided with the pipeline.

Note `run_dir` must lead to a `tar.gz` for compatability with the demultiplexers sgdemux and fqtk

Expand Down
2 changes: 1 addition & 1 deletion nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ manifest {
description = """Demultiplexing pipeline for Illumina sequencing data"""
mainScript = 'main.nf'
nextflowVersion = '!>=22.10.1'
version = '1.3.0'
version = '1.3.1'
doi = '10.5281/zenodo.7153103'
}

Expand Down
2 changes: 1 addition & 1 deletion tests/functions/demultiplex.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ nextflow_function {
when {
function {
"""
input[0] = 'https://raw.githubusercontent.com/nf-core/demultiplex/master/assets/inputs/flowcell_input.csv'
input[0] = 'https://raw.githubusercontent.com/nf-core/test-datasets/demultiplex/samplesheet/1.3.0/flowcell_input.csv'
"""
}
}
Expand Down
6 changes: 6 additions & 0 deletions tests/functions/demultiplex.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"Test Function extract_csv": {
"content": null,
"timestamp": "2023-06-05T10:39:32+0000"
}
}
2 changes: 1 addition & 1 deletion tests/pipeline/default/bases2fastq.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ nextflow_pipeline {

when {
params {
input = "$baseDir/assets/inputs/b2fq-samplesheet.csv"
input = 'https://raw.githubusercontent.com/nf-core/test-datasets/demultiplex/samplesheet/1.3.0/b2fq-samplesheet.csv'
demultiplexer = 'bases2fastq'
outdir = "$outputDir"
}
Expand Down
2 changes: 1 addition & 1 deletion tests/pipeline/default/bcl2fastq.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ nextflow_pipeline {
when {
params {
outdir = "$outputDir"
input = "${baseDir}/assets/inputs/flowcell_input.csv"
input = 'https://raw.githubusercontent.com/nf-core/test-datasets/demultiplex/samplesheet/1.3.0/flowcell_input.csv'
demultiplexer = 'bcl2fastq'
}
}
Expand Down
2 changes: 1 addition & 1 deletion tests/pipeline/default/bclconvert.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ nextflow_pipeline {

when {
params {
input = "$baseDir/assets/inputs/flowcell_input.csv"
input = 'https://raw.githubusercontent.com/nf-core/test-datasets/demultiplex/samplesheet/1.3.0/flowcell_input.csv'
demultiplexer = 'bclconvert'
outdir = "$outputDir"
}
Expand Down
2 changes: 1 addition & 1 deletion tests/pipeline/default/fqtk.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ nextflow_pipeline {

when {
params {
input = "$baseDir/assets/inputs/fqtk-samplesheet.csv"
input = 'https://raw.githubusercontent.com/nf-core/test-datasets/demultiplex/samplesheet/1.3.0/fqtk-samplesheet.csv'
demultiplexer = 'fqtk'
outdir = "$outputDir"
}
Expand Down
2 changes: 1 addition & 1 deletion tests/pipeline/default/sgdemux.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ nextflow_pipeline {

when {
params {
input = "$baseDir/assets/inputs/sgdemux-samplesheet.csv"
input = 'https://raw.githubusercontent.com/nf-core/test-datasets/demultiplex/samplesheet/1.3.0/sgdemux-samplesheet.csv'
demultiplexer = 'sgdemux'
outdir = "$outputDir"
}
Expand Down
8 changes: 4 additions & 4 deletions tests/pipeline/default/skip_tools.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ nextflow_pipeline {

when {
params {
input = "$baseDir/assets/inputs/flowcell_input.csv"
input = 'https://raw.githubusercontent.com/nf-core/test-datasets/demultiplex/samplesheet/1.3.0/flowcell_input.csv'
demultiplexer = 'bclconvert'
trim_fastq = false
outdir = "$outputDir"
Expand All @@ -33,7 +33,7 @@ nextflow_pipeline {

when {
params {
input = "$baseDir/assets/inputs/flowcell_input.csv"
input = 'https://raw.githubusercontent.com/nf-core/test-datasets/demultiplex/samplesheet/1.3.0/flowcell_input.csv'
demultiplexer = 'bclconvert'
skip_tools = "fastp"
outdir = "$outputDir"
Expand All @@ -58,7 +58,7 @@ nextflow_pipeline {

when {
params {
input = "$baseDir/assets/inputs/flowcell_input.csv"
input = 'https://raw.githubusercontent.com/nf-core/test-datasets/demultiplex/samplesheet/1.3.0/flowcell_input.csv'
demultiplexer = 'bclconvert'
skip_tools = "fastqc"
outdir = "$outputDir"
Expand All @@ -84,7 +84,7 @@ nextflow_pipeline {

when {
params {
input = "$baseDir/assets/inputs/flowcell_input.csv"
input = 'https://raw.githubusercontent.com/nf-core/test-datasets/demultiplex/samplesheet/1.3.0/flowcell_input.csv'
demultiplexer = 'bclconvert'
skip_tools = "fastp,fastqc"
outdir = "$outputDir"
Expand Down
18 changes: 10 additions & 8 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 @@ -84,7 +84,9 @@ workflow DEMULTIPLEX {

// Sanitize inputs and separate input types
// FQTK's input contains an extra column 'per_flowcell_manifest' so it is handled seperately
// For reference - assets/inputs/fqtk-samplesheet.csv vs assets/inputs/sgdemux-samplesheet
// For reference:
// https://raw.githubusercontent.com/nf-core/test-datasets/demultiplex/samplesheet/1.3.0/fqtk-samplesheet.csv VS
// https://raw.githubusercontent.com/nf-core/test-datasets/demultiplex/samplesheet/1.3.0/sgdemux-samplesheet.csv
if (demultiplexer == 'fqtk'){
ch_inputs = extract_csv_fqtk(ch_input)

Expand Down Expand Up @@ -190,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 @@ -319,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 @@ -343,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 @@ -353,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