Skip to content

How to reference gap junctions in the configuration file #415

@MargauxCalice

Description

@MargauxCalice

Hello,

I want to create a network of gap junctions and simulate it using the PointNet simulator, but I'm not sure how to reference the gap junctions in the configuration file.

I have created gap junction connections as follows:

net_pre.import_nodes(nodes_file_name=path_pre_h5,node_types_file_name=path_pre_csv)
net_post.import_nodes(nodes_file_name=path_post_h5,node_types_file_name=path_post_csv)


net_pre.add_gap_junctions(source=net_pre.nodes(pop_name='PV'), target=net_post.nodes(pop_name='SST'), connection_rule=connection_rule,resistance=1250)

net_pre.build()
net_pre.save_edge('network')

Then I referenced these gap junctions in the configuration file as follows:

    "networks": {
        "nodes": [
            {
                "nodes_file": "$NETWORK_DIR/test_net_nodes.h5",
                "node_types_file": "$NETWORK_DIR/test_net_node_types.csv"
            }
        ],
        "edges": [],
        "gap_juncs": [
        	{
        	"gap_juncs_file":"$NETWORK_DIR/test_net_test_net_edges.h5",
        	"gap_juncs_types_file":"$NETWORK_DIR/test_net_test_net_edge_types.csv"
            }
            
        ]

However, I am getting this error:


Traceback (most recent call last):
  File "/home/margaux/miniconda3/envs/ENV_NEST/config_command_run_pointnet.py", line 20, in <module>
    main(sys.argv)
  File "/home/margaux/miniconda3/envs/ENV_NEST/config_command_run_pointnet.py", line 15, in main
    network = pointnet.PointNetwork.from_config(configure)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/margaux/miniconda3/envs/ENV_NEST/lib/python3.11/site-packages/bmtk/simulator/core/simulator_network.py", line 260, in from_config
    network.load_gap_junc_files(config.gap_juncs)
  File "/home/margaux/miniconda3/envs/ENV_NEST/lib/python3.11/site-packages/bmtk/simulator/core/simulator_network.py", line 192, in load_gap_junc_files
    self._gap_juncs[network][key] = f[key][()]
                                    ~^^^^^
  File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
  File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
  File "/home/margaux/miniconda3/envs/ENV_NEST/lib/python3.11/site-packages/h5py/_hl/group.py", line 357, in __getitem__
    oid = h5o.open(self.id, self._e(name), lapl=self._lapl)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
  File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
  File "h5py/h5o.pyx", line 190, in h5py.h5o.open
KeyError: "Unable to open object (object 'source_ids' doesn't exist)"

Thank you for your help!
Margaux

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions