CLI Commands#

For key routines, we also provides CLI-executable commands, such that one can manipulate the simulation from the shell.

Simulation Builder#

make-h5types#

make-h5types [OPTIONS]

Options

-c, --config <config>#
--config-prefix <config_prefix>#

path to directory containing network and cell mechanism config files

--output-path <output_path>#
--gap-junctions#

measure-distances#

measure-distances [OPTIONS]

Options

--config <config>#

Required

--config-prefix <config_prefix>#

Required path to directory containing network and cell mechanism config files

--coords-path <coords_path>#

Required

--coords-namespace <coords_namespace>#
--geometry-path <geometry_path>#
-i, --populations <populations>#

Required

--resolution <resolution>#
--nsample <nsample>#
--alpha-radius <alpha_radius>#
--io-size <io_size>#
--chunk-size <chunk_size>#
--value-chunk-size <value_chunk_size>#
--cache-size <cache_size>#
-v, --verbose#

generate-distance-connections#

generate-distance-connections [OPTIONS]

Options

--config <config>#

Required

--config-prefix <config_prefix>#

Required

-i, --include <include>#
--forest-path <forest_path>#

Required

--connectivity-path <connectivity_path>#

Required

--connectivity-namespace <connectivity_namespace>#
--coords-path <coords_path>#

Required

--coords-namespace <coords_namespace>#
--synapses-namespace <synapses_namespace>#
--distances-namespace <distances_namespace>#
--resolution <resolution>#
--interp-chunk-size <interp_chunk_size>#
--io-size <io_size>#
--chunk-size <chunk_size>#
--value-chunk-size <value_chunk_size>#
--cache-size <cache_size>#
--write-size <write_size>#
-v, --verbose#
--dry-run#
--debug#

generate-input-features#

generate-input-features [OPTIONS]

Options

--config <config>#

Required

--config-prefix <config_prefix>#

Required

--coords-path <coords_path>#

Required

-n, --distances-namespace <distances_namespace>#
--output-path <output_path>#
--arena-id <arena_id>#
-p, --populations <populations>#
--io-size <io_size>#
--chunk-size <chunk_size>#
--value-chunk-size <value_chunk_size>#
--cache-size <cache_size>#
--write-size <write_size>#
-v, --verbose#
--gather#
--interactive#
--debug#
--debug-count <debug_count>#
--plot#
--show-fig#
--save-fig <save_fig>#
--save-fig-dir <save_fig_dir>#
--font-size <font_size>#
--fig-format <fig_format>#
--dry-run#

generate-input-spike-trains#

generate-input-spike-trains [OPTIONS]

Options

--config <config>#

Required

--config-prefix <config_prefix>#

Required

--selectivity-path <selectivity_path>#

Required

--selectivity-namespace <selectivity_namespace>#
--coords-path <coords_path>#
--distances-namespace <distances_namespace>#
--arena-id <arena_id>#
-p, --populations <populations>#
--n-trials <n_trials>#
--io-size <io_size>#
--chunk-size <chunk_size>#
--value-chunk-size <value_chunk_size>#
--cache-size <cache_size>#
--write-size <write_size>#
--output-path <output_path>#
--spikes-namespace <spikes_namespace>#
--spike-train-attr-name <spike_train_attr_name>#
--phase-mod#
--gather#
--debug#
--plot#
--show-fig#
--save-fig <save_fig>#
--save-fig-dir <save_fig_dir>#
--font-size <font_size>#
--fig-format <fig_format>#
-v, --verbose#
--dry-run#

generate-soma-coordinates#

generate-soma-coordinates [OPTIONS]

Options

--config <config>#

Required

--config-prefix <config_prefix>#
--types-path <types_path>#

Required

--geometry-path <geometry_path>#
--output-path <output_path>#

Required

--output-namespace <output_namespace>#
-i, --populations <populations>#
--resolution <resolution>#
--alpha-radius <alpha_radius>#
--nodeiter <nodeiter>#
--dispersion-delta <dispersion_delta>#
--snap-delta <snap_delta>#
--io-size <io_size>#
--chunk-size <chunk_size>#
--value-chunk-size <value_chunk_size>#
-v, --verbose#

distribute-synapse-locs#

distribute-synapse-locs [OPTIONS]

Options

--config <config>#

Required

--config-prefix <config_prefix>#

Required

--template-path <template_path>#
--output-path <output_path>#
--forest-path <forest_path>#

Required

-m, --mechanisms-path <mechanisms_path>#
-i, --populations <populations>#

Required

--distribution <distribution>#
--io-size <io_size>#
--chunk-size <chunk_size>#
--value-chunk-size <value_chunk_size>#
--write-size <write_size>#
-v, --verbose#
--dry-run#
--debug#

Simulation Runner#

run-network#

run-network [OPTIONS]

Options

--arena-id <arena_id>#

name of arena used for stimulus

--cell-selection-path <cell_selection_path>#

name of file specifying subset of cells gids to be instantiated

--config-file <config_file>#

Required model configuration file name

--config-prefix <config_prefix>#

