Giter Site home page Giter Site logo

opensourcebrain / 169457 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from modeldbrepository/169457

0.0 1.0 0.0 228 KB

Schiz.-linked gene effects on intrinsic single-neuron excitability (Maki-Marttunen et al. 2016)

Home Page: https://modeldb.yale.edu/169457

Python 11.61% AGS Script 86.93% AMPL 1.46%

169457's Introduction

# Python-scripts for reproducing Figures 2-6 in the article 
# "Functional effects of schizophrenia-linked genetic variants on intrinsic single-neuron excitability: A modeling study."
#
# The scripts can be run using Python 2.7.8 with an interface to NEURON 7.3.
#
# If LaTeX installed, change the variable 'useLatex' to True for cleaner figure texts.
#
# All scripts are open for distribution and reuse through Creative Commons Attribution 2.0 Generic license
# (CC BY 2.0). The NEURON interface commands use the cell model and simulation of BAC firing by Etay Hay (Hay et al. 2011)
# The included .asc and .hoc files are copied as such from ModelDB entry 139653 with the author's permission, and the .mod
# files are copied with minor changes (hard-coded parameters are replaced with parameters whose values may be changed).
#
# Tuomo Maki-Marttunen, Jan 2015
#
# To run the python scripts, save them to the same directory with the .mod files, and make sure directories
# 'morphologies' and 'models' exist (in more detail, make sure that files 'morphologies/cell1.asc',
# 'morphologies/cell2.asc', 'models/L5PC_template.hoc', and 'models/L5PCbiophys3.hoc' are accessible). Then,
# follow the procedures below:
#
# 1) Run the .mod file complier:

nrnivmodl

# Before it is possible to draw any of figures, the mutations have to be scaled. To do this,
# do one of the following:
# 
# 2a)
#
# python runcontrols.py
# python scalemutations.py
# 
# Running runcontrols.py calculates the f-I curve and membrane potential limit cycle for the control neuron.
# Running scalemutations.py finds the scaling factors for each variant separately.
# This is a computationally heavy task, so if you can parallelize it to different computing nodes,
# you can alternatively run on each machine the following:
# 
# 2b)
#
# python scalemutations.py i
# 
# where i=0,...,57.
#
# After 2a) or 2b), run
# 
# python collectscalings.py
#
# to collect the scalings into a single file, scalings.sav
# 
# 2c) Alternatively, download the file scalings.sav, where the scalings are calculated in advance.
# 
# 3) You are now ready to draw Figures 2-5 from the article:

python drawfig1.py
python drawfig2.py
python drawfig3.py
python drawfig4.py

# On a tested standard computer, Figure 2 took around one minute to calculate, Figure 3
# was finished in 10 hours, Figure 4 in 15 minutes, and Figure 5 in five hours.
# 
# 4) To draw Figure 6, first calculate the spiking thresholds for uniformly distributed
# synaptic inputs on apical dendrite:

python savesynapselocations.py
python findthresholddistalamps.py
python collectthresholddistalamps.py

# (The second script takes some time to calculate, it can be distributed to different
# computers as was done in 2b with scalemutations.py)
#
# 5) Now, Figure 6 can be drawn:

python drawfig5.py

# This is the figure with heaviest computational load, due to the fine resolution of ISI.
# It took around 6 days to finish the Figure 6 on the tested machine.

169457's People

Contributors

tommorse avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.