Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • D Documentation
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • anywave
  • Documentation
  • Wiki
  • MATLAB_BIDS

Last edited by Bruno Colombet Jul 23, 2025
Page history
This is an old version of this page. You can view the most recent version or browse the history.

MATLAB_BIDS

  • Requirements
  • Modify the dest.txt
  • Specify the command line parameters your plugin will handle
  • Handle options in your code
  • Avoid figure and GUIs
  • Tips about logging errors
  • Call your plugin using the command line

Requirements

The plugin must be able to handle command line launch mode. So the correct flag must be added to the desc.txt file, see below.

Modify the dest.txt

Add the line:

flags = CanRunFromCommandLine

Note that you can set several flags separating them by ':'

Specify the command line parameters your plugin will handle

The plugin will receive all the default command line options handled by AnyWave but if you need to handle your own options then you must provide a file called args.json and put it along with desc.txt file in the plugin folder.
Example of a plugin that will handle the options eeg_file (path to a EEG data file) and meg_file (path to a MEG data file):

{
"Parameters" : [ "eeg_file", "meg_file"]
}

Handle options in your code

function main(varargin)
% init function will give you back a struct filled with all you need:
args = anywave('init', varargin);
% test if command line option are set (if not we are running in normal GUI mode)
eeg_file = '';
if isfield(args, 'eeg_file') 
   % we are running in command line mode/bids pipeline
   eeg_file = args.eeg_file;
else
   % raise error
   error('need eeg_file parameter/option');
end
end

Avoid figure and GUIs

If you want the plugin to be run as a BIDS pipeline you must not stop the execution by using blocking dialog boxes.

Tips about logging errors

The command line option output_dir will always be set by AnyWave either by the pipeline itself or by default.
Write a log.txt file for example in that location and report all logs for your plugin in that file.

Call your plugin using the command line

If you want to run your plugin outside of BIDS Pipeline context:

anywave --run my_plugin --eeg_file <path to eeg> --meg_file <path to meg>
Clone repository
  • Build_AnyWave
  • CLI
  • CLI_List
  • Changes
  • ExportData
  • ICA
  • Imaginary Coherence
  • MATLAB anywave function
  • MATLAB_BIDS
  • MATLAB_change_sig_prop
  • MATLAB_debug
  • MATLAB_get_data
  • MATLAB_get_markers
  • MATLAB_get_props
  • MATLAB_init
View All Pages