Legacy MRI data processing using QuNex lacking myelin maps after post-Freesurfer processing

141 views
Skip to first unread message

Estephan Moana

unread,
Aug 21, 2022, 2:41:26 PM8/21/22
to HCP-Users
Hello, I am using QuNex (v0.94.7, HCP pipelines v4.4.0) to process legacy MRI data using only T1w data (1 mm isotropic). After running a few tests, I noticed that following post-Freesurfer there are no myelin maps created. There are no obvious errors related to CreateMyelinMaps.sh in the output (see log files attached). I asked about this in the QuNex discourse forum, and I was recommended to ask about it here. Any thoughts what could be the reason for this? 

Thank you.

Estephan



done_hcp_post_freesurfer_HC0002_2022-08-21_11.24.43.506884.log
Log-hcp_post_freesurfer-2022-08-21_11.24.43.476405.log

Glasser, Matt

unread,
Aug 21, 2022, 2:43:13 PM8/21/22
to hcp-...@humanconnectome.org

We skip myelin map creation if only a T1w is available.


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/7e72dcba-77e7-4658-a0cd-6bf988d5db32n%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

unread,
Aug 21, 2022, 2:47:37 PM8/21/22
to HCP-Users, glas...@wustl.edu
I see. The way I found out about this was by trying to run the MSMAll step on the legacy fMRI data from this project. Is there a way to process MSMAll without myelin maps? Do you have any suggestions on how to proceed after the fMRISurface step when processing legacy data?

Glasser, Matt

unread,
Aug 21, 2022, 2:51:30 PM8/21/22
to hcp-...@humanconnectome.org

Perhaps you can post more details about this data including structural, field map, and functional parameters. 

 

The underlying MSMAll scripts allow not using myelin maps for MSMAll: https://github.com/Washington-University/HCPpipelines/blob/master/MSMAll/MSMAllPipeline.sh Line 529 remove the “A” from CA_CAT (Connectivity (C), Architecture (A), Topography (T)), but you might have to edit a copy of the pipeline, as I don’t think we exposed this outside the pipeline. 

Estephan Moana

unread,
Aug 21, 2022, 2:58:11 PM8/21/22
to HCP-Users, glas...@wustl.edu
It is this data set I asked about a few days ago, the post has all the imaging parameters: https://groups.google.com/a/humanconnectome.org/g/hcp-users/c/LFhoupvzQ_A/m/-0Smgjz5BAAJ

To clarify, you're suggesting that I should modify the MSMAllPipeline.sh, line 529 so that it reads: MSMAllRegsOrig+="@CA_CT" # Iterations

Is this correct?

Glasser, Matt

unread,
Aug 21, 2022, 3:00:36 PM8/21/22
to Estephan Moana, HCP-Users

Delete both “A.”

 

Given that that is also legacy low spatial and temporal resolution fMRI, I would check the FIX classification carefully and you would probably need to use a different FIX training file.

Estephan Moana

unread,
Aug 21, 2022, 3:05:44 PM8/21/22
to HCP-Users, glas...@wustl.edu, Estephan Moana
Thanks for the tips Matt. 

I used the FIX training file "Standard.RData", that in the FSL FIX user guide its description is:
  • Standard.RData - for use on more "standard" FMRI datasets / analyses; e.g., TR=3s, Resolution=3.5x3.5x3.5mm, Session=6mins, default FEAT preprocessing (including default spatial smoothing).

The resolution is not the same, but "close enough". Does this sound like a sensible choice?

Glasser, Matt

unread,
Aug 21, 2022, 3:06:56 PM8/21/22
to hcp-...@humanconnectome.org, Estephan Moana

Yes, but keep in mind that sICA+FIX’s performance is not as good for legacy data, mainly be cause it is just harder to do ICA in lower spatial and temporal resolution data.

Estephan Moana

unread,
Aug 23, 2022, 11:44:28 AM8/23/22
to HCP-Users, glas...@wustl.edu, Estephan Moana
Hi Matt, I was able to run MSMAll after following your advice to modify line 529 in the MSMAllPipeline.sh script to:     MSMAllRegsOrig+="@C_CT"                         # Iterations

There were still some errors due to the absence of myelin maps in the log though. Should I be concerned about these errors or are they expected? Thank you.

Estephan
error_hcp_msmall_fMRI_CONCAT_ALL_FM0007_2022-08-22_10.48.39.812019.log
Log-hcp_msmall-2022-08-22_10.48.39.753414.log

Glasser, Matt

