[FieldTrip] problem using ft_sourceparcellate

Johannes Gehrig jgehrig at med.uni-frankfurt.de
Thu Oct 7 12:02:28 CEST 2021


Dear Jan-Mathijs,

In general, I want to compare the connectivity between two MEG sessions in which patients took different drugs. 

I followed the tutorial "whole brain connectivity" to get a first idea of the data (so I tried to calculate the connectivity in dipole space...). 
I tried to use the parcellation of Glasser et al 2016 (atlas_MMP1.0_4k.mat). To fit this to my data, I used ft_sourceinterpolate of my source model (subject-specific, using the template "standard_sourcemodel3d8mm") and the atlas.

I think this is exactly the cause: "One possible cause is the fact that some parcels in the input parcellation are not assigned any of the locations where your subject data is represented."
Because when I debug (ft_sourceparcellate), the second parcel is not found (j==2, and dat(tissue==j) is an "Empty cell array: 0-by-1").

How could I solve this issue?

Thanks in advance an best regards, 
Johannes

Von: Schoffelen,J.M. (Jan Mathijs) via fieldtrip
Gesendet: Donnerstag, 7. Oktober 2021 10:28
An: FieldTrip discussion list
Cc: Schoffelen, J.M. (Jan Mathijs)
Betreff: Re: [FieldTrip] problem using ft_sourceparcellate

Dear Johannes, 

Could you explain a bit more what you attempt to do? Specifically: what is the parcellation that you are using? Ideally, you should use one that is defined on exactly the same surface as your data.  Otherwise (e.g. when using a parcellation defined in 3D space) some on-the-fly interpolation is required, and this may not work robustly enough. One possible cause is the fact that some parcels in the input parcellation will not get assigned any of the locations at which your functional data is represented. Which is probably the cause of the error you are facing.

Best wishes,
Jan-Mathijs

PS: as a side note, in general I would recommend to compute connectivity in parcellated space, rather than in ‘dipole space’. Apart from potential memory issues, the sheer number of pairwise combination makes the interpretation / statistical evaluation quite complicated.


On 7 Oct 2021, at 09:08, Johannes Gehrig via fieldtrip <fieldtrip at science.ru.nl> wrote:

Dear Stefan,
 
thanks for your reply. At the moment I use simple "coherence" following the „whole brain connectivity“ tutorial. However, if there was a memory efficient solution for dwPLI that is also an option. If I followed the discussion correctly, this is not yet fully implemented?
 
Have you tried to parcellate your data before doing the connectivity analysis? I suspect that my problem could be related with ft_sourceinterpollate, because the output of the source analysis (avg.csd, avg.mom, avg.noisecsd, computed withels pcc) is no longer present after ft_sourceinterpolate and without the source interpolation the source parcellation doesn't work, so far my impression...
 
Thanks and best regards,
Johannes
 
Von: Stefan Dvoretskii
Gesendet: Mittwoch, 6. Oktober 2021 17:39
An: FieldTrip discussion list
Cc: Johannes Gehrig; Gil Avila, Cristina
Betreff: Re: [FieldTrip] problem using ft_sourceparcellate
 
Dear Johannes, 
 
which connectivity measure are you using? There is a potential bottleneck in the 'ft_connectivityanalysis', which can however be circumvented with custom code, at least for dwPLI. Then you won't even need to parcelate.
We are currently working to incorporate it into the Fieldtrip code.
 
Best regards,
Stefan
 
пн, 4 окт. 2021 г., 11:06 Johannes Gehrig via fieldtrip <fieldtrip at science.ru.nl>:
Dear Fieldtrip-user,
I am facing a problem using ft_sourceinterpolate. I am following the "Whole brain connectivity and network analysis"- Tutorial and as I can not compute the connectivity directly with the source data ("out of memory") I would like to perform the source parcellation before computing the connectivity. Unfortunately (fieldtrip 20211001 and matlab2018b) ft_sourceparcellate crashes after calling it. Before computing the source data the sourcemodel was interpolated with the atlas using ft_sourceinterpolate. Therefore the amount of positions in the atlas and the source data is the same (8004).
load('atlas_MMP1.0_4k.mat'); 
cfg = [];
cfg.parcellation = 'parcellation';
cfg.method       = 'mean';
cfg.parameter    = 'all'; 
parc_sourceOn = ft_sourceparcellate(cfg, source_ON, atlas);
Error message:"
there are in total 8004 positions, 4544 positions are inside the brain, 8004 positions have a label
4544 of the positions inside the brain have a label
4544 of the labeled positions are inside the brain
0 of the positions inside the brain do not have a label
creating 362 parcels for parameter csd by taking the mean
computing parcellation
232           tmp(j,:,:) = cellmean1(dat(tissue==j));
computing parcellation for L_V1_ROI
Index exceeds array bounds.

Error in ft_sourceparcellate>cellmean1 (line 494)
y = x{1};

Error in ft_sourceparcellate (line 232)
          tmp(j,:,:) = cellmean1(dat(tissue==j));
"
Any help and ideas are very much appreciated!
Best regards, Johannes
_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
https://doi.org/10.1371/journal.pcbi.1002202

 
_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
https://urldefense.com/v3/__https://doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!pg0W3nFXzJCE9mE1pvYfYPxllCL06pTokAzKEH8cYGsjnXbtXGbXLrC_6SLHcu0eFLPB1lmxevpST48$ 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20211007/d5dae382/attachment.htm>


More information about the fieldtrip mailing list