[FieldTrip] Clustering channel dimension of DTF Connectivity

Antony Passaro antony.passaro at gmail.com
Wed May 8 23:17:21 CEST 2013

 Hi Fieldtrippers,

I am trying to perform a group-level comparison of 2 conditions across 10
subjects based on the DTF connectivity. For the time being, we are looking
at the DTF for a subset of frequencies (alpha) and choosing the avgoverfreq
option which gives us a 4096 x 1 matrix since we are looking at 64 x 64
channels. Using ft_freqstatistics, I noticed that it will throw an error
explaining that there is not yet an implementation for data with channelcmb
for a cluster analysis so I took it upon myself to identify channel pairs
which should be considered neighbors and build a new neighbor structure
prior to running ft_freqstatistics. To do that, I took the basic neighbor
structure for 64 channels and then created a new neighbor structure of 4096
channel pairs based on the code below:

for i=1:4096
    label{i,1} = [dtf.labelcmb{i,1},'_',dtf.labelcmb{i,2}];

labelcmb = dtf.labelcmb;


%Identify the channel pairs which are neighbors with the target channel
NBtarget = {};
for ch=1:chans^2
    NBtarget(ch).label = label{ch};
    target = find(cellfun(@(x) strcmp(labelcmb{ch,1},x),{neighbours(:).label})
==1) ;
    tempnb = cellfun(@(x) strcat(x,['_' labelcmb{ch,2}]),{neighbours(
    NBtarget(ch).neighblabel = tempnb{:};

%Identify the channel pairs which are neighbors with the reference channel
NBref = {};
for ch=1:chans^2
    NBref(ch).label = label{ch};
    target = find(cellfun(@(x) strcmp(labelcmb{ch,2},x),{neighbours(:).label})
==1) ;
    tempnb = cellfun(@(x) strcat([labelcmb{ch,1}
    NBref(ch).neighblabel = tempnb{:};

%Append both sets of neighbors (ref and target)
NBboth= {};
for ch=1:chans^2
    NBboth(ch).label = label{ch};
    NBboth(ch).neighblabel = [NBref(ch).neighblabel;

This seems to work and the clustering method proceeds without error. My
question is the following: is this the proper way to utilize the clustering
method using ft_freqstatistics on connectivity data or am I missing

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130508/ef2c95a0/attachment-0001.html>

More information about the fieldtrip mailing list