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

fieldmap for BOLD file not found even though it is present #73

Open
rmldj opened this issue Jan 14, 2022 · 4 comments
Open

fieldmap for BOLD file not found even though it is present #73

rmldj opened this issue Jan 14, 2022 · 4 comments

Comments

@rmldj
Copy link

rmldj commented Jan 14, 2022

Hello,

I posted this on the hcp-users group but it seems to be more specific to the BIDS app:

I am trying to run the HCPPipelines BIDS app on a sample subject from my colleague's data. After the PostFreeSurferPipeline is completed, I get the error:

  File "/run.py", line 435, in <module>
    f"No fieldmaps found for BOLD {fmritcs}. Consider --procesing_mode [legacy | auto ]."
AssertionError: No fieldmaps found for BOLD /bids_dataset/sub-121c/func/sub-121c_task-rest_bold.nii.gz. Consider --procesing_mode [legacy | auto ].

However in the subdirectory sub-121c/fmap, I have the following files:

sub-121c_dir-PA_epi.json    sub-121c_magnitude2.json
sub-121c_dir-PA_epi.nii.gz  sub-121c_magnitude2.nii.gz
sub-121c_magnitude1.json    sub-121c_phasediff.json
sub-121c_magnitude1.nii.gz  sub-121c_phasediff.nii.gz

In the sub-121c_dir-PA_epi.json there is the line

    "IntendedFor": "func/sub-121c_task-rest_bold.nii.gz"

and the corresponding sub-121c_dir-PA_epi.nii.gz is present.

The BIDS validator correctly identifies the corresponding BOLD map func/sub-121c_task-rest_bold.nii.gz - I checked this by modifying the IntendedFor field. However the pipeline script somehow does not locate the fieldmap sub-121c_dir-PA_epi.nii.gz...
I would be grateful for any help..
Romuald

@rmldj
Copy link
Author

rmldj commented Jan 14, 2022

Btw. I pulled the latest version from docker hub yesterday - so this should be v4.3.0-3

@rmldj
Copy link
Author

rmldj commented Jan 14, 2022

I did some sleuthing on the command line using BIDSLayout.
It seems that the problem is in https://github.com/BIDS-Apps/HCPPipelines/blob/master/run.py#L416
The fieldmap_set that I get is

[{'epi': '/opt/romuald/SR/fMRI_data/sub-121c/fmap/sub-121c_dir-PA_epi.nii.gz', 'suffix': 'epi'}, {'phasediff': '/opt/romuald/SR/fMRI_data/sub-121c/fmap/sub-121c_phasediff.nii.gz', 'magnitude1': '/opt/romuald/SR/fMRI_data/sub-121c/fmap/sub-121c_magnitude1.nii.gz', 'suffix': 'phasediff', 'magnitude2': '/opt/romuald/SR/fMRI_data/sub-121c/fmap/sub-121c_magnitude2.nii.gz'}]

hence the following condition fails:

all(item["suffix"] == "epi" for item in fieldmap_set)

However, if I would erase the phasediff and magnitude files it would still not work as it would fail the condition

len(fieldmap_set) == 2

So it seems that the code expects two have two epi fieldmaps, while I have only one?
Is it true? Does that mean that the data is incomplete and I should be using auto processing mode here? (I have a T2w image)

@rhancockn
Copy link
Collaborator

rhancockn commented Jan 14, 2022 via email

@rmldj
Copy link
Author

rmldj commented Jan 14, 2022

Thanks! I will ask for the AP file.
But apparently the legacy method has The following LegacyStyleData settings were requested: --dcmethod=NONE
So the HCPPipeline does not do any distortion correction - the phase/magnitude data would be used with the option https://github.com/Washington-University/HCPpipelines/blob/master/fMRIVolume/GenericfMRIVolumeProcessingPipeline.sh#L76
so this need some setup from inside the BIDS app?

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

No branches or pull requests

2 participants