unread,
Aug 23, 2022, 1:46:58 PM8/23/22
to hcp-...@humanconnectome.org, Estephan Moana

Maybe see if DeDriftAndResample works.  Probably we need to make some myelin map lines conditional if they aren’t available.

Estephan Moana

unread,
Aug 23, 2022, 3:07:39 PM8/23/22
to HCP-Users, glas...@wustl.edu, Estephan Moana
I tested it and DeDriftAndResample failed with the error (full log attached). What are your thoughts? Thank you.

Tue Aug 23 13:57:27 CDT 2022:DeDriftAndResamplePipeline.sh: DownSampleT1wFolderNames: /home/moanae/shared/project_FM_Gracely_TEST_FM0007/sessions/FM0007/hcp/FM0007/T1w/fsaverage_LR32k
Tue Aug 23 13:57:27 CDT 2022:DeDriftAndResamplePipeline.sh: Concat Reg
Tue Aug 23 13:57:27 CDT 2022:DeDriftAndResamplePipeline.sh: Hemisphere: L
Tue Aug 23 13:57:27 CDT 2022:DeDriftAndResamplePipeline.sh: Structure: CORTEX_LEFT
Tue Aug 23 13:57:27 CDT 2022:DeDriftAndResamplePipeline.sh: DeDriftRegFile: /opt/HCP/HCPpipelines/global/templates/MSMAll/DeDriftingGroup.L.sphere.

While running:
/opt/workbench/workbench-1.5.0/bin_rh_linux64/../exe_rh_linux64/wb_command -surface-sphere-project-unproject /home/moanae/shared/project_FM_Gracely_TEST_FM0007/sessions/FM0007/hcp/FM0007/MNINonLinear/Native/FM0007.L.sphere.MSMAll_InitialReg_2_d40_WRN.native.surf.gii /home/moanae/shared/project_FM_Gracely_TEST_FM0007/sessions/FM0007/hcp/FM0007/MNINonLinear/FM0007.L.sphere.164k_fs_LR.surf.gii /opt/HCP/HCPpipelines/global/templates/MSMAll/DeDriftingGroup.L.sphere. /home/moanae/shared/project_FM_Gracely_TEST_FM0007/sessions/FM0007/hcp/FM0007/MNINonLinear/Native/FM0007.L.sphere.MSMAll.native.surf.gii

ERROR: NAME OF FILE: DeDriftingGroup.L.sphere.
PATH TO FILE: /opt/HCP/HCPpipelines/global/templates/MSMAll

File does not exist.

error_hcp_dedrift_and_resample_fMRI_CONCAT_ALL_FM0007_2022-08-23_13.57.25.310192.log

Estephan Moana

unread,
Aug 23, 2022, 3:13:02 PM8/23/22
to HCP-Users, Estephan Moana, glas...@wustl.edu
This is the content of  /opt/HCP/HCPpipelines/global/templates/MSMAll in the singularity container:

