Skip to content

Pydeface module#373

Open
loboehme1 wants to merge 3 commits into
nf-neuro:mainfrom
loboehme1:pydeface
Open

Pydeface module#373
loboehme1 wants to merge 3 commits into
nf-neuro:mainfrom
loboehme1:pydeface

Conversation

@loboehme1

Copy link
Copy Markdown

Describe your changes

This PR adds a new PYDEFACE module under modules/nf-neuro/anonymization/pydeface.
The module runs PyDeface on anatomical MRI NIfTI files to remove facial structures for anonymization.
It takes a tuple containing sample metadata and an input NIfTI image, creates a BIDS-like output path using subject and session metadata, and emits the defaced NIfTI image, log files, and software version information.

List test packages used by your module

The module test uses the nf-neuro LOAD_TEST_DATA subworkflow to provide a test T1w NIfTI image.
Test data/package used: T1w.zip

The test checks that:

  • The PYDEFACE process completes successfully
  • One defaced NIfTI file is produced
  • Output logs are created
  • The output filename matches the expected *_defaced.nii.gz pattern
  • Output files exist and are non-empty

Checklist before requesting a review

  • Create the tool:
    • Edit ./modules/nf-neuro/<category>/<tool>/main.nf
    • Edit ./modules/nf-neuro/<category>/<tool>/meta.yml
    • Edit ./modules/nf-neuro/<category>/<tool>/environment.yml --> we use the PyDeface container directly
  • Generate the tests:
    • Edit ./modules/nf-neuro/<category>/<tool>/tests/main.nf.test
    • Run the tests to generate the main.nf.test.snap snapshots
  • Ensure the syntax is correct :
    • Run prettier and editorconfig-checker to fix common syntax issues
    • Run nf-core modules lint and fix all errors --> there are still a few errors and warnings
    • Ensure your variables have good, clear names

@loboehme1 loboehme1 requested a review from a team June 24, 2026 00:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant