bidskit
bidskit copied to clipboard
Second pass error
Hi, I am new to resting state fMRI. First of all, thank you for this, it certainly is a useful tool. I am working with an online dataset PPMI from multiple sites. I have 2 questions: 1.) in the PPMI manual it says: Please note: Two Axial Resting State fMRI (BOLD) sequences must be acquired. The initial sequence (Phase encoding direction R>L), and a repeat sequence (Phase encoding direction L>R) to correct for distortion. Does this means the second sequence should be in the fmap BIDS directory? 2.) The first pass conversion works fine, however for the second pass I am facing some issues (please see below).
Processing subject 100898
Working subject directory : /Users/hamzah/Desktop/PPMI_rsfMRI_GI/00_rsfMRI_RL/work/sub-100898
BIDS subject directory : /Users/hamzah/Desktop/PPMI_rsfMRI_GI/00_rsfMRI_RL/sub-100898
Organizing SAG_3D_T1_FSPGR
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.10/bin/bidskit", line 8, in
Thank you very much in advance! Hamzah
The Protocol_Translator.json looks something like this:
{
"3D_T1__weighted":[
"anat",
"T1w",
"UNASSIGNED"
],
"rsfMRI_L_R":[
"fmap",
"acq-rest",
["task-rest_bold"]
],
"rsfMRI_RL":[
"func",
"task-rest_bold",
"UNASSIGNED"
]
}
Am I doing something wrong?
Cheers, Hamzah
Hi @hbaagil Looks like are a couple of things going on with the protocol translator setup, but first things first, which version of bidskit and dcm2niix are you using? Let me know - later versions may fix your SerDesc error.
For the RL and LR encoded rs-fMRI runs, I'd put both of them in the func folder and add dir-RL and dir-LR to the BIDS file stubs in the Protocol_Translator.json, so something like this:
{
"3D_T1__weighted":[
"anat",
"T1w",
"UNASSIGNED"
],
"rsfMRI_L_R":[
"func",
"task-rest_dir-LR_bold",
"UNASSIGNED"
],
"rsfMRI_RL":[
"func",
"task-rest_dir-RL_bold",
"UNASSIGNED"
],
}
Quick note: you won't get great results using T2*-weighted EPI with phase encoding reversal (RL and LR) for susceptibility distortion correction (SDC). Does the PPMI project acquire SE-EPI, DW-EPI or multiecho GRE fieldmap data as part of its protocol?. If so you could estimate distortion corrections for the T2*-EPI from the DW-EPI data if its acquired with phase encoding reversal. If PPMI has a recommended preprocessing pipeline, definitely use that.
Hi @jmtyszka, thank you for your quick response. I am using: BIDSKIT 2022.8.26 dcm2niiX version v1.0.20220720
The PPMI database also acquire DW-EPI. Unfortunately, there is no recommended preprocessing pipeline from PPMI.
Cheers!
@jmtyszka I did as you suggested, but now I get this error message from the [email protected]
(node:1642) Warning: Closing directory handle on garbage collection
(Use node --trace-warnings ...
to show where the warning was created)
1: [ERR] You have to define 'TaskName' for this file. (code: 50 - TASK_NAME_MUST_DEFINE)
./sub-100878/func/sub-100878_task-rest_dir-LR_bold.nii.gz
./sub-100878/func/sub-100878_task-rest_dir-RL_bold.nii.gz
./sub-101124/func/sub-101124_task-rest_dir-LR_bold.nii.gz
./sub-101124/func/sub-101124_task-rest_dir-RL_bold.nii.gz
./sub-101175/func/sub-101175_task-rest_dir-LR_bold.nii.gz
./sub-101175/func/sub-101175_task-rest_dir-RL_bold.nii.gz
./sub-101179/func/sub-101179_task-rest_dir-LR_bold.nii.gz
./sub-101179/func/sub-101179_task-rest_dir-RL_bold.nii.gz
./sub-101492/func/sub-101492_task-rest_dir-LR_bold.nii.gz
./sub-101492/func/sub-101492_task-rest_dir-RL_bold.nii.gz
... and 40 more files having this issue (Use --verbose to see them all).
I am assuming that the 2 files with distinct LR and RL phase encoding is causing this error in the func directory?
Try upgrading bidskit to v2022.10.4, clearing your work and sub-* folders and re-running bidskit. Looks like the TaskName field in the JSON sidecars hasn't been filled. Let me know how if the bids-validator still complains after the re-conversion.