Comparing melodic group ICA components CIFTI file to reference RSNs

204 views
Skip to first unread message

Estephan Moana

unread,
Mar 20, 2021, 9:11:48 PM3/20/21
to HCP-Users
Hello, I was wondering how can one compare the melodic CIFTI output file from running group ICA with the ICA components to reference networks. For example, if I want to compare the ICA CIFTI file to the networks from Smith 2009 <https://www.fmrib.ox.ac.uk/datasets/brainmap+rsns/>.

Some options I thought of:
1. Convert the CIFTI file into fakeNIFTI and use the fslcc tool (I tried, it seemed not to work)
2. Use reference RSN CIFTI files from the HCP1200 release with a  wb_command tool equivalent to fslcc. Is there such a file from HCP1200, where reference RSN are labeled and a wb_command tool to compare RSNs?
3. Visually compare the CIFTI ICA file to reference RSNs (least desired option, given its subjectivity)

I'm open to any other suggestions to quantitatively compare melodic ICA components in CIFTI format to reference RSNs from published studies. Thank you.

Estephan

Glasser, Matthew

unread,
Mar 20, 2021, 10:08:44 PM3/20/21
to hcp-...@humanconnectome.org

I would regress the ICA component timeseries into the volume timeseries to make volume spatial maps.  Keep in mind that this is totally valid as this is a temporal regression rather than a spatial regression. 

 

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/b42673e4-a124-4520-929a-1cdc85f3a0efn%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.

Estephan Moana-Filho

unread,
Mar 20, 2021, 10:17:29 PM3/20/21
to hcp-...@humanconnectome.org
I assume you’re referring to each subject’s timeseries output from dual regression stage 2, is that correct? Is it possible for you to write an example command with pseudocode to do this?

Sent from my iPhone

On Mar 20, 2021, at 9:08 PM, Glasser, Matthew <glas...@wustl.edu> wrote:


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/BNtBR5vB4FU/unsubscribe.
To unsubscribe from this group and all its topics, 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/F5BE7F0D-E5C0-4E99-A790-9978750EC2EA%40wustl.edu.

Glasser, Matthew

unread,
Mar 20, 2021, 10:19:21 PM3/20/21
to hcp-...@humanconnectome.org

Yes that would work and then you could average them.  Have a look at RSNRegression: https://github.com/Washington-University/HCPpipelines/blob/master/global/scripts/RSNregression.sh

 

Matt.

Estephan Moana

unread,
Mar 21, 2021, 10:16:43 AM3/21/21
to HCP-Users, glas...@wustl.edu
This is what I did so far:
1. Ran Melodic to obtain a group ICA with 100 components, and also lower dimension group ICAs with dimensions = 7 to 21.
2. Ran RSNRegression weighted dual regression with the command pasted below.

Now I have for each subject the following files:
sub-20001.FuncConnect_01_GroupICA_GroupAnalysis_01_restingfMRI-n49_100components_weighted_WR_MSMAll_DeDrift.32k_fs_LR.dscalar.nii
sub-20001.FuncConnect_01_GroupICA_GroupAnalysis_01_restingfMRI-n49_100components_weighted_WR_MSMAll_DeDrift_spectra.32k_fs_LR.sdseries.nii
sub-20001.FuncConnect_01_GroupICA_GroupAnalysis_01_restingfMRI-n49_100components_weighted_WR_MSMAll_DeDrift_ts.32k_fs_LR.sdseries.nii
sub-20001.FuncConnect_01_GroupICA_GroupAnalysis_01_restingfMRI-n49_100components_weighted_WR_MSMAll_DeDrift_vol.32k_fs_LR.dscalar.nii
sub-20001.FuncConnect_01_GroupICA_GroupAnalysis_01_restingfMRI-n49_100components_weighted_WRZ_MSMAll_DeDrift.32k_fs_LR.dscalar.nii
sub-20001.FuncConnect_01_GroupICA_GroupAnalysis_01_restingfMRI-n49_100components_weighted_WRZ_MSMAll_DeDrift_vol.32k_fs_LR.dscalar.nii

