Configuration file¶
The parameters can be stored in a configuration file which in then parsed by the CLI using the
-c/--config argument. This configuration file is a *.cfg file and is organized in the
following way:
the root items are only used by the entry point.
the items in sections are used by the corresponding sub-command (e.g. the items of the
[create-inputs]section are only used by theaxon-synthesis create-inputssub-command.
Global section¶
The items of the [global] section can be used by all sub-commands. If an item is present in
both the [global] section and in a sub-section, the second one takes precedence. For example,
the following configuration:
[create-inputs]
atlas_path = /the/atlas/path
atlas_region_filename = brain_regions.nrrd
is equivalent to:
[global]
path = /the/atlas/path
atlas_region_filename = the_global_brain_regions.nrrd
[create-inputs]
atlas_region_filename = brain_regions.nrrd
Parameter groups¶
Some parameters can be grouped in a sub-section and are then expanded as individual parameters. For example, the following configuration:
[create-inputs]
atlas_path = /the/atlas/path
atlas_region_filename = brain_regions.nrrd
is equivalent to:
[create-inputs]
[[atlas]]
path = /the/atlas/path
region_filename = brain_regions.nrrd
Example¶
A complete example is given in the examples directory that contains the following configuration
file:
debug = True
log_level = debug
seed = 0
[global]
morphology_dir = morphologies/repair_release/asc
[[atlas]]
path = /gpfs/bbp.cscs.ch/home/aberchet/DATA/atlas_ccfv3_obp
region_filename = brain_regions.nrrd
[[create_graph]]
intermediate_number = 10
min_intermediate_distance = 500
min_random_point_distance = 500
voronoi_steps = 2
use_orientation_penalty = True
orientation_penalty_exponent = 0.1
orientation_penalty_amplitude = 1
use_depth_penalty = True
depth_penalty_sigma = 0.25
depth_penalty_amplitude = 2
use_terminal_penalty = False
favored_regions = ["fiber tracts"]
favored_region_min_random_point_distance = 1000
[[post_processing]]
random_coeff = 2
length_coeff = 1
global_target_sigma_coeff = 10
target_sigma_coeff = 2
history_sigma_coeff = 2
[[outputs]]
enable_final_figures = True
enable_graph_creation_figures = True
enable_graph_creation_data = True
enable_main_trunk_figures = True
enable_main_trunk_morphologies = True
enable_morphologies = True
enable_postprocess_trunk_figures = True
enable_postprocess_trunk_morphologies = True
enable_steiner_tree_solution_figures = True
enable_steiner_tree_solutions = True
enable_target_point_figures = True
enable_target_points = True
enable_tuft_figures = True
enable_tuft_morphologies = True
[fetch-white-matter-recipe]
url = git@bbpgitlab.epfl.ch:conn/configs/long-range-connectivity-configs.git
file_path = white_matter_FULL_RECIPE_v1p20.yaml
output_path = WMR.yaml
[create-inputs]
output_dir = inputs
clustering_parameters = """{
"big_spheres": {"method": "sphere_parents", "sphere_radius": 500, "max_path_distance": 1500},
"medium_spheres": {"method": "sphere_parents", "sphere_radius": 300, "max_path_distance": 1000},
"small_spheres": {"method": "sphere_parents", "sphere_radius": 100, "max_path_distance": 300}
}
"""
[[wmr]]
path = WMR.yaml
[synthesize]
input_dir = inputs
output_dir = out
axon_grafting_points_file = axon_grafting_points.h5
morphology_data_file = input_cells.mvd3
[validation]
[[mimic]]
output_dir = mimic_validation
clustering_parameters = """{
"big_spheres": {"method": "sphere_parents", "sphere_radius": 300, "max_path_distance": 1000}
}
"""