Connectivity matrices based on Destrieux - NaN values

33 views
Skip to first unread message

Carlo Alberto Barbano

unread,
Nov 17, 2025, 2:33:37 PM (10 days ago) Nov 17
to HCP-Users
Hi, 

I am trying to compute functional connectivity matrices based on Destrieux. This is what I did (e.g. for subject 102008):

wb_command -cifti-parcellate 102008/MNINonLinear/Results/rfMRI_REST1_LR/rfMRI_REST1_LR_Atlas_MSMAll_hp2000_clean.dtseries.nii 102008/MNINonLinear/fsaverage_LR32k/102008.aparc.a2009s.32k_fs_LR.dlabel.nii COLUMN ~/tmp/test.ptseries.nii

followed by:

wb_command -cifti-correlation ~/tmp/test.ptseries.nii ~/tmp/test.pconn.nii

However, I get NaN values in the resulting pconn.nii file. Is there something I am missing ? 

Thanks,
Carlo

Tim Coalson

unread,
Nov 17, 2025, 8:29:21 PM (10 days ago) Nov 17
to hcp-...@humanconnectome.org
If a label in the table has no associated vertices, it will have a timecourse of all 0s in the ptseries file.  Since such a timeseries has a stdev of 0, the correlation formula divides zero by zero, and results in NaN values in the pconn.  Using the -legacy-mode flag is one way to exclude these labels (but also not give any warning if a label includes vertices that don't contain data), but it means that for individualized parcellations, if a parcel wasn't detected in a subject, the indices of that subject's parcellated files won't match the other subjects.

It looks like we use freesurfer tools to convert the aparc to gifti label format, so it may not be doing the "drop unused labels" behavior that we specify when converting the label volume files to workbench format.  This could result in many extra (unused) labels in the table of aparc.

Also, Destrieux is a parcellation based on folding patterns (gyri, sulci), and as such is not a very relevant parcellation for analyzing functional data (or other areal features), as it will combine data across functionally different areas, and split some functional areas between gyral vs sulcal labels, etc.  We recommend the HCP MMP 1.0 parcellation for analysis of functional or other areal data.

Tim


--
You received this message because you are subscribed to the Google Groups "HCP-Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hcp-users+...@humanconnectome.org.
To view this discussion visit https://groups.google.com/a/humanconnectome.org/d/msgid/hcp-users/7ace64cb-660b-406c-b9e7-abc059f6ba45n%40humanconnectome.org.

Carlo Alberto Barbano

unread,
Nov 18, 2025, 7:52:56 AM (10 days ago) Nov 18
to hcp-...@humanconnectome.org
Thank you for the reply. 

I see the problem - it happens with the medial wall which is not present in the HCP scans. I removed it and it works! 
Yes, I am aware that Destrieux is not typically used for this purpose, but I needed the same parcels across hemispheres. 

Thanks again !

Best
Carlo

You received this message because you are subscribed to a topic in the Google Groups "HCP-Users" group.
To unsubscribe from this topic, visit https://groups.google.com/a/humanconnectome.org/d/topic/hcp-users/TvoBnxo7ZKg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to hcp-users+...@humanconnectome.org.
To view this discussion visit https://groups.google.com/a/humanconnectome.org/d/msgid/hcp-users/CANm3QU56aJBQhwgBj1pTmJ-rZrifXSK8kNmJ1MmQbTqEcaXHRA%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages