This entry contains the simulation scripts for the article "Computational modelling of novelty detection in the mismatch negativity protocols and its impairments in schizophrenia" Directories and subdirectories: - `./` (this directory): The main directory with scripts for Brian2 simulations. - `hay/`: The directory for Hay model simulations - `hay/models`: The directory with the hoc files - `hay/morphologies`: The directory with the asc files - `hay/saves_ACC`: Empty directory - the Hay model simulations with the ACC gene expression alterations will be saved here - `hay/saves_PFC`: Empty directory - the Hay model simulations with the PFC gene expression alterations will be saved here - `fIs/`: Empty directory - the Brian2 simulations of single neuron f-I curves will be saved here To run the simulations for Fig. 2A and plot the results, the grid search has to be run. Do this by: **Fig. 2A (super CPU-costly, approx 7000 CPU hours)** ``` sh rungrid.sh python3 drawfig_venn.py ``` To run the simulations for Fig. 2B and plot the results, we only need to run one simulation script that performs 4 experiments (one for each protocol). Do this by: **Fig. 2B (approx 2 min runtime)** ``` python3 simSCZpop_AUCbased.py 1 CTRL 0 #Run only CTRL simulation with seed=1 imodel=0. If run with less arguments, it will simulate also other 15 models (and ACC and PFC variants too if without CTRL argument). python3 drawfig_onesim.py ``` To run the simulations for Fig. 3A-C, do the following: **Fig. 3A (approx 2 min runtime)** ``` python3 simCTRL_diffseq.py #You can check the results after this by "python3 drawfig_longseq.py" - it will plot panel A but give an error for drawing panel B and C if you didn't run the simulations for imodel=1-15 below. ``` **Fig. 3B-C (approx 30 min runtime)** ``` for imodel in `seq 1 15` do python3 simCTRL_diffseq.py 1 $imodel done python3 drawfig_longseq.py ``` To run the simulations for Fig. 3D-E and plot the results, do the following: **Fig. 3D-E (approx 5-6 hours runtime)** ``` sh docheckups_NMDAblock.sh python3 drawfig_NMDAblocked.py ``` **Fig. 3F-G (approx 5-6 hours runtime)** ``` sh docheckups_delays.sh python3 drawfig_delays.py ``` To run the simulations for Fig. 4 and plot the results, do the following: **Fig. 4 (runtime many days):** ``` sh runsynfire.sh python3 drawfigstdp0.py ``` To run Fig. 5A-B, we have to run the Hay model simulations. These will be done in the "hay" folder as follows: **Fig. 4A-B** ``` cd hay nrnivmodl #compile the .MOD mechanisms python3 CTRL.py #Takes ~2 minutes sh runACC.sh #Takes ~15-18 hours sh runPFC.sh #Takes ~14-17 hours cd .. python3 drawfig_SCZ_allcortical_a.py ``` To run Fig. 5C-G, run the following: ``` sh runFigSCZ.sh python3 drawfig_SCZ_allcortical_b.py ``` To run Fig. 5H-L, run the following: ``` sh runFigSCZ_19percent.sh python3 drawfig_SCZ_allcortical_c.py ``` To run Fig. 6, run the following: ``` sh runfigcortfit.sh python3 drawfigcortfit.py ``` To run Fig. 7A-D, run the following (in addition to the simulations run for Fig. 5 and 6): ``` python3 sim_fIcurve_0to1amps_fittedtaus.py ACC #Takes less than a minute python3 sim_fIcurve_0to1amps_fittedtaus.py PFC #Takes less than a minute python3 drawfig_SCZ_corticalsubcortical_a.py ``` To run Fig. 7E-I, run the following: ``` python3 interpolate_fIcurve_membranetimeconstant_cortical.py #This can be done once the simulations for Fig. 5 and 6 have been performed. This saves taus_cortical_subjectwise_*.sav. sh runFigSCZ_corticalsubcortical.sh python3 drawfig_SCZ_corticalsubcortical_b.py ``` To run Fig. 7J-N, run the following (assuming the CTRL simulations for Fig. 7E-I are already done): ``` sh runFigSCZ_corticalsubcortical_19percent.sh python3 drawfig_SCZ_corticalsubcortical_c.py ``` Copyright CC-BY Tuomo Mäki-Marttunen, Ahmed Eissa, Jan Fredrik Kismul 2023-2025 --- ### File breakdown: ``` README.html #This file do_vary_fittedcortical_mmns.py #Script to run one seed from one of the 16 models with a cortical output population with a given input strength and noise level docheckups_NMDAblock.py #Script to run the model without NMDARs docheckups_NMDAblock.sh #Bash script that runs docheckups_NMDAblock.py for the 16 models docheckups_delays.py #Script to run the model with transmission delays docheckups_delays.sh #Bash script that runs docheckups_delays.py for the 16 models dosimSCZpop_19percentMorePruned_cortical.sh #Bash script that runs simSCZpop_19percentMorePruned_cortical.py for 20 seeds dosimSCZpop_cortical.sh #Bash script that runs simSCZpop_cortical.py for 20 seeds drawfig_NMDAblocked.py #Draws Fig. 3D-E drawfig_SCZ_allcortical_a.py #Draws Fig. 5A-B drawfig_SCZ_allcortical_b.py #Draws Fig. 5C-G drawfig_SCZ_allcortical_c.py #Draws Fig. 5H-L drawfig_SCZ_corticalsubcortical_a.py #Draws Fig. 7A-D drawfig_SCZ_corticalsubcortical_b.py #Draws Fig. 7E-I drawfig_SCZ_corticalsubcortical_c.py #Draws Fig. 7J-N drawfig_blocked_1_noEP2.py #Draws Supp. Fig. drawfig_blocked_2_noEP.py #Draws Supp. Fig. drawfig_blocked_3_nolongs.py #Draws Supp. Fig. drawfig_blocked_4_ESEDonly.py #Draws Supp. Fig. drawfig_delays.py #Draws Fig. 3F-G drawfig_longseq.py #Draws Fig. 3A-C drawfig_onesim.py #Draws Fig. 2B drawfig_rob_SDs.py #Draws Supp. Fig. drawfig_rob_jitter.py #Draws Supp. Fig. drawfig_rob_randominputs.py #Draws Supp. Fig. drawfig_rob_sizes.py #Draws Supp. Fig. drawfig_stdpsynfire_gridsearch3.py #Draws Fig. 4B drawfig_venn.py #Draws Fig. 2A drawfigcortfit.py #Draws Fig. 6 drawfigstdp0.py #Draws Fig. 4A drawfigstdp.py #Draws Fig. 4B-O fIs #Directory where f-I curves of IAF models with different membrane constants are saved gridsearch_mmns_2pm_sep7.py #Script for running the grid search to fit the model hay #Directory for Hay model simulations interpolate_fIcurve_membranetimeconstant_cortical.py #Script for combining the f-I data from Hay model and interpolating them to find their corresponding IAF membrane constants mytools.py #Generic tools for plotting and interpolating myvenn.py #A script based on venny4py to plot a Venn diagram runFigSCZ.sh #Bash script that runs simSCZpop_AUCbased.py for 20 seeds runFigSCZ_19percent.sh #Bash script that runs simSCZpop_19percentMorePruned.py for 20 seeds runFigSCZ_corticalsubcortical.sh #Bash script that runs simSCZpop_corticalsubcortical.py for 20 seeds runFigSCZ_corticalsubcortical_19percent.sh #Bash script that runs simSCZpop_corticalsubcortical_19percentMorePruned.py for 20 seeds runfigcortfit.sh #Bash script that runs sim_fIcurve_0to1amps.py for 25 membrane constants (from 50 to 1200 ms) rungrid.sh #Bash script that runs the grid search runsynfire.sh #Bash script that runs the STDP experiments with the synfire chain simCTRL_diffseq.py #Script to run one seed from one of the 16 models with a different stimulus sequence simSCZpop_19percentMorePruned.py #Script to run all 16 models where synaptic conductance to E populations is reduced by 19 percent for a given seed simSCZpop_19percentMorePruned_cortical.py #cript to run all 16 models with the cortical output population (CO) where synaptic conductance to CO is reduced by 19 percent for a given seed simSCZpop_AUCbased.py #Script to run all 16 models, both CTRL, SCZ(ACC) and SCZ(PFC) where all populations are considered cortical (no external cortical population) simSCZpop_corticalsubcortical.py #Script to run all 16 models with the cortical output population (CO), both CTRL, SCZ(ACC) and SCZ(PFC) simSCZpop_corticalsubcortical_19percentMorePruned.py #Script to run all 16 models with the cortical output population (CO), where synaptic conductance to CO is reduced by 19 percent sim_fIcurve_0to1amps.py #Script to run IAF f-I curve for a given membrane time constant, leak conductance and threshold potential sim_mmns_2pm_sep_noISDIDD_savespikesonly.py #The main simulation script to simulate the model, no limit for the parameter variability (may not work for SD > 0.3) sim_mmns_2pm_sep_noISDIDD_savespikesonly_limtau.py #The main simulation script to simulate the model sim_mmns_2pm_sep_noISDIDD_savespikesonly_limtau_delays.py #Script to simulate the model with transmission delays sim_mmns_2pm_sep_noISDIDD_savespikesonly_limtau_fixunits.py #The main simulation script to simulate the model, fixed the units (the output is identical). I might recommend using this as a base script if you develop the model further since it has the correct units - however, it may in its current form be slower than sim_mmns_2pm_sep_noISDIDD_savespikesonly_limtau.py due to additional unit checks sim_mmns_2pm_sep_noISDIDD_savespikesonly_limtau_givensequence.py #Script to simulate the model with an alternative stimulus sequence sim_mmns_2pm_sep_noISDIDD_withnoisyfittedcortical_savespikesonly_limtau.py #SCript to simulate the model with the cortical output population (CO) sim_mmns_2pm_sep_nopm2_nopm_savespikesonly.py #Script to simulate the model without pacemaker (phase-locked) populations sim_mmns_2pm_sep_nopm2_nosep_nopm_savespikesonly.py #Script to simulate the model without pacemaker (phase-locked) populations and without separate delayed-activating populations sim_mmns_2pm_sep_nopm2_nosep_savespikesonly.py #Script to simulate the model without the alternative-phase pacemaker (phase-locked) population and without separate delayed-activating populations sim_mmns_2pm_sep_nopm2_savespikesonly.py #Script to simulate the model without the alternative-phase pacemaker (phase-locked) population stdpsynfire_noNMDA_synstim_vartau.py #Script to simulate the synfire chain model stdpsynfire_noNMDA_synstim_vartau_random.py #Script to simulate the synfire chain model with random inputs stdpsynfire_noNMDA_synstim_vartau_saveallweights.py #Script to simulate the synfire chain model and save all weight time courses ```