Singularity> cd /opt/HCP/HCPpipelines/global/templates/MSMAll/
Singularity> ls
DeDriftingGroup.L.sphere.DeDriftMSMAll.164k_fs_LR.surf.gii
DeDriftingGroup.R.sphere.DeDriftMSMAll.164k_fs_LR.surf.gii
Q1-Q6_RelatedParcellation210.atlas_Topographic_ROIs.32k_fs_LR.dscalar.nii
Q1-Q6_RelatedParcellation210.atlas_Topography.32k_fs_LR.dscalar.nii
Q1-Q6_RelatedParcellation210.MyelinMap_BC_MSMAll_2_d41_WRN_DeDrift.32k_fs_LR.dscalar.nii
Q1-Q6_RelatedParcellation210.MyelinMap_BC_MSMAll_2_d41_WRN_DeDrift.59k_fs_LR.dscalar.nii
rfMRI_REST_Atlas_MSMAll_2_d41_WRN_DeDrift_hp2000_clean_PCA.ica_d10_ROW_vn
rfMRI_REST_Atlas_MSMAll_2_d41_WRN_DeDrift_hp2000_clean_PCA.ica_d11_ROW_vn
rfMRI_REST_Atlas_MSMAll_2_d41_WRN_DeDrift_hp2000_clean_PCA.ica_d12_ROW_vn
rfMRI_REST_Atlas_MSMAll_2_d41_WRN_DeDrift_hp2000_clean_PCA.ica_d137_ROW_vn
rfMRI_REST_Atlas_MSMAll_2_d41_WRN_DeDrift_hp2000_clean_PCA.ica_d13_ROW_vn
rfMRI_REST_Atlas_MSMAll_2_d41_WRN_DeDrift_hp2000_clean_PCA.ica_d14_ROW_vn
rfMRI_REST_Atlas_MSMAll_2_d41_WRN_DeDrift_hp2000_clean_PCA.ica_d15_ROW_vn
rfMRI_REST_Atlas_MSMAll_2_d41_WRN_DeDrift_hp2000_clean_PCA.ica_d16_ROW_vn
rfMRI_REST_Atlas_MSMAll_2_d41_WRN_DeDrift_hp2000_clean_PCA.ica_d17_ROW_vn
rfMRI_REST_Atlas_MSMAll_2_d41_WRN_DeDrift_hp2000_clean_PCA.ica_d18_ROW_vn
rfMRI_REST_Atlas_MSMAll_2_d41_WRN_DeDrift_hp2000_clean_PCA.ica_d19_ROW_vn
rfMRI_REST_Atlas_MSMAll_2_d41_WRN_DeDrift_hp2000_clean_PCA.ica_d20_ROW_vn
rfMRI_REST_Atlas_MSMAll_2_d41_WRN_DeDrift_hp2000_clean_PCA.ica_d21_ROW_vn
rfMRI_REST_Atlas_MSMAll_2_d41_WRN_DeDrift_hp2000_clean_PCA.ica_d40_ROW_vn
rfMRI_REST_Atlas_MSMAll_2_d41_WRN_DeDrift_hp2000_clean_PCA.ica_d7_ROW_vn
rfMRI_REST_Atlas_MSMAll_2_d41_WRN_DeDrift_hp2000_clean_PCA.ica_d8_ROW_vn
rfMRI_REST_Atlas_MSMAll_2_d41_WRN_DeDrift_hp2000_clean_PCA.ica_d9_ROW_vn

Coalson, Timothy Scott (S&T-Student)

unread,
Aug 23, 2022, 4:47:01 PM8/23/22
to HCP-Users, glas...@wustl.edu, Estephan Moana
The dedrifting filename in the command appears to be incomplete, there should be "DeDriftMSMAll.164k_fs_LR.surf.gii" after the period your command stops at.  Did you edit anything that contained this filename?

Tim


From: Estephan Moana <esteph...@gmail.com>
Sent: Tuesday, August 23, 2022 2:07 PM
To: HCP-Users <hcp-...@humanconnectome.org>
Cc: glas...@wustl.edu <glas...@wustl.edu>; Estephan Moana <esteph...@gmail.com>

Subject: Re: [hcp-users] Legacy MRI data processing using QuNex lacking myelin maps after post-Freesurfer processing
 
WARNING: This message has originated from an External Source. This may be a phishing expedition that can result in unauthorized access to our IT System. Please use proper judgment and caution when opening attachments, clicking links, or responding to this email.

Estephan Moana

unread,
Aug 23, 2022, 5:12:51 PM8/23/22
to HCP-Users, tsc...@mst.edu, glas...@wustl.edu, Estephan Moana
Thanks Tim, I did not change anything containing this filename but I did find a typo in the respective parameter in the qunex batch file. OnceI corrected the typo, I was able to go further but still found an error related to the absence of a T2w image (which this dataset does not have) - see below. How to address this issue? Thank you.

Tue Aug 23 16:01:14 CDT 2022:DeDriftAndResamplePipeline.sh: DownSampleFolder: /home/moanae/shared/project_FM_Gracely_TEST_FM0007/sessions/FM0007/hcp/FM0007/MNINonLinear/fsaverage_LR32k
Tue Aug 23 16:01:14 CDT 2022:DeDriftAndResamplePipeline.sh: DownSampleT1wFolder: /home/moanae/shared/project_FM_Gracely_TEST_FM0007/sessions/FM0007/hcp/FM0007/T1w/fsaverage_LR32k
Tue Aug 23 16:01:14 CDT 2022:DeDriftAndResamplePipeline.sh: LowResMesh: 32
Tue Aug 23 16:01:14 CDT 2022:DeDriftAndResamplePipeline.sh: Supports multiple lowres meshes
Tue Aug 23 16:01:14 CDT 2022:DeDriftAndResamplePipeline.sh: Working with Mesh: 32

