Error: non-parametric cluster permutation tests

Hi,

I'm trying to run a non-parametric cluster permutation tests, but I'm getting the almost same error report as the one posted here (see screenshot).

Do you have any ideas how to fix this?

Thank you very much,

Jeremie

There seems to be something strange with the ChannelFile field or how it is handled:

A. First, test that the code is using the unique function from Matlab. Run this line in Matlab and share the result:

which('unique', 'all')

It should give you a path in the Matlab root

B. Secondly, please share the result of the following steps with us:

  1. Copy the file path for one of the recording files Raw (0ms, 599ms):
    Right-click > File > Copy file path to clipboard
  2. In Matlab run this line:
    sInputs = bst_process('GetInputStruct', THE_COPIED_FILE_PATH)

Hi,

Here are the results:

A. /Applications/MATLAB_R2016a.app/toolbox/matlab/ops/unique.p

B.

  1. /Users/je/Desktop/Brainstorm_database/ATLAS_kids_vivant_jeremie/data/Subject01/P01_Vivant_Average_contre-intuitifs/data_block001.mat

  2. sInputs = bst_process('GetInputStruct', /Users/je/Desktop/Brainstorm_database/ATLAS_kids_vivant_jeremie/data/Subject01/P01_Vivant_Average_contre-intuitifs/data_block001.mat)
    sInputs = bst_process('GetInputStruct', /Users/je/Desktop/Brainstorm_database/ATLAS_kids_vivant_jeremie/data/Subject01/P01_Vivant_Average_contre-intuitifs/data_block001.mat)

    Error: Unexpected MATLAB operator.

Thank you again for your help,

For point 2 in B, pass the path as a string

Ok, how can I do that?

single quotes: 'your_path'

Here:

sInputs = bst_process('GetInputStruct', '/Users/je/Desktop/Brainstorm_database/ATLAS_kids_vivant_jeremie/data/Subject01/P01_Vivant_Average_contre-intuitifs/data_block001.mat')

sInputs =

      iStudy: 6
       iItem: 1
    FileName: 'Subject01/P01_Vivant_Average_contre-intuitifs/data_block001.mat'
    FileType: 'data'
     Comment: 'Raw (0ms,599ms)'
   Condition: 'P01_Vivant_Average_contre-intuitifs'
 SubjectFile: 'Subject01/brainstormsubject.mat'
 SubjectName: 'Subject01'
    DataFile: ''
 ChannelFile: 'Subject01/P01_Vivant_Average_contre-intuitifs/channel.mat'
ChannelTypes: {'EEG'}

Hi,
Does someone have any insight about what seems to be the problem here?
I'm absolutely clueless and need to be able to do this analysis :frowning:

Thank you in advance for your help!

Are you able to run the process with the data from the Introduction tutorial?
https://neuroimage.usc.edu/brainstorm/Tutorials/Statistics#Example_3:_Cluster-based_correction

Hi,
I tried it on another computer and it worked! And don't understand what was the problem, but I'm glad it's fixed.

Thank you so much for your help, I appreciate it.

If possible, please share with us the differences between the two computers so we can figure out where the error was and improve Brainstorm

  • Operative system and version
  • Matlab version
  • Processor architecture (Intel or AppleSilicon)
  • Brainstorm version
  • Path to Brainstorm user dir:
    with Brainstorm runninng execute: bst_get('BrainstormUserDir')
  • Path to Brainstorm database:
    with Brainstorm runninng execute: bst_get('BrainstormDbDir')

Computer 1: Brainstorm used with matlab (the one that gives the reported error)

  • MacOS Ventura 13.5
  • Matlab R2016a
  • Apple M1
  • 3.240530
  • /Users/je/.brainstorm
  • /Users/je/Desktop/Brainstorm_database

Computer 2: Brainstorm used without matlab (the one that works)

  • MacOS Ventura 13.5
  • Matlab R2022b
  • Apple Intel Core i7
  • 3.240604
  • /Users/jeremie/.brainstorm
  • /Users/jeremie/Desktop/Brainstorm_database

It worked on this second computer. Thanks!

Thanks for the info @JBlanchette, the trouble seems to be the version of Matlab in the Computer 1, it's quite old to have a full support to M1 (even with Rosetta).

Try installing R2020b or newer in Computer 1, and try again.

See these link from MathWorks:

Thank you very much for your help!