Hi everyone,
I am currently starting a deep-learning-based analysis of connectivity matrices derived from the resting-state fMRI data within the HCP1200 release. As I am relatively new to fMRI data analysis, I have a few questions regarding the dataset and would greatly appreciate your assistance.
Considering the above, I am uncertain which file would be most suitable for my analysis. I noticed that Dr. Matthew Glasser recommended the use of the combined version ( ${fMRIName}/${fMRIName}_Atlas_MSMAll_hp2000_clean.dtseries.nii). Do you think this recommendation would also apply in my case?
Kind regards.
Yes, if you don’t know that you have a reason to use something else, start with:
${StudyFolder}/${Subject}/MNINonLinear/Results/${fMRIName}/${fMRIName}_Atlas_MSMAll_hp2000_clean.dtseries.nii
Matt.
--
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 on the web visit
https://groups.google.com/a/humanconnectome.org/d/msgid/hcp-users/92de0d3d-e12d-4dcc-adba-e7f1227466a9n%40humanconnectome.org.
The materials in this message are private and may contain Protected Healthcare Information or other information of a sensitive nature. If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail.
Hi Matt,
Thank you so much for your previous response. Could you also clarify if the volumetric rfMRI timeseries files (PhaseOne_gdc_dc.nii.gz and PhaseTwo_gdc_dc.nii.gz) in either /MNINonLinear/Results/ or T1w/Results/ are registered to MNI152?
Thanks.
For subcortical structures, the data are registered to MNI space. Those files are not fMRI timeseries.
I apologize for my misunderstanding regarding the files. I initially thought the PhaseOne_gdc_dc.nii.gz and PhaseTwo_gdc_dc.nii.gz files contained the fMRI timeseries. I plan to use the HCP MMP 1.0 atlas to create the connectivity matrix from the timeseries data, and working with the NIFTI format is much easier for me.
Yesterday, I created a connectivity matrix from the ${fMRIName}_hp2000_clean.nii.gz file. Additionally, I converted one of the ${fMRIName}_Atlas_MSMAll_hp2000_clean.dtseries.nii files from CIFTI to NIFTI using the Connectome Workbench, and then created another connectivity matrix from it. The connectivity matrices created from the converted ${fMRIName}_Atlas_MSMAll_hp2000_clean.dtseries.nii file and the ${fMRIName}_hp2000_clean.nii.gz file appear identical. Are these files essentially the same, with the only difference being that one is in CIFTI format and the other is in NIFTI?
Thank you for your assistance.
You use wb_command -cifti-parcellate with the HCP’s multi-modal atlas obtained from here: https://balsa.wustl.edu/file/87B9N. Then wb_command -cifti-correlation to make a connectivity matrix. There is no reason to convert any files to NIFTI or to use NIFTI files at all.
To view this discussion on the web visit https://groups.google.com/a/humanconnectome.org/d/msgid/hcp-users/7262e7b2-2643-490b-b3d6-8f33ec652a0cn%40humanconnectome.org.
Hi again,
Thank you for the recommendation. In this case, how can I create the connectivity matrix using specific regions from the atlas?
For instance, I created a list of the regions in the atlas using the following command:
>> wb_command -cifti-label-export-table Q1-Q6_RelatedValidation210.CorticalAreas_dil_Final_Final_Areas_Group_Colors_with_Atlas_ROIs2.32k_fs_LR.dlabel.nii 1 labels.txt
Then get the first 40 regions into another txt file:
>> cat first_40_labels.txt
L_V1_ROI
181 67 10 255 255
L_MST_ROI
182 49 91 127 255
L_V6_ROI
183 49 85 168 255
L_V2_ROI
184 13 51 237 255
...
Then I ran the following code:
>> atlas_path="Q1-Q6_RelatedValidation210.CorticalAreas_dil_Final_Final_Areas_Group_Colors_with_Atlas_ROIs2.32k_fs_LR.dlabel.nii"
>> dtseries_path="rfMRI_REST2_LR_Atlas_MSMAll_hp2000_clean.dtseries.nii"
>> first_40_labels_path="first_40_labels.txt"
>> wb_command -cifti-label-import $atlas_path $first_40_labels_path first40.dlabel.nii
>> wb_command -cifti-parcellate $dtseries_path first40.dlabel.nii COLUMN first40_timeseries.ptseries.nii
>> wb_command -cifti-correlation first40_timeseries.ptseries.nii first_40_connmatrix.pconn.nii
However, the resulting connectivity matrix has the shape of 379x379 instead of the expected shape for the first 40 regions. It seems like the parcellation and correlation processes included additional regions beyond the specified first 40 regions.
Could you please advise on how to ensure that the connectivity matrix is computed only for the specified regions from the atlas?
I would select the regions after the fact.
This resulted in time series data with the shape of (379, 1200). Then, using Python, I selected the first 40 regions in the left cortex as an example and created the connectivity matrix.
2.
Create the connectivity matrix using Workbench. Then select the sub-matrix using Python:
# Parcellate the time series
wb_command -cifti-parcellate $dtseries_path $atlas_path COLUMN ${subject_session}_timeseries.ptseries.nii
# Generate the connectivity matrix
wb_command -cifti-correlation ${subject_session}_timeseries.ptseries.nii ${subject_session}_connmatrix.pconn.nii
This resulted in a 379 x 379 connectivity matrix. Then, using Python, I extracted the sub-matrix for the first 40 regions in the left cortex.
The connectivity matrices generated by both methods seem almost identical (Pearson Correlation = 1.0, Cosine Similarity = 1.0, MSE = 0.000016). Therefore, I believe I created the matrix correctly using both methods.
However, I still wonder if it is possible to perform the sub-matrix selection within the connectivity matrix using Connectome Workbench directly. Do you have any suggestions?
Thank you so much for all the assistance. I really appreciate it.
To view this discussion on the web visit https://groups.google.com/a/humanconnectome.org/d/msgid/hcp-users/0410d3b1-0d76-4666-a066-08cc1fb1ae3an%40humanconnectome.org.
To view this discussion on the web visit https://groups.google.com/a/humanconnectome.org/d/msgid/hcp-users/dd97ab70-a97c-425b-8055-18e15fb6ee6bn%40humanconnectome.org.
Hi Tim,
I hope you're doing well.
Thank you for your response. By specifying "-discard-others", I successfully created the connectivity matrix for selected ROIs using solely Workbench. On the other hand, when attempting the second approach you suggested, I encountered the following error: "ERROR: row mapping type must be series, scalars, or labels". Here's the code I used:
>> wb_command -cifti-parcellate $dtseries_path $atlas_path COLUMN ${subject_session}_timeseries.ptseries.nii
>> wb_command -cifti-correlation ${subject_session}_timeseries.ptseries.nii ${subject_session}_full_connmatrix.pconn.nii
>> wb_command -cifti-merge ${subject_session}_connmatrix_181_to_221.pconn.nii -cifti ${subject_session}_full_connmatrix.pconn.nii -column 181 -up-to 221
>> wb_command -cifti-transpose ${subject_session}_connmatrix_181_to_221.pconn.nii ${subject_session}_connmatrix_181_to_221_transposed.pconn.nii
>> wb_command -cifti-merge ${subject_session}_final_connmatrix_181_to_221.pconn.nii -cifti ${subject_session}_connmatrix_181_to_221_transposed.pconn.nii -column 181 -up-to 221
I also attempted to use ROI Names in the third line with the following code:
>> roi_columns=""
while IFS= read -r line; do
roi_columns+="-column $line "
done < "$roi_names_file"
>> wb_command -cifti-merge ${output_path}/${subject_session}_connmatrix_selected_rois.pconn.nii -cifti ${output_path}/${subject_session}_full_connmatrix.pconn.nii $roi_columns
Unfortunately, it resulted in the same error. I am probably missing something here.
And for anybody trying to do something similar, you can use the following code for reference:
>> wb_command -cifti-label-import $atlas_path $first_40_labels_path ${atlas_name}_first40.dlabel.nii -discard-others
>> wb_command -cifti-parcellate $dtseries_path ${atlas_name}_first40.dlabel.nii COLUMN ${subject_session}_first40_timeseries.ptseries.nii
>> wb_command -cifti-correlation ${subject_session}_first40_timeseries.ptseries.nii ${subject_session}_first40_connmatrix.pconn.nii
As you mentioned, the connectivity files are quite small so I can ignore the parcels in my code but I just wanted to learn how I can do it using Workbench directly.
Thank you so much once again for your invaluable help.
Kind regards,
Görkem.