openworm / OpenWorm

Repository for the main Dockerfile with the OpenWorm software stack and project-wide issues
http://openworm.org
MIT License
2.57k stars 206 forks source link

Modeling a decision making circuit #212

Closed slarson closed 6 years ago

slarson commented 9 years ago

In a paper by Cori Bargman a social behavior in C. elegans is analyzed down to the level of its underlying circuit. The putative circuit appears to be the following:

screen shot 2014-07-20 at 11 03 46 pm

We're working to explore what we know about this circuit already and to use this exploration to help improve the tools around the project.

First stop, PyOpenWorm. Can we pull out the circuit from it?

RMG neuron info:
type: interneuron
receptors: []

URX neuron info:
type: sensoryinterneuron
receptors: ['SRA-10', 'GCY-1', 'GCY-32', 'GCY-35', 'GCY-34', 'GCY-36', 'GCY-37', 'GCY-25', 'NPR-1']

ASK neuron info:
type: sensory
receptors: ['OSM-9', 'DAF-11', 'SRA-9', 'SRG-2', 'SRA-7', 'SRG-8']

ASJ neuron info:
type: sensory
receptors: ['DAF-11', 'SRE-1', 'OSM-9']

Do nodes exist? (RMGR,URXR,ASKR,ASJR)
True
True
True
True
Do edges exist? (RMGR/URXR, RMGR/ASKR, RMGR/ASJR, URXR/ASKR, URXR/ASJR, ASKR,ASJR)
True
True
False
False
False
False
Get edge info
{'synapse': 'GapJunction', 'neurotransmitter': 'FRMFemide_GJ', 'weight': '1'}
{'synapse': 'GapJunction', 'neurotransmitter': 'FRMFemide_GJ', 'weight': '1'}

Get edge info
"RMGR", "URXR": {'synapse': 'GapJunction', 'neurotransmitter': 'FRMFemide_GJ', 'weight': '1'}
"RMGR", "ASKR": {'synapse': 'GapJunction', 'neurotransmitter': 'FRMFemide_GJ', 'weight': '1'}
"RMGR", "ASJR": None
"RMGR", "RMHR": {'synapse': 'GapJunction', 'neurotransmitter': 'FRMFemide_GJ', 'weight': '1'}
"RMGR", "AWBR": {'synapse': 'GapJunction', 'neurotransmitter': 'FRMFemide_GJ', 'weight': '1'}
"RMGR", "IL2R": {'synapse': 'GapJunction', 'neurotransmitter': 'FRMFemide_GJ', 'weight': '1'}
"RMGR", "ASHR": {'synapse': 'Send', 'neurotransmitter': 'FRMFemide', 'weight': '1'}
"RMGR", "ADLR": None

Close, but not quite. Next step here is to improve the DB

In addition, we could be testing out how this particular circuit is currently working in the c302 model, to sanity check the connections. We could run the c302 model such that we check out all the edges in this network to see if they produce output that makes sense given the connections that exist. For example, are chemical synapse connections unidirectional? Are gap junctions bi-directional?

slarson commented 9 years ago

@ahrasheed check this out

slarson commented 9 years ago

Update from @ahrasheed:

As far as I have gathered, the task is to use c302 model to generate networks of all pairs of neurons as described by the hub and spoke model (e.g. (RMG and URX), (RMG and ASH) etc). Then stimulate one of the neurons in the pair and see if the other neuron shows activity in accordance with the model i.e. a gap junction would indicate that the other neuron would show equivalent activity regardless of which neuron is stimulated from the pair. And a synapse would indicate that neurons are stimulated only in one direction. (Sample attached for pair RMG-ASH stimulating ASH for 500 ms)

ash-rmg

slarson commented 9 years ago

@aribrich based on @ahrasheed 's update; can you also post what we discussed last time and your current understanding of the next steps based on our conversation with @pgleeson about the gap junctions? We've let this issue get a bit behind where we actually are.

aribrich commented 9 years ago

Here is a plot for the stimulation of the entire network shown at the top of the page:

image

RMG was stimulated, but as we can see, only two neurons reacted to that stimulation. Those two are ASH and URX, which are the only two neurons that have chemical synapses with RMG. The rest of the neurons are connected to RMG through GAP junctions.

This is clearly a symptom of the program being incomplete and unable to handle gap junction relations. Therefore, the next step in that work flow is to complete the functionality that would be able to handle gap junctions as well.

slarson commented 9 years ago

@aribrich Thanks! I believe the update from @pgleeson is that gap junctions are in the process of being implemented in LEMS / NeuroML2, correct?

For both @aribrich & @ahrasheed, can you guys post and link your scripts here? At this point just doing it on gist.github.com is probably all we need to be able to compare notes.

Thanks!

aleph-ra commented 9 years ago

Here is the test script for generating hub/spoke pairs and stimulating each neuron from the pair to generate seperate LEMS files (as mentioned in my previous comment). This is probably not the right way of doing this test as I am generating bash commands and running them using os.system (while being present in the same folder as the c302.py file). However this does produce the desired result i.e. a bunch of LEMS files.

The right way will be to generate the files using the "generate" function in c302.py. However that approach is giving me an error when opening the LEMS files with JNML (which I still need to debug).

The command line struct used by @aribrich to generate the plot for the entire hub/spoke network is as follows:

