<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="">
Hi Marta,
<div class=""><br class="">
</div>
<div class="">I would start by checking whether </div>
<div class="">1) the downsampled version of the atlas contains all parcels (i.e. are all values between 0 and 246 represented in atlas.tissue?)</div>
<div class="">2) if the above is true, whether the source position(s) that should coincide with the left lateral amygdala, actually are flagged as an ‘inside’ position in the source_avg variable.</div>
<div class=""><br class="">
</div>
<div class="">Good luck,</div>
<div class="">Jan_Mathijs</div>
<div class=""> <br class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 9 Aug 2023, at 17:59, Marta Stojanovic via fieldtrip <<a href="mailto:fieldtrip@science.ru.nl" class="">fieldtrip@science.ru.nl</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div style="padding: 0px; margin: 0px;" class="">Hi Fieldtrip Community, </div>
<p style="padding:0 0 0 0; margin:0 0 0 0;" class=""> </p>
<div style="padding: 0px; margin: 0px;" class="">I'm reaching out regarding an error I previously noticed when running ft_virtualchannel. </div>
<p style="padding:0 0 0 0; margin:0 0 0 0;" class=""> </p>
<div style="padding: 0px; margin: 0px;" class="">Namely, in my call to the ft_virtualchannel function, I used timelock data that includes trial information, a sourceanalysis output struct, and a lower resolution atlas created by interpolating the source average
output from ft_sourceanalysis with the Brainnetome atlas using ft_sourceinterpolate. </div>
<p style="padding:0 0 0 0; margin:0 0 0 0;" class=""> </p>
<div style="padding: 0px; margin: 0px;" class="">My call to the ft_virtualchannel looks like the following:</div>
<div class="rtcContent" style="padding: 30px; font-size: inherit;">
<div class="lineNode" style="font-size: 10pt; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;">
<span style="white-space: pre;" class="">clear <span style="color: #a709f5;" class="">
atlas_lowres</span>;</span></div>
<div class="lineNode" style="font-size: 10pt; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;">
<span style="white-space: pre;" class="">cfg = [];</span></div>
<div class="lineNode" style="font-size: 10pt; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;">
<span style="white-space: pre;" class="">cfg.parameter = <span style="color: #a709f5;" class="">
'all'</span>;</span></div>
<div class="lineNode" style="font-size: 10pt; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;">
<span style="white-space: pre;" class="">cfg.interpmethod = <span style="color: #a709f5;" class="">
'nearest'</span>;</span></div>
<div class="lineNode" style="font-size: 10pt; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;">
<span style="white-space: pre;" class="">atlas_lowres = ft_sourceinterpolate(cfg,atlas,source_avg);</span></div>
<div class="lineNode" style="font-size: 10pt; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;">
<span style="white-space: pre;" class="">atlas_lowres.pos = source_avg.pos;</span></div>
<div class="lineNode" style="font-size: 10pt; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;">
<span style="white-space: pre;" class="">atlas_lowres.coordsys = <span style="color: #a709f5;" class="">
'mni'</span>; <span style="color: #008013;" class="">% ensure mni space</span></span></div>
<div class="lineNode" style="font-size: 10pt; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;">
<span style="white-space: pre;" class="">disp(<span style="color: #a709f5;" class="">'Done aligning atlas to source average'</span>)</span></div>
<div class="lineNode" style="font-size: 10pt; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;">
<span style="white-space: pre;" class=""><br class="">
</span></div>
<div class="lineNode" style="font-size: 10pt; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;">
</div>
<div class="lineNode" style="font-size: 10pt; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;">
<span style="white-space: pre;" class=""><span style="color: #008013;" class="">%% parcellate single trials</span></span></div>
<div class="lineNode" style="font-size: 10pt; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;">
</div>
<div class="lineNode" style="font-size: 10pt; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;">
<span style="white-space: pre;" class="">clear <span style="color: #a709f5;" class="">
parc_trls</span>;</span></div>
<div class="lineNode" style="font-size: 10pt; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;">
<span style="white-space: pre;" class="">cfg = [];</span></div>
<div class="lineNode" style="font-size: 10pt; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;">
<span style="white-space: pre;" class="">cfg.method = <span style="color: #a709f5;" class="">
'pca'</span>;</span></div>
<div class="lineNode" style="font-size: 10pt; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;">
<span style="white-space: pre;" class="">cfg.parcellation = <span style="color: #a709f5;" class="">
'tissue'</span>;</span></div>
<div class="lineNode" style="font-size: 10pt; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;">
<span style="white-space: pre;" class="">parc_trls = ft_virtualchannel(cfg, tlck_all, source_avg, atlas_lowres);</span></div>
<div class="lineNode" style="font-size: 10pt; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;">
<span style="white-space: pre;" class="">disp(<span style="color: #a709f5;" class="">'Done parcellating single trials'<span style="" class="">)</span></span></span></div>
</div>
<div style="padding: 0px; margin: 0px;" class="">The atlas_lowres struct includes the following fields:</div>
<p style="padding:0 0 0 0; margin:0 0 0 0;" class=""> </p>
<div style="padding: 0px; margin: 0px;" class=""> dim: [20 25 22]</div>
<div style="padding: 0px; margin: 0px;" class=""> transform: [4×4 double]</div>
<div style="padding: 0px; margin: 0px;" class=""> unit: 'mm'</div>
<div style="padding: 0px; margin: 0px;" class=""> tissue: [20×25×22 double]</div>
<div style="padding: 0px; margin: 0px;" class=""> tissuelabel: {1×246 cell}</div>
<div style="padding: 0px; margin: 0px;" class=""> cfg: [1×1 struct]</div>
<div style="padding: 0px; margin: 0px;" class=""> pos: [11000×3 double]</div>
<div style="padding: 0px; margin: 0px;" class=""> coordsys: 'mni'</div>
<p style="padding:0 0 0 0; margin:0 0 0 0;" class=""> </p>
<div style="padding: 0px; margin: 0px;" class="">However, after running the function, the parc_trls struct is the following, with one less label:</div>
<p style="padding:0 0 0 0; margin:0 0 0 0;" class=""> </p>
<div style="padding: 0px; margin: 0px;" class="">parc_trls = </div>
<p style="padding:0 0 0 0; margin:0 0 0 0;" class=""> </p>
<div style="padding: 0px; margin: 0px;" class=""> struct with fields:</div>
<p style="padding:0 0 0 0; margin:0 0 0 0;" class=""> </p>
<div style="padding: 0px; margin: 0px;" class=""> trial: [144×245×1018 double]</div>
<div style="padding: 0px; margin: 0px;" class=""> time: [0 0.0020 0.0039 0.0059 0.0079 0.0098 … ]</div>
<div style="padding: 0px; margin: 0px;" class=""> dimord: 'rpt_chan_time'</div>
<div style="padding: 0px; margin: 0px;" class=""> <strong class=""> label: {245×1 cell}</strong></div>
<div style="padding: 0px; margin: 0px;" class=""> cfg: [1×1 struct]</div>
<div style="padding: 0px; margin: 0px;" class=""> grad: [1×1 struct]</div>
<div style="padding: 0px; margin: 0px;" class=""> sampleinfo: [144×2 double]</div>
<div style="padding: 0px; margin: 0px;" class=""> trialinfo: [144×2 double]</div>
<div style="padding: 0px; margin: 0px;" class=""> brainordinate: [1×1 struct]</div>
<p style="padding:0 0 0 0; margin:0 0 0 0;" class=""> </p>
<div style="padding: 0px; margin: 0px;" class="">When checking the label, I realise one parcel/label for the left lateral amygdala is missing.</div>
<p style="padding:0 0 0 0; margin:0 0 0 0;" class=""> </p>
<div style="padding: 0px; margin: 0px;" class="">I wonder what the missing label could pertain to. I know I can run the function with cfg.pos, which I have done previously. I curious as to why this error might arise when specifying cfg.parcellation as 'tissuelabel'
and parcellating the trials based on the atlas parcel labels.</div>
<p style="padding:0 0 0 0; margin:0 0 0 0;" class=""> </p>
<div style="padding: 0px; margin: 0px;" class="">Thanks in advance,</div>
<p style="padding:0 0 0 0; margin:0 0 0 0;" class=""> </p>
<div style="padding: 0px; margin: 0px;" class="">Marta</div>
<p style="padding:0 0 0 0; margin:0 0 0 0;" class=""> </p>
<p style="padding:0 0 0 0; margin:0 0 0 0;" class=""> </p>
_______________________________________________<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="">
<a href="https://urldefense.com/v3/__https://doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!5Jdn4hhspH-ABoHvipGtxKDHoaeLT5tUpKpiwQiP5HYOFIzbhKcSchDe5QVIkikdKDR-jz5J6GpPtRAONk9dgYVUGBkdi5Zocs0nCA$">https://doi.org/10.1371/journal.pcbi.1002202</a><br class="">
</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>