generated from nipype/pydra-tasks-template
-
Notifications
You must be signed in to change notification settings - Fork 8
YML File Usage
Yibei Chen edited this page Jul 26, 2022
·
4 revisions
Example 1:
ConvertXFM:
output_requirements:
out_file: [in_file]
output_templates:
out_file: [ConvertXFM_output]
doctest:
in_file: flirt.mat
invert_xfm: True
out_file: flirt_inv.mat
cmdline: convert_xfm -omat flirt_inv.mat -inverse flirt.mat
tests_inputs:
- in_file: flirt.mat
invert_xfm: True
tests_outputs:
- out_file
Example 2
GLM:
output_requirements:
out_file: [in_file]
output_callables:
output_templates:
out_file: "{in_file}_glm"
inputs_drop:
doctest:
in_file: test.nii.gz
design: confounds_regressors.tsv
cmdline: fsl_glm -i test.nii.gz -d confounds_regressors.tsv -o test_glm.nii.gz
tests_inputs:
- in_file: test.nii.gz
design: confounds_regressors.tsv
tests_outputs:
- out_file
output_requirements
- all outputs need to be listed here, even if you are not sure about their requirements. The
converter.py
needs the name here to generateoutput_fields
output_templates vs. output_callables
- if the output field has its input counterpart, use
output_templates
. For example, FSL sometimes requires out_file names in the input field. Otherwise, useoutput_callables
. -
output_templates
can be a function or a string;output_callables
can only be a function. -
output_templates
will use the same file extension and file path as the default setting;output_callables
can allow you to change file extension and requires absolute file path specified. -
output_templates
requires the field asstr
;output_callables
requires the field asFile
,MultiOutputFile
, orMultiOutputObj
soon)