fMRIprep + HCP Data: Fieldmap correction looks inverted?

Hello fMRIprep gurus!

I have been trying to process HCP data using fMRIprep version 20.2.3

My current BIDS folder structure looks something like this:

sub-100307/anat:
sub-100307_run-01_T1w.nii.gz  sub-100307_run-01_T2w.nii.gz

sub-100307/dwi:
sub-100307_acq-dir95lr_dwi.bval      sub-100307_acq-dir95rl_dwi.bval      sub-100307_acq-dir96lr_dwi.bval      sub-100307_acq-dir96rl_dwi.bval      sub-100307_acq-dir97lr_dwi.bval      sub-100307_acq-dir97rl_dwi.bval
sub-100307_acq-dir95lr_dwi.bvec      sub-100307_acq-dir95rl_dwi.bvec      sub-100307_acq-dir96lr_dwi.bvec      sub-100307_acq-dir96rl_dwi.bvec      sub-100307_acq-dir97lr_dwi.bvec      sub-100307_acq-dir97rl_dwi.bvec
sub-100307_acq-dir95lr_dwi.json      sub-100307_acq-dir95rl_dwi.json      sub-100307_acq-dir96lr_dwi.json      sub-100307_acq-dir96rl_dwi.json      sub-100307_acq-dir97lr_dwi.json      sub-100307_acq-dir97rl_dwi.json
sub-100307_acq-dir95lr_dwi.nii.gz    sub-100307_acq-dir95rl_dwi.nii.gz    sub-100307_acq-dir96lr_dwi.nii.gz    sub-100307_acq-dir96rl_dwi.nii.gz    sub-100307_acq-dir97lr_dwi.nii.gz    sub-100307_acq-dir97rl_dwi.nii.gz
sub-100307_acq-dir95lr_sbref.json    sub-100307_acq-dir95rl_sbref.json    sub-100307_acq-dir96lr_sbref.json    sub-100307_acq-dir96rl_sbref.json    sub-100307_acq-dir97lr_sbref.json    sub-100307_acq-dir97rl_sbref.json
sub-100307_acq-dir95lr_sbref.nii.gz  sub-100307_acq-dir95rl_sbref.nii.gz  sub-100307_acq-dir96lr_sbref.nii.gz  sub-100307_acq-dir96rl_sbref.nii.gz  sub-100307_acq-dir97lr_sbref.nii.gz  sub-100307_acq-dir97rl_sbref.nii.gz

sub-100307/fmap:
sub-100307_dir-1_epi.json    sub-100307_dir-3_epi.json    sub-100307_dir-5_epi.json    sub-100307_dir-7_epi.json    sub-100307_run-01_magnitude1.nii.gz  sub-100307_run-01_phasediff.nii.gz   sub-100307_run-02_phasediff.json
sub-100307_dir-1_epi.nii.gz  sub-100307_dir-3_epi.nii.gz  sub-100307_dir-5_epi.nii.gz  sub-100307_dir-7_epi.nii.gz  sub-100307_run-01_magnitude2.nii.gz  sub-100307_run-02_magnitude1.nii.gz  sub-100307_run-02_phasediff.nii.gz
sub-100307_dir-2_epi.json    sub-100307_dir-4_epi.json    sub-100307_dir-6_epi.json    sub-100307_dir-8_epi.json    sub-100307_run-01_magnitude.nii.gz   sub-100307_run-02_magnitude2.nii.gz
sub-100307_dir-2_epi.nii.gz  sub-100307_dir-4_epi.nii.gz  sub-100307_dir-6_epi.nii.gz  sub-100307_dir-8_epi.nii.gz  sub-100307_run-01_phasediff.json     sub-100307_run-02_magnitude.nii.gz

