Difference between revisions of "AnyWave:CommandLine"

From WikiMEG
Jump to: navigation, search
 
(40 intermediate revisions by one user not shown)
Line 1: Line 1:
This is a way to run AnyWave in non GUI mode to process files.<br/>
+
__NOTOC__
=Operations=
+
{| style="text-align: center; margin: auto;"
What can AnyWave do in a command line?<br/>
+
|+ Command Line Operations
==Convert Files to BIDS==
+
|-
AnyWave is used by some third party softwares to process eeg/ieeg/meg files and convert them to BIDS format.<br/>
+
| [[File:Menu_cli_tobids.png|400px|link=AnyWave:CLi_toBIDS|'''convert a file to BIDS''']] ||  [[File:Menu_cli_process.png|400px|link=AnyWave:CLI_runPlugin|'''Run a plugin''']]
Here is the complete list of options to use to do so:<br/>
+
|-
--toBIDS : this option allows to convert a file to BIDS. If specified, the following options must also be set:<br/>
+
|}
--bids_modality <modality> : sets the file modality (eeg, ieeg or meg).<br/>
+
AnyWave allows the user to process data using the command line.<br/>
--bids_sub <sub>           : sets the bids subject<br/>
+
Passing arguments to anywave can be done using the double dash syntax:<br/>
--bids_task <task>         : sets the bids task<br/>
+
<syntaxhighlight lang='bash'>
 +
anywave --arg1 <value> --arg2 <value> --arg3
 +
</syntaxhighlight>
 +
An argument may have a value.<br/>
 +
There is a list of common arguments that can be used anytime for every command line operation:<br/>
 +
'''--input_file <file>''' set the file to process.<br/>
 +
'''--input_dir <dir>''' sets the input directory to use.<br/>
 +
'''--marker_file <file>''' sets the marker file (.mrk) to use. (path must be absolute)<br/>
 +
'''--montage_file <file>''' sets the montage file (.mtg) to use. (path must be absolute)<br/>
 +
'''--input_dir <dir>''' sets the input directory to use.<br/>
 +
'''--output_dir <dir>''' sets the output directory. The location where the plugin should generate its results.<br/>
 +
'''--output_file <file>''' sets the name of the processing output file.<br/>
 +
'''--output_prefix <string>''' sets the prefix of the output file.<br/>
 +
'''--hp <value>''' sets the high pass filter value to use.<br/>
 +
'''--lp <value>''' sets the low pass filter value to use.<br/>
 +
'''--notch <value>''' sets the notch filter value to use.<br/>
 +
'''--skip_bad_chanels <true|false|yes|no>''' default is true. Set it false to force anywave to also add bad channels to processing input.<br/>
 +
'''--create_montage <bipolar_ieeg|none>''' create a montage from data file and use it as input for processing. ''bipolar_ieeg'' means seeg alike bipolar. ''none'' will force AnyWave to ignore .mtg file that may be present along with the data file.<br/>
 +
'''--use_markers "markers"''' specify the markers to use for processing. sets --use_markers all_data to force AnyWave to use a global marker for the whole data as input.<br/>
 +
'''--skip_markers "markers"''' specify the markers to avoid while processing. Can be used with use_markers. if --use_markers all_data is set, this option is ignored.<br/>
 
<br/>
 
<br/>
Other optional options:<br/>
+
'''--log_dir <directory>''' set the output log directory. Every log files generated by the command line will be placed in that directory. The directory must exist.<br/>
--bids_ses <session>         : sets the session in the subject directory.<br/>
+
'''--run <plugin name>''' start processing data using a plugin. This will required to specify plugin related options.<br/>
--bids_run <run>             : defines the run number.<br/>
+
<br/>
--bids_acq <acq>             : defines the acquisition option.<br/>
+
Example:<br/>
--bids_proc <proc>            : defines the processing applied.<br/>
+
Running h² computation on a seeg data file:<br/>
--bids_output <sidecars|full> : sidecars will only generates .json sidecars for the file. full will also convert the file format en rename if to be BIDS compliant.<br/>
+
<syntaxhighlight lang="bash">
                                default is full.<br/>
+
anywave --run h2 --time_window 4 --step 1 --max_lag 0.1 --hp 1 --lp 45 --input_file d:\data\seeg\data.vhdr
 +
</syntaxhighlight>

Latest revision as of 15:27, 15 October 2020

Command Line Operations
convert a file to BIDS Run a plugin

AnyWave allows the user to process data using the command line.
Passing arguments to anywave can be done using the double dash syntax:

anywave --arg1 <value> --arg2 <value> --arg3

An argument may have a value.
There is a list of common arguments that can be used anytime for every command line operation:
--input_file <file> set the file to process.
--input_dir <dir> sets the input directory to use.
--marker_file <file> sets the marker file (.mrk) to use. (path must be absolute)
--montage_file <file> sets the montage file (.mtg) to use. (path must be absolute)
--input_dir <dir> sets the input directory to use.
--output_dir <dir> sets the output directory. The location where the plugin should generate its results.
--output_file <file> sets the name of the processing output file.
--output_prefix <string> sets the prefix of the output file.
--hp <value> sets the high pass filter value to use.
--lp <value> sets the low pass filter value to use.
--notch <value> sets the notch filter value to use.
--skip_bad_chanels <true|false|yes|no> default is true. Set it false to force anywave to also add bad channels to processing input.
--create_montage <bipolar_ieeg|none> create a montage from data file and use it as input for processing. bipolar_ieeg means seeg alike bipolar. none will force AnyWave to ignore .mtg file that may be present along with the data file.
--use_markers "markers" specify the markers to use for processing. sets --use_markers all_data to force AnyWave to use a global marker for the whole data as input.
--skip_markers "markers" specify the markers to avoid while processing. Can be used with use_markers. if --use_markers all_data is set, this option is ignored.

--log_dir <directory> set the output log directory. Every log files generated by the command line will be placed in that directory. The directory must exist.
--run <plugin name> start processing data using a plugin. This will required to specify plugin related options.

Example:
Running h² computation on a seeg data file:

anywave --run h2 --time_window 4 --step 1 --max_lag 0.1 --hp 1 --lp 45 --input_file d:\data\seeg\data.vhdr