Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

init_3dQwarp_wf expects input that is missing from inputnode #441

Open
psadil opened this issue May 23, 2024 · 3 comments · May be fixed by #454
Open

init_3dQwarp_wf expects input that is missing from inputnode #441

psadil opened this issue May 23, 2024 · 3 comments · May be fixed by #454
Labels
bug Something isn't working

Comments

@psadil
Copy link
Contributor

psadil commented May 23, 2024

What happened?

I was attempting to configure a workflow with init_3dQwarp_wf but was unable to get it to run. As I understand it, this may be an issue with the workflow expecting inputnode to provide in_reference

(inputnode, unwarp_reference, [("in_reference", "reference_image"),
("in_reference", "input_image")]),

but also that inputnode is not looking for in_reference

inputnode = pe.Node(
niu.IdentityInterface(fields=["in_data", "metadata"]), name="inputnode"
)

What command did you use?

from pathlib import Path

from sdcflows.workflows.fit import pepolar

afni_wf = pepolar.init_3dQwarp_wf(omp_nthreads=1, name="qwarp")
afni_wf.base_dir = Path.cwd()
afni_wf.inputs.inputnode.in_data = [
    "sub-travel2_dir-AP_epi.nii.gz",
    "sub-travel2_dir-PA_epi.nii.gz",
]

afni_wf.inputs.inputnode.metadata = [
    {"PhaseEncodingDirection": "j-"},
    {"PhaseEncodingDirection": "j"},
]

afni_wf.run()

# now try adding in_reference
afni_wf.inputs.inputnode.in_reference = "sub-travel2_dir-AP_epi.nii.gz"

What version of the software are you running?

2.8.1

How are you running this software?

Local installation ("bare-metal")

Is your data BIDS valid?

Yes

Are you reusing any previously computed results?

No

Please copy and paste any relevant log output.

First attempt at running

AttributeError: 'DynamicTraitedSpec' object has no attribute 'in_reference'

Attempt at adding in_reference

AttributeError: 'NoneType' object has no attribute 'set_input'


### Additional information / screenshots

_No response_
@psadil psadil added the bug Something isn't working label May 23, 2024
@effigies
Copy link
Member

Looks like that's been there since the beginning: 368bbc0

So this is an untested workflow. I guess I would just add in_reference to the inputnode and pass an appropriate reference. I'm not sure which direction is assumed to be the reference, but you could probably guess and check.

@psadil
Copy link
Contributor Author

psadil commented May 23, 2024

I'm a bit confused; is this workflow aiming to unwarp one of the elements of in_data or some other epi that is referred to by in_reference? It looks like it's designed to treat as a reference whichever file is first in in_data, based on this sort_pe node, but I'm not sure whether that's the one that should be unwarped.

FWIW, this is a version of the 3dqwarp workflow back when it was used by fmriprep

@psadil
Copy link
Contributor Author

psadil commented Jun 22, 2024

Aim is to have init_3dQwarp_wf outputs match the outputs from init_topup_wf

@psadil psadil linked a pull request Jul 7, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants