Skip to content

Commit

Permalink
Use niftiMD5SUM
Browse files Browse the repository at this point in the history
  • Loading branch information
anroy1 committed Sep 8, 2024
1 parent 6230a0d commit 736caaf
Show file tree
Hide file tree
Showing 4 changed files with 93 additions and 663 deletions.
2 changes: 1 addition & 1 deletion subworkflows/nf-scil/preproc_t1/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ workflow PREPROC_T1 {
image_bet = image_bet // channel: [ val(meta), [ t1 ] ]
mask_bet = mask_bet // channel: [ val(meta), [ mask ] ]
crop_box = BETCROP_CROPVOLUME_T1.out.bounding_box // channel: [ val(meta), [ bounding_box ] ]
mask_final = BETCROP_CROPVOLUME_MASK.out.image // channel: [ val(meta), [ mask ] ]
mask_final = BETCROP_CROPVOLUME_MASK.out.image // channel: [ val(meta), [ image ] ]
t1_final = BETCROP_CROPVOLUME_T1.out.image // channel: [ val(meta), [ image ] ]
versions = ch_versions // channel: [ versions.yml ]
}
36 changes: 33 additions & 3 deletions subworkflows/nf-scil/preproc_t1/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,17 @@ nextflow_workflow {
then {
assertAll(
{ assert workflow.success},
{ assert snapshot(workflow.out).match()}
{ assert snapshot(
niftiMD5SUM(workflow.out.image_nlmeans.get(0).get(1)),
niftiMD5SUM(workflow.out.image_N4.get(0).get(1)),
niftiMD5SUM(workflow.out.image_resample.get(0).get(1)),
niftiMD5SUM(workflow.out.image_bet.get(0).get(1)),
niftiMD5SUM(workflow.out.mask_bet.get(0).get(1)),
file(workflow.out.crop_box.get(0).get(1)),
niftiMD5SUM(workflow.out.mask_final.get(0).get(1)),
niftiMD5SUM(workflow.out.t1_final.get(0).get(1)),
workflow.out.versions
).match()}
)
}
}
Expand Down Expand Up @@ -141,7 +151,17 @@ nextflow_workflow {
then {
assertAll(
{ assert workflow.success},
{ assert snapshot(workflow.out).match()}
{ assert snapshot(
niftiMD5SUM(workflow.out.image_nlmeans.get(0).get(1)),
niftiMD5SUM(workflow.out.image_N4.get(0).get(1)),
niftiMD5SUM(workflow.out.image_resample.get(0).get(1)),
niftiMD5SUM(workflow.out.image_bet.get(0).get(1)),
niftiMD5SUM(workflow.out.mask_bet.get(0).get(1)),
workflow.out.crop_box,
niftiMD5SUM(workflow.out.mask_final.get(0).get(1)),
niftiMD5SUM(workflow.out.t1_final.get(0).get(1)),
workflow.out.versions
).match()}
)
}
}
Expand Down Expand Up @@ -200,7 +220,17 @@ test("preproc_t1_surgery") {
then {
assertAll(
{ assert workflow.success},
{ assert snapshot(workflow.out).match()}
{ assert snapshot(
niftiMD5SUM(workflow.out.image_nlmeans.get(0).get(1)),
niftiMD5SUM(workflow.out.image_N4.get(0).get(1)),
niftiMD5SUM(workflow.out.image_resample.get(0).get(1)),
niftiMD5SUM(workflow.out.image_bet.get(0).get(1)),
niftiMD5SUM(workflow.out.mask_bet.get(0).get(1)),
file(workflow.out.crop_box.get(0).get(1)),
niftiMD5SUM(workflow.out.mask_final.get(0).get(1)),
niftiMD5SUM(workflow.out.t1_final.get(0).get(1)),
workflow.out.versions
).match()}
)
}
}
Expand Down
Loading

0 comments on commit 736caaf

Please sign in to comment.