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

#45 - MRtrix module - betcrop/betantsbet #71

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
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
6 changes: 2 additions & 4 deletions modules/nf-neuro/betcrop/antsbet/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ process BETCROP_ANTSBET {
-e $template -m $tissues_probabilities ${args.join(' ')}
scil_volume_math.py convert bet/BrainExtractionMask.nii.gz \
${prefix}__t1_bet_mask.nii.gz --data_type uint8
mrcalc $t1 ${prefix}__t1_bet_mask.nii.gz -mult ${prefix}__t1_bet.nii.gz -nthreads $task.cpus
scil_volume_math.py multiplication $t1 ${prefix}__t1_bet_mask.nii.gz \
${prefix}__t1_bet.nii.gz --data_type float32

cat <<-END_VERSIONS > versions.yml
"${task.process}":
scilpy: \$(pip list | grep scilpy | tr -s ' ' | cut -d' ' -f2)
mrtrix: \$(mrcalc -version 2>&1 | sed -n 's/== mrcalc \\([0-9.]\\+\\).*/\\1/p')
ants: \$(antsRegistration --version | grep "Version" | sed -E 's/.*v([0-9]+\\+\\).*/\\1/')
END_VERSIONS
"""
Expand All @@ -51,15 +51,13 @@ process BETCROP_ANTSBET {
"""
antsBrainExtraction.sh -h
scil_volume_math.py -h
mrcalc -h

touch ${prefix}__t1_bet.nii.gz
touch ${prefix}__t1_bet_mask.nii.gz

cat <<-END_VERSIONS > versions.yml
"${task.process}":
scilpy: \$(pip list | grep scilpy | tr -s ' ' | cut -d' ' -f2)
mrtrix: \$(mrcalc -version 2>&1 | sed -n 's/== mrcalc \\([0-9.]\\+\\).*/\\1/p')
ants: \$(antsRegistration --version | grep "Version" | sed -E 's/.*v([0-9]+\\+\\).*/\\1/')
END_VERSIONS
"""
Expand Down
3 changes: 0 additions & 3 deletions modules/nf-neuro/betcrop/antsbet/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ tools:
- "scilpy":
description: "The Sherbrooke Connectivity Imaging Lab (SCIL) Python dMRI processing toolbox."
homepage: "https://github.com/scilus/scilpy.git"
- "MRtrix3":
description: "Toolbox for image processing, analysis and visualisation of dMRI."
homepage: "https://mrtrix.readthedocs.io/en/latest/"
- "ants":
description: "Advanced Normalization Tools."
homepage: "https://github.com/ANTsX/ANTs"
Expand Down
12 changes: 6 additions & 6 deletions modules/nf-neuro/betcrop/antsbet/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{
"id": "test"
},
"test__t1_bet.nii.gz:md5,bd666c4ce559eab93690131f8b2a9101"
"test__t1_bet.nii.gz:md5,4fc936b6eeb1396e2537c2ec401d89ff"
]
],
"1": [
Expand All @@ -19,7 +19,7 @@
]
],
"2": [
"versions.yml:md5,9fde1445bc10857db69e440781e58cb7"
"versions.yml:md5,bb378e913d4002d0b644d3277892ae20"
],
"mask": [
[
Expand All @@ -34,18 +34,18 @@
{
"id": "test"
},
"test__t1_bet.nii.gz:md5,bd666c4ce559eab93690131f8b2a9101"
"test__t1_bet.nii.gz:md5,4fc936b6eeb1396e2537c2ec401d89ff"
]
],
"versions": [
"versions.yml:md5,9fde1445bc10857db69e440781e58cb7"
"versions.yml:md5,bb378e913d4002d0b644d3277892ae20"
]
}
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.04.4"
"nextflow": "24.10.0"
},
"timestamp": "2024-10-30T17:42:18.337235926"
"timestamp": "2024-12-12T15:46:45.836683711"
}
}
8 changes: 4 additions & 4 deletions subworkflows/nf-neuro/preproc_t1/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,18 @@
"test_cropped.nii.gz",
"test_t1_cropped.nii.gz",
[
"versions.yml:md5,19aaa24cf046e49a4ad4ce5d507ea8aa",
"versions.yml:md5,37229cd5cee6f6788fbc9083d6618c61",
"versions.yml:md5,657fbb224f260392e573b8511c4b798d",
"versions.yml:md5,b979132991d8f72a3585465533bd5730",
"versions.yml:md5,bdd934b4b8456060c36d6d97e4f30740",
"versions.yml:md5,da278daafbe3afa8454021e2716dd205",
"versions.yml:md5,ea32c30f5320f720b2f5dc32ac2535ea"
]
],
"meta": {
"nf-test": "0.9.2",
"nextflow": "24.04.3"
"nf-test": "0.9.0",
"nextflow": "24.10.0"
},
"timestamp": "2024-12-04T10:38:12.185789"
"timestamp": "2024-12-12T15:50:29.838128539"
}
}
Loading