Giter VIP home page Giter VIP logo

neuroml2's People

Contributors

adrianq avatar borismarin avatar dilawar avatar epiasini avatar pgleeson avatar rokasst avatar sanjayankur31 avatar tarelli avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

neuroml2's Issues

Improve images/links in gallery on NeuroML home page

There may be better/updated images, e.g. for OSB 3D viewer.

Also, this appears to be a promo for OSB (or the blue button looks like a real button); should say something like "Open Source Brain is built on NeuroML..."

selection_594

LEMS/NML2 example 3 does not work with neuron

jnml LEMS_NML2_Ex3_Net.xml -neuron fails:

 jNeuroML v0.7.3
(INFO) Reading from: /Users/borismarin/git/NeuroML2/LEMSexamples/LEMS_NML2_Ex3_Net.xml
(INFO) Adding simulation Component(id=sim1 type=Simulation) of network/component: net1 (Type: network)
(INFO) -- Writing to mod: /Users/borismarin/git/NeuroML2/LEMSexamples/hhcell_1.mod
(INFO) -- Writing to mod: /Users/borismarin/git/NeuroML2/LEMSexamples/hhcell_2.mod
(INFO) -- Writing to mod: /Users/borismarin/git/NeuroML2/LEMSexamples/syn2exp.mod
(INFO) -- Writing to mod: /Users/borismarin/git/NeuroML2/LEMSexamples/syn1exp.mod
(INFO) -- Writing to mod: /Users/borismarin/git/NeuroML2/LEMSexamples/pulseGen1.mod
Exception in thread "main" java.lang.NullPointerException
    at org.neuroml.export.neuron.LEMSQuantityPathNeuron.getExposure(LEMSQuantityPathNeuron.java:61)
    at org.neuroml.export.neuron.LEMSQuantityPathNeuron.getExposure(LEMSQuantityPathNeuron.java:74)
    at org.neuroml.export.neuron.LEMSQuantityPathNeuron.getDimension(LEMSQuantityPathNeuron.java:83)
    at org.neuroml.export.neuron.NeuronWriter.getMainScript(NeuronWriter.java:1150)
    at org.neuroml.export.neuron.NeuronWriter.generateMainScriptAndMods(NeuronWriter.java:186)
    at org.neuroml.export.neuron.NeuronWriter.generateAndRun(NeuronWriter.java:115)
    at org.neuroml.JNeuroML.main(JNeuroML.java:396)

Investigate option of updating syntax for connections to match current use for gap junctions

This

 <electricalProjection id ="testGJconn" presynapticPopulation="iafPop1" postsynapticPopulation="iafPop2">
      <electricalConnection preCell="0" postCell="0" synapse="gj1"/>
  </electricalProjection>

is cleaner than

 <projection id="internal2" presynapticPopulation="iafCells" postsynapticPopulation="iafCells" synapse="syn2">
    <connection id="0" preCellId="../iafCells/0/iaf" postCellId="../iafCells/2/iaf"/>
 </projection>

Inconsistent use of Child(ren)

In the current core component definitions, there are ComponentTypes which use Child for optional sub elements (e.g. notes in here, parent here).

As described in the LEMS paper, Child means one and only one sub-component of the appropriate type must be present. So, the correct construct would be Children, with the max attribute specified where appropriate (e.g. segment can only have zero or one parent).

Update LEMS definition of <transientPoissonFiringSynapse> to work in NEURON

@RokasSt, the LEMS definition of transientPoissonFiringSynapse works fine with the latest jNeuroML, & runs on jNeuroML, but has issues when mapped to NEURON.

I've added an example here: https://github.com/NeuroML/NeuroML2/blob/development/examples/NML2_Inputs.nml#L45, and added display of it (commented out) to the LEMS to run example inputs: https://github.com/NeuroML/NeuroML2/blob/development/LEMSexamples/LEMS_NML2_Ex16_Inputs.xml.

The issue with mapping to Neuron is that there can only be one condition in the test here:

<OnCondition test="tsince .gt. isi .and. t .geq. delay .and. t .lt. duration + delay">
, i.e. no &&.

A solution might be to incorporate the delay in the OnStart and add a v long isi if t>(duration + delay). Could you look into it and test? Thanks.

