hcp2bids icon indicating copy to clipboard operation
hcp2bids copied to clipboard

Incorrect phase encode direction in JSON?

Open mangstad opened this issue 1 year ago • 6 comments

https://github.com/suyashdb/hcp2bids/blob/1009641fa5f216c9d901efcadb555e1cb1e5398b/hcp2bids/main.py#L588

So at this point, it's creating the generic task JSON files, and it says if direction is LR then phase encode is i and if it's RL it's i-. However, everywhere else earlier in the script for DWI and fieldmap data, it indicates if it's LR it's i- and if it's RL it's i. I used this to convert some HCP data to BIDS and run fMRIprep, and in fact it does appear from my output images as if the fieldmap correction was applied in the wrong direction. I'm re-running right now with the i/i- flipped on the functional images to see if that resolves it, but I expect it to.

mangstad avatar Apr 26 '23 20:04 mangstad

Hi @mangstad, I came across your issue as I am also intending to run fMRIPrep on HCP(-EP) data. I wondered if flipping the phase encoding direction as you suggested resolved the issue? Thank you very much, Natasha

clarkenj avatar Aug 25 '23 13:08 clarkenj

Yes, flipping the direction resulted in the outputs looking much better.

mangstad avatar Aug 26 '23 01:08 mangstad

Great, thank you!

clarkenj avatar Aug 26 '23 14:08 clarkenj

Hello @mangstad, Thanks for pointing out this issue. So the way to solve this problem is to set the "PhaseEncodingDirection" to i for LR and to -i for RL, or just set "PhaseEncodingDirection" consistently across the script (regardless i for LR or -i for LR) is fine?

I have another question hope you could kindly answer. Running fmriprep requires the "dataset_description.json" file, how do you manage the get this issue solved? Many thanks!

DAI-Sicheng avatar Mar 28 '24 16:03 DAI-Sicheng

@DAI-Sicheng you do need to set the phase encode direction correctly, not just consistently. Setting it incorrectly will result in the correction being applied incorrectly and will give you distorted data.

For the dataset description file, you just need to create one. The required things in that file don't actually impact the processing in any way, so you just need to create a file that passes the BIDS checks. Info on that file can be found here: https://bids-specification.readthedocs.io/en/stable/modality-agnostic-files.html

mangstad avatar Apr 02 '24 16:04 mangstad

@mangstad Your reply helps a lot, thank you so much!

DAI-Sicheng avatar Apr 05 '24 09:04 DAI-Sicheng