-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
first commit, tests for noise on synapses
- Loading branch information
Showing
3 changed files
with
97 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# 0029_SynapseNoise | ||
|
||
three replicates of IzhikevichBurstingNeuron.cps connected by chemical synapses by ODE *v* adding noise | ||
|
||
## tests | ||
|
||
- 1D, 3 units, network, synaptic connection global quantity ODE, noise | ||
- cps file reads well | ||
- network file reads well | ||
- checks that there are two ODEs for br_i_j (the post-synaptic bound receptor) | ||
- checks that there are two Vsyn parameters | ||
- checks that there are two tau_r parameters | ||
- checks that there are two tau_d parameters | ||
- running the model through COPASI produces output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
#!/bin/bash | ||
|
||
# work out our folder name | ||
test=${PWD##*/} # to assign to a variable | ||
test=${test:-/} # to correct for the case where PWD=/ | ||
|
||
fail=0 | ||
|
||
# run sbmodelr | ||
../../sbmodelr -s v -n ../sources/1to2to3.gv --cn 0.1 uni -o IzNoise.cps ../sources/IzhikevichBurstingNeuron.cps 3 1> output 2> /dev/null | ||
|
||
# compare output and target | ||
difference=$(diff output target_stdout) | ||
if [[ $difference ]]; then | ||
printf 'FAIL %s\n' "${test}" | ||
fail=1 | ||
fi | ||
|
||
# create model summary | ||
../model_report.py IzNoise.cps >/dev/null | ||
if ! [[ $? = 0 ]]; then | ||
printf 'FAIL %s\n' "${test}" | ||
exit -1 | ||
fi | ||
|
||
# check that there are two ODEs for br_i_j (the post-synaptic bound receptor) | ||
n=$(grep -Pc "br_v_([12])\,([23])\s+ode" IzNoise.summary.txt) | ||
if ((n != 2)) ; then | ||
printf 'FAIL %s\n' "${test}" | ||
let "fail = $fail + 2" | ||
fi | ||
|
||
# check that there are two Vsyn parameters | ||
n=$(grep -Pc "^Vsyn_v_synapse_[12]-[23]\s+fixed" IzNoise.summary.txt) | ||
if ((n != 2)) ; then | ||
printf 'FAIL %s\n' "${test}" | ||
let "fail = $fail + 4" | ||
fi | ||
|
||
# check that there are two tau_r parameters | ||
n=$(grep -Pc "^tau_r_v_synapse_[12]-[23]\s+fixed" IzNoise.summary.txt) | ||
if ((n != 2)) ; then | ||
printf 'FAIL %s\n' "${test}" | ||
let "fail = $fail + 8" | ||
fi | ||
|
||
# check that there are two tau_d parameters | ||
n=$(grep -Pc "^tau_d_v_synapse_[12]-[23]\s+fixed" IzNoise.summary.txt) | ||
if ((n != 2)) ; then | ||
printf 'FAIL %s\n' "${test}" | ||
let "fail = $fail + 8" | ||
fi | ||
|
||
# run the model with CopasiSE | ||
../CopasiSE -c . --nologo IzNoise.cps > cpsout 2>&1 | ||
if ! [[ $? = 0 ]]; then | ||
printf 'FAIL %s\n' "${test}" | ||
let "fail = $fail + 16" | ||
fi | ||
|
||
# check that the output was created and contains last time point | ||
n=$(tail -n 3 I-tc.txt | grep -Pc "^300\s+") | ||
if ((n != 1)) ; then | ||
printf 'FAIL %s\n' "${test}" | ||
let "fail = $fail + 32" | ||
fi | ||
|
||
if [ "$fail" = 0 ] ; then | ||
printf 'PASS %s\n' "${test}" | ||
rm IzNoise.summary.txt I-tc.txt cpsout output *.cps | ||
fi | ||
|
||
exit $fail |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Processing ../sources/IzhikevichBurstingNeuron.cps | ||
Reactions: 0 | ||
Species: 0 (Reactions: 0, Fixed: 0, Assignment: 0, ODE: 0) | ||
Compartments: 1 (Fixed: 1, Assignment: 0, ODE: 0) | ||
Global quantities: 8 (Fixed: 6, Assignment: 0, ODE: 2) | ||
Events: 2 (Only time-dependent: 1, variable-dependent: 1) | ||
Network: directed (Nodes: 3, Edges: 2) | ||
|
||
created new model IzNoise.cps with a set of 3 replicas of ../sources/IzhikevichBurstingNeuron.cps | ||
|