-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added test for subsetTrim, but didn't get time for runQC
- Loading branch information
1 parent
7c45ccc
commit 1ca495d
Showing
2 changed files
with
74 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
nextflow_workflow { | ||
|
||
name "Test Workflow RUN_QC" | ||
script "subworkflows/local/runQc/main.nf" | ||
workflow "RUN_QC" | ||
|
||
test("Should run without failures") { | ||
|
||
when { | ||
params { | ||
// define parameters here. Example: | ||
// outdir = "tests/results" | ||
} | ||
workflow { | ||
""" | ||
// define inputs of the workflow here. Example: | ||
// input[0] = file("test-file.txt") | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assert workflow.success | ||
assert snapshot(workflow.out).match() | ||
} | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
nextflow_workflow { | ||
|
||
name "Test Workflow SUBSET_TRIM" | ||
script "subworkflows/local/subsetTrim/main.nf" | ||
workflow "SUBSET_TRIM" | ||
|
||
test("Should run without failures") { | ||
config "tests/run.config" | ||
setup { | ||
run("LOAD_SAMPLESHEET") { | ||
script "subworkflows/local/loadSampleSheet/main.nf" | ||
process { | ||
""" | ||
input[0] = "/home/ec2-user/pipeline-development/bbduk-rearrangement/mgs-workflow/test-data/samplesheet.csv" | ||
input[1] = false | ||
input[2] = false | ||
""" | ||
} | ||
} | ||
} | ||
|
||
when { | ||
params {} | ||
workflow { | ||
""" | ||
input[0] = LOAD_SAMPLESHEET.out.samplesheet // reads_ch | ||
input[1] = LOAD_SAMPLESHEET.out.group // group_ch | ||
input[2] = params.n_reads_profile // n_reads | ||
input[3] = params.grouping // grouping | ||
input[4] = params.adapters // adapter_path | ||
input[5] = params.single_end // single_end | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assert workflow.success | ||
def countGzipLines = { file -> path(file).linesGzip.size() } | ||
assert countGzipLines(workflow.out.subset_reads[0][1][0]) == 165 * 4 | ||
assert countGzipLines(workflow.out.trimmed_subset_reads[0][1][0]) == 135 * 4 | ||
} | ||
|
||
} | ||
|
||
} |