I am opening this thread here after posting on the HCP mailing list (thread here: https://groups.google.com/a/humanconnectome.org/forum/#!topic/hcp-users/hzN6avhI484).
My problem is the following: I have some CIFTI data obtained by using fMRIprep. The data is in fsaverage5 space and I would like to adapt a cortical/subcortical version of the Glasser atlas (dlabel file) that I have been using for HCP style data to parcellate this data.
I was able to successfully resample the atlas to the fsaverage5 space by using connectome workbench. However, when I try to extract the timeseries of the parcels from the fMRIprep preprocessed data, 2 parcels of the Glasser atlas only return nan: “R_H_ROI” and “L_H_ROI” . These are cortical regions that seem to be very close to the hippocampus.
On the HCP mailing list, I have been told that the reason could be a different type of masking in fMRIprep, which “cuts off” these two regions so that they are completely missing from the resulting CIFTI file. In this case, they argue that “This would mean that fmriprep-processed results, with their current settings/templates, would never contain data inside those parcels.”
Would you have any insights on where this might be happening along the pipeline and/or any suggestions to recover the missing regions?
Thank you very much.
This could be case. When forming the CIFTI file, we first load up FreeSurfer’s aparc annotation for the specific surface (in this case,
fsaverage5's ?h.aparc.annot) and remove all the
unknown parcellations. The purpose of this was to remove vertices within the medial wall (to be more in-line with HCP), but may remove more than intended. However, fmriprep outputs the BOLD data resampled to each
fsaverage5 hemisphere, and these GIFTI files include the
unknown parcellations… though you would have to generate a new CIFTI file from these surfaces yourself.
At present, fmriprep-generated CIFTI files consist of two different spaces:
but will shortly allow users to output their data to HCP grayordinates.
Hope that helps,
It helped a lot and solved the problem! Here is the solution in case it is useful to anyone.
First, I got the subcortical labels from the original CIFTI:
wb_command -cifti-separate sub-001_ses-1_task-emotion_bold.dtseries.nii COLUMN -volume-all fmriprep_vol.nii -label fmriprep_lab.nii
Then, I create the “unmasked” CIFTI:
wb_command -cifti-create-dense-timeseries sub-001_ses-1_task-emotion_bold_nomask.dtseries.nii -volume fmriprep_vol.nii fmriprep_lab.nii -left-metric sub-001_ses-1_task-emotion_space-fsaverage5_hemi-L.func.gii -right-metric sub-001_ses-1_task-emotion_space-fsaverage5_hemi-R.func.gii
Then I use this as a template to resample my original atlas:
wb_command -cifti-resample Glasser_subcort_atlas_reorder.dlabel.nii COLUMN sub-001_ses-1_task-emotion_bold_nomask.dtseries.nii COLUMN ADAP_BARY_AREA ENCLOSING_VOXEL Glasser_subcort_atlas_reorder_fsaverage5_nomask.dlabel.nii -left-spheres $currsphereL $newshpereL -left-area-metrics $currareaL $newareaL -right-spheres $currsphereR $newshpereR -right-area-metrics $currareaR $newareaR
Finally, I can parcellate succesfully:
wb_command -cifti-parcellate sub-001_ses-1_task-emotion_bold_nomask.dtseries.nii Glasser_subcort_atlas_reorder_fsaverage5_nomask.dlabel.nii 2 sub-001_ses-1_task-emotion_bold_nomask_glasser.ptseries.nii
The resulting CIFTI parcellated timeseries has 379 rows as intended:
wb_command -file-information sub-001_ses-1_task-emotion_bold_nomask_glasser.ptseries.nii
Number of Rows: 379