Tutorial 2: Spike Input Simulation
Overview
This tutorial describes how to perform spike input to biophysical neurons.
Warning
bionetlite currently does not support input via Virtual cells. This tutorial confirms that the population information file for biophysical neurons is generated.
See also
Corresponding BMTK tutorial: Tutorial: Single Cell Simulation with External Feedforward Input
Changes from BMTK to bionetlite
Only the import statement needs to be changed. All other code remains exactly the same.
Before (BMTK):
from bmtk.builder.networks import NetworkBuilder
After (bionetlite):
from bionetlite import NeuliteBuilder as NetworkBuilder
Code Example
from bionetlite import NeuliteBuilder as NetworkBuilder
# Create network
net = NetworkBuilder('mcortex')
# Add biophysical neurons
net.add_nodes(
N=1,
pop_name='Scnn1a',
model_type='biophysical',
model_template='ctdb:Biophys1.hoc',
dynamics_params='472363762_fit.json',
morphology='Scnn1a_473845048_m.swc'
)
# Add Virtual cells for input
# Note: bionetlite ignores Virtual cells
net.add_nodes(
N=10,
pop_name='input',
model_type='virtual'
)
# Build network
net.build()
# Save to files
net.save_nodes(output_dir='sim_ch02/network')
Generated Files
In this simulation, only the population file for biophysical neurons is generated. Information about Virtual cells is not included.
mcortex_population.csv
Contains information for biophysical neuron(s) (1 neuron). The column structure is as follows:
#n_cell,n_comp,name,swc_file,ion_file
1,3682,Scnn1a_100,data/Scnn1a_473845048_m.swc,data/472363762_fit.csv
#n_cell: Number of cellsn_comp: Number of compartmentsname: Population nameswc_file: Path to SWC morphology fileion_file: Path to ion channel parameter file
Note
Since Virtual cells are not output, mcortex_mcortex_connection.csv becomes a file with only the header.
Limitations
bionetlite and Neulite support the following input methods:
✅ Steady-state current injection
❌ Spike train input from file (currently not supported)
❌ Input via Virtual cell (currently not supported)
Note
If spike input functionality is required, implementation on the Neulite side is needed.
Next Steps
Tutorial 3: Single Population Network - Single population containing multiple neurons
Specifications and Limitations - Detailed specifications and limitations of bionetlite