Required path to directory containing network and cell mechanism config files

--template-paths <template_paths>#

colon-separated list of paths to directories containing hoc cell templates

--hoc-lib-path <hoc_lib_path>#

Required path to directory containing required hoc libraries

--dataset-prefix <dataset_prefix>#

Required path to directory containing required neuroh5 data files

-m, --mechanisms-path <mechanisms_path>#
--results-path <results_path>#

Required path to directory where output files will be written

--results-id <results_id>#

identifier that is used to name neuroh5 namespaces that contain output spike and intracellular trace data

--node-rank-file <node_rank_file>#

name of file specifying assignment of cell gids to MPI ranks

--io-size <io_size>#

the number of MPI ranks to be used for I/O operations

--use-cell-attr-gen#

whether to use cell attribute generator for I/O operations

--cell-attr-gen-cache-size <cell_attr_gen_cache_size>#

cell attribute generator cache readahead size

--recording-profile <recording_profile>#

intracellular recording profile to use

--output-syn-spike-count#

record the per-cell number of spikes received from each pre-synaptic source

--use-coreneuron#

use CoreNEURON for simulation

--stimulus-id <stimulus_id>#

name of input stimulus

--tstop <tstop>#

physical time to simulate (ms)

--v-init <v_init>#

initialization membrane potential (mV)

--stimulus-onset <stimulus_onset>#

starting time of stimulus (ms)

--max-walltime-hours <max_walltime_hours>#

maximum wall time (hours)

--microcircuit-inputs#

initialize intrinsic microcircuit inputs (True by default when cell selection is provided)

--checkpoint-clear-data#

delete simulation data from memory after it has been saved

--checkpoint-interval <checkpoint_interval>#

checkpoint interval in ms of simulation time

--results-write-time <results_write_time>#

time to write out results at end of simulation

--spike-input-path <spike_input_path>#

path to file for input spikes when cell selection is specified

--spike-input-namespace <spike_input_namespace>#

namespace for input spikes when cell selection is specified

--spike-input-attr <spike_input_attr>#

attribute name for input spikes when cell selection is specified

--dt <dt>#
--ldbal#

estimate load balance based on cell complexity

--lptbal#

optimize load balancing assignment with LPT algorithm

--cleanup, --no-cleanup#

delete from memory the synapse attributes metadata after specifying connections

--profile-memory#

calculate and print heap usage while constructing the network

--write-selection#

write out cell and connectivity data for selection

-v, --verbose#

print verbose diagnostic messages while constructing the network

--debug#

enable debug mode

--dry-run#

whether to actually execute simulation after building network

Analysis scripts#

plot-biophys-cell-tree#

Plot bio-physical cell trees.

plot-biophys-cell-tree [OPTIONS]

Options

-c, --config <config>#

Required model configuration file name

--config-prefix <config_prefix>#

path to directory containing network and cell mechanism config files

-p, --population <population>#

Required target population

-g, --gid <gid>#

Required target cell gid

--template-paths <template_paths>#

colon-separated list of paths to directories containing hoc cell templates

--dataset-prefix <dataset_prefix>#

path to directory containing required neuroh5 data files

--data-file <data_file>#

input data file (overrides file provided in configuration)

-s, --load-synapses#
--syn-sources <syn_sources>#

synapse filter for source populations

--syn-source-threshold <syn_source_threshold>#

only show synapses for sources in top n percentile

--syn-types <syn_types>#

synapse filter for synapse types

--font-size <font_size>#
--bgcolor <bgcolor>#
--colormap <colormap>#
--plot-method <plot_method>#
Options:

matplotlib | mayavi | neuron

-v, --verbose#

plot-cell-tree#

plot-cell-tree [OPTIONS]

Options

-p, --forest-path <forest_path>#

Required

-i, --population <population>#

Required

-g, --gid <gid>#

Required

--conn-loc, --no-conn-loc#
--line-width <line_width>#
--color-edge-scalars, --no-color-edge-scalars#
-m, --mayavi#
-v, --verbose#

plot-coords-in-volume#

plot-coords-in-volume [OPTIONS]

Options

--config <config>#

Required

-c, --coords-path <coords_path>#

Required

-n, --coords-namespace <coords_namespace>#
-i, --populations <populations>#

Required

--subpopulation <subpopulation>#
--scale <scale>#
--subvol#
-m, --mayavi#
-v, --verbose#

plot-network-clamp#

plot-network-clamp [OPTIONS]

Options

--config-file <config_file>#
--config-prefix <config_prefix>#
-p, --input-path <input_path>#

Required

--spike-namespace <spike_namespace>#
--state-namespace <state_namespace>#
-i, --populations <populations>#
--include-artificial, --exclude-artificial#
--target-input-features-path <target_input_features_path>#
--target-input-features-namespace <target_input_features_namespace>#
--target-input-features-arena-id <target_input_features_arena_id>#
--target-input-features-trajectory-id <target_input_features_trajectory_id>#
-g, --gid <gid>#
-n, --n-trials <n_trials>#
--spike-hist-bin <spike_hist_bin>#
--all-spike-hist#
--labels <labels>#
--lowpass-plot-type <lowpass_plot_type>#
--legend <legend>#
--state-variable <state_variable>#
--t-variable <t_variable>#
--t-max <t_max>#
--t-min <t_min>#
--font-size <font_size>#
--line-width <line_width>#
-v, --verbose#

