[FieldTrip] ft_sourcestatistics on restricted regions of interest
Schoffelen, J.M. (Jan Mathijs)
janmathijs.schoffelen at donders.ru.nl
Tue Jun 14 11:33:48 CEST 2022
Hi Paolo,
My version of the fieldtrip code mentions a ‘FIXME the following needs to be reimplemented’ in line 29 of ft_sourcestatistics, which is just before the cfg options are described that you intend to use. My conclusion is therefore that the current fieldtrip code does not support this functionality. I see in your message that you use fieldtrip(-lite) as a plugin from EEGLAB. I don’t know the state of the code that is shipped with EEGLAB so I don’t know what the help of ft_sourcestatistics in that folder is promising the user w.r.t. certain functionality.
If you want to do a ‘roi’ (or parcel) based postprocessing of your data (including statistics), I recommend you to look into the functions ft_sourceparcellate and/or ft_virtualchannel for this.
Note that - once the data are parcellated - one should use ft_timelockstatistics/ft_freqstatistics even if the data has been source reconstructed.
Note also that the positions at which the sources are defined should coincide meaningfully with the positions that are defined in the atlas, e.g. it does not make sense to try and parcellate data that is defined on a corticex-constrained mesh using a volumetric (e.g. AAL) atlas.
Best wishes,
Jan-Mathijs
On 13 Jun 2022, at 10:55, Paolo PRESTI <paolo.presti at unipr.it<mailto:paolo.presti at unipr.it>> wrote:
Hi,
yes, sure I can give some further details.
I have recorded EEG data and extracted ERPs for two different conditions. At the scalp level, I have found significant differences between conditions in two separate time intervals: one over central electrodes around 250 ms after the stimulus presentations (P200), and the second one over occipital electrodes after 190 ms (N190). Then, I wanted to look for the source generators of these differences.
For each participant, I reconstructed the source activity using the ft_sourceanalysis function, with the mne method.
Here you can fine the line of codes:
cfg = [];
cfg.method = 'mne';
cfg.grid = leadfield;
cfg.headmodel = vol.vol;
cfg.mne.lambda = 3;
cfg.mne.scalesourcecov = 'yes';
sourceLow = ft_sourceanalysis(cfg, dataAvgLow);
sourceHigh = ft_sourceanalysis(cfg, dataAvgHigh);
Thus, I created a cell array with data of all subjects:
brain_lhh{i} = sourceHigh;
brain_hlm{i} = sourceLow;
As concerns the statistical analysis, I have used the same script of the tutorialhttps://www.fieldtriptoolbox.org/example/source_statistics/<https://urldefense.com/v3/__https://www.fieldtriptoolbox.org/example/source_statistics/__;!!HJOPV4FYYWzcc1jazlU!_LkHCep6J1bmBoOHwpLMO68Ky6g7I46AYzkxnLIp-hOkDeBUNJmg2rvacBiqK0BKt3yGyBB6IyUVX-TgnBx8AQI6C3rL6zqWGBbWew$>, just adding information about the time range that I wanted to test:
cfg=[];
cfg.method = 'montecarlo';
cfg.latency = [0.200 0.400]; % This was the significant time interaval where I found differences at the scalp level
cfg.avgovertime = 'yes';
cfg.statistic = 'ft_statfun_depsamplesT';
cfg.parameter = 'pow';
cfg.correctm = 'cluster';
%cfg.clusterstatistic = 'wcm';
cfg.numrandomization = 1000;
cfg.alpha = 0.05; % note that this only implies single-sided testing
cfg.tail = 0;
nsubj=numel(brain_hlm);
cfg.design(1,:) = [1:nsubj 1:nsubj];
cfg.design(2,:) = [ones(1,nsubj)*1 ones(1,nsubj)*2];
cfg.uvar = 1; % row of design matrix that contains unit variable (in this case: subjects)
cfg.ivar = 2; % row of design matrix that contains independent variable (the conditions)
statP200 = ft_sourcestatistics(cfg, brain_hlm{:}, brain_lhh{:});
This function returned the "statP200" variable where I can find information about the significant dipoles over the whole areas of the cortex.
What I want to do now is try to restrict the area of analysis to specific regions of interest. I see that the function ft_sourcestatistics gives the user the possibility to specify the ROIs, by populating the field cfg.atlas and cfg.roi. Hence, I added to the previous lines of code the following ones:
aal = ft_read_atlas('D:\Matlab Analysis\Toolbox\eeglab2021.0\plugins\Fieldtrip-lite20210601\template\atlas\aal\ROI_MNI_V4.nii');
cfg.atlas = aal;
cfg.roi = aal.tissuelabel;
cfg.avgoverroi = 'yes';
However, the statP200 variable returned by the ft_sourcestatistics did not contain any kind of information about differences over ROIs. Even if I try to specify some ROIs in the cfg.roi, it does not change anything in the results
Hope I now provided more details!
Thanks
Paolo
________________________________
Da: fieldtrip <fieldtrip-bounces at science.ru.nl<mailto:fieldtrip-bounces at science.ru.nl>> per conto di Schoffelen, J.M. (Jan Mathijs) via fieldtrip <fieldtrip at science.ru.nl<mailto:fieldtrip at science.ru.nl>>
Inviato: lunedì 13 giugno 2022 10:14
A: FieldTrip discussion list <fieldtrip at science.ru.nl<mailto:fieldtrip at science.ru.nl>>
Cc: Schoffelen, J.M. (Jan Mathijs) <janmathijs.schoffelen at donders.ru.nl<mailto:janmathijs.schoffelen at donders.ru.nl>>
Oggetto: Re: [FieldTrip] ft_sourcestatistics on restricted regions of interest
Ciao Paolo,
Can you please expand a little bit? From the formulation of your question I get the impression that you already tried out a few things, but probably you ran into problems. At this point, it is a bit random guessing to the readership as to in which direction the for you optimal answer would go.
So, some details as to what you have tried in terms of cfg, data objects etc. would be helpful.
Best wishes,
Jan-Mathijs
On 13 Jun 2022, at 09:44, Paolo PRESTI via fieldtrip <fieldtrip at science.ru.nl<mailto:fieldtrip at science.ru.nl>> wrote:
Hi all,
I want to perform some statistical comparisons between ROIs using the function ft_sourcestatistics. I see that one can specify the cfg.atlas and cfg.roi fields to restrict the analysis on specific ROIs. However, I am not sure that such a configuration has been already implemented.
Does anyone know if this function actually permits performing such an analysis? Does exist an alternative way?
Thanks,
Paolo
Paolo Presti, PhD Student
Department of Medicine and Surgery, Unit of Neuroscience
Via Volturno 39/E, 43125
Parma
<Outlook-5v4ksszb.jpg>
Firma il tuo 5xmille all’Università di Parma, aiutaci a essere sempre più accoglienti e inclusivi verso le nostre studentesse e i nostri studenti - Indica 00308780345 nella tua denuncia dei redditi.
_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip<https://urldefense.com/v3/__https://eur01.safelinks.protection.outlook.com/?url=https*3A*2F*2Fmailman.science.ru.nl*2Fmailman*2Flistinfo*2Ffieldtrip&data=05*7C01*7Cpaolo.presti*40unipr.it*7Cc481d8194dab43075ebb08da4d15edcd*7Cbb064bc5b7a841ecbabed7beb3faeb1c*7C0*7C0*7C637907053831077986*7CUnknown*7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0*3D*7C3000*7C*7C*7C&sdata=Fjjahtuq*2FfAs*2FGnU*2FOAN3d*2BHhOGuV4Q*2FuD*2Bk*2F7pZ3VE*3D&reserved=0__;JSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJSU!!HJOPV4FYYWzcc1jazlU!_LkHCep6J1bmBoOHwpLMO68Ky6g7I46AYzkxnLIp-hOkDeBUNJmg2rvacBiqK0BKt3yGyBB6IyUVX-TgnBx8AQI6C3rL6zrwmWPlkw$>
https://urldefense.com/v3/__https://doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!9FFVtfr7s6PJ7i_gvL_B__SzDuSmLe-MEza_7DIhRW2O1KSNb-MsEj0sa4uHJuBPItfwzpMYYhthjwvDuNDXWGeiUi1EdX3sbDoKSg$<https://urldefense.com/v3/__https://eur01.safelinks.protection.outlook.com/?url=https*3A*2F*2Furldefense.com*2Fv3*2F__https*3A*2F*2Fdoi.org*2F10.1371*2Fjournal.pcbi.1002202__*3B!!HJOPV4FYYWzcc1jazlU!9FFVtfr7s6PJ7i_gvL_B__SzDuSmLe-MEza_7DIhRW2O1KSNb-MsEj0sa4uHJuBPItfwzpMYYhthjwvDuNDXWGeiUi1EdX3sbDoKSg*24&data=05*7C01*7Cpaolo.presti*40unipr.it*7Cc481d8194dab43075ebb08da4d15edcd*7Cbb064bc5b7a841ecbabed7beb3faeb1c*7C0*7C0*7C637907053831077986*7CUnknown*7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0*3D*7C3000*7C*7C*7C&sdata=i05*2FsHJ2csSoS*2F8HeIZUiKZEtHUWmEJBNNKKhR2Ze1w*3D&reserved=0__;JSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUl!!HJOPV4FYYWzcc1jazlU!_LkHCep6J1bmBoOHwpLMO68Ky6g7I46AYzkxnLIp-hOkDeBUNJmg2rvacBiqK0BKt3yGyBB6IyUVX-TgnBx8AQI6C3rL6zq_kVUM4w$>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20220614/0191873a/attachment.htm>
More information about the fieldtrip
mailing list