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

Updated samshee #240

Merged
merged 11 commits into from
Aug 12, 2024
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [#216](https://github.com/nf-core/demultiplex/pull/216) List fastq reports for R1 and R2 separately in multiqc report.
- [#219](https://github.com/nf-core/demultiplex/pull/219) Modified workflow to store samplesheet in results folder.
- [#217](https://github.com/nf-core/demultiplex/pull/217) Update all nf-core modules and tests.
- [#240](https://github.com/nf-core/demultiplex/pull/240) Updated samshee, stub script and error strategy

### `Fixed`

Expand Down
4 changes: 4 additions & 0 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,10 @@ process {
mode: params.publish_dir_mode
]
}
// Samshee should fail the entire pipeline immediately as it validated the illumina samplesheet to be valid before the pipeline runs. As such, it should not be running more than once & if it fails should stop the pipeline
withName: SAMSHEE {
errorStrategy = "terminate"
}

}

80 changes: 0 additions & 80 deletions modules/local/samshee/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -45,90 +45,10 @@ process SAMSHEE {

stub:
"""
#Generate minimal samplesheet
cat <<-END_SAMPLE_SHEET > minimal_samplesheet.csv
[Header]
FileFormatVersion,2
RunName,Run_001
Instrument Type,NextSeq 1000
InstrumentPlatform,NextSeq 1000

[Reads]
Read1Cycles,150
Read2Cycles,150
Index1Cycles,8
Index2Cycles,8

[Settings]

[Data]
Sample_ID,Sample_Name,Description,Sample_Project
Sample1,Sample1,,
END_SAMPLE_SHEET


#Generate minimal schema validator file
cat <<-END_SCHEMA > minimal_schema.json
{
"type": "object",
"properties": {
"Header": {
"type": "object",
"properties": {
"FileFormatVersion": { "type": "integer" },
"RunName": { "type": "string" },
"Instrument Type": { "type": "string" },
"InstrumentPlatform": { "type": "string" }
},
"required": ["FileFormatVersion", "RunName", "Instrument Type", "InstrumentPlatform"]
},
"Reads": {
"type": "object",
"properties": {
"Read1Cycles": { "type": "integer" },
"Read2Cycles": { "type": "integer" },
"Index1Cycles": { "type": "integer" },
"Index2Cycles": { "type": "integer" }
},
"required": ["Read1Cycles", "Read2Cycles", "Index1Cycles", "Index2Cycles"]
},
"Settings": {
"type": "object"
},
"Data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"Sample_ID": { "type": "string" },
"Sample_Name": { "type": "string" },
"Description": { "type": "string" },
"Sample_Project": { "type": "string" }
},
"required": ["Sample_ID", "Sample_Name", "Description", "Sample_Project"]
}
}
},
"required": ["Header", "Reads", "Settings", "Data"]
}
END_SCHEMA

# Run validation command and capture output
output=\$(validate_samplesheet.py minimal_samplesheet.csv minimal_schema.json 2>&1)
status=\$?
# Check if validation failed
if echo "\$output" | grep -q "Validation failed:"; then
echo "\$output" # Print output for debugging
exit 1 # Fail the process if validation failed
fi

cat <<-END_VERSIONS > versions.yml
"${task.process}":
samshee: \$( python -m pip show --version samshee | grep "Version" | sed -e "s/Version: //g" )
python: \$( python --version | sed -e "s/Python //g" )
END_VERSIONS

# If no validation errors, process exits with status 0
exit \$status
"""
}
4 changes: 2 additions & 2 deletions tests/pipeline/fqtk.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"demux-metrics.txt:md5,1d587fa959f9129155314cf531103347"
],
"meta": {
"nf-test": "0.8.4",
"nf-test": "0.9.0",
"nextflow": "24.04.3"
},
"timestamp": "2023-10-17T08:06:53+0000"
Expand All @@ -14,7 +14,7 @@
"{CSV2TSV={sed=4.8}, FALCO={falco=1.2.1}, FASTP={fastp=0.23.4}, FQTK={fqtk=0.2.1}, MD5SUM={md5sum=8.3}, UNTAR_FLOWCELL={untar=1.34}, Workflow={nf-core/demultiplex=v1.5.0dev}}"
],
"meta": {
"nf-test": "0.8.4",
"nf-test": "0.9.0",
"nextflow": "23.10.0"
},
"timestamp": "2024-08-02T19:57:17.122084549"
Expand Down
12 changes: 6 additions & 6 deletions tests/pipeline/kraken.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"laneBarcode.html:md5,2bbdae3ee57151eab520c966597d7438"
],
[

]
]
],
Expand All @@ -36,7 +36,7 @@
"laneBarcode.html:md5,48842c23b9a2816aec540177df870968"
],
[

]
]
]
Expand All @@ -56,7 +56,7 @@
]
],
"meta": {
"nf-test": "0.8.4",
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-08-09T17:17:23.034777828"
Expand All @@ -66,7 +66,7 @@
"{BCL2FASTQ={bcl2fastq=2.20.0.422}, FALCO={falco=1.2.1}, FASTP={fastp=0.23.4}, KRAKEN2={kraken2=2.1.3, pigz=2.8}, MD5SUM={md5sum=8.3}, Workflow={nf-core/demultiplex=v1.5.0dev}}"
],
"meta": {
"nf-test": "0.8.4",
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-08-09T17:17:22.999406989"
Expand All @@ -79,9 +79,9 @@
"kraken-top-n-plot.txt:md5,84f10e652a1e2b98f96ffbe1a8ffe114"
],
"meta": {
"nf-test": "0.8.4",
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-08-09T17:17:23.014483899"
}
}
}
6 changes: 3 additions & 3 deletions tests/pipeline/mkfastq.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"{CELLRANGER_MKFASTQ={cellranger=8.0.0}, FALCO={falco=1.2.1}, FASTP={fastp=0.23.4}, MD5SUM={md5sum=8.3}, UNTAR_FLOWCELL={untar=1.34}, Workflow={nf-core/demultiplex=v1.5.0dev}}"
],
"meta": {
"nf-test": "0.8.4",
"nf-test": "0.9.0",
"nextflow": "23.10.0"
},
"timestamp": "2024-08-02T20:09:53.707554042"
Expand All @@ -22,9 +22,9 @@
"IndexMetricsOut.bin:md5,9e688c58a5487b8eaf69c9e1005ad0bf"
],
"meta": {
"nf-test": "0.8.4",
"nf-test": "0.9.0",
"nextflow": "24.04.3"
},
"timestamp": "2024-07-23T23:50:42.910185053"
}
}
}
6 changes: 3 additions & 3 deletions tests/pipeline/sgdemux.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"{FALCO={falco=1.2.1}, FASTP={fastp=0.23.4}, MD5SUM={md5sum=8.3}, SGDEMUX={sgdemux=1.1.1}, UNTAR_FLOWCELL={untar=1.34}, Workflow={nf-core/demultiplex=v1.5.0dev}}"
],
"meta": {
"nf-test": "0.8.4",
"nf-test": "0.9.0",
"nextflow": "23.10.0"
},
"timestamp": "2024-08-02T19:58:24.75171605"
Expand All @@ -17,9 +17,9 @@
"sample_barcode_hop_metrics.tsv:md5,d41d8cd98f00b204e9800998ecf8427e"
],
"meta": {
"nf-test": "0.8.4",
"nf-test": "0.9.0",
"nextflow": "23.10.4"
},
"timestamp": "2023-10-17T08:01:14+0000"
}
}
}
52 changes: 26 additions & 26 deletions tests/pipeline/skip_tools.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"{BCLCONVERT={bclconvert=4.3.6}, FALCO={falco=1.2.1}, FASTP={fastp=0.23.4}, MD5SUM={md5sum=8.3}, Workflow={nf-core/demultiplex=v1.5.0dev}}"
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.3"
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-07-25T20:38:35.033660203"
"timestamp": "2024-08-12T17:21:22.50969783"
},
"skip_fastqc": {
"content": [
Expand All @@ -31,9 +31,9 @@
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "23.10.1"
"nextflow": "24.04.4"
},
"timestamp": "2024-08-07T15:11:46.12688"
"timestamp": "2024-08-12T17:24:04.288349648"
},
"skip_fastp": {
"content": [
Expand All @@ -57,9 +57,9 @@
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "23.10.1"
"nextflow": "24.04.4"
},
"timestamp": "2024-08-07T15:09:48.227109"
"timestamp": "2024-08-12T17:22:17.56007143"
},
"skip_multiqc": {
"content": [
Expand All @@ -83,9 +83,9 @@
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "23.10.1"
"nextflow": "24.04.4"
},
"timestamp": "2024-08-07T15:14:47.991287"
"timestamp": "2024-08-12T17:27:14.471150173"
},
"skip_fastp_fastqc": {
"content": [
Expand All @@ -109,49 +109,49 @@
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "23.10.1"
"nextflow": "24.04.4"
},
"timestamp": "2024-08-07T15:13:01.794999"
"timestamp": "2024-08-12T17:25:09.780834994"
},
"software_versions_skip_fastqc": {
"content": [
"{BCLCONVERT={bclconvert=4.3.6}, FALCO={falco=1.2.1}, FASTP={fastp=0.23.4}, MD5SUM={md5sum=8.3}, Workflow={nf-core/demultiplex=v1.5.0dev}}"
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.3"
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-07-25T20:40:12.591107775"
"timestamp": "2024-08-12T17:23:59.039256258"
},
"software_versions_skip_fastp_fastqc": {
"content": [
"{BCLCONVERT={bclconvert=4.3.6}, FALCO={falco=1.2.1}, MD5SUM={md5sum=8.3}, Workflow={nf-core/demultiplex=v1.5.0dev}}"
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.3"
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-07-25T20:40:52.373539308"
"timestamp": "2024-08-12T17:25:01.70585844"
},
"software_versions_skip_multiqc": {
"content": [
"{BCLCONVERT={bclconvert=4.3.6}, FALCO={falco=1.2.1}, FASTP={fastp=0.23.4}, MD5SUM={md5sum=8.3}, Workflow={nf-core/demultiplex=v1.5.0dev}}"
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.3"
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-07-25T20:41:53.704450617"
"timestamp": "2024-08-12T17:27:03.685153368"
},
"software_versions_skip_fastp": {
"content": [
"{BCLCONVERT={bclconvert=4.3.6}, FALCO={falco=1.2.1}, MD5SUM={md5sum=8.3}, Workflow={nf-core/demultiplex=v1.5.0dev}}"
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.3"
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-07-25T20:39:04.450501154"
"timestamp": "2024-08-12T17:22:14.728243247"
},
"skip_trimming": {
"content": [
Expand All @@ -175,8 +175,8 @@
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "23.10.1"
"nextflow": "24.04.4"
},
"timestamp": "2024-08-07T15:08:34.10467"
"timestamp": "2024-08-12T17:21:22.530325808"
}
}
}
10 changes: 5 additions & 5 deletions tests/pipeline/test_pe.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"laneBarcode.html:md5,b5f0e5f5730d70513defa8024913b214"
],
[

]
]
],
Expand All @@ -39,7 +39,7 @@
"laneBarcode.html:md5,eddae85d4b13d6fb5817df5fbfb756ff"
],
[

]
]
]
Expand Down Expand Up @@ -69,7 +69,7 @@
"{BCL2FASTQ={bcl2fastq=2.20.0.422}, FALCO={falco=1.2.1}, FASTP={fastp=0.23.4}, MD5SUM={md5sum=8.3}, Workflow={nf-core/demultiplex=v1.5.0dev}}"
],
"meta": {
"nf-test": "0.8.4",
"nf-test": "0.9.0",
"nextflow": "24.04.3"
},
"timestamp": "2024-07-31T13:03:01.047096473"
Expand All @@ -81,9 +81,9 @@
"bcl2fastq_sample_counts.txt:md5,6454d154d69ffa563878f5b7fd3d9879"
],
"meta": {
"nf-test": "0.8.4",
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-08-01T16:33:58.242361926"
}
}
}
Loading