Update mapping NeuroML2 to & from PyNN

Examples of integration between PyNN and NeuroML2 are being added to: https://github.com/OpenSourceBrain/PyNNShowcase

Scenario: Model in PyNN; convert it equivalent in NeuroML2

In progress here: https://github.com/pgleeson/PyNN/tree/master/pyNN/neuroml (recent version has been merged into PyNN master: NeuralEnsemble/PyNN#509). There is example of a PyNN file converted to NeuroML2 on https://github.com/OpenSourceBrain/PyNNShowcase (latest export is here)

Longer term:

  • Export network connectivity to binary format (e.g. HDF5) from PyNN & have that supported also by NeuroML pipeline (see #93)

Scenario: Network model in NeuroML 2; need to convert it to equivalent in PyNN using jNeuroML

Started here: https://github.com/NeuroML/org.neuroml.export/blob/development/src/main/java/org/neuroml/export/pynn/PyNNWriter.java.

Initially only worked for models only using NML2 equivalents of PyNN cells, e.g. https://github.com/NeuroML/NeuroML2/blob/development/examples/NML2_PyNNCells.nml. Now using tips here and here to make sure this jNeuroML generated code is compatible with PyNN.

  • test for export of abstract cells, e.g. IaF, Izhikevich; add to .travis.yml
  • support plotting/saving of non v variables
  • test for export of connections; add to .travis.yml
  • test for export of connectionWDs; add to .travis.yml
  • test for single cond based cell; add to .travis.yml
  • test for multicomp cells; add to .travis.yml
  • test/document running generated examples on parallel Neuron

Scenario: Cell model in NeuroML 2/LEMS; need to use it in PyNN script as a cell for Population

Similar to above, but use statement like:

cell_type, cell_instance = import_neuroml2_cell(file="MyNeuroML.nml",cell_id = "mycell") 

inside existing PyNN script. Note something similar to this is possible in NetPyNE already, see here.

Make <gateHHrates ...> perferred format aot <gate type="gateHHrates"...>

Both of these are valid a/c to the NeuroML 2 schema & are understood by Lems. However, the automatically generated APIs (libNeuroML & org.neuroml.model) have more difficulty with the 2nd format.

  • Schema should be updated to ensure type is used correctly whenever 2nd form is used
  • Hint given in schema that 2nd is preferred form
  • Conversion script for ChannelML -> NML2 should be updated to generate 2nd format
  • Examples on OSB (e.g. here) should be updated to the 1st format
  • A later release (e.g. beta5) should make 2nd form compulsory

hardcoded paths in test.py

The paths of the schema definitions in Cvapp-NeuroMorpho.org and neuroConstruct are hardcoded in test.py. This is not very appropriate, because unlike libNeuroML and org.neuroml.model (which are also checked for schema definitions), these are not downloaded by getNeuroML.py and thus are not guaranteed to be there.

Broken schemata link

Some NeuroML2 examples use xmlns="http://www.neuroml.org/schema/neuroml2", which is a broken link.

Overwritten ComponentReference in Networks/Population

Compare the comp refs for the hierarchy below

 <ComponentType name="population" extends="basePopulation" description="A population of components, with just one parameter for the _size">
        <ComponentReference name="component" type="Component"/>
  <ComponentType name="basePopulation" description="A population of cells (anything which extends _baseCell_)">
        <ComponentReference name="component" type="baseCell"/>

Should population (specialisation) contain refs to Component (I suppose that it refers to Lems Components) instead of BaseCell?

LEMS_NML2_Ex1_HH.xml does not work in neuron

jnml LEMS_NML2_Ex1_HH.xml -neuron
nrnivmodl fails

hhcell.mod pulseGen1.mod
hhcell.mod pulseGen1.mod
"/Applications/NEURON-7.3/nrn/share/nrn/libtool" --tag=CC --mode=compile gcc -DHAVE_CONFIG_H  -I. -I.. -I"/Applications/NEURON-7.3/nrn/include/nrn" -I"/Applications/NEURON-7.3/nrn/x86_64/lib"      -g -O2 -c -o hhcell.lo `test -f 'hhcell.c' || echo '/'`hhcell.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I/Applications/NEURON-7.3/nrn/include/nrn -I/Applications/NEURON-7.3/nrn/x86_64/lib -g -O2 -c hhcell.c  -fno-common -DPIC -o .libs/hhcell.o
hhcell.c:557:20: error: use of undeclared identifier 'leak_ionChannel_g'
   leak_channelg = leak_ionChannel_g ;
                   ^
hhcell.c:582:23: error: use of undeclared identifier 'naChans_ionChannel_g'
   naChans_channelg = naChans_ionChannel_g ;
                      ^
hhcell.c:599:22: error: use of undeclared identifier 'kChans_ionChannel_g'
   kChans_channelg = kChans_ionChannel_g ;
                     ^
3 errors generated.
make: *** [hhcell.lo] Error 1

conductance value for passive channel unused

When defining a ionChannelPassive, one has to specify a 'conductance' value. However, the mod file generated by jnml creates the following code:

BREAKPOINT {                                                                    

    rates()                                                                     
    fopen = 1 ? evaluable                                                       
    g = conductance ? evaluable                                                 
    gion = gmax * fopen                                                         

    i = gion * (v - e)                                                          

} 

So it looks like the 'conductance' parameter is not used in the equations. Only the gmax set by a channelDensity is used. This can be confusing, also because somebody might read the 'g' value from the channel and interpret it as it's true conductance.

Decide whether baseCell should contain spike

See http://www.neuroml.org/NeuroML2CoreTypes/Cells.html#baseCell

Would a better solution be:

baseCell  (EventPort: spike)
baseCellMembPot, extends baseCell (Exposure v, voltage)
baseCellMembPotDL, extends baseCell (Exposure V, dimensionless)

Quoting @robertcannon:
"Perhaps baseCell should be more specific? It is mainly mammalian neurons that spike. For c-elegans you may want graded transmission rather than spikes. You could call it spikingCell, or maybe extend baseCell with spikingCell? For endocrine models we'd want a cell and a membrane potential but not any spikes too, though I don't think it would matter if they extended different root elements. So spikingCell could be the root for all event based models, and other models, yet to be constructed, might have a different root element."
so:

baseCell  
spikingCell, extends baseCell (EventPort: spike)
baseCellMembPot, extends spikingCell (Exposure v, voltage)
baseCellMembPotDL, extends spikingCell (Exposure V, dimensionless)

Note a cell further down in this hierarchy doesn't have to spike...

Add permanent URL for direct access to NeuroML schemas

Check / cleanup inheritance

In many of the ComponentType definitions, there are elements which are repeatedly defined in Parent types as well as in its children, see e.g.
https://github.com/NeuroML/NeuroML2/blob/development/NeuroML2CoreTypes/Networks.xml#L133
https://github.com/NeuroML/NeuroML2/blob/development/NeuroML2CoreTypes/Networks.xml#L144
https://github.com/NeuroML/NeuroML2/blob/development/NeuroML2CoreTypes/Networks.xml#L163

We need a list of which elements are being repeated, and why (should those fields be inherited or not?).

Segment parent

Segments might not have parents (e.g. the first one), so it should be <Children> instead of <Child>.

Allow free points & paths in cell definitions

There has been some interest to re-add the elements for specifying structural information related to a cell as obtained in neuronal reconstructions (e.g. raw data on points along neurites, synapse positions, outlines of cellular/anatomical features).

These elements (free points, paths, polygons, manifolds etc.) had not yet been added to v2 due to low interest in these elements in v1.x.

These could be added to v2.0 in a gradual process by extending the schema, and so be made available in the Java & Python APIs.

Thoughts for priorities for these additions are welcome.

Some ideas to improve neuroml

  • FixedFactorConcentrationModel and DecayingPoolConcentrationModel should extend from ConcentrationModel. Also it would be a good idea to rename ConcentrationModel to BaseConcentrationModel
  • Issue #38
  • IntracellularProperties and ExtracellularProperties should extend Standalone. If they don't extend Standalone at least intracellularproperties should extend Base.
  • Imo we are using unbounded in some components and it doesn't make sense.
  • Add a choice tag (?) in ValueAcrossSegOrSegGroup in order to specify that either segmentGroup or segment can be defined. Maybe @borismarin can help to refactor neuroml schema for next release as he has become a sort of xsd guru. We also have sth similar in ChannelPopulation
  • Decide between ionChannel and ionChannelHH
  • Does it make sense to have baseCell in CellTypes group?
  • EIFCondExpIsfaIsta and EIFCondAlphaIsfaIsta should extend the same class
  • Create baseChannelDensity

Add ability to specify segment ids in connections

There will need to be an extension of the element to allow specification of the segment id for the pre & post synaptic connection point (on multicompartmental cells) along the lines of what was in v1.8.1:

Note this will not be usable by jLEMS as that only has networks of single comp cells (hence the delay in supporting it).

This will need to be added to the Schema & an example added

Add synapse centred network description

As opposed to just an instance based network description:

network
    cell type 1
        cell morphology
            segment 1
            ...
    cell type 2
        cell morphology 
            segment 1
            ...
    population 1  (cell type 1; size = n)
    population 2  (cell type 2; size = m)
    projection  (pop 1 -> pop2)
        connection 1 (cell #1, seg 3 -> cell #2, seg 6) 
        connection 2 (cell #3, seg 2 -> cell #6, seg 1)
        ...

specification of the synapses at cell level should also be supported:

network
    cell type 1
        cell morphology
            segment 1
            ...
        synapse list
            synapse 1 (seg 10, fract 0.5, direction pre)    
            synapse 2 (seg 4, fract 0.2, direction post)
    cell type 2
        cell morphology 
        ...
        synapse list
        ...
    population 1  (cell type 1; size = 1)
    population 2  (cell type 2; size = 1)
    projection  (pop 1 -> pop2)
        connection 1 (syn 1 -> syn 3)   
        connection 2 (syn 7 -> syn 5)
        ...

This will allow greater portability of the (cell & its synapses) and will allow neuronal reconstruction applications to export cell descriptions together with synapse locations (without requiring another post/pre cell).

Improve support for Brian/Brian2

Note: the latest examples of NeuroML<->Brain(2) are in https://github.com/OpenSourceBrain/BrianShowcase

Brian export is still in development, but works for single cell/compartment models. Works for Brian v1 & v2.

The main class for export to Brian is https://github.com/NeuroML/org.neuroml.export/blob/development/src/main/java/org/neuroml/export/brian/BrianWriter.java

A working example in LEMS that can be exported to Brian is at LEMS_NML2_Ex9_FN.xml. This can be converted to Brian format with jNeuroML:

jnml LEMS_NML2_Ex9_FN.xml -brian 
jnml LEMS_NML2_Ex9_FN.xml -brian2

This produces the following Brian v1 file: LEMS_NML2_Ex9_FN_brian.py and the following v2 file: LEMS_NML2_Ex9_FN_brian2.py

More examples which can be mapped to Brain1/2 include:
FergusonEtAl2013-PVFastFiringCell
FitzHugh-Nagumo
hodgkin_huxley_tutorial

Major enhancements which are required include:

Synaptic connections
as used here: https://github.com/NeuroML/NeuroML2/blob/development/examples/NML2_InstanceBasedNetwork.nml & https://github.com/NeuroML/NeuroML2/blob/development/LEMSexamples/LEMS_NML2_Ex13_Instances.xml
Note: this could potentially be facilitated by making an Brian interface for NeuroMLlite

Convertion of nml1.8 to nml2

Hi,

I am supporting NML version 2 in my Python application. Is there an application which converts models in NML1.8 to version 2?

Some exampes use attributes that aren't defined in the component type

jLEMS doesn't complain, but PyLEMS does: due to make jLEMS a bit stricter about this too.

In the definition of component type 'synapticConnection', could we have the definition for the parameter 'destination' (perhaps Text)?

LEMS_NML2_Ex3_Net.xml instantiates synapticConnection and passes in a value for this parameter, but since there is no parameter defined, PyLEMS fails due to being not able to resolve a dimension or type.

Similar issue with parameter 'deltaV' in the instantiation of component-type 'gateKS' (defined in Channels.xml) in LEMS_NML2_Ex4_KS.xml.

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.