From here, how could I determine which components to retain for group comparisons?

----------------
# 'GroupMaps' 'file' "the group template spatial maps for weighted or dual regression"
GroupMaps="${StudyFolder}/${derivatives_dir2}/FuncConnect/01_GroupICA/GroupICA_${subjs_grp_main}_100components/melodic_oIC_100.dscalar.nii"
# 'InputList' 'fmri@fmri@fmri...' "the timeseries fmri names to concatenate"
InputList="task-rest_acq-restfMRIAP@task-rest_acq-restfMRIPA"
# 'RegName' 'name' "the registration string corresponding to the input files"
RegName="MSMAll_DeDrift"
# Mesh low resolution, like '32' for 32k_fs_LR
LowResMesh="32"
# 'ProcString' 'string' "part of filename describing processing, like '_hp2000_clean'"
ProcString="_hp0_clean"
# 'Method' 'regression method' "'weighted', 'dual', or 'single' - weighted regression finds locations in the subject that don't match the template well and downweights them; dual is simpler, both methods use vertex area information.  single temporal regression requires a prior run of weighted or dual regression and is intended for adding an additional output space"
Method="weighted"
# 'LowICADims' 'num@num@num...' "when using --method=weighted, the low ICA dimensionality files to use for determining weighting"
LowICADims="7@8@9@10@11@12@13@14@15@16@17@18@19@20@21"
# 'ICATemplateName' 'filename' "filename template where 'REPLACEDIM' will be replaced by each of the --low-ica-dims values in turn to form the low-dim inputs"
LowDimTemplate="${StudyFolder}/${derivatives_dir2}/FuncConnect/01_GroupICA/GroupICA_${subjs_grp_main}_REPLACEDIMcomponents/melodic_oIC_REPLACEDIM.dscalar.nii"
# Number of samples to use when computing frequency spectrum (must be >0 to generate subject time series)
nTPsForSpectra=500
# To generate voxel-based outputs, provide a cifti file setting the voxels to use
VolCiftiTemplate=${HOME}/HCPpipelines-4.2.0/global/templates/91282_Greyordinates/91282_Greyordinates.dscalar.nii
# 'DoZString' 'YES or NO' "also create Z maps from the regression" 'NO'
DoZString="YES"
# 'MatlabMode' '0, 1, or 2' "defaults to $g_matlab_default_mode
MatlabMode="1"
# 'OutString' 'name' "filename part to describe the outputs, like group_ICA_d127"
OutString="${funcconnecttype_name}_${subjs_grp_main}_100components_weighted"

${HCPPIPEDIR}/global/scripts/RSNregression.sh \
--study-folder=${StudyFolder}/${derivatives_dir} \
--subject=${subjID} \
--group-maps=${GroupMaps} \
--subject-timeseries=${InputList} \
--surf-reg-name=${RegName} \
--low-res=${LowResMesh} \
--proc-string=${ProcString} \
--method=${Method} \
--low-ica-dims=${LowICADims} \
--low-ica-template-name=${LowDimTemplate} \
--output-spectra=${nTPsForSpectra} \
--volume-template-cifti=${VolCiftiTemplate} \
--output-z=${DoZString} \
--matlab-run-mode=${MatlabMode} \
--output-string=${OutString}

Glasser, Matthew

unread,
Mar 21, 2021, 10:33:37 AM3/21/21
to Estephan Moana, HCP-Users

So that looks mostly correct except for this:

 

VolCiftiTemplate=${HOME}/HCPpipelines-4.2.0/global/templates/91282_Greyordinates/91282_Greyordinates.dscalar.nii