While running:
/opt/workbench/workbench-1.5.0/bin_rh_linux64/../exe_rh_linux64/wb_command -add-to-spec-file /home/moanae/shared/project_FM_Gracely_TEST_FM0007/sessions/FM0007/hcp/FM0007/MNINonLinear/fsaverage_LR32k/FM0007.MSMAll.32k_fs_LR.wb.spec INVALID /home/moanae/shared/project_FM_Gracely_TEST_FM0007/sessions/FM0007/hcp/FM0007/MNINonLinear/T2w_restore.nii.gz

ERROR: data file not found

Glasser, Matt

unread,
Aug 23, 2022, 5:15:31 PM8/23/22
to hcp-...@humanconnectome.org, tsc...@mst.edu, Estephan Moana

Does that halt everything?  You might want to turn set -e off and just ignore the errors related to T2w images or myelin maps.  As I said, we haven’t made a formal “Legacy Mode” for MSMAll and DeDriftAndResample.

Estephan Moana

unread,
Aug 23, 2022, 5:52:06 PM8/23/22
to HCP-Users, glas...@wustl.edu, tsc...@mst.edu, Estephan Moana
Yes, it seems that this error halts everything.

I understand that "Legacy Mode" is currently limited. I am trying to see how far along I can go within these limitations. I would really like to benefit from the HCP preprocessing approach in this dataset, as I plan to run functional and structural connectivity analysis in addition to stimulus-evoked fMRI analysis.

When you say to turn set -e off,  you mean I should comment out any lines with "set -e" in some of the HCP pipeline scripts? Can you point me to which script(s) should I do that? Thank you.

Glasser, Matt

unread,
Aug 23, 2022, 5:57:47 PM8/23/22
to hcp-...@humanconnectome.org, tsc...@mst.edu, Estephan Moana

DeDriftAndResample is the biggest one, since you made it through MSMAll.

Estephan Moana

