Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions workflows/tests/bugs/replicates_same_filename/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
nextflow_pipeline {

name "Replicates"
script "../../../../main.nf"
tag "bug"

// BUG https://github.com/nf-core/nascent/issues/159
test("Should fail with replicates that have the same filename") {
when {
params {
outdir = "$outputDir"
input = "${projectDir}/workflows/tests/bugs/replicates_same_filename/replicates_same_filename.csv"
}
}

then {
// FIXME this fails at FASTQC but should fail at nf-validation
// Might get fixed in nf-schema?
assert workflow.failed
assert snapshot(
workflow.trace.tasks().size(),
).match()
}
}

// BUG https://github.com/nf-core/nascent/issues/159
test("Should work with replicates that have the same id and different file names") {
when {
params {
outdir = "$outputDir"
input = "${projectDir}/workflows/tests/bugs/replicates_same_filename/same_id.csv"
}
}

then {
assertAll(
{ assert workflow.success },
{ assert snapshot(
workflow.trace.tasks().size(),
).match()
}
)
}
}
}
18 changes: 18 additions & 0 deletions workflows/tests/bugs/replicates_same_filename/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"Should fail with replicates that have the same filename": {
"content": [0],
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-08-22T12:24:05.004711151"
},
"Should work with replicates that have the same id and different file names": {
"content": [31],
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-08-22T14:52:05.603228732"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
sample,fastq_1,fastq_2
SAMPLE_REP1,https://raw.githubusercontent.com/nf-core/test-datasets/nascent/testdata/SRX882903_T3.fastq.gz,
SAMPLE_REP1,https://github.com/nf-core/test-datasets/raw/nascent/testdata/SRX882903_T3.fastq.gz,
3 changes: 3 additions & 0 deletions workflows/tests/bugs/replicates_same_filename/same_id.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
sample,fastq_1,fastq_2
SAMPLE_REP1,https://raw.githubusercontent.com/nf-core/test-datasets/nascent/testdata/SRX882903_T1.fastq.gz,
SAMPLE_REP1,https://raw.githubusercontent.com/nf-core/test-datasets/nascent/testdata/SRX882903_T2.fastq.gz,