I would like to perform some seed-based connectivity analysis on my longitudinal resting state data processed with fmriprep. As a first step, I need to extract the time series from my ROIs. I am using the sub-*_task-rest_space-MNI152NLin2009cAsym_desc-smoothAROMAnonaggr_bold image. As such, I thought to download the recent Harvard-Oxford parcellation that was mapped onto the MNI152NLin2009cAsym template from Templateflow. First question is (sorry if I missed this):
I would like to extract specific ROIs (e.g., amygdala), is there a list available of the intensity of each region so that I can use something like fslmaths to threshold individual ROIs?
My second question is:
Can anyone advice on a software package that utilises fmriprep output for group analysis, such as seed-to-voxel and ICA analysis? I am aware of XCPengine, but from my understanding it does not perform group analysis but only subject level analysis.
Any advice would be greatly appreciated. I really like the fmriprep project and I am a bit stuck at the moment in the transition to group analysis.
Thank you @oesteban! I found those coordinates, but I meant intensity values (I was thinking that I can create ROI masks by thresholding the atlas with the values above and below the intensity of each region). I am not sure how to make a mask from coordinates? To generate an ROI from coordinates I can only think about creating a sphere around them, but that does not sound like it would be very precise.
Thanks also for the link.
I’ve done this before, and have some code (in Bash) that may be helpful:
ROI_dir=$HOME/ROIs #output directory for ROI files
subcort_atlas=HarvardOxford
subcort_ROIs=("Left Amygdala" "Right Amygdala") #Must match labels from specified atlas .xml file
thr=75 #how much you want to threshold your ROI(s) (i.e 50=50%)
resolution=2 #atlas resolution you want: 1mm or 2mm
#Extract sub-cortical ROIs from specified FSL atlas
for roi in "${subcort_ROIs[@]}"
do
label_index=`cat $FSLDIR/data/atlases/${subcort_atlas}-Subcortical.xml | grep "$roi" | awk '{print $2}' | tr -d '"' | cut -c7-` #Specifies which volume (i.e. ROI) from the probability atlas to extract
roi=`echo ${roi// /_} | tr -d ','` #Remove white spaces and commas from ROI label(s)
if [ ! -f $ROI_dir/${roi}_thr-${thr}.nii.gz ]; then
echo ""
echo "Creating $roi ROI, thresholding at ${thr}%, and binarizing"
echo ""
fslroi $FSLDIR/data/atlases/$subcort_atlas/${subcort_atlas}-sub-prob-${resolution}mm.nii.gz $ROI_dir/${roi}_thr-${thr}.nii.gz $label_index 1 #Extract the specified ROI
fslmaths $ROI_dir/${roi}_thr-${thr}.nii.gz -thr $thr -bin $ROI_dir/${roi}_thr-${thr}.nii.gz #Threshold ROI and binarize
fi
done
I should note that I was using the HarvardOxford subcortical atlas and corresponding .xml file that contains the ROI coordinates that comes with the FSL (v 6.0.1) distribution, but you could adjust the paths to point to templateflow (pretty sure they’re the same).
The threshold variable I set was 75%, but that was a personal choice, so it’s up to you what you feel your threshold should be.
I haven’t tried doing this through nipype, but I imagine it’s possible.