Implementation of antsRegistration_affine_SyN.sh for registration - #282
Implementation of antsRegistration_affine_SyN.sh for registration#282gdevenyi wants to merge 7 commits into
Conversation
390c9c1 to
a90da89
Compare
|
Minimal work is required so the module fits with the Once done, most linting and testing should work out the box. But nf-test expects some naming/formatting, that sadly isn't targetted when nf-core conventions are not abided to. |
2878c25 to
ae312c2
Compare
|
@AlexVCaron I can't sort out how to run the test properly inside the devcontainer, what's the appropriate command? |
ae312c2 to
b91bb4a
Compare
|
I run the test suite for any component from the root of the repo via : In this case, the path is For the lint, it is done via the Tell me of any problems, I can pull your PR and help debug ! |
|
Right. OK. It seems like the devcontainer doesn't have the antsRegistration_affine_SyN.sh that I got merged into the main repo... |
|
I'll get into that this w-e. It should've been included in the build, I'll investigate |
|
As stated on scilus/containers-scilus#42, |
0932c5d to
a7e2ecb
Compare
4db49ca to
b09a2af
Compare
|
@gdevenyi container is updated, we still have some issues with our servers I'll let you know asap when ready. |
No problem my local testbed works. |
e9318a2 to
191152d
Compare
|
Depends on scilus/containers-scilus#45, also need to update the container reference once its released |
Merged and scilus/scilus:dev is updated |
|
This all works, I guess the only thing now is this should be pinned to an official scilus container version instead of dev |
|
I'm not sure there will be a release with a new version soon, right @arnaudbore ? In the meantime, you could pin it to the image SHA. |
Sure. |
3ec0077 to
cb0a599
Compare
|
The masking implementation here depends on #369, if that's changed this should be as well |
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds a new registration/cobralab_ants Nextflow module to nf-neuro, including module metadata and an nf-test suite covering default, “quick”, “no warp”, and stub modes.
Changes:
- Introduces the
REGISTRATION_COBRALABANTSprocess implementation and module metadata. - Adds
nf-testcoverage and snapshots for multiple registration configurations. - Adds test tagging and per-test Nextflow config overrides.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| modules/nf-neuro/registration/cobralab_ants/main.nf | Adds the REGISTRATION_COBRALABANTS process implementation, including optional QC generation and stub behavior. |
| modules/nf-neuro/registration/cobralab_ants/meta.yml | Documents module inputs/outputs/tools and parameters used by the process. |
| modules/nf-neuro/registration/cobralab_ants/environment.yml | Adds module conda environment placeholder for linting/metadata consistency. |
| modules/nf-neuro/registration/cobralab_ants/tests/main.nf.test | Adds nf-test cases for default, quick, no-warp, and stub runs. |
| modules/nf-neuro/registration/cobralab_ants/tests/main.nf.test.snap | Adds snapshots asserting expected emitted outputs/hashes for each test. |
| modules/nf-neuro/registration/cobralab_ants/tests/nextflow.config | Test config enabling reproducibility + single-thread mode. |
| modules/nf-neuro/registration/cobralab_ants/tests/nextflow_quick.config | Test config enabling fast mode + QC + single-thread mode. |
| modules/nf-neuro/registration/cobralab_ants/tests/nextflow_no_warp.config | Test config enabling fast + linear-only (no nonlinear warp) + single-thread mode. |
| modules/nf-neuro/registration/cobralab_ants/tests/tags.yml | Adds tags mapping to allow selective test execution by module path. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@gdevenyi scilus/scilus:2.3.0 is ready 👍 |
|
Cool. Still pending confirmation of the masking implementation in #369 |
cb0a599 to
235e030
Compare
|
Re: "Still pending confirmation of the masking implementation in #369" — I have just reviewed and tested #369 in depth (review), so here is the confirmation, plus what it means for this module. Scope note: I looked at this PR for its integration surface with #369, not as a full standalone review. The good news for this moduleYour Non-fatal, rc=0, so CI stays green while nothing is masked. Confirmed against ANTs 2.6.5, and confirmed by #369's own snapshot: its Separate flags sidestep that entirely. Two related findings worth having:
What is still unsettled, and why it blocks youThe
My recommendation, and what it would mean hereI have suggested #369 keep the If that lands, the change here is a deletion — drop the if ( fixed_mask ) args += " --fixed-mask $fixed_mask"
if ( moving_mask ) args += " --moving-mask $moving_mask"If instead the module-level enum stays, this module is already correct in shape; it just needs Either way it is worth settling before both merge, because Two other integration items
Otherwise this is a drop-in for the ANTs branch: every channel the subworkflow consumes is present with matching globs, and computing |
Split single mask input into separate fixed_mask and moving_mask inputs, matching the pattern from PR nf-neuro#367 for the ants registration module. antsRegistration_affine_SyN.sh supports --fixed-mask and --moving-mask as independent flags.
…hread support - Forward --reproducibility and --random-seed CLI flags to antsRegistration_affine_SyN.sh (CoBrALab PR nf-neuro#7) - Export ANTS_RANDOM_SEED env var (default 1234) for ancillary ANTs tools - Replace hardcoded thread counts with task.ext.single_thread-aware expressions for ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS and OMP_NUM_THREADS - Remove OPENBLAS_NUM_THREADS (set globally in test config) - Add reproducibility, ants_rng_seed, single_thread args to meta.yml Mirrors the pattern already applied to registration/ants (nf-neuro PR nf-neuro#342).
Align cobralab_ants with the registration subworkflow masking rework (PR nf-neuro#369): gate fixed/moving mask forwarding behind masking_strategy (none/apriori/internal/both), add fixed_warped output (reference warped to moving space via antsApplyTransforms), and update tests accordingly.
…ames
Address Copilot review: parse moving/fixed IDs extension-agnostically
(.nii and .nii.gz) and strip by ${prefix} instead of ${meta.id}; use a
concrete viz output filename instead of a glob. Matches the registration/ants
reference module.
Conformance fixes found while reviewing this module against the canonical registration/ants module and the registration subworkflow contract: - Add ext.suffix support (declared "obligatory" by registration/ants) instead of hardcoding _warped, in both script and stub. - Rename QC output to *_registration_cobralabants_mqc.gif. It previously used registration/ants' exact filename, which would make the two indistinguishable in a MultiQC report once both are selectable registration backends. - Declare choices: on masking_strategy, matching registration/ants and registration/anattodwi. - Quote bracketed antsApplyTransforms arguments. Nextflow emits the script as bash source, so an unquoted [file,1] is a valid pathname glob and expands if any single-character filename is present in the work directory. - Derive moving_id in the stub instead of hardcoding "t1", matching the script and registration/ants. - Drop a stray indent on the output0GenericAffine.mat rename. Snapshots re-recorded: the only content change is the QC filename; every md5 is unchanged, including across two independent runs. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KaGdNMxpjiMAicdMN5ewtY
587282e to
b28dc8f
Compare
|
Rebased onto Fixes (
|
Describe your changes
Implement the CoBrALab variant of antsRegistrationSyN.sh with optimized pyramids.
List test packages used by your module
Checklist before requesting a review
./modules/nf-neuro/<category>/<tool>/main.nf./modules/nf-neuro/<category>/<tool>/meta.yml./modules/nf-neuro/<category>/<tool>/environment.yml./modules/nf-neuro/<category>/<tool>/tests/main.nf.testmain.nf.test.snapsnapshotsprettierandeditorconfig-checkerto fix common syntax issuesnf-core modules lintand fix all errors