sub-100307/func:
sub-100307_task-REST_acq-LR_run-01_bold.nii.gz   sub-100307_task-REST_acq-LR_run-02_bold.nii.gz   sub-100307_task-REST_acq-RL_run-01_bold.nii.gz   sub-100307_task-REST_acq-RL_run-02_bold.nii.gz   sub-100307_task-REST_run-01_sbref.nii.gz
sub-100307_task-REST_acq-LR_run-01_sbref.nii.gz  sub-100307_task-REST_acq-LR_run-02_sbref.nii.gz  sub-100307_task-REST_acq-RL_run-01_sbref.nii.gz  sub-100307_task-REST_acq-RL_run-02_sbref.nii.gz  sub-100307_task-REST_run-02_sbref.nii.gz

and I have the following .json files on the BIDS parent directory:

task-REST_acq-LR_sbref.json/task-REST_acq-LR_bold.json:
{
    "RepetitionTime": 0.72,
    "EchoTime": 0.0331,
    "EffectiveEchoSpacing": 0.00058,
    "MagneticFieldStrength": 3.0,
    "Manufacturer": "Siemens",
    "ManufacturerModelName": "Skyra",
    "PhaseEncodingDirection": "i",
    "TaskName": "REST"
}
task-REST_acq-RL_sbref.json/task-REST_acq-LR_sbref.json:
{
    "RepetitionTime": 0.72,
    "EchoTime": 0.0331,
    "EffectiveEchoSpacing": 0.00058,
    "MagneticFieldStrength": 3.0,
    "Manufacturer": "Siemens",
    "ManufacturerModelName": "Skyra",
    "PhaseEncodingDirection": "i-",
    "TaskName": "REST"
}

Now, to me the PE directions for these json files appear to be correct. However, the PEB/PEPOLAR SDC seems to be pushing the distortion to the other direction

My question is:

  • Is my json for sbref and bold correct? A LR PE acquisition should be represented by a PED=“i”? Or is that incorrect and it is therefore causing a correction to go in the opposite direction?

  • There are phase and magnitude images in the fmap folder, but I currently have them as intended for the T1w and T2w acquisitions, not the bold acquisitions. Is it possible to use these for SDC?

Sorry, because I am a new user I am not able to embed images on my post. See below for example of the SDC shift in the other direction:

It is particularly obvious at axial slices z=7 and z=11

Hi @allucas, and welcome to neurostars!

It would help to know, how did you convert HCP to BIDS? Also, why not just use the already pre-processed data?

Best,
Steven

Does this persist in either 20.2.7 or 23.0.2? Those are the two versions still supported.

Thank you @Steven, I used this GitHub - suyashdb/hcp2bids: To convert Human Connectome projects(HCP) data to BIDS std and a combination of personal scripts.

I am trying to get HCP and my own data processed the exact same way to reduce batch effects as much as possible. Also, I believe the processed HCP data is mostly in surface/CIFTI format, unless I am missing some release

I am not sure, but I will try 23.0.2 and report back.

Hi @allucas,

HCP includes volumetric data, e.g., /HCP1200/100206/MNINonLinear/Results/rfMRI_REST1_LR/rfMRI_REST1_LR.nii.gz

Best,
Steven

Thank you so much Steven. I looked there and saw the processed volumetric files. I am specifically interested in having a 24 parameter regression post-processing without GSR and maintaining WM signals. In your expertise, is it possible to achieve this with the files within
/HCP1200/100206/MNINonLinear/Results/rfMRI_REST1_LR/?

I know for a fact I can successfully do this with fMRIprep outputs which motivates my original question, but if this is possible given the data available in that folder, I might not have to run fMRIprep

Yes, in the same folder you can use the Movement_Regressors.txt file, which has the following columns: mmx mmy mmz degx degy degz dmmx dmmx dmmz ddegx ddegy ddegz (where the
extra d in the front means derivative). You can import this into something like nilearn, add columns for the squared terms, and do regression like that. The _dt file is the same but linearly detrended and demeaned.

Best,
Steven

@effigies I am looking at the Dockerhub versions and neither of those two versions seem to be available (Docker) should I be getting my Docker versions from someplace else?

fMRIPrep containers are here (nipreps/fmriprep): Docker

@Steven, thank you so much! Will try both of your suggestions!

Based on this conversation on the hcp2bids GitHub it looks like LR should be “i-” and RL should be “i”.