Command Line Interface¶
cuBNM command line interface
usage: cubnm [-h] {optimize,grid} ...
Positional Arguments¶
- cmd
Possible choices: optimize, grid
Sub-commands¶
optimize¶
Optimize parameters using evolutionary algorithms
cubnm optimize [-h] -m {rWW,rWWEx,Kuramoto} -p PARAMS --duration DURATION --TR
TR --sc SC [--sc_dist SC_DIST] [--dt DT] [--bw_dt BW_DT]
[-d OUT_DIR] [--emp_fc_tril EMP_FC_TRIL]
[--emp_fcd_tril EMP_FCD_TRIL] [--emp_bold EMP_BOLD] [--no_fc]
[--no_fcd] [--rand_seed RAND_SEED]
[--noise_segment_length NOISE_SEGMENT_LENGTH] [--no_ext_out]
[--states_ts] [--states_sampling STATES_SAMPLING]
[--bw_params {friston2003,heinzle2016-3T}]
[--bold_remove_s BOLD_REMOVE_S] [--window_size WINDOW_SIZE]
[--window_step WINDOW_STEP] [--exc_interhemispheric]
[--fcd_keep_edges] [--gof_terms GOF_TERMS] [--force_cpu]
[--force_gpu] [--serial_nodes] [-v]
[--progress_interval PROGRESS_INTERVAL] [--no_print_args]
[-o OPTIMIZER] [--optimizer_seed OPTIMIZER_SEED]
[--n_iter N_ITER] [--popsize POPSIZE]
[--het_params HET_PARAMS [HET_PARAMS ...]] [--maps MAPS]
[--maps_coef_range MAPS_COEF_RANGE]
[--node_grouping NODE_GROUPING] [--multiobj]
Named Arguments¶
- -m, --model
Possible choices: rWW, rWWEx, Kuramoto
Model (required)
- -p, --params
Parameters in custom format inside quotation marks (required). Format: “<param_name>=<start>[:<end>[:<step>]],…”
- --duration
Duration of the simulation (required)
- --TR
Repetition time (required)
- --sc
Structural connectivity .txt file or “example” (required)
- --sc_dist
Structural connectivity distribution .txt file or “example”
- --dt
Neuronal model integration step (msec)
Default:
'0.1'- --bw_dt
Balloon-Windkessel model integration step (msec)
Default:
'1.0'- -d, --out_dir
Output directory
Default:
'same'- --emp_fc_tril
Functional connectivity lower triangle as space-separated .txt file or “example”
- --emp_fcd_tril
Functional connectivity dynamics lower triangle as space-separated .txt file or “example”
- --emp_bold
Cleaned and parcellated BOLD signal as space-separated .txt file or “example” BOLD signal should be in the shape (nodes, volumes). Motion outliers should either be excluded (not recommended as it disrupts the temporal structure) or replaced with zeros. If provided emp_fc_tril and emp_fcd_tril will be ignored.
- --no_fc
Do not calculate simulated/empirical FC
Default:
False- --no_fcd
Do not calculate simulated/empirical FCD
Default:
False- --rand_seed
Simulation noise seed
Default:
410- --noise_segment_length
Noise segment length (seconds)
Default:
30- --no_ext_out
Do not return model state variables
Default:
False- --states_ts
Return model states timeseries
Default:
False- --states_sampling
Sampling rate of model state variables
- --bw_params
Possible choices: friston2003, heinzle2016-3T
Balloon Windkessel parameters
Default:
'friston2003'- --bold_remove_s
Remove initial n seconds of the simulation from FC/FCD calculations and average of state variables
Default:
30- --window_size
FCD window size
Default:
10- --window_step
FCD window step
Default:
2- --exc_interhemispheric
Exclude interhemispheric connections in FC/FCD calculations
Default:
False- --fcd_keep_edges
Keep edge windows from FCD calculations
Default:
False- --gof_terms
Goodness of fit terms (comma separated in quotation marks) e.g. “fc_corr,fcd_ks”.
Default:
['fc_corr', 'fcd_ks']- --force_cpu
Force CPU
Default:
False- --force_gpu
Force GPU
Default:
False- --serial_nodes
Only applicable to GPUs; Uses one thread per simulation and do calculation of nodes serially; Experimental
Default:
False- -v, --sim_verbose
Show simulation progress
Default:
False- --progress_interval
Interval of progress updates (in msec). Only used if sim_verbose is True
Default:
500- --no_print_args
Do not print command line arguments table
Default:
False- -o, --optimizer
Optimizer type
- --optimizer_seed
Optimizer random seed
Default:
0- --n_iter
Optimizer max iterations
Default:
80- --popsize
Optimizer population size
Default:
24- --het_params
List of heterogeneous regional parameters (space separated)
- --maps
Path to heterogeneity maps or “example”
- --maps_coef_range
Coefficient range for maps. Options: “auto”, “min:max” (same for all maps), “min1:max1,min2:max2,…” (different for each map)
Default:
auto- --node_grouping
Path to node grouping array or special values: node, sym
- --multiobj
Instead of combining the objectives into a single objective function (via summation) defines each objective separately. This must not be used with single-objective optimizers
Default:
False
grid¶
Grid search
cubnm grid [-h] -m {rWW,rWWEx,Kuramoto} -p PARAMS --duration DURATION --TR TR
--sc SC [--sc_dist SC_DIST] [--dt DT] [--bw_dt BW_DT] [-d OUT_DIR]
[--emp_fc_tril EMP_FC_TRIL] [--emp_fcd_tril EMP_FCD_TRIL]
[--emp_bold EMP_BOLD] [--no_fc] [--no_fcd] [--rand_seed RAND_SEED]
[--noise_segment_length NOISE_SEGMENT_LENGTH] [--no_ext_out]
[--states_ts] [--states_sampling STATES_SAMPLING]
[--bw_params {friston2003,heinzle2016-3T}]
[--bold_remove_s BOLD_REMOVE_S] [--window_size WINDOW_SIZE]
[--window_step WINDOW_STEP] [--exc_interhemispheric]
[--fcd_keep_edges] [--gof_terms GOF_TERMS] [--force_cpu]
[--force_gpu] [--serial_nodes] [-v]
[--progress_interval PROGRESS_INTERVAL] [--no_print_args]
Named Arguments¶
- -m, --model
Possible choices: rWW, rWWEx, Kuramoto
Model (required)
- -p, --params
Parameters in custom format inside quotation marks (required). Format: “<param_name>=<start>[:<end>[:<step>]],…”
- --duration
Duration of the simulation (required)
- --TR
Repetition time (required)
- --sc
Structural connectivity .txt file or “example” (required)
- --sc_dist
Structural connectivity distribution .txt file or “example”
- --dt
Neuronal model integration step (msec)
Default:
'0.1'- --bw_dt
Balloon-Windkessel model integration step (msec)
Default:
'1.0'- -d, --out_dir
Output directory
Default:
'same'- --emp_fc_tril
Functional connectivity lower triangle as space-separated .txt file or “example”
- --emp_fcd_tril
Functional connectivity dynamics lower triangle as space-separated .txt file or “example”
- --emp_bold
Cleaned and parcellated BOLD signal as space-separated .txt file or “example” BOLD signal should be in the shape (nodes, volumes). Motion outliers should either be excluded (not recommended as it disrupts the temporal structure) or replaced with zeros. If provided emp_fc_tril and emp_fcd_tril will be ignored.
- --no_fc
Do not calculate simulated/empirical FC
Default:
False- --no_fcd
Do not calculate simulated/empirical FCD
Default:
False- --rand_seed
Simulation noise seed
Default:
410- --noise_segment_length
Noise segment length (seconds)
Default:
30- --no_ext_out
Do not return model state variables
Default:
False- --states_ts
Return model states timeseries
Default:
False- --states_sampling
Sampling rate of model state variables
- --bw_params
Possible choices: friston2003, heinzle2016-3T
Balloon Windkessel parameters
Default:
'friston2003'- --bold_remove_s
Remove initial n seconds of the simulation from FC/FCD calculations and average of state variables
Default:
30- --window_size
FCD window size
Default:
10- --window_step
FCD window step
Default:
2- --exc_interhemispheric
Exclude interhemispheric connections in FC/FCD calculations
Default:
False- --fcd_keep_edges
Keep edge windows from FCD calculations
Default:
False- --gof_terms
Goodness of fit terms (comma separated in quotation marks) e.g. “fc_corr,fcd_ks”.
Default:
['fc_corr', 'fcd_ks']- --force_cpu
Force CPU
Default:
False- --force_gpu
Force GPU
Default:
False- --serial_nodes
Only applicable to GPUs; Uses one thread per simulation and do calculation of nodes serially; Experimental
Default:
False- -v, --sim_verbose
Show simulation progress
Default:
False- --progress_interval
Interval of progress updates (in msec). Only used if sim_verbose is True
Default:
500- --no_print_args
Do not print command line arguments table
Default:
False