OpenWorm icon indicating copy to clipboard operation
OpenWorm copied to clipboard

Produce Behavioral Figure A + simulated match

Open slarson opened this issue 8 years ago • 21 comments

Forward Reverse with Tap on Wild Type.

Can do a speed graph showing a positive and negative direction. Involves Sibernetic combined with c302, with Tap Withdrawal Circuit enabled.

slarson avatar Feb 03 '17 15:02 slarson

  • [ ] Run Sibernetic with c302 in the loop
  • [ ] Parse the results from Sibernetic about body position that came out
  • [ ] Transform results into a line graph
  • [ ] Identify movies in database where a tap withdrawal occurs
  • [ ] Parse out the behavioral activity
  • [ ] Transform results into a line graph
  • [ ] Merge both graphs into the same figure with same axes overlaid
  • [ ] Calculate the delta between the two graphs

slarson avatar Feb 13 '17 17:02 slarson

@slarson What variables do we want to plot in the graphs? If we add more details to how we we want to compare the "body position" then we can start looking at how to produce those variables in both Sibernetic and Movement Validation cc @gidili @cheelee

tarelli avatar Feb 13 '17 18:02 tarelli

@tarelli OK here's a first cut of how the plot should look. Also want to loop in @rgerkin here to see if he could help with producing this, in particular doing the comparison between the real and simulated time series.

@MichaelCurrie @JimHokanson What would it take to get this kind of time series out of Movement Validation?

@a-palyanov @skhayrulin What would it take to get this kind of time series out of Sibernetic?

cc: @raminmh @lungd

tap withdrawal speed chart

Dynamic version link

slarson avatar Feb 13 '17 18:02 slarson

Geppetto could be used to produce this if https://github.com/openworm/org.geppetto.simulator.sph/issues/40 can be done.

slarson avatar Feb 13 '17 18:02 slarson

Rex has some experimental tap data (@Ichoran GitHub handle)

JimHokanson avatar Feb 16 '17 18:02 JimHokanson

Sibernetic will be supporting outputting a graph like this as an option, per this issue: https://github.com/openworm/sibernetic/issues/119

slarson avatar Feb 24 '17 16:02 slarson

@Ichoran @cheelee Would it be possible to get a hold of the data as a line chart for tap withdrawal that @JimHokanson mentioned above?

slarson avatar Feb 24 '17 16:02 slarson

@slarson - Sure! Do you want the average, or do you want a bunch of trials? How many? How accurate does the timing need to be (sync between video and tap delivery) for this to be valuable?

Ichoran avatar Feb 24 '17 20:02 Ichoran

@Ichoran Thanks! Took us a little while to get back to this, but I think it will be best if @raminmh @lungd weigh in on this, as they have been taking the lead on our efforts with Tap Withdrawal. Thanks again for all your contributions and help!

slarson avatar Mar 17 '17 15:03 slarson

Summary of discussions at the Movement Validation hangout with @Ichoran.

The data is in a format outside of WCON, but has no problems converting it. The issue is what we'd want ... apparently the behavior patterns of experiments involving the worms don't cluster as much as form some kind of continuous manifold.

There are terabytes of that data ... so we get to pick a sample.

cheelee avatar Mar 20 '17 16:03 cheelee

More pertinent than the data size on disk is that we have a library of about 80,000 initial tap withdrawals (i.e. the first time that worm has ever seen a tap). So you can get pretty much whatever you ask for. For instance, if you want the worm to be traveling between 0.08 and 0.12 mm/s forwards pre-tap, I can select out that data. And I can save the cut-out examples as WCON, or generate some sort of summary data.

Ichoran avatar Mar 20 '17 16:03 Ichoran

Updating the roadmap:

The following points can proceed in parallel:

Sibernetic

  • [ ] Show pilot example of parsing output from Sibernetic about body position (@a-palanov)
  • [ ] Transform results into a line graph

c302

  • [ ] Come up with any circuit that generates sinusoidal output in muscles
  • [ ] Do first test of plugging that output into Sibernetic
  • [ ] Model the effect of stretch receptors from Sibernetic into c302
  • [ ] Do second test of running c302 in loop with Sibernetic

Experimental data

  • [ ] Identify movies in database where a tap withdrawal occurs
  • [ ] Parse out the behavioral activity
  • [ ] Transform results into a line graph

This must happen once the above points are completed:

Combination

  • [ ] Merge both graphs into the same figure with same axes overlaid
  • [ ] Calculate the delta between the two graphs

slarson avatar Jul 21 '17 15:07 slarson

@a-palyanov Can we run a simulation now where the worm crawls forward, simulate fake "tap" reversal, and then goes backwards for a time to get a starting "rig" going that begins to close the loop with real data?

@Ichoran Can we start with a small # of representative, average responses encoded in WCON so we can make 1-4 initial graphs? Eventually we are going to want to pull hundreds of average responses but we need to prime the pump with a small number to begin with.

@pgleeson @raminmh I know we are proceeding well on making traveling waves in muscles. Is it time to think about a very dead simple way to generate sinusoids in muscle cells just for the purpose of integration and closing the loop at first, which then lays a foundation for the more accurate / correct version?

slarson avatar Jul 21 '17 15:07 slarson

@slarson - Sure. How long do you want before and after the tap? (Note: you can't have more than 10s after the tap before the next tap arrives.) I assume you want data from the first tap per recording only?

Ichoran avatar Jul 21 '17 17:07 Ichoran

@Ichoran Since simulation time is expensive, the shorter the better. How about 500 ms before and after the tap?

slarson avatar Jul 21 '17 17:07 slarson

@slarson - Okay, but that's only around 30 frames. I don't think I'll be able to get to it this week but next week should be possible.

Ichoran avatar Jul 21 '17 17:07 Ichoran

@Ichoran Thank you! Its good to know that resolution may be an issue. My thought is that 30 should be enough data points to define the line in the graph we are looking for up above, but this is the kind of thing that we only see when we try.

Next week would be terrific.

slarson avatar Jul 21 '17 17:07 slarson

@slarson Sure, I think it is a good idea. There are some ways to do so:

  • One can activate sinusoidal muscle waves from the output of the tap-withdrawal circuit, by sinus functions at the motor neurons, (the way you did that before). The difference here is that the TW circuit activates the sin waves.

  • We could continue hand-tuning the parameters of a circuit including A-, B-, and D-type motor neurons together with AVB, to generate muscle waves.

  • It would be great to see how the circuit these guys are suggesting here (https://arxiv.org/pdf/1705.02301.pdf) would work in our simulator.

@slarson @pgleeson @lungd what do you think ?

@slarson Could you please link us once again to the other paper you found about B type motor neurons ?

raminmh avatar Jul 22 '17 08:07 raminmh

@Ichoran Any luck with the data for this?

@raminmh In general this plan sounds good. About the paper with the b-type motor neurons ... can you remind me more about it?

slarson avatar Aug 11 '17 15:08 slarson

@slarson - It's near the top of my to-do list but a couple of other things came up. I'll probably have the data in hand on Monday or Tuesday next week.

Ichoran avatar Aug 11 '17 17:08 Ichoran

worm_motion_1.png worm_motion_2.png worm_motion_3.png

The OpenWorm Simulation stack is beginning to be able to produce this kind of simulated data as shown in these figures.

slarson avatar Jun 20 '18 16:06 slarson