Skip to content

EpiReg with 'wmseg' input throws TraitError: Output 'seg' does not exist #3264

@oliver-contier

Description

@oliver-contier

Summary

Actual behavior

Passing a white matter segmentation with the 'wmseg' input to a Node using the EpiReg interface raises the following Error:

TraitError: The 'seg' trait of an EpiRegOutputSpec instance must be a pathlike object or string representing an existing file but a value of "/Users/olivercontier/bigfri/scratch/preproc_bbr_workdir/sub-01/sub_wf/ses_wf/_ses_i_0/bbr/epi2struct_fast_seg.nii.gz" <class 'str'> was specified.

Expected behavior

FSL's epi_reg script does not perform segmentation when a white matter segmented file is already provided. Hence, the interface should not check whether the 'seg' output exists in that case.

I think this should be fixable by changing the behavior of _list_outputs() method of the EpiReg class.

How to replicate the behavior

I tried to provide more details in my post on neurostars.

Platform details:

{'commit_hash': '07af08f98',
 'commit_source': 'repository',
 'networkx_version': '2.4',
 'nibabel_version': '3.1.1',
 'nipype_version': '1.6.0-dev+g07af08f98',
 'numpy_version': '1.18.5',
 'pkg_path': '/Users/olivercontier/bigfri/scratch/bids/code/sandbox/nipype_epireg/nipype/nipype',
 'scipy_version': '1.5.2',
 'sys_executable': '/opt/anaconda3/envs/bigfri/bin/python',
 'sys_platform': 'darwin',
 'sys_version': '3.8.5 | packaged by conda-forge | (default, Aug 20 2020, '
                '20:51:28) \n'
                '[Clang 10.0.1 ]',
 'traits_version': '6.1.0'}

Execution environment

My python environment outside container

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions