Authors and Affiliations: Eleanor K. Lutza, Kim T. Hab, Jeffrey A. Riffella†
- a. Department of Biology, University of Washington, Seattle, WA 98195, USA.
- b. University of Washington, Seattle, WA 98195, USA
- † To whom all correspondence should be addressed
Code used to analyze and visualize data for this manuscript is provided in this Github repository under the MIT license. Note that the code and data required to create the concentration map for the arena is provided in the open-source code of a previous paper. A brief explanation of each code file is provided below.
This paper was originally submitted to the Journal of Experimental Biology on January 4, 2020. Comments from two anonymous reviewers were received on February 11, 2020, and the manuscript was revised and resubmitted on February 21, 2020. Both versions are available in the manuscript
folder.
All data, code, and original video files for the behavior section of this manuscript is provided free at this Mendeley Data repository.
- Output number of live and dead animals for each species and treatment
- Remove dead larvae from experiment master file
- Check that manually annotated files all exist and are spelled correctly
- Translate Multitracker hdf5 files into Pandas dataframes and save to CSV
- Find videos with quiescent animals at beginning of video
- Manually correct videos with quiescent animals at beginning of video
- Add the size of each larvae into the trajectory CSV file
- Convert pixel locations to mm
- Zero out any off-screen values to the limits of the behavior arena
- Calculate instantaneous speed in mm per second
- Calculate instananeous angle (from horizontal, countercounterclockwise, in degrees)
- Calculate instantaneous change in heading (angle)
- Calculate the predicted concentration of chemical in the arena experienced by the larva at each time point
- Calculate the change in concentration relative to the previous timestep
- Calculates each of the ten navigation variables for each animal and outputs the results as a separate data file
- Time spent moving
- Total distance traveled
- Mean speed when moving
- Maximum speed
- Mean speed during the first minute
- Difference in mean speed (first and last minute)
- Number of sharp turns (>45 degrees)
- Number of spiral movements
- Number of continuous paths that are not spirals
- Longest rest period (in seconds)
- Calculate the median concentration preferred by the larvae (normalized to the acclimation period)
- Calculate the discovery time for each larvae (normalized to the acclimation period)
- Calculate the speed in areas of high concentration, compared to speed in areas of low concentration, normalized to behavior during the acclimation period.
- Output all of these values into a separate spreadsheet.
- Calculate the change in each of the ten navigation variables for each animal between the acclimation period and the experiment period. Save the results as a separate data file.
- Time spent moving
- Total distance traveled
- Mean speed when moving
- Maximum speed
- Mean speed during the first minute
- Difference in mean speed (first and last minute)
- Number of sharp turns (>45 degrees)
- Number of spiral movements
- Number of continuous paths that are not spirals
- Longest rest period (in seconds)
- Calculate if there are any differences among the six species for each of the ten navigational variables (Kruskal test)
- Calculate if the larvae of each species prefer each of the different treatment odors
- Check if data gathered has a normal distribution (to inform the types of statistical tests that can be conducted)
- Calculate if there are mortality differences across the larval species (Fisher's exact test for binary data)
- Calculate pairwise perMANOVA for each species against each other species (navigation variables) as well as pairwise tests of multivariate dispersion (ANOVA) for all of the ten navigation variables during the acclimation period.
Each figure code file generates the figure(s) named in the title (S
marks supplemental figures)
- F_1_plot_gradient_map.ipynb
- F_1_plot_trajectories.ipynb
- F_2_describe_trajectories.ipynb
- F_2_make_barplots_acclimation.ipynb
- F_3_make_PCA_plots.R
- F_4_angular_distributions.ipynb
- F_4_make_barplots_experiment.ipynb
- F_S1_plot_distance_matrix.ipynb
- F_S2_make_barplots_acclimation_changes.ipynb
- F_S3_larvae_size_across_species.ipynb
- F_S3_PCA_acclimation_changes.ipynb
- F_S4_combined_trajectories.ipynb
- colors.py (colors used in all figures)