python c302.py RMG_stim parameters_A -cells ["RMGR","ASHR","ASKR","AWBR","IL2R","RMHR","URXR"] -cellstostimulate ["RMGR"] -duration 500

pgleeson commented 9 years ago

Latest commit (https://github.com/openworm/CElegansNeuroML/commit/bc7abf20db0e5022d95791b03dced4fae654f97c) adds https://github.com/openworm/CElegansNeuroML/blob/master/CElegans/pythonScripts/c302/c302_A_Social.py, which, in addition to using c302 to generate a 7 cell network as above, also modifies the NeuroML docuemnt with libNeuroML post generation, adding more stimuli and resaves the network.

In this way all cells can be stimulated in turn showing which cells interact, e.g. using

jnml LEMS_c302_A_Social.xml

selection_112

or, after running above, using:

python analyse.py c302_A_Social.dat

selection_113

Once again I'll point out that this is completely unphysiological behaviour due to using Integrate and Fire cells, but should help giving an intuition for how the network is connected.

Note colour for the traces is different between the graphs; in the bottom graph cells are in alphabetical order from the bottom, see https://github.com/openworm/CElegansNeuroML/blob/master/CElegans/pythonScripts/c302/LEMS_c302_A_Social.xml#L50.

In c302 currently, gap junctions are modelled in the same way as excitatory connections: a chemical synapse between the cells. This is why RMGR (3rd from top, magenta) reacts when any other cell is stimulated. It reacts even more when e.g. blue (ASHR) is stimulated, as this has 2 extra normal chem synapse to it too.

slarson commented 9 years ago

Awesome progress @ahrasheed and @pgleeson !!

I wanted to report more investigation into gap junctions of the c. elegans. (summary). I'd been frustrated not being able to put my finger on exactly which innexins were in which neurons when talking to @aribrich . Turns out there are still gaps but now I at least have a bunch of good references to build from.

Look what I found from (Altun et al., 2009):

screenshot 2014-09-30 01 04 51

The paper reports no Innexin expression in URX strangely.

And another bit of proof from (Starich et al., 2009):

screenshot 2014-09-30 01 23 33

Oh, and also, from the supplemental materials in that paper: screenshot 2014-09-30 01 30 05

Interestingly, it appears that RMG has both UNC-7 and INX-4, and AWB has INX-4 and UNC-9.

So in summary, we should care very much about getting models for:

From (Liu et al., 2013), two out of four of those have some quantitative data related to mutants that lack those gap junctions and how that affects the conductance of muscle cells:

screenshot 2014-09-30 02 13 19

And two more from (Liu et al., 2006) showing UNC-9 and an apparently unaffected UNC-7 changes of conductance in muscle:

screenshot 2014-09-30 02 41 32

Even though these are not in neurons, if we can find a metric for the quantity of gap junctions in these muscle cells, we can perhaps divide the difference in the measured conductance drop by that number and get an estimated range for the conductance of those gap junctions. Pretty imperfect until it is directly measured, but a heck of a lot better than a wild guess.

As a first approximation, just having a single "Innexin" gap junction channel with some reasonable average conductance would be a big step forward.

slarson commented 9 years ago

@pgleeson -- @aribrich and I are trying to remember if NeuroML2 has added support for gap junctions yet. I have a vague recollection you may have done this, but can't find where this may have happened. We got back to wondering about this again.

slarson commented 9 years ago

@pgleeson OK we have located the example gap junctions NML file in the development branch here. We've also noted this issue: NeuroML/NeuroML2#34. We'd like to help if possible.

slarson commented 9 years ago

@pgleeson also referencing this issue LEMS/jLEMS#31 as we realize this is also key to making this happen.

slarson commented 9 years ago

I'm recommending that @aribrich try out the experimental jLEMS branch as recommended in this comment and report back on the state of gap junction support.

slarson commented 9 years ago

@portegys -- you were also interested in this issue. Do you want to try checking out this branch as well?

portegys commented 9 years ago

Sounds good in a couple of days.

pgleeson commented 9 years ago

Yes, gap junction support is there now in the development branches of NML2/LEMS and the c302 examples with gjs (e.g. https://github.com/openworm/CElegansNeuroML/blob/master/CElegans/pythonScripts/c302/c302_B_Social.nml) should work with this.

slarson commented 8 years ago

@brijeshmodi12 have a look at this

brijeshmodi12 commented 7 years ago

@slarson Plots after executing runAndPlot.py

ca2 _of_6_cells membrane_potentials_of_6_cells

brijeshmodi12 commented 7 years ago

@slarson

After reading padriag's comment, I think the following should be the next steps:

  1. Since the behavior of cells is not realistic, we can model each cell individually and how they fire. If I am not wrong, the cells in C ELegans social circuit don't integrate and fire. Do they?
  2. Employing Gap junctions wherever required, instead of chemical synapse. Do we know how each cell is generating its output? Any paper describing that? or other source of info which we follow generally?
slarson commented 7 years ago

@brijeshmodi12 We are currently working with a model of the neurons that is defined by hodgkin huxley equations as described here: https://hodgkin-huxley-tutorial.readthedocs.io/en/latest/ Instead. The key there is to pick appropriate channels :)

So how do we do that? Good question. We have another project ChannelWorm where we are aggregating information about channel models.

On your second point; we do need to make sure the gap junctions are present in the model. Are you able to run it?

slarson commented 6 years ago

This largely happened as in incorporated into c302. Much more to be done but this was a great start.