edickie / ciftify

The tools of the Human Connectome Project (HCP) adapted for working with non-HCP datasets
https://edickie.github.io/ciftify/
MIT License
112 stars 158 forks source link

Trouble getting vertex location info from ciftify_statclust_report #125

Open dakotakliam opened 4 years ago

dakotakliam commented 4 years ago

Hello,

I have a question regarding the usage of ciftify_statclust_report. I recently ran FSL’s MELODIC on my resting-state fMRI data to generate several independent components, and now I would like to identify the “peak vertex” for each cluster within each component, from which I will generate a set of ROIs. It is my understanding that ciftify_statclust_report with the –output-peaks flag would allow me to export a csv file with the cluster ID, location of the peak vertex, surface area of the cluster, mean intensity value, and atlas overlap, which would be ideal for my project! Unfortunately, I continue to receive several errors, and can’t seem to figure out what’s going wrong.

When I use the midthickness files generate from my data, along with the corresponding vertex-wise surface information like this:

ciftify_statclust_report --max-threshold 4 --outputbase test --output-peaks --left-surface Laverage.32k_fs_LR.surf.gii --right-surface Raverage.32k_fs_LR.surf.gii --left-surf-area L_midthick_va.func.gii --right-surf-area R_midthick_va.func.gii melodic_IC.dscalar.nii

I get a test_clust.dlabel.nii as output, which contains the thresholded clusters for each component, but there is no csv file. I also receive several errors:

Traceback (most recent call last): File "/anaconda3/bin/ciftify_statclust_report", line 10, in sys.exit(main()) File "/anaconda3/lib/python3.7/site-packages/ciftify/bin/ciftify_statclust_report.py", line 426, in main ret = run_ciftify_dlabel_report(arguments, tmpdir) File "/anaconda3/lib/python3.7/site-packages/ciftify/bin/ciftify_statclust_report.py", line 184, in run_ciftify_dlabel_report label_data, surf_va_LR) File "/anaconda3/lib/python3.7/site->packages/pandas/core/indexing.py", line 190, in setitem self._setitem_with_indexer(indexer, value) File "/anaconda3/lib/python3.7/site-packages/pandas/core/indexing.py", line 611, in _setitem_with_indexer raise ValueError('Must have equal len keys and value ' ValueError: Must have equal len keys and value when setting with an iterable

When I run the same command, only with the default surface files (not specifying my own), I receive a different set of errors. However, I do get a test_clust.dlabel.nii file, a test_statclust_report.csv file, and a test_subcortical_peaks.csv file. Unfortunately, though, I can't seem to get the peak vertex location for the clusters on the surface (the subcortical file only has the subcortical clusters, and the report file doesn't have vertex location info).

Any thoughts/advice on how to troubleshoot this? I'm happy to send additional details regarding inputs, outputs, and error messages if need be. I'd also like to ask if I need to be running ciftify_statclust_report on each component of my ICA separately?

Thanks in advance!