By Ashleigh Thomas, Alex Elchesen, Iryna Hartsock with contributions by Peter Bubenik
Analyze videos of C. elegans behavior using persistent homology techniques as outlined in [arxiv | published].
tda-tools by Jose Bouza
-
In
config.R
, setwindow_length
,patch_length
, and number of framesnframes
as desired. Also include the filepaths for the input data, which is a 100-dimensional time series of angles formatted as a csv (each row is a 100-dimensional vector). -
Run
compute_diagrams.R
. This does the heavy computations and can run for hours depending on parameter choice.A file with the computed diagrams will be saved in the
computations
folder. The path to the computations will be stored in the variablediagram_computation_filepath
. -
Run chunks of
analyze_diagrams.Rmd
, using the output file fromcompute_diagrams.R
as input. There are a few processing chunks and after that, each chunk gives a different aspect of analysis.
-
Get the original video data, which was collected by Kathleen Bates.
-
Download the skeleton extract code at figshare. The code comes from this paper.
-
Use the above code to extract 100-dimensional angle data for the skeletons of each sample into csv files.
-
Add the filepaths to the csv files to a config file. Now you can run the tda-for-worm-behavior code on that data.
Apache License 2.0