Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Circuit Configuration File Nodes and Edges Out of Order #180

Closed
mwstroud opened this issue Aug 9, 2021 · 1 comment
Closed

Circuit Configuration File Nodes and Edges Out of Order #180

mwstroud opened this issue Aug 9, 2021 · 1 comment

Comments

@mwstroud
Copy link

mwstroud commented Aug 9, 2021

The build_env_bionet() function seems to be building the circuit_config.json incorrectly. In the "networks" section, the nodes and edges are listed out of order. The code block below shows how this function generates the nodes and edges incorrectly. The Edrive_nodes are virtual cells and the network_nodes are biophysical cells. This ordering in both the nodes and edges breaks the simulation.

  "networks": {
    "nodes": [
      {
        "nodes_file": "$NETWORK_DIR\\Edrive_nodes.h5",
        "node_types_file": "$NETWORK_DIR\\Edrive_node_types.csv"
      },
      {
        "nodes_file": "$NETWORK_DIR\\network_nodes.h5",
        "node_types_file": "$NETWORK_DIR\\network_node_types.csv"
      }
    ],
    "edges": [
      {
        "edges_file": "$NETWORK_DIR\\Edrive_network_edges.h5",
        "edge_types_file": "$NETWORK_DIR\\Edrive_network_edge_types.csv"
      },
      {
        "edges_file": "$NETWORK_DIR\\network_network_edges.h5",
        "edge_types_file": "$NETWORK_DIR\\network_network_edge_types.csv"
      }
    ],
    "gap_juncs": []
  }

Importantly, build_env_bionet() writes biophysical nodes last when they should be listed first. If the ordering is changed such that biophysical cells are listed first, the simulation runs correctly.

  "networks": {
    "nodes": [
      {
        "nodes_file": "$NETWORK_DIR\\network_nodes.h5",
        "node_types_file": "$NETWORK_DIR\\network_node_types.csv"
      },
      {
        "nodes_file": "$NETWORK_DIR\\Edrive_nodes.h5",
        "node_types_file": "$NETWORK_DIR\\Edrive_node_types.csv"
      }
    ],
    "edges": [
      {
        "edges_file": "$NETWORK_DIR\\network_network_edges.h5",
        "edge_types_file": "$NETWORK_DIR\\network_network_edge_types.csv"
      },
      {
        "edges_file": "$NETWORK_DIR\\Edrive_network_edges.h5",
        "edge_types_file": "$NETWORK_DIR\\Edrive_network_edge_types.csv"
      }
    ],
    "gap_juncs": []
  }

Here are raster plots showing the effects of this error using a different network:
Raster plot with incorrect circuit_config.json ordering:
WithoutFix

Raster plot with correct circuit_config.json ordering:
withFix
As is shown, the effects are large from this ordering issue. It has been identified that biophysical to biophysical edges break as a result of this issue.
Setup:

  • BMTK 0.0.9
  • NEURON 8.0
@mwstroud
Copy link
Author

mwstroud commented Sep 9, 2021

Kael Dai has resolved this issue in an update to the develop branch. There seemed to be a mix up in a local variable node_id and NEURON's variable gid, but this has been fixed.

Thanks Kael Dai!

@mwstroud mwstroud closed this as completed Sep 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant