Hi Tim and Benjamin,

@Tim: Thank you very much for your comments
@Benjamin: You can find the 4k spheres that were used for the released MEG data 
in the MEG pipeline in

https://github.com/Washington-University/megconnectome/tree/master/template

I also try Tim’s advice on using  -cifti-resample

Have a nice day
Giorgos

From: Timothy Coalson <tsc...@mst.edu<mailto:tsc...@mst.edu>>
Date: Friday, 13. April 2018 at 00:23
To: Giorgos Michalareas <g...@ae.mpg.de<mailto:g...@ae.mpg.de>>
Cc: Benjamin Chiêm 
<benjamin.ch...@uclouvain.be<mailto:benjamin.ch...@uclouvain.be>>, 
"hcp-users@humanconnectome.org<mailto:hcp-users@humanconnectome.org>" 
<hcp-users@humanconnectome.org<mailto:hcp-users@humanconnectome.org>>
Subject: Re: [HCP-Users] MEG processing pipelines

If you want to match existing 4K data, you shouldn't create a new sphere, you 
should obtain the spheres that define the correspondence between the surfaces 
you want to use, and the atlas your data is currently on.

Also, note that wb_command -cifti-resample will allow you to skip the separate, 
resample, cifti-create sequence.  This command is smart enough to notice when 
you are using label data, and do the right thing.  For an extreme downsampling 
like this, it will likely be rather detrimental to the area definitions (if you 
have a summary measure you want to compare to the atlas, consider upsampling 
that summary measure instead), but the ADAP_BARY_AREA method should be somewhat 
better for downsampling (but requires a little extra work).

If the outlines of the labels are what you want, then you can use border files 
instead - these aren't restricted to the vertices the way label files are, so 
the border file outlines will remain sharp when resampled.  You can make border 
files from label files at their original resolution with wb_command 
-cifti-label-to-border and/or -label-to-border .

Tim


On Thu, Apr 12, 2018 at 7:37 AM, Georgios Michalareas 
<g...@ae.mpg.de<mailto:g...@ae.mpg.de>> wrote:

Hi Benjamin,

to resample from 165K and 32K to 4K you need to use wb_command from connectome 
workbench software available on the connectome db website.

This is the actual documentation page of wb_command

https://www.humanconnectome.org/software/workbench-command

To downsample form 165K and 32K to a 4k representation you need a target 4k 
sphere for each hemisphere  (cortical surfaces are inflated to spheres then 
downsampled and then deflated again).
To create such a sphere you can use something like the foillowing commands


downsampDir=/home/georgios.michalareas/workspace/projects/testHCPsMRIinMPIEA/wbdata_downsampled/

wb_command -surface-create-sphere 4000 ${downsampDir}Sphere.4k.R.surf.gii
wb_command -surface-flip-lr ${downsampDir}Sphere.4k.R.surf.gii 
${downsampDir}Sphere.4k.L.surf.gii
wb_command -set-structure ${downsampDir}Sphere.4k.R.surf.gii CORTEX_RIGHT
wb_command -set-structure ${downsampDir}Sphere.4k.L.surf.gii CORTEX_LEFT


Then once you have these spheres you can downsample a label file with something 
like (commands on a linux terminal)

wb_command -cifti-separate EZE09.aparc.164k_fs_LR.dlabel.nii COLUMN  -label  
CORTEX_LEFT  TMPOLD_LEFT_EZE09.aparc.164k.label.gii
wb_command -cifti-separate EZE09.aparc.164k_fs_LR.dlabel.nii COLUMN  -label  
CORTEX_RIGHT  TMPOLD_RIGHT_EZE09.aparc.164k.label.gii
wb_command -label-resample TMPOLD_LEFT_EZE09.aparc.164k.label.gii   
EZE09.L.sphere.164k_fs_LR.surf.gii Sphere.4k.L.surf.gii BARYCENTRIC 
TMPNEW_LEFT_EZE09.aparc.164k.label.gii
wb_command -label-resample TMPOLD_RIGHT_EZE09.aparc.164k.label.gii   
EZE09.R.sphere.164k_fs_LR.surf.gii Sphere.4k.R.surf.gii BARYCENTRIC 
TMPNEW_RIGHT_EZE09.aparc.164k.label.gii
wb_command -cifti-create-label  EZE09.aparc.a2009s.4k_fs_LR.dlabel.nii 
-left-label TMPNEW_LEFT_EZE09.aparc.164k.label.gii    -right-label 
TMPNEW_RIGHT_EZE09.aparc.164k.label.gii

# delete temporary files
rm -f   TMPOLD_LEFT_EZE09.aparc.164k.label.gii
rm -f   TMPOLD_RIGHT_EZE09.aparc.164k.label.gii
rm -f  TMPNEW_LEFT_EZE09.aparc.164k.label.gii
rm -f  TMPNEW_RIGHT_EZE09.aparc.164k.label.gii

