OpenSourceBrain / MiglioreEtAl14_OlfactoryBulb3D

3D model of the olfactory bulb (Migliore et al. 2014)
http://www.opensourcebrain.org/projects/miglioreetal14_olfactorybulb3d
Other
2 stars 1 forks source link

Export network structure to NML2 #6

Closed pgleeson closed 6 years ago

pgleeson commented 9 years ago

Create scripts to export a smaller scale version of the complete network to NML2.

Ensure valid & can be loaded in OSB 3D Explorer,

Test with progressively larger versions of the network.

JustasB commented 8 years ago

@pgleeson What are your thoughts on the best approach to export the scaled down version into NeuroML? Do you suggest something similar to the ModelView method that's used in export_mitral?

JustasB commented 8 years ago

@pgleeson Additionally, we still don't have the spike timing code. Can you bug Migliore (I sent an email to Francesco a few days ago)? Or shall we read out the voltages from the cells on our own?

JustasB commented 8 years ago

Regarding the export, we'd need to export granule cells, mitral to granule cell connections, and synnapses. Then there is the odor stim inputs too.

JustasB commented 8 years ago

@pgleeson @scrook Update and question: I'm going out of town to visit family starting tomorrow until Dec 27th. I may get a few hours here and there to work on the project while I'm traveling, but otherwise that will leave 4 days to work until Dec 31st.

What I need to know from you both is: (A) What is the hard deadline for the paper, and (B) which of the below numbered items need to be completed before the hard deadline in order for me to be included in the paper?

Given the rate of progress, and what's left, completion of the following items should be feasible before EOD Dec 31st:

1) Gepetto 3D visualizable NeuroML network files with Mitral and Granule cell positions and orientations with varying cell counts based on a parameter 2) Disconnected Initial Segment problem fixed: https://github.com/OpenSourceBrain/MiglioreEtAl14_OlfactoryBulb3D/issues/7

Completion of the following items may be possible before Doc 31st:

3) The network with connections between mitral and granule cells 4) Start on synapses

Completion of the following items will most likely be possible after Dec 31st:

5) Full synapses 6) Odor inputs 7) Spike time recording 8) (The longest part) Getting the model spikes to match the reduced original NEURON model 9) Code cleanup

JustasB commented 8 years ago

@pgleeson I'm making progress on exporting Granule cells and the connections. Three issues I've run into:

  1. GCs do not appear to have position information. The xyz values for all GCs are 0s. This is not the case for MCs. There is a position() function in granule.hoc, but it's never called. Any thoughts before I contact Francesco? It might be possible to guess the location by looking at the location of the segments of the mitral cell where the GCs synapse, but that seems like a hack.
  2. Each cell is a unique component in the populationList. Which means there will be a unique projection element for each connection. Will this work well with the ConnectivityWidget you referenced earlier? The only thing in common between the projection elements would be the synapse. Will that be usable for the widget?
  3. Synapses are bi-directional. All synapses are dendro-dendritic. How should the projections be implemented? Should there be two projection elements for each synapse (one for forward pre-postcells, and one for backward direction), or will one projection suffice? For now, I'm leaving just one projection per synapse. Any examples of bi-directional synapses and or bi-directional projections?
JustasB commented 8 years ago

One more:

Is there something like a connection object that takes a SegmentGroupId instead of SegmentId along with FractionAlong?

Right now, the connection object has these:

<connection preFractionAlong="0-1" postSegmentId="[int]" 
   preSegmentId="[int]" postFractionAlong="0-1"/>

The issue is that in the NEURON code, the equivalent of the SegmentGroup is being referenced and the fractionAlong refers to the fractionAlong the SegmentGroup, not the Segment. Let me know if there is a better way than manually computing the segmentId from the numberInternalDivisions of the SegmentGroup and translating the NEURON fractionAlong value into a specific Segment and then setting 0.5 as the fractionAlong value of that Segment in nml.

JustasB commented 8 years ago

@pgleeson Is this a bug or by-design?

When I export mitral cells, in their nml, the numberOfSubdivisions matches the number of member segments in the group. While exported GCs the numberOfSubdivision is greater than the number of members. Is this by design or a bug?

E.g. in a mitral cell:

<segmentGroup neuroLexId="sao864921383" id="secden_1">
                <property tag="numberInternalDivisions" value="3"/>
                <annotation/>
                <member segment="96"/>
                <member segment="97"/>
                <member segment="98"/>
            </segmentGroup>

While in a GC:

<segmentGroup neuroLexId="sao864921383" id="priden2_0">
                <property tag="numberInternalDivisions" value="26"/>
                <annotation/>
                <member segment="36"/>
            </segmentGroup>

Notice in GC numberInternalDivisions=26, but only one member.

JustasB commented 8 years ago

@pgleeson Ok, I got the network structure built. Now need to visualize it. Spent most of the afternoon getting neuroConstuct to work. It won't show the 3D view on Mac OS (reported bugs) nor on Windows (won't create/open a project, also reported). This is a blocking issue for me, I'll continue to work after I hear from you.

pgleeson commented 8 years ago

Breaking these questions out into a number of other issues...

pgleeson commented 8 years ago

Regarding 2 above, yes, there will be lots of separate projection/connection elements due to the cells all being different, see here for an example: https://github.com/openworm/CElegansNeuroML/blob/master/CElegans/pythonScripts/c302/examples/c302_A_Social.nml. Don't worry about the connectivity widget representation for the time being, just make sure the network nml file is valid. The visualiser should be able to handle lots of different types of network, including this. The c elegans example above can be visualised despite having one population per cell:

selection_022

pgleeson commented 8 years ago

Regarding 3, there should be 2 synaptic connections per NEURON connection in the NML2 file if there is a functioning NetConn each way between the "pre" & "post" connection points.

See issue #13 for more

pgleeson commented 8 years ago

Re question about SegmentGroup connections above, see #14

pgleeson commented 8 years ago

Re visualising the generated network, can the locations of cells be visualised with:

jnml MyNet.net.nml -svg

@JustasB?

One possibility is to extend this exporter to add the option of showing synaptic connection endpoints/lines...

JustasB commented 8 years ago

The script to export an arbitrary-sized network can now be found under Python/Export/export_network.py

JustasB commented 6 years ago

This has been done here: https://github.com/OpenSourceBrain/MiglioreEtAl14_OlfactoryBulb3D/pull/25