Skip to main content
https://github.com/nipype/nipype2pydra/actions/workflows/tests.yml/badge.svg https://codecov.io/gh/nipype/nipype2pydra/branch/main/graph/badge.svg?token=UIS0OGPST7 Supported Python versions Latest Version

Nipype2Pydra is a command-line tool for semi-automatically porting command interfaces and workflows written from the Nipype workflow engine to its successor Pydra. It has been designed so that any required manual-specifications are stored in separate YAML specification files, which is read ahead of the conversion, so once designed the conversion can be re-run to pick up changes in newer versions of the Nipype code without having to redo the manual steps.

Basic Usage

To convert a Nipype interface to a Pydra task run the nipype2pydra task command and pass it the conversion specification YAML file and the root of the package to save the generated module, e.g.:

$ nipype2pydra task ants_registration_registration.yaml /path/to/package/root

This will create a module file under the package root directory based on the output_module field in the specification, e.g:

/path/to/package/root/output/module/path

If that is missing and the nipype interface is in the standard nipype.interfaces package, then it will be stored at pydra.tasks. with the same path end.

Conversion Specifications

While the conversions aim to as automatic as possible, there are structural differences between Nipype and Pydra that require manual specification, and it might be desirable to rename some of the inputs/outputs to more intuitive names. Such specifications are stored in YAML format, such as the ANTs registration conversion specification,

task_name: Registration
nipype_module: nipype.interfaces.ants.registration
output_requirements:
    output_warped_image: ["fixed_image", "moving_image", "output_transform_prefix"]
output_templates:
    output_warped_image: "{output_transform_prefix}warped"
doctest:
    fixed_image: test.nii.gz
    moving_image: test.nii.gz
    cmdline: >-
        antsRegistration --output [ output_, output_warped_image.nii.gz ]
        --metric Mattes[ test.nii, test.nii, 1, 32, Random, 0.05 ]
    tests_inputs: []
    tests_outputs:
    - AttributeError

Detailed description of the different options to go here

Installation

Nipype2Pydra can be installed for Python >= 3.7 from PyPI with

$ python3 -m pip install nipype2pydra

License

This work is licensed under a Creative Commons Attribution 4.0 International License

Creative Commons Attribution 4.0 International License

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nipype2pydra-0.1.tar.gz (13.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nipype2pydra-0.1-py3-none-any.whl (19.1 kB view details)

Uploaded Python 3

File details

Details for the file nipype2pydra-0.1.tar.gz.

File metadata

  • Download URL: nipype2pydra-0.1.tar.gz
  • Upload date:
  • Size: 13.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for nipype2pydra-0.1.tar.gz
Algorithm Hash digest
SHA256 6714c8844321cd6a048e02f605da1d78f0fbf23b2544b280ef8f4819147c1c7a
MD5 a9538ddf7e1092f6055e713c562f0dc2
BLAKE2b-256 0d3b699df5ac21f7ed788baf4d847cbb3aee23afbaec0660741243423a5994e5

See more details on using hashes here.

File details

Details for the file nipype2pydra-0.1-py3-none-any.whl.

File metadata

  • Download URL: nipype2pydra-0.1-py3-none-any.whl
  • Upload date:
  • Size: 19.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for nipype2pydra-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1d8152526914cd8ae653eb5b42625407dfc177d76efd5de72156e4f22db4de0a
MD5 56df7bc473b74cc6df9fb2c40554f464
BLAKE2b-256 fbc86debe6af5c9d6a3c7a380c44239afbd264d072c6c4deaaf5bd79e9597c75

See more details on using hashes here.

Release history Release notifications | RSS feed

0.5.0

2 files

0.4.4

2 files

0.4.3

2 files

0.4.2

2 files

0.4.1

2 files

0.4.0

2 files

0.3.5

2 files

0.3.4

2 files

0.3.3

2 files

0.3.2

2 files

0.2.2

2 files

0.2.1

2 files

0.2

2 files

This release

0.1 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page