help > Running seed-based ROI-to-ROI analysis in CONN using externally computed connectivity matrices
Showing 1-3 of 3 posts
Display:
Results per page:
Mar 25, 2026  03:03 PM | tbn
Running seed-based ROI-to-ROI analysis in CONN using externally computed connectivity matrices

Hi everyone,


I’m trying to run second-level analyses in CONN, but I’ve run into some confusion and would really appreciate some guidance.


I’ve already completed my first-level analyses using the TMFC toolbox. This gave me ROI-to-ROI connectivity matrices (not z-scores, but subject-level beta/contrast estimates) for different task conditions. So for each subject and condition, I have a full connectivity matrix (ROI × ROI).


My goal is to take these matrices and perform second-level analyses in CONN, specifically:




  • Seed-based ROI-to-ROI analysis using the NAcc as seed (left and right separately)




  • Group comparisons 




  • Regressions with clinical variables




  • Across multiple condition contrasts (e.g., condition A > condition B,  etc.)




I tried to integrate these outputs into CONN by using a script with functions like conn_mtx_write to format my matrices into .mtx.nii files, assuming this might allow CONN to treat them as first-level inputs for second-level analysis.


However, I’m not fully sure how to correctly define and use the NAcc (left and right) as seeds in this setup. Is there a code template or similar?


I would really appreciate any advice or examples of how to properly set this up.


Thanks a lot in advance!

Mar 27, 2026  08:03 AM | Alfonso Nieto-Castanon - Boston University
RE: Running seed-based ROI-to-ROI analysis in CONN using externally computed connectivity matrices

Hi


You can use conn_module('GLM',...) functionality to run second-level analyses from your 2D .mtx.nii files (ROI-to-ROI matrices) as well as from your 3D .nii files (seed-based-connectivity maps). For instructions and examples of use see https://web.conn-toolbox.org/resources/c...


Hope this helps


Alfonso


 


Originally posted by tbn:



Hi everyone,


I’m trying to run second-level analyses in CONN, but I’ve run into some confusion and would really appreciate some guidance.


I’ve already completed my first-level analyses using the TMFC toolbox. This gave me ROI-to-ROI connectivity matrices (not z-scores, but subject-level beta/contrast estimates) for different task conditions. So for each subject and condition, I have a full connectivity matrix (ROI × ROI).


My goal is to take these matrices and perform second-level analyses in CONN, specifically:




  • Seed-based ROI-to-ROI analysis using the NAcc as seed (left and right separately)




  • Group comparisons 




  • Regressions with clinical variables




  • Across multiple condition contrasts (e.g., condition A > condition B,  etc.)




I tried to integrate these outputs into CONN by using a script with functions like conn_mtx_write to format my matrices into .mtx.nii files, assuming this might allow CONN to treat them as first-level inputs for second-level analysis.


However, I’m not fully sure how to correctly define and use the NAcc (left and right) as seeds in this setup. Is there a code template or similar?


I would really appreciate any advice or examples of how to properly set this up.


Thanks a lot in advance!



 

Apr 9, 2026  10:04 AM | tbn
RE: Running seed-based ROI-to-ROI analysis in CONN using externally computed connectivity matrices

Hi Alfonso,


Thanks for your help. I tried following your advice, however, I still cannot figure out how to just do seed-based ROI-to-ROI (not seed-to-voxel) FC. 


Just as background information, I have 4 conditions and thus obtained one .mtx.nii file per condition: cond1.mtx.nii; cond2.mtx.nii; cond3.mtx.nii; cond4.mtx.nii . Each file contains ROI-to-ROI connectivity values (47 × 47 ROIs) for all subjects, stored as 2D matrices (one per subject).



I then used conn_module('glm',...) to run second-level analyses with:




  • A design matrix including group, age, sex, and behavioural scores.




  • Multiple within-subject contrasts (e.g., cond1 > cond2, etc.)




  • Between-subject contrasts testing effects of group and beh scores




(See script attached)



When I run the GLM, CONN opens the ROI-to-ROI results explorer showing Analysis of 1081 connections among 47 ROIs and a full connectivity graph across all ROIs


 


However, I am specifically interested in seed-based ROI-to-ROI analyses using the nucleus accumbens (NAC_L and NAC_R) as seeds.


But I cannot/dont know how to manually select NAC_L or NAC_R in the results explorer


Please could you help me and tell me how to select a seed here.




 


Thank you very much for your help.


Best regards,


 


 


Originally posted by Alfonso Nieto-Castanon:



Hi


You can use conn_module('GLM',...) functionality to run second-level analyses from your 2D .mtx.nii files (ROI-to-ROI matrices) as well as from your 3D .nii files (seed-based-connectivity maps). For instructions and examples of use see https://web.conn-toolbox.org/resources/c...


Hope this helps


Alfonso


 


Originally posted by tbn:



Hi everyone,


I’m trying to run second-level analyses in CONN, but I’ve run into some confusion and would really appreciate some guidance.


I’ve already completed my first-level analyses using the TMFC toolbox. This gave me ROI-to-ROI connectivity matrices (not z-scores, but subject-level beta/contrast estimates) for different task conditions. So for each subject and condition, I have a full connectivity matrix (ROI × ROI).


My goal is to take these matrices and perform second-level analyses in CONN, specifically:




  • Seed-based ROI-to-ROI analysis using the NAcc as seed (left and right separately)




  • Group comparisons 




  • Regressions with clinical variables




  • Across multiple condition contrasts (e.g., condition A > condition B,  etc.)




I tried to integrate these outputs into CONN by using a script with functions like conn_mtx_write to format my matrices into .mtx.nii files, assuming this might allow CONN to treat them as first-level inputs for second-level analysis.


However, I’m not fully sure how to correctly define and use the NAcc (left and right) as seeds in this setup. Is there a code template or similar?


I would really appreciate any advice or examples of how to properly set this up.


Thanks a lot in advance!



 



 


Originally posted by Alfonso Nieto-Castanon:



Hi


You can use conn_module('GLM',...) functionality to run second-level analyses from your 2D .mtx.nii files (ROI-to-ROI matrices) as well as from your 3D .nii files (seed-based-connectivity maps). For instructions and examples of use see https://web.conn-toolbox.org/resources/c...


Hope this helps


Alfonso


 


Originally posted by tbn:



Hi everyone,


I’m trying to run second-level analyses in CONN, but I’ve run into some confusion and would really appreciate some guidance.


I’ve already completed my first-level analyses using the TMFC toolbox. This gave me ROI-to-ROI connectivity matrices (not z-scores, but subject-level beta/contrast estimates) for different task conditions. So for each subject and condition, I have a full connectivity matrix (ROI × ROI).


My goal is to take these matrices and perform second-level analyses in CONN, specifically:




  • Seed-based ROI-to-ROI analysis using the NAcc as seed (left and right separately)




  • Group comparisons 




  • Regressions with clinical variables




  • Across multiple condition contrasts (e.g., condition A > condition B,  etc.)




I tried to integrate these outputs into CONN by using a script with functions like conn_mtx_write to format my matrices into .mtx.nii files, assuming this might allow CONN to treat them as first-level inputs for second-level analysis.


However, I’m not fully sure how to correctly define and use the NAcc (left and right) as seeds in this setup. Is there a code template or similar?


I would really appreciate any advice or examples of how to properly set this up.


Thanks a lot in advance!



 



 

Attachment: The GLM script.docx