unread,
Aug 23, 2022, 7:02:52 PM8/23/22
to HCP-Users, glas...@wustl.edu, tsc...@mst.edu, Estephan Moana
Ok, so I did not find any "set -e" in the DeDriftAndResamplePipeline script. I did find the lines that reference T2w images (lines #731, 739) and commented them out. this allowed me to progress further until the script halts due to lack of myelin maps. Any tips on how can I go past without myelin maps?

Tue Aug 23 17:58:01 CDT 2022:DeDriftAndResamplePipeline.sh: MapMap: MyelinMap
Tue Aug 23 17:58:01 CDT 2022:DeDriftAndResamplePipeline.sh: MapMap: SmoothedMyelinMap
Tue Aug 23 17:58:01 CDT 2022:DeDriftAndResamplePipeline.sh: DEBUG: Point 2.0
Tue Aug 23 17:58:01 CDT 2022:DeDriftAndResamplePipeline.sh: DEBUG: Point 3.0

While running:
/opt/workbench/workbench-1.5.0/bin_rh_linux64/../exe_rh_linux64/wb_command -cifti-resample /home/moanae/shared/project_FM_Gracely_TEST_FM0007/sessions/FM0007/hcp/FM0007/MNINonLinear/Native/FM0007.sulc.native.dscalar.nii COLUMN /home/moanae/shared/project_FM_Gracely_TEST_FM0007/sessions/FM0007/hcp/FM0007/MNINonLinear/fsaverage_LR32k/FM0007.MyelinMap_BC.32k_fs_LR.dscalar.nii COLUMN ADAP_BARY_AREA ENCLOSING_VOXEL /home/moanae/shared/project_FM_Gracely_TEST_FM0007/sessions/FM0007/hcp/FM0007/MNINonLinear/fsaverage_LR32k/FM0007.sulc_MSMAll.32k_fs_LR.dscalar.nii -surface-postdilate 30 -left-spheres /home/moanae/shared/project_FM_Gracely_TEST_FM0007/sessions/FM0007/hcp/FM0007/MNINonLinear/Native/FM0007.L.sphere.MSMAll.native.surf.gii /home/moanae/shared/project_FM_Gracely_TEST_FM0007/sessions/FM0007/hcp/FM0007/MNINonLinear/fsaverage_LR32k/FM0007.L.sphere.32k_fs_LR.surf.gii -left-area-surfs /home/moanae/shared/project_FM_Gracely_TEST_FM0007/sessions/FM0007/hcp/FM0007/T1w/Native/FM0007.L.midthickness.native.surf.gii /home/moanae/shared/project_FM_Gracely_TEST_FM0007/sessions/FM0007/hcp/FM0007/T1w/fsaverage_LR32k/FM0007.L.midthickness_MSMAll.32k_fs_LR.surf.gii -right-spheres /home/moanae/shared/project_FM_Gracely_TEST_FM0007/sessions/FM0007/hcp/FM0007/MNINonLinear/Native/FM0007.R.sphere.MSMAll.native.surf.gii /home/moanae/shared/project_FM_Gracely_TEST_FM0007/sessions/FM0007/hcp/FM0007/MNINonLinear/fsaverage_LR32k/FM0007.R.sphere.32k_fs_LR.surf.gii -right-area-surfs /home/moanae/shared/project_FM_Gracely_TEST_FM0007/sessions/FM0007/hcp/FM0007/T1w/Native/FM0007.R.midthickness.native.surf.gii /home/moanae/shared/project_FM_Gracely_TEST_FM0007/sessions/FM0007/hcp/FM0007/T1w/fsaverage_LR32k/FM0007.R.midthickness_MSMAll.32k_fs_LR.surf.gii

ERROR: failed to open file '/home/moanae/shared/project_FM_Gracely_TEST_FM0007/sessions/FM0007/hcp/FM0007/MNINonLinear/fsaverage_LR32k/FM0007.MyelinMap_BC.32k_fs_LR.dscalar.nii', file does not exist, or folder permissions prevent seeing it


Glasser, Matt

unread,
Aug 23, 2022, 7:04:20 PM8/23/22
to hcp-...@humanconnectome.org, tsc...@mst.edu, Estephan Moana

You might need to comment out lines doing processing on myelin maps and any that use myelin maps as a reference (like this one) should be changed to thickness maps.

Coalson, Timothy Scott (S&T-Student)

unread,
Aug 23, 2022, 7:49:51 PM8/23/22
to Glasser, Matt, hcp-...@humanconnectome.org, Estephan Moana
To prevent the DeDriftAndResamplePipeline.sh script from stopping at errors, scroll down to the bottom, where you see this line:


and add a line immediately after it, with this code:

debug_disable_trap

Tim


From: Glasser, Matt <glas...@wustl.edu>
Sent: Tuesday, August 23, 2022 6:04 PM
To: hcp-...@humanconnectome.org <hcp-...@humanconnectome.org>
Cc: Coalson, Timothy Scott (S&T-Student) <tsc...@mst.edu>; Estephan Moana <esteph...@gmail.com>

Estephan Moana

unread,
Aug 24, 2022, 12:21:15 PM8/24/22
to HCP-Users, tsc...@mst.edu, Estephan Moana, glas...@wustl.edu
Thanks Tim and Matt. To change the reference from myelin maps to thickness maps, which thickness file should I use, this one? 
/.../FM0007/MNINonLinear/fsaverage_LR32k/FM0007.corrThickness.32k_fs_LR.dscalar.nii

If so, for example the command in this line should be modified like this, correct?

${Caret7_Command} -cifti-resample ${NativeFolder}/${Subject}.${NativeMap}.native.dscalar.nii COLUMN ${Folder}/${Subject}.corrThickness.${Mesh}k_fs_LR.dscalar.nii COLUMN ADAP_BARY_AREA ENCLOSING_VOXEL ${Folder}/${Subject}.${Map}_${OutputRegName}.${Mesh}k_fs_LR.dscalar.nii -surface-postdilate 30 -left-spheres ${NativeFolder}/${Subject}.L.sphere.${OutputRegName}.native.surf.gii ${Folder}/${Subject}.L.sphere.${Mesh}k_fs_LR.surf.gii -left-area-surfs ${NativeT1wFolder}/${Subject}.L.midthickness.native.surf.gii ${DownSampleT1wFolder}/${Subject}.L.midthickness_${OutputRegName}.${Mesh}k_fs_LR.surf.gii -right-spheres ${NativeFolder}/${Subject}.R.sphere.${OutputRegName}.native.surf.gii ${Folder}/${Subject}.R.sphere.${Mesh}k_fs_LR.surf.gii -right-area-surfs ${NativeT1wFolder}/${Subject}.R.midthickness.native.surf.gii ${DownSampleT1wFolder}/${Subject}.R.midthickness_${OutputRegName}.${Mesh}k_fs_LR.surf.gii

Glasser, Matt

unread,
Aug 24, 2022, 12:23:38 PM8/24/22
to hcp-...@humanconnectome.org, tsc...@mst.edu, Estephan Moana

Keep the variables, but you can change ‘MyelinMap_BC’ to ‘thickness’.

Reply all
Reply to author
Forward
0 new messages