<div dir="ltr"><div class="gmail_default" style="font-family:georgia,serif">It worked!</div><div class="gmail_default" style="font-family:georgia,serif">Thank you for your help and patience with this simple issue, Dr. Schoffelen.<br></div><div class="gmail_default" style="font-family:georgia,serif"><br></div><div class="gmail_default" style="font-family:georgia,serif">With gratitude,</div><div class="gmail_default" style="font-family:georgia,serif">Camilo</div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><b style="color:rgb(80,0,80)"><span style="font-size:12pt;color:rgb(99,144,68)"><font face="georgia, serif">================================</font></span></b><font face="georgia, serif"><b><br></b></font></div><div><font face="georgia, serif" color="#38761d"><b>Camilo Castelblanco Riveros (He/His)</b></font></div><div><font face="georgia, serif" color="#274e13">Ph.D. Candidate (G3)</font></div><div><div><font face="georgia, serif" color="#274e13"><a href="https://www.robertsonlab.com/" target="_blank">Robertson Lab</a> & <a href="https://www.dartmouth-hitchcock.org/research/search-clinical-trials/trial/STUDY02001606" target="_blank">Bujarski Lab</a></font></div><div><font face="georgia, serif" color="#274e13">Student Interest Group in Neurology (<a href="https://geiselmed.dartmouth.edu/student-gov/student-groups/" target="_blank">SIGN</a>) Co-Leader<u></u></font></div></div><div><font face="georgia, serif" color="#274e13">Diversity Student Advisory Board Member</font></div><div><font face="georgia, serif" color="#274e13">e: <a href="mailto:camilo.a.castelblanco.riveros.gr@dartmouth.edu" target="_blank">ccastelblanco.gr@dartmouth.edu</a></font></div><div><font face="georgia, serif" color="#274e13"><a href="https://dartmouth.zoom.us/my/ccastelblanco" target="_blank">Zoom</a></font></div><div><div style="color:rgb(34,34,34)"><div><font face="georgia, serif"><br></font></div></div></div><div><font face="georgia, serif"><img src="https://pbs.twimg.com/profile_images/1442874308360032261/L7MnNrBk_400x400.jpg" alt="Integrative Neuroscience at Dartmouth (IND) (@DartmouthNeuro) / Twitter" width="96" height="96"><img src="https://jobsearch.dartmouth-hitchcock.org/wp-content/uploads/DH-Bug-e1666020448423.png" width="96" height="96"></font></div></div></div></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Oct 7, 2024 at 11:49 AM Schoffelen, J.M. (Jan Mathijs) via fieldtrip <<a href="mailto:fieldtrip@science.ru.nl">fieldtrip@science.ru.nl</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
Hi Camilo,
<div><br>
</div>
<div>Have you recently updated your fieldtrip version? I think that the mexmaca64 compiled code was added a while back (w.r.t. the spm_bwlabel function it seems that this has been added about 8 months ago, as far as I can see in the repo’s history on github).</div>
<div><br>
</div>
<div>Best wishes,</div>
<div>Jan-Mathijs</div>
<div><br>
</div>
<div><br id="m_-6151340506305739039lineBreakAtBeginningOfMessage">
<div><br>
<blockquote type="cite">
<div>On 7 Oct 2024, at 17:11, Camilo Castelblanco Riveros via fieldtrip <<a href="mailto:fieldtrip@science.ru.nl" target="_blank">fieldtrip@science.ru.nl</a>> wrote:</div>
<br>
<div>
<div dir="ltr">
<div class="gmail_default" style="font-family:georgia,serif">Hi!</div>
<div class="gmail_default" style="font-family:georgia,serif"><br>
</div>
<div class="gmail_default" style="font-family:georgia,serif">Thanks in advance for your support.</div>
<div class="gmail_default" style="font-family:georgia,serif"><br>
</div>
<div class="gmail_default" style="font-family:georgia,serif"><b>Context</b>:</div>
<div class="gmail_default" style="font-family:georgia,serif">I am trying to run "ft_freqstatistics" comparing conditions within an individual subject. </div>
<div class="gmail_default" style="font-family:georgia,serif"><b>Issue</b>:</div>
<div class="gmail_default" style="font-family:georgia,serif">When running the code, I get the following error:</div>
<div class="gmail_default" style="font-family:georgia,serif">---</div>
<div class="gmail_default" style="font-family:georgia,serif">generated 1000 random permutations<br>
computing a parametric threshold for clustering<br>
computing statistic<br>
estimated time per randomization is 0.13 seconds<br>
computing statistic 1000 from 1000<br>
<br>
Error using spm_bwlabel (line 27)<br>
spm_bwlabel.c not compiled - see Makefile<br>
</div>
<div class="gmail_default" style="font-family:georgia,serif">---</div>
<div class="gmail_default" style="font-family:georgia,serif"><br>
</div>
<div class="gmail_default" style="font-family:georgia,serif"><b>Troubleshooting</b>:</div>
<div class="gmail_default" style="font-family:georgia,serif">1. I inspected my fieldtrip SPM toolbox (''...GitHub/fieldtrip/external/spm12'') has the spm_bwlabel files but not the spm_bwlabel.mexmaca64. I think I need the spm_bwlabel.mexmaca64 to run it on
my machine; is that correct?</div>
<div class="gmail_default" style="font-family:georgia,serif">2. Doing some reading, I may need to compile the spm_make_standalone.m file. However, I do not know how to do it in Fieldtrip's path.</div>
<div class="gmail_default" style="font-family:georgia,serif"><br>
</div>
<div class="gmail_default" style="font-family:georgia,serif"><b>My code</b>:</div>
<div class="gmail_default" style="font-family:georgia,serif">
<div style="padding:30px">
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
<span style="white-space:pre-wrap">cfg = [];</span></div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
<span style="white-space:pre-wrap">cfg.parameter = <span style="color:rgb(167,9,245)">
'powspctrm'</span>; <span style="color:rgb(0,128,19)">% Specify power spectrum parameter</span></span></div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
<span style="white-space:pre-wrap">cfg.method = <span style="color:rgb(167,9,245)">'montecarlo'</span>;
<span style="color:rgb(0,128,19)">% Use permutation testing</span></span></div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
<span style="white-space:pre-wrap">cfg.statistic = <span style="color:rgb(167,9,245)">
'depsamplesT'</span>; <span style="color:rgb(0,128,19)">% Dependent samples t-test</span></span></div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
<span style="white-space:pre-wrap">cfg.correctm = <span style="color:rgb(167,9,245)">'cluster'</span>;
<span style="color:rgb(0,128,19)">% Use cluster-based correction</span></span></div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
<span style="white-space:pre-wrap">cfg.clusteralpha = 0.05; <span style="color:rgb(0,128,19)">
% Threshold for forming clusters</span></span></div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
<span style="white-space:pre-wrap">cfg.clusterstatistic = <span style="color:rgb(167,9,245)">
'maxsum'</span>; <span style="color:rgb(0,128,19)">% Sum of t-values for defining clusters</span></span></div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
<span style="white-space:pre-wrap">cfg.alpha = 0.025; <span style="color:rgb(0,128,19)">
% Significance level for two-tailed test</span></span></div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
<span style="white-space:pre-wrap">cfg.tail = 0; <span style="color:rgb(0,128,19)">% Two-tailed test</span></span></div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
<span style="white-space:pre-wrap">cfg.clustertail = 0; <span style="color:rgb(0,128,19)">
% Two-tailed cluster statistics</span></span></div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
<span style="white-space:pre-wrap">cfg.numrandomization = 1000; <span style="color:rgb(0,128,19)">
% Number of random permutation</span></span><span style="white-space:pre-wrap">cfg.neighbours = [];
</span><span style="white-space:pre-wrap;color:rgb(0,128,19)">% No neighborhood structure needed for iEEG</span></div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
</div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
<span style="white-space:pre-wrap"><span style="color:rgb(0,128,19)">% Design matrix </span>
</span></div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
<span style="white-space:pre-wrap">design = zeros(2, ntrials_low + ntrials_high);</span></div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
<span style="white-space:pre-wrap">design(1, 1:ntrials_low) = 1; <span style="color:rgb(0,128,19)">
% Assign label 1 to trials in the low condition</span></span></div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
<span style="white-space:pre-wrap">design(1, ntrials_low+1:end) = 2; <span style="color:rgb(0,128,19)">
% Assign label 2 to trials in the high condition</span></span></div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
<span style="white-space:pre-wrap">design(2, :) = [1:ntrials_low, 1:ntrials_high]; <span style="color:rgb(0,128,19)">
% Assign trial indices</span></span></div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
</div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
<span style="white-space:pre-wrap"></span></div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
<span style="white-space:pre-wrap">cfg.design = design;</span></div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
<span style="white-space:pre-wrap">cfg.uvar = 2; <span style="color:rgb(0,128,19)">% unit of observation (subject)</span></span></div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
<span style="white-space:pre-wrap">cfg.ivar = 1; <span style="color:rgb(0,128,19)">% independent variable (condition)</span></span></div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
<span style="white-space:pre-wrap"></span></div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
<span style="white-space:pre-wrap"><span style="color:rgb(0,128,19)">%7 Compute statistics</span></span><span style="white-space:pre-wrap">[stat] = ft_freqstatistics(cfg, TFR_low, TFR_high);</span></div>
</div>
</div>
<div class="gmail_default" style="font-family:georgia,serif"><br>
</div>
<div class="gmail_default" style="font-family:georgia,serif">With gratitude,<br>
Camilo</div>
<div>
<div dir="ltr" class="gmail_signature">
<div dir="ltr">
<div><b style="color:rgb(80,0,80)"><span style="font-size:12pt;color:rgb(99,144,68)"><font face="georgia, serif">================================</font></span></b><font face="georgia, serif"><b><br>
</b></font></div>
<div><font face="georgia, serif" color="#38761d"><b>Camilo Castelblanco Riveros (He/His)</b></font></div>
<div><font face="georgia, serif" color="#274e13">Ph.D. Candidate (G3)</font></div>
<div>
<div><font face="georgia, serif" color="#274e13"><a href="https://www.robertsonlab.com/" target="_blank">Robertson
Lab</a> & <a href="https://www.dartmouth-hitchcock.org/research/search-clinical-trials/trial/STUDY02001606" target="_blank">
Bujarski Lab</a></font></div>
<div><font face="georgia, serif" color="#274e13">Student Interest Group in Neurology (<a href="https://geiselmed.dartmouth.edu/student-gov/student-groups/" target="_blank">SIGN</a>)
Co-Leader<u></u></font></div>
</div>
<div><font face="georgia, serif" color="#274e13">Diversity Student Advisory Board Member</font></div>
<div><font face="georgia, serif" color="#274e13">e: <a href="mailto:camilo.a.castelblanco.riveros.gr@dartmouth.edu" target="_blank">ccastelblanco.gr@dartmouth.edu</a></font></div>
<div><font face="georgia, serif" color="#274e13"><a href="https://dartmouth.zoom.us/my/ccastelblanco" target="_blank">Zoom</a></font></div>
<div>
<div style="color:rgb(34,34,34)">
<div><font face="georgia, serif"><br>
</font></div>
</div>
</div>
<div><font face="georgia, serif"><img src="https://pbs.twimg.com/profile_images/1442874308360032261/L7MnNrBk_400x400.jpg" alt="Integrative Neuroscience at Dartmouth (IND) (@DartmouthNeuro) / Twitter" width="96" height="96"><img src="https://jobsearch.dartmouth-hitchcock.org/wp-content/uploads/DH-Bug-e1666020448423.png" width="96" height="96"></font></div>
</div>
</div>
</div>
</div>
_______________________________________________<br>
fieldtrip mailing list<br>
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
<a href="https://doi.org/10.1371/journal.pcbi.1002202" target="_blank">https://doi.org/10.1371/journal.pcbi.1002202</a><br>
</div>
</blockquote>
</div>
<br>
</div>
</div>
_______________________________________________<br>
fieldtrip mailing list<br>
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
<a href="https://doi.org/10.1371/journal.pcbi.1002202" rel="noreferrer" target="_blank">https://doi.org/10.1371/journal.pcbi.1002202</a><br>
</blockquote></div>