*Drosophila melanogaster* larval locomotion

- Parameters measuring video settings
^{#}- Frame rate [fps]: number of frames per second. Our videos used 7.5 fps.
- Video length [seconds]: duration of the video. Most of our videos are 240-second long.

- Parameters measuring animal shape
- Body Length [mm]: The length of the midline of the larva measured using all frames.
- Body Length Contracted [mm]: Body length measured using a subset of frames when the larval length reaches the local minimum during a stride.
- Body Length Extended [mm]: Body length measured using a subset of frames where the larval length reaches the local maximum during a stride.
- Time Head Bending [%]*#: If the larva has a head angle of more than 45 degrees, the larva is considered bending its head. The parameter measures the percentage of time when the larva bends its head.

Line 1: from P0 to P1

Line 2: from (P1 + P2 + P3)/3 to (P3 + P4 + P5)/3

Head Angle: Angle between Line 1 and Line 2. - Time Body Bending [%]*#: If the larva on a frame has body angle more than 45 degrees, the larva is considered bending its body. The parameter measures the percentage of frames when the larva bends its body.

Line 1: from (P0 + P1*2 + P2)/4 to (P3 + P4*2 + P5)/4

Line 2: from (P7 + P8*2 + P9)/4 to (P10 + P11*2 + P12)/4

Body Angle: Angle between Line 1 and Line 2. - Time Bending [%]*#: If the larva on a frame bends either its head or body more than 45 degrees, the larva is considered bent. The parameter measures the percentage of frames when the larva is bent.

- Parameters measuring peristalsis *

A stride is defined as a step when body length reaches local minimum and ends till the next local minimum. The distance travelled by the larva tail during a stride must be over 1/20^{th}of its average body length to be considered as a stride. This is to exclude time when the animal only moved its head. The distance traveled by the larva's tail is using points (P10+P11)/2 of the first local minimum and the next local minimum (we avoid using the last point of the tail to avoid noise due to flickering of video).- Speed [mm/second]@: The positional change of the center point over time. It is calculated at every frame using the distance traveled by the center point between two frames before and 2 frames after each frame, divided by the time interval.
- Time Striding [%]#: Percentage of time when the larva is doing peristalsis, i.e. striding
- Speed Striding [mm/second] @: Speed measured on a subset of frames when the animal is striding.
- Stride Duration [second]: Time duration of one stride.
- Stride Distance [mm] @: Distance traveled by the center point during one stride.
- Stride Count [counts/min]: Average number of strides per minute.
- Contraction Rate [mm/second]: The change rate of body length during the contraction phase of a stride.
- Extension Rate [mm/second]: The change rate of body length during the extension phase of a stride.

- Parameters measuring track * #
- Distance [mm/min]: Average total distance traveled by the center point of the larva in a minute.
- Direction Change [%]: For each point X on the track, draw a line to the point 2.25mm before and a line to the point 2.25mm after X on the track. If the angle between the two lines is over 25 degrees, then X is considered a direction change point. This parameter measures the percentage of direction change points on the track.

- Parameters measuring stamina

A run is defined as a period when the animal is doing continuous strides without turning, bending or other interruptions. A run must have >=3 strides on a roll.- Run Distance [mm]: Average distance traveled in a run.
- Run Duration [second]: Average time duration of a run.
- Run Stride Counts: Average number of strides for a run.
- Total Number of runs.

***** These parameters are measured in three ways: overall, inside, and outside. Overall values evaluate the whole video. Inside values evaluate the animal when it is away from the plastic. Outside values evaluate the animal when it is close to the plastic.

**#** For these parameters, one video provides only one value. For other parameters, one video provides three values: mean, standard deviation, and n.

**@** These parameters are measured for each point.