plot-spike-raster#

plot-spike-raster [OPTIONS]

Options

-p, --spike-events-path <spike_events_path>#

Required

-n, --spike-events-namespace <spike_events_namespace>#
-i, --populations <populations>#
--max-spikes <max_spikes>#
--spike-hist-bin <spike_hist_bin>#
--t-variable <t_variable>#
--t-max <t_max>#
--t-min <t_min>#
--font-size <font_size>#
--fig-size <fig_size>#
--labels <labels>#
--save-format <save_format>#
--include-artificial, --exclude-artificial#
-v, --verbose#

plot-state#

plot-state [OPTIONS]

Options

-p, --state-path <state_path>#

Required

-n, --state-namespace <state_namespace>#
--state-namespace-pattern <state_namespace_pattern>#
-i, --populations <populations>#
--max-units <max_units>#
-g, --gid <gid>#
--t-variable <t_variable>#
--state-variable <state_variable>#
--t-max <t_max>#
--t-min <t_min>#
--font-size <font_size>#
--colormap <colormap>#
--lowpass-plot#
-q, --query#
--reduce#
--distance#
-v, --verbose#

Tools#

show-h5types#

CLI alias for show_celltypes.

# Example Run
% !show-h5types -p datasets/MiV_Small_h5types.h5

numprocs=1
Name       Start    Count
====       =====    =====
STIM       0        10
PYR        10       80
PVBC       90       53
OLM        143      44
show-h5types [OPTIONS]

Options

-p, --input-path <input_path>#

query-cell-attrs#

Query and show cell attributes in NeuroH5 file.

# Example Run
% query-cell-attrs -p datasets/Microcircuit_Small_coords.h5 -i PYR

numprocs=1
Population PYR; Namespace: Arc Distances
   Attribute: U Distance
   Index: [10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
82 83 84 85 86 87 88 89]
   Attribute: V Distance
   Index: [10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
82 83 84 85 86 87 88 89]
Population PYR; Namespace: Generated Coordinates
   Attribute: L Coordinate
   Index: [10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
82 83 84 85 86 87 88 89]
   Attribute: U Coordinate
   Index: [10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
82 83 84 85 86 87 88 89]
   Attribute: V Coordinate
   Index: [10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
82 83 84 85 86 87 88 89]
   Attribute: X Coordinate
   Index: [10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
82 83 84 85 86 87 88 89]
   Attribute: Y Coordinate
   Index: [10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
82 83 84 85 86 87 88 89]
   Attribute: Z Coordinate
   Index: [10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
82 83 84 85 86 87 88 89]
query-cell-attrs [OPTIONS]

Options

-p, --input-path <input_path>#
-i, --populations <populations>#

check-config#

Check configuration by loading and instantiate env.

% check-config --config=Microcircuit_Small.yaml --config-prefix=config

If the simulation configuration is initialized successfully,the code runs without raising any error.

check-config [OPTIONS]

Options

--config <config>#

Required

--config-prefix <config_prefix>#
-v, --verbose#

cut-slice#

cut_slice

cut-slice [OPTIONS]

Options

--arena-id <arena_id>#

name of arena used for spatial stimulus

-c, --config <config>#

Required

--config-prefix <config_prefix>#
--dataset-prefix <dataset_prefix>#

Required path to directory containing required neuroh5 data files

-n, --distances-namespace <distances_namespace>#
--distance-limits <distance_limits>#
--spike-input-path <spike_input_path>#

path to file for input spikes when cell selection is specified

--spike-input-namespace <spike_input_namespace>#

namespace for input spikes when cell selection is specified

--spike-input-attr <spike_input_attr>#

attribute name for input spikes when cell selection is specified

-o, --output-path <output_path>#

Required

--io-size <io_size>#
--trajectory-id <trajectory_id>#

Required name of trajectory used for spatial stimulus

--write-selection#
-v, --verbose#

sample-cells#

sample-cells [OPTIONS]

Options

--arena-id <arena_id>#

name of arena used for spatial stimulus

-c, --config <config>#

Required

--config-prefix <config_prefix>#

Required path to directory containing network config files

--dataset-prefix <dataset_prefix>#

Required path to directory containing required neuroh5 data files

-n, --distances-namespace <distances_namespace>#
--spike-input-path <spike_input_path>#

path to file for input spikes

--spike-input-namespace <spike_input_namespace>#

namespace for input spikes

--spike-input-attr <spike_input_attr>#

attribute name for input spikes

--input-features-path <input_features_path>#
--input-features-namespaces <input_features_namespaces>#
--selection-path <selection_path>#

Required

-o, --output-path <output_path>#

Required

--io-size <io_size>#
--stimulus-id <stimulus_id>#

Required name of stimulus used

-v, --verbose#