help > Trouble exporting first-level analysis results (how to read Beta_SubjectX_ConditionX_SourceX files?)
Showing 1-2 of 2 posts
Display:
Results per page:
Sep 9, 2023  04:09 PM | alexeijoel
Trouble exporting first-level analysis results (how to read Beta_SubjectX_ConditionX_SourceX files?)

Hi there, 

Thankyou for this wonderful and versatile toolbox! 

I am brand new to neuroimaging analysis and am having trouble interpreting the output data from a first-level SBC analysis in CONN.


Background: I am using CONN for a very specific use case - to define ROIs for a brain stimulation study based on resting state connectivity (SBC) of whole-brain voxels with some other ROIs I have obtained from an anatomical localizer functional scan. In CONN, I've successfully loaded ROIs (my own, not from atlas) from Freesurfer in Setup, coregistered functional data (resting state scan) to T1 anatomical and resampled to surface space, and run seed-to-voxel connectivity. The SBC results look great in CONN figure display GUI, and I'm happy with visual inspection. 


But here I need to export the first-level results, and this is where I'm stuck. Basically, all I need are the unthresholded seed-to-voxel correlation (or Z score) maps for two source ROIs, for each individual subject.


My question is: How should I interpret/transform/register the output data from a SBC first-level analysis in CONN if I want to load these results as a surface overlay in external software (e.g. onto left and right hemi inflated surfaces in Freesurfer/Freeview)? 


Presumably, I need the Beta_SubjectX_ConditionX_SourceX.nii files in first-level results, which I understand are the Fisher-transformed correlation values (i.e. Z scores) for each surface vertex based on their connectivity with SourceX? But loading these files directly onto inflated surface in Freesurfer doesn't work (I have also tried first converting the Beta .nii files to .mgh using conn_mgh2nii, with no luck). 

For reference, the size of the original contrast activation map on surface mesh for a given subject in Freesurfer is something like [145200, 1, 1, 13] given by Matlab, whereas each CONN output file Beta_SubjectX_ConditionX_SourceX.nii has size [42, 83, 94]. I'm not sure how to interpret this - my understanding was that SBC in CONN should yield (for each source) a correlation value for each and every surface vertex.


I am sure I am doing something silly here based on my novice understanding of neuroimaging file formats and transformations, but any pointers in the right direction would be gratefully and humbly appreciated!

Kind regards, 

Alex

Sep 18, 2023  11:09 PM | Alfonso Nieto-Castanon - Boston University
RE: Trouble exporting first-level analysis results (how to read Beta_SubjectX_ConditionX_SourceX files?)

Hi Alex,


The surface files created and output by CONN have been normalized and resampled to FreeSurfer fsaverage space, so they all have the same number of vertices (163842 vertices per hemisphere, for FreeSurfer fsaverage tesellation @ resolution=8). You can use the function conn_surf_nii2curv to convert these surface NIFTI files to freesurfer "paint" files, or the function conn_surf_nii2gii to convert them to GIFTI format, to be used/displayed by other external software packages. In both cases keep in mind that you would want to display these files overlaid on a surface that has the same resolution as freesurfer fsaverage reference (rather than, for example, the original surface files created by FreeSurfer for each subject which as you pointed out will have a different number of vertices for each subject). For example, if you have a subject's lh.pial surface file created by FreeSurfer with an arbitrary number of vertices you could use the syntax:


conn_surf_readsurfresampled('lh.pial',true)


to create a new lh.pial.fsavg file that will represent the same surface but resampled at the resolution of the fsaverage reference (with 163842 vertices per hemisphere), so those should work nicely with paint files created from your surface NIFTI files.  


Hope this helps


Alfonso


Originally posted by alexeijoel:



Hi there, 

Thankyou for this wonderful and versatile toolbox! 

I am brand new to neuroimaging analysis and am having trouble interpreting the output data from a first-level SBC analysis in CONN.


Background: I am using CONN for a very specific use case - to define ROIs for a brain stimulation study based on resting state connectivity (SBC) of whole-brain voxels with some other ROIs I have obtained from an anatomical localizer functional scan. In CONN, I've successfully loaded ROIs (my own, not from atlas) from Freesurfer in Setup, coregistered functional data (resting state scan) to T1 anatomical and resampled to surface space, and run seed-to-voxel connectivity. The SBC results look great in CONN figure display GUI, and I'm happy with visual inspection. 


But here I need to export the first-level results, and this is where I'm stuck. Basically, all I need are the unthresholded seed-to-voxel correlation (or Z score) maps for two source ROIs, for each individual subject.


My question is: How should I interpret/transform/register the output data from a SBC first-level analysis in CONN if I want to load these results as a surface overlay in external software (e.g. onto left and right hemi inflated surfaces in Freesurfer/Freeview)? 


Presumably, I need the Beta_SubjectX_ConditionX_SourceX.nii files in first-level results, which I understand are the Fisher-transformed correlation values (i.e. Z scores) for each surface vertex based on their connectivity with SourceX? But loading these files directly onto inflated surface in Freesurfer doesn't work (I have also tried first converting the Beta .nii files to .mgh using conn_mgh2nii, with no luck). 

For reference, the size of the original contrast activation map on surface mesh for a given subject in Freesurfer is something like [145200, 1, 1, 13] given by Matlab, whereas each CONN output file Beta_SubjectX_ConditionX_SourceX.nii has size [42, 83, 94]. I'm not sure how to interpret this - my understanding was that SBC in CONN should yield (for each source) a correlation value for each and every surface vertex.


I am sure I am doing something silly here based on my novice understanding of neuroimaging file formats and transformations, but any pointers in the right direction would be gratefully and humbly appreciated!

Kind regards, 

Alex