The parcellation files from Freesurfer atlases , including Desikan-Killiany, 
i.e. EZE09.aparc.164k_fs_LR.dlabel.nii, as well as the 164K spheres required 
for downsampling , i.e. EZE09.L.sphere.164k_fs_LR.surf.gii, should be in the 
latest processed structural mri data that you download from connectome db. Look 
in the "MNINonLinear" folder.

I hope these helped
Best
Giorgos




On 4/10/2018 4:25 PM, Benjamin Chiêm wrote:
Dear Georgios,

Thank you again for your very helpful answer.
I have succeeded in parcellating my results using the Yeo et al. atlas, with 
the *.dlabel.nii file provided with the parcellated HCP MEG data (107 nodes), 
and with the wb_command –cifti-parcellate line code.

However, I have troubles to find equivalent *.dlabel.nii files for other 
parcellations scheme, like for the example the Desikan-Killiany atlas. Could 
you help me? Also, should I just use the ft_resampledata Fieldtrip function in 
order to go from the 165K or 32K to the 4K dlabel files, or am I missing 
something?

Regards,

Benjamin

De : Georgios Michalareas <g...@ae.mpg.de><mailto:g...@ae.mpg.de>
Envoyé : lundi 26 mars 2018 19:20
À : Benjamin Chiêm 
<benjamin.ch...@uclouvain.be><mailto:benjamin.ch...@uclouvain.be>; 
hcp-users@humanconnectome.org<mailto:hcp-users@humanconnectome.org>
Objet : Re: [HCP-Users] MEG processing pipelines


Hi Benjamin,

Sorry for late reply but I was out of office.

Regarding single trial source analysis I have put together some code that shows 
you how to project all motor trials for LH into source space in a matrix with 
dimensions:

Nsources * Ntimespoints * Ntrials

beware this matrix for the specific subject is 11GB.

Please find the code attached in file

testsourcepertrial1.m

I have put some comments i hope they help.



Regarding parcellating the data, you have to use the workbench command tool to 
donwload all parcelations from thw 165 K representation to the 4K one used for 
the MEG source level analysis.

I ll have a look and come back to you on this.



Till then I hope the code I am sending you helps

Best

Giorgos

On 3/16/2018 3:38 PM, Benjamin Chiêm wrote:
Dear HCP experts,

In the context of my PhD thesis (using HCP data), I had some questions about 
MEG processing pipelines.
In my research, I somehow need the MEG data during motor task, in the source 
space (i.e. after beamforming), for each trial and each individual separately. 
It seems that the MEG pipelines average data over trials for each individual, 
and that they reduce the temporal resolution of the data when going from 
'tmegpreproc' files to 'srcavglcmv’.

So my two questions are:

- Is it possible, from the 'tmegpreproc' file for each individual, to perform 
sources reconstruction with Linearly Constrained Minimum Variance beamformer 
for each trial independently, and to keep the original temporal resolution 
(about 500Hz)? What are the steps to follow? I tried to play with options like 
« cfg.rawtrial = yes » or « cfg.keeptrials = yes » in ft_timelockanalysis and 
ft_sourceanalysis of the hcp_srcavglcmv_contrasts.m file, but to be honest I am 
not sure of what I am doing…

- After projection on the sources space, how can I parcellate the data, using 
for example the Desikan-Killiany atlas?

I hope I am clear enough in my explanations. Thank you again for the amazing 
work you’re doing!

Regards,

Benjamin Chiêm


_______________________________________________
HCP-Users mailing list
HCP-Users@humanconnectome.org<mailto:HCP-Users@humanconnectome.org>
http://lists.humanconnectome.org/mailman/listinfo/hcp-users

[https://ipmcdn.avast.com/images/icons/icon-envelope-tick-green-avg-v1.png]<http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>

Virus-free. 
www.avg.com<http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>




--

------------------------------------------------

Dr. Georgios Michalareas

Neuroscience Department

Max Planck Institute for Empirical Aesthetics



email: g...@aesthetics.mpg.de<mailto:g...@aesthetics.mpg.de>

phone: +49 69 8300479-325

------------------------------------------------


--
------------------------------------------------
Dr. Georgios Michalareas
Neuroscience Department
Max Planck Institute for Empirical Aesthetics

email: g...@aesthetics.mpg.de<mailto:g...@aesthetics.mpg.de>
phone: +49 69 8300479-325
------------------------------------------------

_______________________________________________
HCP-Users mailing list
HCP-Users@humanconnectome.org<mailto:HCP-Users@humanconnectome.org>
http://lists.humanconnectome.org/mailman/listinfo/hcp-users


_______________________________________________
HCP-Users mailing list
HCP-Users@humanconnectome.org
http://lists.humanconnectome.org/mailman/listinfo/hcp-users

Reply via email to