bhallalab / moose-examples Goto Github PK
View Code? Open in Web Editor NEWExample scripts, demo and tutorials
Home Page: https://moose.ncbs.res.in
License: GNU General Public License v2.0
Example scripts, demo and tutorials
Home Page: https://moose.ncbs.res.in
License: GNU General Public License v2.0
Currently if one can not import moogli
, the script raise and exception. import moogli
should be optional in all scripts committed to this repository.
Most scripts in traub_2005
directory are failing, they are emit the following message:
File "test_nachans.py", line 38, in <module>
import testutils
File "/home1/dilawars/SVN/GITHUB/BhallaLab/moose-examples/traub_2005/py/testutils.py", line 45, in <module>
import channelbase
File "/home1/dilawars/SVN/GITHUB/BhallaLab/moose-examples/traub_2005/py/channelbase.py", line 165, in <module>
class ChannelBase(moose.HHChannel, ChannelMeta):
TypeError: Error when calling the metaclass bases
multiple bases have instance lay-out conflict
Many of them due to moogli which is now built with openscene-3.2.1 . The problem should be due to new version of openscene library.
File "Fig2C.py", line 356, in <module>
main()
File "Fig2C.py", line 337, in main
rdes = buildRdesigneur()
File "Fig2C.py", line 148, in buildRdesigneur
rd.addSpineProto() # This adds a version with an LCa channel by default.
File "/usr/lib/python2.7/dist-packages/rdesigneur/rdesigneurProtos.py", line 348, in addSpineProto
assert( moose.exists( parent ) ), "%s must exist" % parent
AssertionError: /library must exist
ReadSwc: cells/ko20x-07.CNG.swc : NumSegs = 152, bad = 0, Validated = 1, numBranches = 40
ReadSwc::diagnostics: undef : 0
ReadSwc::diagnostics: soma : 3
ReadSwc::diagnostics: axon : 0
ReadSwc::diagnostics: dend : 59
ReadSwc::diagnostics: apical : 53
ReadSwc::diagnostics: dend_f : 7
ReadSwc::diagnostics: dend_e : 11
ReadSwc::diagnostics: custom : 0
ReadSwc::diagnostics: bad : 0
ReadSwc::diagnostics: undef : 0
ReadSwc::diagnostics: axon_f : 0
ReadSwc::diagnostics: axon_e : 0
ReadSwc::diagnostics: apical_f : 9
ReadSwc::diagnostics: apical_e : 10
Rdesigneur: Elec model has 152 compartments and 0 spines on 0 compartments.
Setting Up 3D Display
QGLTempContext: No GL capable X visuals available.
QGLTempContext: No GL capable X visuals available.
QGLContext::makeCurrent(): Cannot make invalid context current.
Error: OpenGL version test failed, requires valid graphics context.
Segmentation fault
Rdesigneur: Elec model has 152 compartments and 0 spines on 0 compartments.
Setting Up 3D Display
QGLTempContext: No GL capable X visuals available.
QGLTempContext: No GL capable X visuals available.
QGLContext::makeCurrent(): Cannot make invalid context current.
Error: OpenGL version test failed, requires valid graphics context.
Segmentation fault
Traceback (most recent call last):
File "rxdSpineSize.py", line 293, in <module>
showVisualization()
File "rxdSpineSize.py", line 191, in showVisualization
makeModel()
File "rxdSpineSize.py", line 120, in makeModel
rdes.buildModel( '/model' )
File "/usr/lib/python2.7/dist-packages/rdesigneur/rdesigneur.py", line 199, in buildModel
self.buildAdaptors()
File "/usr/lib/python2.7/dist-packages/rdesigneur/rdesigneur.py", line 489, in buildAdaptors
self._buildAdaptor( mesh, i[2], i[3], name, i[1], False, i[4], i[5] )
File "/usr/lib/python2.7/dist-packages/rdesigneur/rdesigneur.py", line 1230, in _buildAdaptor
elecComptList = moose.vec( mesh.elecComptList[0].path + '/../spine' )
IndexError: tuple index out of range
Following scripts failed/did not run on travis. Connected to issue #4
With the latest moose-core (git commit "65720c1d2e0eb8")
moose-examples/tutorials/Rdesigneur/8.1_synTrigCICR and ex8.2_multiscale_gluR_phosph_3compt.py the result are different as per moose-documentation.
Git commit 50f03b getting same result as it is in moose docs need to see what changed over the time
Aditya,
These are not running, bcos of recent update in moose, in which if moose object exist and if we try to create same object (path) with different type/class, it complaints. "To get the existing object use moose.element(obj)
instead"
Earlier moose was silently assigning the old id to new variable which was wrong which is corrected.
E.g
pool = moose.Pool('/model/Ca')
reac = moose.Reac('/model/Ca')
reac had moose id of pool which was wrong
postcomp = moose.Compartment(post_path)
TypeError: cannot convert LIF to moose.Compartment. To get the existing object use moose.element(obj)
instead
somaIKCa = setupTable('somaIKCa',moose.HHChannel(soma_path+'/Gran_KCa_98'),'Gk')
TypeError: cannot convert HHChannel2D to moose.HHChannel. To get the existing object use moose.element(obj)
instead
Currently moose-examples is >30MB is size! It would require to rewriting history after cleanup otherwise we wont be able to reduce the size. Rewriting history means that all forks of moose-examples will become invalid. Many of these files are not required and added inadvertently.
Three largest directories:
13M snippets
6.6M paper-2015
5.2M neuroml
Directories with more than 1MB of content:
2 neuroml/PurkinjeCellPassivePulseInput
2 neuroml/PurkinjeCellPassivePulseInput/cells
2 paper-2015/Fig2_elecModels
2 paper-2015/Fig5_CellMultiscale
2 paper-2015/Fig5_CellMultiscale/cells
2 tutorials/Rdesigneur/cells
3 neuroml/CA1PyramidalCell
3 neuroml/CA1PyramidalCell/cells_channels
3 tutorials
3 tutorials/Rdesigneur
4 paper-2015/Fig6_NetMultiscale
4 paper-2015/Fig6_NetMultiscale/cells_channels
6 neuroml
7 paper-2015
Largest files:
9.6M ./snippets/symcompartment.txt
1.1M ./neuroml/PurkinjeCellPassivePulseInput/cells/purk2.morph.xml
936K ./snippets/threading_demo.dat
736K ./snippets/hdfdemo_Vm.csv
612K ./paper-2015/Fig6_NetMultiscale/cells_channels/CA1spiny7_0.morph.xml
608K ./paper-2015/Fig6_NetMultiscale/cells_channels/CA1spiny.morph.xml
592K ./tutorials/Rdesigneur/chans/CA1.morph.xml
592K ./paper-2015/Fig6_NetMultiscale/cells_channels/CA1.morph.xml
592K ./paper-2015/Fig6_NetMultiscale/cells_channels/CA1.morph.spines.xml
592K ./paper-2015/Fig5_CellMultiscale/chans/CA1.morph.xml
592K ./paper-2015/Fig2_elecModels/chans/CA1.morph.xml
592K ./neuroml/CA1PyramidalCell/cells_channels/CA1_original.morph.xml
592K ./neuroml/CA1PyramidalCell/cells_channels/CA1.morph.xml
592K ./neuroml/CA1PyramidalCell/cells_channels/CA1.morph.original.xml
592K ./neuroml/CA1PyramidalCell/cells_channels/CA1inhomog.morph.xml
588K ./tutorials/Rdesigneur/cells/CA1.morph.xml
588K ./paper-2015/Fig6_NetMultiscale/cells_channels/CA1_nochans.morph.xml
588K ./paper-2015/Fig5_CellMultiscale/cells/CA1.morph.xml
588K ./paper-2015/Fig2_elecModels/cells/CA1.morph.xml
588K ./neuroml/CA1PyramidalCell/cells_ 308K ./genesis/EGFR_MAPK_58.png
252K ./tutorials/Rdesigneur/cells/DHC-neuron.CNG.swc
252K ./paper-2015/Fig5_CellMultiscale/cells/DHC-neuron.CNG.swc
228K ./neuroml/OlfactoryBulbPassive/OBpassive_numgloms3_seed750.0.xml
228K ./.git/objects/pack/pack-9273cc4dcd5076582996dcd1fb1126a024c42053.idx
196K ./snippets/compartmental_neuron.csv
156K ./tutorials/ChemicalBistables/mapkFB.png
152K ./genesis/acc68.png
148K ./neuroml/OlfactoryBulbPassive/cells/mitral.xml
144K ./snippets/output_hdfdemo.h5
136K ./.git/objects/pack/pack-3a08e23cec6c3fdb210083f48ef5b712d9de3287.pack
120K ./paper-2015/Fig4_ReacDiff/CaMKII_merged77.g
116K ./neuroml/OlfactoryBulbPassive/OBpassive_slice_numgloms2_seed100.0.xml
112K ./tutorials/Rdesigneur/cells/VHC-neuron.CNG.swc
112K ./paper-2015/Fig5_CellMultiscale/cells/VHC-neuron.CNG.swc
112K ./paper-2015/Fig2_elecModels/cells/VHC-neuron.CNG.swc
108K ./tutorials/ChemicalOscillators/turingPatternTut.png
96K ./tutorials/Rdesigneur/cells/970529c.CNG.swc
96K ./paper-2015/Fig5_CellMultiscale/cells/970529c.CNG.swc
88K ./.git/objects/53/b4aa1a161381171b0779b3686282666076eedd
84K ./hopfield/hopfield_ui.py
80K ./hopfield/hopfield_ui.ui
76K ./snippets/lifcomp.csv
76K ./genesis/acc35.g
72K ./tutorials/Rdesigneur/cells/barrionuevo_cell1zr.CNG.swc
72K ./snippets/barrionuevo_cell1zr.CNG.swc
68K ./.git/index
52K ./tutorials/ChemicalOscillators/relaxOsc_tut.png
48K ./genesis/Osc_cspace_ref_model.png
48K ./genesis/Kholodenko.png
44K ./squid/squid_demo_qt5.py
44K ./squid/squid_demo.py
44K ./snippets/nsdf_demo.h5
Loading genesis file 'genesis/reaction.g' is failing with this release. Following is the traceback.
The script is snippets/savemodel.py
.
ReadKkit::setMethod: option not known, using Exponential Euler (ee)
Traceback (most recent call last):
File "snippets/savemodel.py", line 67, in <module>
written = write('/model', 'testsave.g')
File "/usr/lib/python2.7/site-packages/moose/genesis/_main.py", line 66, in write
cmin,cmax,sceneitems = autoCoordinates(meshEntry,srcdesConnection)
File "/usr/lib/python2.7/site-packages/moose/genesis/_main.py", line 278, in autoCoordinates
position = nx.graphviz_layout(G, prog = 'dot')
File "/usr/lib/python2.7/site-packages/networkx/drawing/nx_pydot.py", line 257, in graphviz_layout
return pydot_layout(G=G,prog=prog,root=root,**kwds)
File "/usr/lib/python2.7/site-packages/networkx/drawing/nx_pydot.py", line 277, in pydot_layout
D=P.create_dot(prog=prog)
File "/usr/lib/python2.7/site-packages/pydot.py", line 1802, in <lambda>
lambda f=frmt, prog=self.prog : self.create(format=f, prog=prog))
File "/usr/lib/python2.7/site-packages/pydot.py", line 2023, in create
status, stderr_output) )
pydot.InvocationException: Program terminated with status: 1. stderr follows: Error: /tmp/tmpL19Zsb: syntax error in line 2 near ','
Following files run properly without any issues, but do not provide any graphs or output text on terminal.
(I think as they are snippets, an user should get something to understand what just happened while execution of the files.)
The following file runs properly, and generates graphs, too. It might be easier for a new user to understand if graphs would be labeled.
Following file runs properly and generates output properly.
But in one of the comments it says the graph runs for 100 milliseceonds, while the command is moose.start(50), so am changing that data in comment.
Func was the initial version of the feature and Function was an improved version. The field signatures are slightly different - Func can take 2 or 3 variable messages (xy, xyz). I would suggest checking the existing scripts and use cases to see if Func has any practical utility. Otherwise just deprecate it.
Originally posted by @subhacom in BhallaLab/moose-core#366 (comment)
Status of this repositry on Feb 25, 2020. After PR merge BhallaLab/moose-core#387
Following are failing. This is related to BhallaLab/moose-core#388 . The order in unzombification could be determined.
python Fig2A_analysis.py
Traceback (most recent call last):
File "Fig2A_analysis.py", line 9, in <module>
fh = open('wt.xplot',mode='r')
IOError: [Errno 2] No such file or directory: 'wt.xplot'
Travis tests each script in this directory. Not all scripts are run. Any script which launches GUI is not executed. Any script which has a call to input()
or raw_input()
won't run.
|| Failed with status 1
Starting simulation at: 2016-05-06T12:45:05.717483
Finished simulation at: 2016-05-06T12:45:05.873813
Closing nsdf handle
Closed nsdf handle
Traceback (most recent call last):
File "nsdf_vec.py", line 178, in <module>
fname = write_nsdf()
File "nsdf_vec.py", line 146, in write_nsdf
pulse_info['delay', ii] = pulsegen.vec[ii].delay[0]
File "/usr/lib/python2.7/dist-packages/h5py/_hl/dataset.py", line 359, in __setitem__
raise TypeError("Field name selections are not allowed for write.")
TypeError: Field name selections are not allowed for write.
Rest of them.
File "hopfield.py", line 191, in <module>
test()
File "hopfield.py", line 145, in test
hopF = HopfieldNetwork(100)
File "hopfield.py", line 24, in __init__
self.createNetwork()
File "hopfield.py", line 83, in createNetwork
cell.synapse.num = self.numNeurons
AttributeError: 'moose.IntFire' object has no attribute 'synapse'
Following scripts uses pyqt4 and are not tested, they need to ported to PyQt5.
PYQT_REQUIRED
If a script a/b/c.py
is broken on travis, it will be renamed to a/b/c.py.BROKEN`.
If anyone fix it, please restore it back to its original name.
There are currently 67 scripts which does not pass on travis.
loading model from genesis into moose, and converting it again to genesis one.
File "savemodel.py", line 60, in
written = write('/model', 'testsave.g')
NameError: name 'write' is not defined
With the latest moose-core (git commit "65720c1d2e0eb8")
moose-examples/tutorials/Rdesigneur/ex7.2_CICR.py the result are different as per moose-documentation.
We are looking into this.
Traceback (most recent call last):
File "Izhikevich_with_synapse.py", line 133, in
model_dict = make_model()
File "Izhikevich_with_synapse.py", line 110, in make_model
synapse, spike_in = make_synapse('/model/synapse')
File "Izhikevich_with_synapse.py", line 88, in make_synapse
syn.synapse.num = 1
AttributeError: 'moose.SynChan' object has no attribute 'synapse'
Following scripts were not tested on Travis. These needs to marked OK or dirty
manually. Also see issue #4, and #5
Traceback (most recent call last):
File "savemodel.py", line 60, in
written = moose.write('/model', 'testsave.g')
Please clear this file soon.
First of all, Moogli doesn't get installed by its own.
The instructions for installation mogli are to be made handy.
While running the insertSpins.py, in absence of the terminal generates
"Warning: Moogli not found. All moogli calls will use dummy functions"
A major issue is with the morphology module.
Running the following files generate error:
"AttributeError: 'module' object has no attribute 'Morphology'"
insertSpines.py
insertSpinesWithoutRdesigneur.py
loadMorphology.py
Running the teseSigNeur.py gives:
AttributeError: 'moose.SynChan' object has no attribute 'synapse'
2.After git commit c385807 the example stop working
File "/home/harsha/MOOSE/delete-moose-core/python/rdesigneur/rdesigneur.py", line 1393, in _configureSolvers
dmdsolve.buildNeuroMeshJunctions( smdsolve, pmdsolve )
RuntimeError: getFieldPropertyDestFinfo2::NotImplemented buildNeuroMeshJunctions for rttType Id,Id for oid /model[0]/chem[0]/dend[0]/dsolve[0]
3.After git commit eafa8b2bfe0
RuntimeError: getLookupValueFinfoItem::NotImplemented error
I was thinking of putting animation plots as videos in documentation. It is possible through the Sphinx.
If you permit it, I would like to have animation videos of following python files in snippets folder.
for time plots
For animation plot
Following is a like to the guide how it can be done using pylot.
https://jakevdp.github.io/blog/2012/08/18/matplotlib-animation-tutorial/
These program which are in snippets folder, when run first time it runs fine, but multiple time run gives seg fault like (heisenbug )
Travis reported the following problem:
```
No CPU information available. Assuming single core.
No CPU information available. Assuming single core.
on node 0, numNodes = 1, numCores = 1
Traceback (most recent call last):
File "loadSbmlmodel.py", line 106, in <module>
modelPath, modelpathexist = main()
File "loadSbmlmodel.py", line 74, in main
if sbmlId.path != '/':
AttributeError: 'tuple' object has no attribute 'path'
```
Currently each example has its own data file in its own folder. This causes lot of problem when packaging due to duplicate file warnings.
Ideally all data files should be kept in one place and let the examples read them from here.
Following scripts do not run due to deprecated API
runs but gives
Elements Matching:', '/alfa/##[FIELD(Gbar)=1e-6]')
Error: SetGet::strGet: Field Gbar not found on Element gateX
testRdesigneur.py
Warning: meshLambda argument is deprecated. Please use 'diffusionLength' instead.
For now rdesigneur will accept this argument.
Error: rdesigneur: Prototype build failed: "elec Proto: global function 'makeCellProto()' not known."
testWigglySpines.py
NeuroMesh::updateShaftParents: may be misaligned
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
Aborted (core dumped)
rxdSpineSize.py
Warning: Dsolve::setNinit: Eref z out of range 1, 0
Traceback (most recent call last):
File "rxdSpineSize.py", line 293, in
showVisualization()
File "rxdSpineSize.py", line 191, in showVisualization
makeModel()
File "rxdSpineSize.py", line 120, in makeModel
rdes.buildModel( '/model' )
File "/home/harsha/Jan/moose-core/python/rdesigneur/rdesigneur.py", line 199, in buildModel
self.buildAdaptors()
File "/home/harsha/Jan/moose-core/python/rdesigneur/rdesigneur.py", line 489, in buildAdaptors
self._buildAdaptor( mesh, i[2], i[3], name, i[1], False, i[4], i[5] )
File "/home/harsha/Jan/moose-core/python/rdesigneur/rdesigneur.py", line 1230, in _buildAdaptor
elecComptList = moose.vec( mesh.elecComptList[0].path + '/../spine' )
IndexError: tuple index out of range
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.