Skip to content

Commit 5fffa29

Browse files
committed
update
1 parent 040d5c0 commit 5fffa29

4 files changed

Lines changed: 356 additions & 48 deletions

File tree

modules/local/numorph3dunet/main.nf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ process NUMORPH3DUNET {
55

66

77
container "carolinschwitalla/numorph-3dunet:latest"
8+
containerOptions '--gpus all'
89

910
input:
1011
tuple val(meta), path(input_dir), path(parameter_file)
Lines changed: 80 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// TODO nf-core: Once you have added the required tests, please run the following command to build this file:
2-
// nf-core modules test numorph3dunet
31
nextflow_process {
42

53
name "Test Process NUMORPH3DUNET"
@@ -9,65 +7,101 @@ nextflow_process {
97
tag "modules"
108
tag "modules_"
119
tag "numorph3dunet"
10+
tag "gpu"
1211

13-
// TODO nf-core: Change the test name preferably indicating the test-data and file-format used
14-
test("sarscov2 - bam") {
15-
16-
// TODO nf-core: If you are created a test for a chained module
17-
// (the module requires running more than one process to generate the required output)
18-
// add the 'setup' method here.
19-
// You can find more information about how to use a 'setup' method in the docs (https://nf-co.re/docs/contributing/modules#steps-for-creating-nf-test-for-chained-modules).
20-
21-
when {
22-
process {
23-
"""
24-
// TODO nf-core: define inputs of the process here. Example:
25-
26-
input[0] = [
27-
[ id:'test', single_end:false ], // meta map
28-
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true),
29-
]
12+
test("Numorph3DUnet test - tif") {
13+
setup {
14+
run ("UNZIP") {
15+
script "../../../nf-core/unzip/main.nf"
16+
process {
17+
"""
18+
input[0] = Channel.fromList([
19+
tuple([ id:'TEST1'],
20+
file('https://zenodo.org/records/14916478/files/ctip2_topro.zip'))
21+
])
3022
"""
23+
}
24+
}
25+
run ("NUMORPHINTENSITY") {
26+
script "../../numorphintensity/main.nf"
27+
process {
28+
"""
29+
input[0] = UNZIP.out.unzipped_archive.map { meta, unzipped_archive ->
30+
tuple(
31+
meta,
32+
unzipped_archive,
33+
file(params.pipelines_testdata_base_path + '/test_data/parameterfiles/params_TEST1_lsmquant.csv'))
34+
}
35+
"""
36+
}
37+
}
38+
run ("NUMORPHALIGN") {
39+
script "../../numorphalign/main.nf"
40+
process {
41+
"""
42+
input[0] = UNZIP.out.unzipped_archive.map { meta, unzipped_archive ->
43+
tuple(
44+
meta,
45+
unzipped_archive,
46+
file(params.pipelines_testdata_base_path + '/test_data/parameterfiles/params_TEST1_lsmquant.csv'))
47+
} //
48+
input[1] = NUMORPHINTENSITY.out.adj_params_mat
49+
input[2] = NUMORPHINTENSITY.out.path_table_mat
50+
input[3] = NUMORPHINTENSITY.out.thresholds_mat
51+
input[4] = NUMORPHINTENSITY.out.NM_variables
52+
"""
53+
}
54+
}
55+
run ("NUMORPHSTITCH") {
56+
script "../../numorphstitch/main.nf"
57+
process {
58+
"""
59+
input[0] = UNZIP.out.unzipped_archive.map { meta, unzipped_archive ->
60+
tuple(
61+
meta,
62+
unzipped_archive,
63+
file(params.pipelines_testdata_base_path + '/test_data/parameterfiles/params_TEST1_lsmquant.csv'))
64+
}
65+
input[1] = NUMORPHALIGN.out.alignment_table_mat
66+
input[2] = NUMORPHALIGN.out.z_displacement_align_mat
67+
input[3] = NUMORPHALIGN.out.path_table_mat
68+
input[4] = NUMORPHINTENSITY.out.thresholds_mat
69+
input[5] = NUMORPHINTENSITY.out.adj_params_mat
70+
input[6] = NUMORPHALIGN.out.NM_variables
71+
"""
72+
}
3173
}
3274
}
33-
34-
then {
35-
assertAll(
36-
{ assert process.success },
37-
{ assert snapshot(process.out).match() }
38-
//TODO nf-core: Add all required assertions to verify the test output.
39-
// See https://nf-co.re/docs/contributing/tutorials/nf-test_assertions for more information and examples.
40-
)
41-
}
42-
43-
}
44-
45-
// TODO nf-core: Change the test name preferably indicating the test-data and file-format used but keep the " - stub" suffix.
46-
test("sarscov2 - bam - stub") {
47-
48-
options "-stub"
49-
5075
when {
76+
params {
77+
outdir = "$workDir/output"
78+
}
5179
process {
5280
"""
53-
// TODO nf-core: define inputs of the process here. Example:
54-
55-
input[0] = [
56-
[ id:'test', single_end:false ], // meta map
57-
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true),
58-
]
81+
input[0] = NUMORPHSTITCH.out.stitched.map { meta, stitched ->
82+
tuple(
83+
meta,
84+
stitched,
85+
file(params.pipelines_testdata_base_path + '/test_data/parameterfiles/params_TEST1_lsmquant.csv'))
86+
}
87+
input[1] = Channel.fromPath('/home/schwitalla/Documents/numorph_3dunet/src/numorph_3dunet/models/075_121_model.h5')
88+
input[2] = Channel.from(1) // number of channels
5989
"""
6090
}
6191
}
6292

6393
then {
94+
def stable_name = getAllFilesFromDir(params.outdir, relative: true, includeDir: true, ignore: ['pipeline_info/*.{html,json,txt}'])
95+
assert workflow.success
6496
assertAll(
65-
{ assert process.success },
66-
{ assert snapshot(process.out).match() }
67-
//TODO nf-core: Add all required assertions to verify the test output.
97+
{ assert snapshot(
98+
// Number of successful tasks
99+
workflow.trace.succeeded().size(),
100+
// All stable path name, with a relative path
101+
stable_name.isEmpty() ? 'No stable paths' : stable_name
102+
).match()}
68103
)
69104
}
70105

71106
}
72-
73107
}

0 commit comments

Comments
 (0)