[FieldTrip] EEG connectivity analysis - error with ft_sourceparcellate in whole brain connectivity tutorial
Rebecca Kenny
beckenny at student.ubc.ca
Tue Sep 15 23:54:12 CEST 2020
Hello Jan-Mathijs,
Thank you very much for your reply! It seems to have worked and I am really
appreciative. I now have a new error that maybe you can help with. Would
this be because of the atlas I chose?
cfg = [];
cfg.parcellation = 'tissue';
cfg.parameter = 'cohspctrm';
parc_conn = ft_sourceparcellate(cfg, source_conn, atlas);
there are in total 4050 positions, 2015 positions are inside the brain,
701027 positions have a label
0 of the positions inside the brain have a label
The logical indices contain a true value outside of the array bounds.
Error in ft_sourceparcellate (line 172)
fprintf('%d of the labeled positions are inside the brain\n',
sum(source.inside(seg(:)~=0)));
Thank you,
Rebecca
On Mon, Sep 14, 2020 at 10:50 PM Schoffelen, J.M. (Jan Mathijs) <
jan.schoffelen at donders.ru.nl> wrote:
> Hi Rebecca,
>
> The atlas needs to be represented as a proper atlas, also known as a
> ‘parcellation’. Unless you know what you’re doing, this can only be
> achieved if the specified atlas is either in a well defined mat-file, or if
> the atlas is created (i.e. read from file + some additional wizardry
> applied to those data) by ft_read_atlas. I suspect that you did not do
> atlas = ft_read_atlas(‘AllAreas_v17_MPM.mat’); in order to create the atlas
> variable.
>
> Also, note that ft_sourceparcellate will try and make the parcellation
> according to the information in the named <cfg.parcellation> field. After
> calling ft_read_atlas for the AllAreas_v17_MPM file, this parcellation is
> defined in the (confusingly) ’tissue’ field, so cfg.parcellation should be
> ’tissue’.
>
> Best wishes,
> Jan-Mathijs
>
>
>
> On 14 Sep 2020, at 20:41, Rebecca Kenny <beckenny at student.ubc.ca> wrote:
>
> Hello,
>
> I am attempting to run connectivity analysis on resting-state EEG data. *
> My goal of source space analysis is to run ft_networkanalysis and extract
> graph theory variables. *I am following the "whole-brain connectivity and
> network analysis" tutorial. I believe I have successfully navigated the
> tutorial (after importing my cleaned data from EEGlab) until I experience
> errors when I get to the 'connectivity analysis and parcellation'.
>
> I can't find the atlas_MMP1.0_4k.mat file so I tried to use
> AllAreas_v17.mat.
>
> % compute connectivity
>
> cfg = [];
>
> cfg.method ='coh';
>
> cfg.complex = 'absimag';
>
> source_conn = ft_connectivityanalysis(cfg, source);
>
>
>
> load AllAreas_v17.mat;
>
> atlas.pos = source_conn.pos;
>
>
>
> cfg = [];
>
> cfg.parcellation = 'parcellation';
>
> cfg.parameter = 'cohspctrm';
>
> parc_conn = ft_sourceparcellate(cfg, source_conn, atlas);
>
>
> figure;imagesc(parc_conn.cohspctrm);
>
>
>
> Error using ft_checkdata (line 528)
>
> This function requires parcellation data as input, see
> ft_datatype_parcellation.
>
>
> Error in ft_sourceparcellate (line 97)
>
> parcellation = ft_checkdata(parcellation, 'datatype', 'parcellation',
> 'parcellationstyle', 'indexed');
>
>
> If there is an email thread already, please direct me to the proper post.
>
> I appreciate any help. I have been stuck at this part for a while and
> would love to move through my analysis.
>
> Thank you,
> Rebecca
>
> _______________________________________________
> fieldtrip mailing list
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> https://doi.org/10.1371/journal.pcbi.1002202
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20200915/1f48b2df/attachment.htm>
More information about the fieldtrip
mailing list