This is actually meant to be a volume only CIFTI space specific to your data (all of it).  I typically merge all of the ${StudyFolder}/${Subject}/MNINonLinear/${fMRIName}/brainmask_fs.${fMRIResolution}.nii.gz brainmask files and take the maximum across them and then convert it to a CIFTI file using the “OTHER” structure:

 

if [ ! -e ${StudyFolder}/${GroupAverageName}/MNINonLinear/${GroupAverageName}_CIFTIVolumeTemplate.${fMRIResolution}.txt ] ; then

  echo "OTHER" > ${StudyFolder}/${GroupAverageName}/MNINonLinear/${GroupAverageName}_CIFTIVolumeTemplate.${fMRIResolution}.txt

  echo "1 255 255 255 255" >> ${StudyFolder}/${GroupAverageName}/MNINonLinear/${GroupAverageName}_CIFTIVolumeTemplate.${fMRIResolution}.txt

fi

 

${Caret7_Command} -volume-label-import ${StudyFolder}/${GroupAverageName}/MNINonLinear/brainmask_fs_max.${fMRIResolution}.nii.gz ${StudyFolder}/${GroupAverageName}/MNINonLinear/${GroupAverageName}_CIFTIVolumeTemplate.${fMRIResolution}.txt ${StudyFolder}/${GroupAverageName}/MNINonLinear/brainmask_fs_max.${fMRIResolution}.nii.gz

${Caret7_Command} -cifti-create-dense-scalar ${StudyFolder}/${GroupAverageName}/MNINonLinear/${GroupAverageName}_CIFTIVolumeTemplate.${fMRIResolution}.dscalar.nii -volume ${StudyFolder}/${GroupAverageName}/MNINonLinear/brainmask_fs_max.${fMRIResolution}.nii.gz ${StudyFolder}/${GroupAverageName}/MNINonLinear/brainmask_fs_max.${fMRIResolution}.nii.gz

 

rm ${StudyFolder}/${GroupAverageName}/MNINonLinear/${GroupAverageName}_CIFTIVolumeTemplate.${fMRIResolution}.txt

 

I find it easier to just treat everything as CIFTI rather than having to mask and unmask the data repeatedly and deal with the increased memory usage.  You can easily convert back to NIFTI with wb_command -cifti-separate.

Estephan Moana

unread,
Mar 21, 2021, 12:13:03 PM3/21/21
to HCP-Users, glas...@wustl.edu, Estephan Moana
Thanks Matt. Following your advice I now have full brain CIFTI volume files with all 100 ICA components for each participant.

At first, I was thinking about selecting the ICA components from the group ICA melodic CIFTI file directly. Is this possible and desirable, as it would inform me of the similar components to be retained for all participants? Putting it differently, is there a risk of having different components being selected per participant based on fslcc output if I run it using individual participants volume ICA component volume files against reference RSNs?

Glasser, Matthew

unread,
Mar 21, 2021, 3:10:01 PM3/21/21
to hcp-...@humanconnectome.org, Estephan Moana

I think I need to know more about the goals of your study to give more specific advice.

Estephan Moana

unread,
Mar 21, 2021, 3:19:51 PM3/21/21
to HCP-Users, glas...@wustl.edu, Estephan Moana
Sure. The goal is to do a group comparison between 3 groups using the output from dual regression. The steps I ran so far are:
1 . Created groupICA maps with dimensions d=10, and d=7 to 21. Input files are resting fMRI runs pre-processed using HCP pipelines+ICAFix+MSMAll
2. Ran RSNRegression script to process weighted dual regression stages 1 and 2

Now I want to proceed with the group comparisons, but not using all 100 components. I want only those components that have a minimal cross-correlation with reference RSNs. As an example, I'm using reference RSNs from Smith 2009. If available, I could use reference RSNs from the HCP1200 release. Does that make sense?

Glasser, Matthew

unread,
Mar 21, 2021, 3:28:56 PM3/21/21
to Estephan Moana, HCP-Users

Help me understand why this is of interest, off-list if need be. 

Reply all
Reply to author
Forward
0 new messages