Configuration file structure¶
Model fitting config¶
1{
2 "working_dir": "/path/to/working/directory",
3 "out_dir": "/path/to/output/directory",
4 "seed": 1234,
5 "CV_folds": 5,
6 "circuit_config": "/path/to/circuit_config.json",
7 "model": {
8 "name": "User-defined-model-name",
9 "fct": {
10 "source": "Name-of-code-module",
11 "kwargs": {
12 "key1": "value1",
13 "key2": "value2",
14 "...": "..."
15 }
16 }
17 }
18}
Key |
Description |
|---|---|
“working_dir” |
Working directory to store data and model |
“out_dir” |
Output directory to store output figures (can be the same as |
“seed” |
Random seed, e.g., used when randomly subsampling data |
“CV_folds” |
Optional number of cross-validation folds; will fit one separate model to each training data set; can be overwritten by command line argument “–cv-folds=N”; only supported by some model building functions, e.g., “conn_prob”, “conn_props”, and delay” |
“circuit_config” |
Path to SONATA circuit config file (.json) |
“model” |
Model-specific settings |
↳”name” |
User-defined name of the model; will be used in filenames |
↳”fct” |
Specification of model fitting function |
↳↳”source” |
Name of source code module for model fitting, e.g., “conn_prob” or “delay” |
↳↳”kwargs” |
Keyword arguments provided as key-value pairs with model-specific settings that are passed to the code module’s extract(), build(), and plot() methods |
Working example:
1{
2 "working_dir": "/gpfs/bbp.cscs.ch/project/proj83/home/pokorny/SimplifiedConnectomeModels/model_building_v2/SSCx-HexO1-Release",
3 "out_dir": "/gpfs/bbp.cscs.ch/project/proj83/home/pokorny/SimplifiedConnectomeModels/model_building_v2/SSCx-HexO1-Release",
4 "seed": 7531,
5 "circuit_config": "/gpfs/bbp.cscs.ch/project/proj83/jira-tickets/NSETM-1948-extract-hex-O1/data/O1_data/circuit_config.json",
6 "model": {
7 "name": "DistDepDelay-SSCxO1-Hex0EE",
8 "fct": {
9 "source": "delay",
10 "kwargs": {
11 "sel_src": {
12 "node_set": "hex0",
13 "synapse_class": "EXC"
14 },
15 "sel_dest": {
16 "node_set": "hex0",
17 "synapse_class": "EXC"
18 },
19 "sample_size": null,
20 "bin_size_um": 50,
21 "max_range_um": null
22 }
23 }
24 }
25}
Connectome manipulation config¶
1{
2 "circuit_config": "circuit_config.json OR /path/to/circuit_config.json",
3 "circuit_path": "/path/to/circuit",
4 "edges_popul_name": "Name-of-edges-population",
5 "src_node_popul_name": "Name-of-source-nodes-population",
6 "tgt_node_popul_name": "Name-of-target-nodes-population",
7 "seed": 1234,
8 "N_split_nodes": 100,
9 "manip": {
10 "name": "User-defined-manipulation-name",
11 "syn_props_init": {
12 "property1": "data-type1",
13 "property2": "data-type2",
14 "...": "..."
15 },
16 "fcts": [
17 {
18 "source": "Name-of-code-module",
19 "key1": "value1",
20 "key2": "value2",
21 "...": "...",
22 "pos_map_file": "/path/to/position/mapping/file",
23 "model_config": {
24 "Model-spec-key1": {
25 "file": "path/to/model/file"
26 },
27 "Model-spec-key2": {
28 "file": "path/to/model/file"
29 }
30 }
31 }
32 ]
33 }
34}
Key |
Description |
|---|---|
“circuit_config” |
Circuit config filename (requires “circuit_path”) OR full path to SONATA circuit config file (.json) |
“circuit_path” |
Optional path to SONATA circuit; required if “circuit_config” only contains a filename |
“edges_popul_name” |
Optional name of SONATA edges population |
“src_node_popul_name” |
Optional name of SONATA source nodes population |
“tgt_node_popul_name” |
Optional name of SONATA target nodes population |
“seed” |
Random seed for stochastic manipulation |
“N_split_nodes” |
Optional number of data splits; can be overwritten by command line argument “–splits=N” |
“manip” |
Manipulation-specific settings |
↳”name” |
User-defined name of the manipulation; will be used in filenames |
↳”syn_props_init” |
Optional key-value pairs of property names and data types for initializing an enpty connectome |
↳”fcts” |
List for specifying a single or sequence of manipulation functions |
↳↳”source” |
Name of manipulation source code module, e.g., “conn_rewiring” or “syn_removal” |
↳↳”key1”, “key2”, … |
Optional key-value pairs with manipulation-specific settings that are passed to the apply() method of the code module’s manipulation class |
↳↳”pos_map_file” |
Optional path to position mapping file |
↳↳”model_config” |
Optinal key-value pairs containing model specifications that are passed to the apply() method of the
code module’s manipulation class; set to |
Working example:
1{
2 "circuit_config": "/gpfs/bbp.cscs.ch/project/proj83/jira-tickets/NSETM-1948-extract-hex-O1/data/O1_data/circuit_config.json",
3 "seed": 3210,
4 "manip": {
5 "name": "ConnRewireOrder1Hex0EE",
6 "fcts": [
7 {
8 "source": "conn_rewiring",
9 "sel_src": {
10 "node_set": "hex0",
11 "synapse_class": "EXC"
12 },
13 "sel_dest": {
14 "node_set": "hex0",
15 "synapse_class": "EXC"
16 },
17 "syn_class": "EXC",
18 "keep_indegree": false,
19 "reuse_conns": false,
20 "gen_method": "duplicate_randomize",
21 "amount_pct": 100,
22 "estimation_run": false,
23 "opt_nconn": true,
24 "p_scale": 1.0,
25 "pos_map_file": "/gpfs/bbp.cscs.ch/project/proj83/home/pokorny/SimplifiedConnectomeModels/model_building_v2/SSCx-HexO1-Release/model/FlatPosMapping-SSCxO1.json",
26 "model_config": {
27 "prob_model_spec": {
28 "file": "/gpfs/bbp.cscs.ch/project/proj83/home/pokorny/SimplifiedConnectomeModels/model_building_v2/SSCx-HexO1-Release/model/ConnProb1stOrder-SSCxO1-Hex0EE.json"
29 },
30 "delay_model_spec": {
31 "file": "/gpfs/bbp.cscs.ch/project/proj83/home/pokorny/SimplifiedConnectomeModels/model_building_v2/SSCx-HexO1-Release/model/DistDepDelay-SSCxO1-Hex0EE.json"
32 },
33 "props_model_spec": {
34 "file": "/gpfs/bbp.cscs.ch/project/proj83/home/pokorny/SimplifiedConnectomeModels/model_building_v2/SSCx-HexO1-Release/model/ConnPropsPerPathway-SSCxO1-Hex0EE.json"
35 }
36 }
37 }
38 ]
39 }
40}
Structural comparison config¶
1{
2 "working_dir": "/path/to/working/directory",
3 "out_dir": "/path/to/output/directory",
4 "circuits": {
5 "0": {
6 "circuit_config": "/path/to/first/circuit_config.json",
7 "circuit_name": "Name-of-first-circuit"
8 },
9 "1": {
10 "circuit_config": "/path/to/second/circuit_config.json",
11 "circuit_name": "Name-of-second-circuit"
12 }
13 },
14 "plot_types": [
15 {
16 "name": "User-defined-plot-name",
17 "fct": {
18 "source": "Name-of-code-module",
19 "kwargs": {
20 "key1": "value1",
21 "key2": "value2",
22 "...": "..."
23 }
24 },
25 "res_sel": [
26 "results-selection1",
27 "results-selection2",
28 "..."
29 ],
30 "range_prctile": 100,
31 "fig_size": [
32 11,
33 3
34 ],
35 "fig_file": {
36 "format": "png",
37 "dpi": 600
38 }
39 },
40 {
41 "name": "Another-user-defined-plot-name",
42 "fct": {
43 "source": "...",
44 "kwargs": {
45 "...": "..."
46 }
47 },
48 "res_sel": [
49 "..."
50 ],
51 "range_prctile": 100,
52 "fig_size": [
53 11,
54 3
55 ],
56 "fig_file": {
57 "format": "png",
58 "dpi": 600
59 }
60 }
61 ]
62}
Key |
Description |
|---|---|
“working_dir” |
Working directory to store extracted data |
“out_dir” |
Output directory to store output figures (can be the same as |
“circuits” |
Selection of two SONATA circuits to compare |
↳”0” & “1” |
Specification of first and second circuit |
↳↳”circuit_config” |
Path to SONATA circuit config file (.json) |
↳↳”circuit_name” |
User-defined name; will be used in figures and filenames |
“plot_types” |
List of plots to generate |
↳”name” |
User-defined name of the plot; will be used in filenames |
↳”fct” |
Specification of structural comparison function |
↳↳”source” |
Name of source code module for structural comparison, e.g., “connectivity” or “properties” |
↳↳”kwargs” |
Keyword arguments provided as key-value pairs with comparison-specific settings that are passed to the code module’s compute() and plot() methods |
↳”res_sel” |
Selection of results for plotting; can be a list of keys corresponding to data items as returned by compute() |
↳”range_prctile” |
Optional range percentile used for plotting the selected results |
↳”fig_size” |
Optional two-element list with width and height (in inch) of generated results figure(s) |
↳”fig_file” |
Optional settings for generated results figure file(s) |
↳↳”format” |
Output file format of generated figure(s), e.g., “png” |
↳↳”dpi” |
Resolution of the generated output figure(s) in dots-per-inch |
Working example:
1{
2 "working_dir": "/gpfs/bbp.cscs.ch/project/proj83/home/pokorny/SimplifiedConnectomeModels/structural_comparator_v2/SSCx-HexO1-Release",
3 "out_dir": "/gpfs/bbp.cscs.ch/project/proj83/home/pokorny/SimplifiedConnectomeModels/structural_comparator_v2/SSCx-HexO1-Release",
4 "circuits": {
5 "0": {
6 "circuit_config": "/gpfs/bbp.cscs.ch/project/proj83/jira-tickets/NSETM-1948-extract-hex-O1/data/O1_data/circuit_config.json",
7 "circuit_name": "Orig"
8 },
9 "1": {
10 "circuit_config": "/gpfs/bbp.cscs.ch/project/proj83/home/pokorny/SimplifiedConnectomeModels/circuits_v2/SSCx-HexO1-Release__ConnRewireOrder1Hex0EE/circuit_config.json",
11 "circuit_name": "Order-1"
12 }
13 },
14 "plot_types": [
15 {
16 "name": "ConnPerLayer_Hex0EE",
17 "fct": {
18 "source": "connectivity",
19 "kwargs": {
20 "group_by": "layer",
21 "skip_empty_groups": false,
22 "sel_src": {
23 "node_set": "hex0",
24 "synapse_class": "EXC"
25 },
26 "sel_dest": {
27 "node_set": "hex0",
28 "synapse_class": "EXC"
29 }
30 }
31 },
32 "res_sel": [
33 "nsyn_conn",
34 "conn_prob"
35 ],
36 "range_prctile": 100,
37 "fig_size": [
38 11,
39 3
40 ],
41 "fig_file": {
42 "format": "png",
43 "dpi": 600
44 }
45 },
46 {
47 "name": "PropsPerMtype_Hex0EE",
48 "fct": {
49 "source": "properties",
50 "kwargs": {
51 "group_by": "mtype",
52 "skip_empty_groups": true,
53 "sel_src": {
54 "node_set": "hex0",
55 "synapse_class": "EXC"
56 },
57 "sel_dest": {
58 "node_set": "hex0",
59 "synapse_class": "EXC"
60 },
61 "fct": "np.mean"
62 }
63 },
64 "res_sel": [
65 "conductance",
66 "decay_time",
67 "delay",
68 "depression_time",
69 "facilitation_time",
70 "n_rrp_vesicles",
71 "syn_type_id",
72 "u_syn"
73 ],
74 "range_prctile": 100,
75 "fig_size": [
76 11,
77 3
78 ],
79 "fig_file": {
80 "format": "png",
81 "dpi": 600
82 }
83 },
84 {
85 "name": "Adjacency_Hex0",
86 "fct": {
87 "source": "adjacency",
88 "kwargs": {
89 "sel_src": {
90 "node_set": "hex0"
91 },
92 "sel_dest": {
93 "node_set": "hex0"
94 }
95 }
96 },
97 "res_sel": [
98 "adj",
99 "adj_cnt"
100 ],
101 "range_prctile": 95,
102 "fig_size": [
103 11,
104 3
105 ],
106 "fig_file": {
107 "format": "png",
108 "dpi": 600
109 }
110 }
111 ]
112}