<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<font size="4" class="">Dear Adi, </font>
<div class=""><font size="4" class=""><br class="">
</font></div>
<div class=""><font size="4" class="">As discussed outside the scope of the other readers: could you please provide some additional information with respect to possible diagnostics you performed yourself so far? Also, perhaps you could point to some documentation
 on the website, or earlier e-mail threads to provide some context?</font></div>
<div class=""><font size="4" class=""><br class="">
</font></div>
<div class=""><font size="4" class="">One thing you could do, is to read through the code of ft_sourcestatistics, and check whether the cfg.roi/cfg.atlas/cfg.inputcoord arguments are used to begin with. If you use the MATLAB debugger and the ‘dbstep’ and ‘dbstep
 in’ buttons you can recurse into lower level functions, such as ft_checkdata and ft_selectdata, which could be the place where the magic might be supposed to take place.</font></div>
<div class=""><font size="4" class=""><br class="">
</font></div>
<div class=""><font size="4" class="">Best wishes,</font></div>
<div class=""><font size="4" class="">Jan-Mathijs</font></div>
<div class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 14 May 2020, at 14:51, Adi Kilim <<a href="mailto:adikilim1@gmail.com" class="">adikilim1@gmail.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="rtl" class="">
<div dir="rtl" class="">
<div dir="rtl" class="">
<div dir="rtl" class="">
<div dir="rtl" class="">
<div dir="rtl" class="">
<div style="text-align:left" dir="ltr" class=""><span style="text-align: left; text-transform: none; text-indent: 0px; letter-spacing: normal; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-position: normal; font-weight: 400; text-decoration: none; word-spacing: 0px; display: inline; white-space: pre-wrap; float: none; background-color: transparent;" class=""><font face="arial,sans-serif" class="">Dear
 community,<br class="">
<br class="">
I am doing a source analysis on MEG data; I used the LCMV beamformer<br class="">
to localize on time-locked data, and want to contrast two conditions: faces and vehicles in tempo-occipital regions.
</font><font face="arial,sans-serif" class="">I used AAL atlas to do that. The code is running however when I'm looking at the stat struct all the voxel are include inside the analysis and thus the clusters are across different brain regions. I've searched
 around the tutorial web pages and the mailing list archive,<br class="">
and didn't find explanation for this or similar problem in fieldtrip similar versions (I'm using fieldtrip-20200409).
</font><b class=""></b><i class=""></i><u class=""></u><sub class=""></sub><sup class=""></sup><strike class=""></strike><font face="arial,sans-serif" class=""></font><font face="arial,sans-serif" class="">This is my code:
</font><font face="arial,sans-serif" class=""></font>------- <font face="arial,sans-serif" class="">
aal = ft_read_atlas('ROI_MNI_V4.nii');<br class="">
</font><font face="arial,sans-serif" class=""><br class="">
cfgStat = [];</font></span></div>
<span style="text-align: left; text-transform: none; text-indent: 0px; letter-spacing: normal; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-position: normal; font-weight: 400; text-decoration: none; word-spacing: 0px; display: inline; white-space: pre-wrap; float: none; background-color: transparent;" class="">
<div style="text-align:left" dir="ltr" class=""><font face="arial,sans-serif" class=""><br class="">
% <br class="">
cfgStat.atlas        =  aal;<br class="">
cfgStat.roi          = {'Temporal_Mid_L'}; %Example ROI<br class="">
cfgStat.avgoverroi   = 'yes';</font> <font face="arial,sans-serif" class="">cfgStat.hemisphere   = 'left';<br class="">
cfgStat.inputcoord   = 'mni' ;</font></div>
<div style="text-align:left" dir="ltr" class=""><font face="arial,sans-serif" class=""><br class="">
cfgStat.avgovertime     = 'yes'; %'no'<br class="">
cfgStat.parameter        ='avg.pow';<br class="">
cfgStat.method           = 'montecarlo';<br class="">
cfgStat.statistic        = 'depsamplesT'; </font><font face="arial,sans-serif" class="">cfgStat.correctm         = 'cluster';<br class="">
cfgStat.clusteralpha     = 0.05;<br class="">
cfgStat.clusterstatistic = 'maxsum';<br class="">
cfgStat.minnbchan        = 2;<br class="">
cfgStat.tail             = 0;<br class="">
cfgStat.clustertail      = 0;<br class="">
cfgStat.alpha            = 0.05;<br class="">
cfgStat.numrandomization = 1000;<br class="">
cfgStat.neighbours       = neighbours;<br class="">
cfgStat.design           = designMat;</font></div>
<div style="text-align:left" dir="ltr" class=""><font face="arial,sans-serif" class=""></font><br class="">
</div>
<div style="text-align:left" dir="ltr" class=""><font face="arial,sans-serif" class=""><br class="">
[stat_mainCond_spcTime] = ft_sourcestatistics(cfgStat, cond1_allSub{:},cond2_allSub{:});<br class="">
</font>------- <font face="arial,sans-serif" class=""><br class="">
</font><span style="text-align: left; text-transform: none; text-indent: 0px; letter-spacing: normal; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-position: normal; font-weight: 400; text-decoration: none; word-spacing: 0px; display: inline; white-space: pre-wrap; float: none; background-color: transparent;" class=""><font face="arial,sans-serif" class="">Any
 ideas on how to solve this atlas source statistics problem (performing statistics on specific ROI and identify the cluster) would be greatly appreciated!<br class="">
</font><font face="arial,sans-serif" class="">Thanks, </font><font face="arial,sans-serif" class="">Adi
<br class="">
</font></span><b class=""></b><i class=""></i><u class=""></u><sub class=""></sub><sup class=""></sup><strike class=""></strike><br class="">
</div>
</span></div>
</div>
</div>
</div>
</div>
</div>
_______________________________________________<br class="">
fieldtrip mailing list<br class="">
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" class="">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br class="">
https://doi.org/10.1371/journal.pcbi.1002202<br class="">
</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>