Skip to main content

Main menu

  • HOME
  • CONTENT
    • Early Release
    • Featured
    • Current Issue
    • Issue Archive
    • Blog
    • Collections
    • Podcast
  • TOPICS
    • Cognition and Behavior
    • Development
    • Disorders of the Nervous System
    • History, Teaching and Public Awareness
    • Integrative Systems
    • Neuronal Excitability
    • Novel Tools and Methods
    • Sensory and Motor Systems
  • ALERTS
  • FOR AUTHORS
  • ABOUT
    • Overview
    • Editorial Board
    • For the Media
    • Privacy Policy
    • Contact Us
    • Feedback
  • SUBMIT

User menu

Search

  • Advanced search
eNeuro
eNeuro

Advanced Search

 

  • HOME
  • CONTENT
    • Early Release
    • Featured
    • Current Issue
    • Issue Archive
    • Blog
    • Collections
    • Podcast
  • TOPICS
    • Cognition and Behavior
    • Development
    • Disorders of the Nervous System
    • History, Teaching and Public Awareness
    • Integrative Systems
    • Neuronal Excitability
    • Novel Tools and Methods
    • Sensory and Motor Systems
  • ALERTS
  • FOR AUTHORS
  • ABOUT
    • Overview
    • Editorial Board
    • For the Media
    • Privacy Policy
    • Contact Us
    • Feedback
  • SUBMIT
PreviousNext
Research ArticleOpen Source Tools and Methods, Novel Tools and Methods

Track-A-Worm 2.0: A Software Suite for Quantifying Properties of C. elegans Locomotion, Bending, Sleep, and Action Potentials

Kiranmayi Vedantham, Longgang Niu, Ryan Ma, Liam Connelly, Anusha Nagella, Sijie Jason Wang and Zhao-Wen Wang
eNeuro 27 August 2025, 12 (8) ENEURO.0224-25.2025; https://doi.org/10.1523/ENEURO.0224-25.2025
Kiranmayi Vedantham
1Department of Neuroscience, University of Connecticut School of Medicine, Farmington, Connecticut 06030
  • Find this author on Google Scholar
  • Find this author on PubMed
  • Search for this author on this site
Longgang Niu
1Department of Neuroscience, University of Connecticut School of Medicine, Farmington, Connecticut 06030
  • Find this author on Google Scholar
  • Find this author on PubMed
  • Search for this author on this site
Ryan Ma
2Health Research Program, University of Connecticut, Storrs, Connecticut 06030
  • Find this author on Google Scholar
  • Find this author on PubMed
  • Search for this author on this site
Liam Connelly
2Health Research Program, University of Connecticut, Storrs, Connecticut 06030
  • Find this author on Google Scholar
  • Find this author on PubMed
  • Search for this author on this site
  • ORCID record for Liam Connelly
Anusha Nagella
2Health Research Program, University of Connecticut, Storrs, Connecticut 06030
  • Find this author on Google Scholar
  • Find this author on PubMed
  • Search for this author on this site
Sijie Jason Wang
3MD Program, University of Connecticut School of Medicine, Farmington, Connecticut 06030
  • Find this author on Google Scholar
  • Find this author on PubMed
  • Search for this author on this site
Zhao-Wen Wang
1Department of Neuroscience, University of Connecticut School of Medicine, Farmington, Connecticut 06030
  • Find this author on Google Scholar
  • Find this author on PubMed
  • Search for this author on this site
  • ORCID record for Zhao-Wen Wang
  • Article
  • Figures & Data
  • Info & Metrics
  • eLetters
  • PDF
Loading

Article Figures & Data

Figures

  • Tables
  • Movies
  • Extended Data
  • Figure 1.
    • Download figure
    • Open in new tab
    • Download powerpoint
    Figure 1.

    WormTracker hardware components. Shown are the hardware configuration of our system, including a fluorescence stereomicroscope (M165 FC, Leica; a) with a fluorescence light source (LED3, Leica; b), a C-mount CMOS camera (Mako G-040B, Allied Vision; c), a motorized stage (OptiScan ES111; d) with a stage controller (ES11), a joystick (CS1521DP; f), a universal specimen holder (H473; g), and a stage mounting bracket (H413; h; all from Prior Scientific) and an external device controller (myDAQ, National Instruments; i). The WormTracker software is preconfigured to work with components c, d, and i. Components b and a 520 nm long-pass cutoff filter (Y52, Hoya Corporation) are required only for optogenetic stimulation. The Petri dish is 60 mm in diameter. The yellow color in the Petri dish is due to light from the microscope base filtered through the long-pass filter. The camera and stage must be oriented as shown to ensure proper stage tracking.

  • Figure 2.
    • Download figure
    • Open in new tab
    • Download powerpoint
    Figure 2.

    Spline generation and bending property quantification. a, Conversion of a grayscale image (left) to a binary image (middle), followed by spline fitting to the binary image (right). The spline is generated by placing 13 markers at equal intervals along the longitudinal axis of the worm's body, with the marker at the head tip shown in red and the centroid in orange. b, Bend trace of a worm recorded over 30 s. c, Bending frequency spectrum of the same worm, with the dominant bending frequency and RMS (root mean square) bend angle from the Results section displayed within the graph. d, Quantification of the maximum bend. Left, Diagram illustrating the definition of the maximum bend, which is the maximum bending angle of a spline marker point in the ventral and dorsal directions relative to a straight line fitted to the two subsequent spline markers. Right, A bend trace with x and y coordinates marking the times and bending angles of alternative peaks and troughs. The coordinates are determined by clicking on the peaks and troughs, using a 20° threshold.

  • Figure 3.
    • Download figure
    • Open in new tab
    • Download powerpoint
    Figure 3.

    Analysis of locomotion directionality, speed, and body curvatures. a, Directionality is determined by examining the relationship between the velocity vector and the head vector. The velocity vector connects the centroids of the current (#2) and previous (#1) frames, while the head vector connects the current centroid to the current head point (a or b). If the head vector projects onto the positive side of the velocity vector, the worm is moving forward; otherwise, it is moving backward. b, Method for quantifying worm amplitude. A rectangle is drawn parallel to the velocity vector, just large enough to enclose all spline markers. The width of the rectangle is the worm's amplitude. c, Reconstructed worm travel paths based on the positions of the centroid (left) and spline marker 1 (right). d, Plots of forward and backward locomotion speeds over time shown for interpolated data. e, Method for quantifying body curvatures. Circles are fitted to worm segments, with curvature values calculated as the worm length (L) divided by the radius r of each fitted circle (L/r).

  • Figure 4.
    • Download figure
    • Open in new tab
    • Download powerpoint
    Figure 4.

    Quantification of sleep duration in freely moving worms using SleepTracker. The actogram shows the locomotor activity of a worm developing from the L4 to young adult stages. Images were captured at a rate of 1 frame every 10 s. Sleep duration, highlighted by the rectangular box, is defined as the period from the start of three consecutive motionless frames to the end of the last three motionless frames. The worm is considered motionless if the difference between the centroid positions of two consecutive frames is <10 µm. Spikes within the sleep period are classified as active events. Extended Data Figure 4-1 illustrates the design of the PDMS chamber.

  • Figure 5.
    • Download figure
    • Open in new tab
    • Download powerpoint
    Figure 5.

    Quantification of action potential (AP) properties using AP Analyzer with two different approaches. a, AP threshold is the membrane potential at a user-defined pre-AP peak time for APs lacking a preupstroke inflection point. b, AP threshold is automatically detected for APs with a preupstroke inflection point. The representative APs are from a body-wall muscle cell of a wild-type C. elegans (a) and a suprachiasmatic nucleus (SCN) neuron of a wild-type CBA/CaJ mouse (b). The RMP is defined as the 20 ms average preceding the user-selected time point for non-inflected APs, and as the lowest 3 ms average within that 20 ms window for inflected APs. The rise time is defined as the time from AP threshold to AP peak, the decay time from AP peak back to the membrane potential matching the AP threshold, and afterhyperpolarization (AHP) as the actual membrane voltage. c, Voltage phase plot of an SCN neuron AP from a mouse, illustrating the quantification of AP maximum and minimum slopes, corresponding to the points where the membrane potential increases and decreases most rapidly, respectively.

  • Figure 6.
    • Download figure
    • Open in new tab
    • Download powerpoint
    Figure 6.

    Comparison of locomotion and body bending properties between wild-type and mutant worm strains demonstrating WormTracker functionality. a, unc-7(e5), unc-9(fc16), unc-8(e1069), and unc-58(n495) mutants showed reduced locomotion speed and abnormal body bending properties compared with wild type (wt). The number of worms analyzed was 13 in each group. b, The zw47 mutant exhibited enhanced body curvatures. Curvatures were measured in the head-to-tail direction, with D1 and D2 representing the first and second dorsal curvatures and V1 and V2 representing the first and second ventral curvatures. If the original V1 or D1 curvature value was less than 2.5, it was excluded from the analysis, and the subsequent V2 or D2 was reassigned as V1 or D1, with V3 or D3 becoming V2 or D2. The number of worms analyzed was 11 in each group. c, The lgc-46(ok2949) mutant exhibited enhanced forward locomotion but reduced backward locomotion compared with wt. The number of worms analyzed was 12 wt and 17 lgc-46. All recordings (60 s each, 15 frames/s) were conducted with NGM plates without OP50. Following the transfer of each worm, a 30–60 s interval was allowed before initiating the recording. The single, double, and triple asterisks indicate statistically significant differences compared with wt at p < 0.05, p < 0.01, and p < 0.001, respectively, while ns indicates no significant difference compared with wt based on one-way ANOVA with Tukey's post hoc test (a) or un-paired t-test (b, c).

Tables

  • Figures
  • Movies
  • Extended Data
    • View popup
    Table 1.

    Hardware components and sources

    ComponentModel or product #SupplierProduct URL
    Motorized stageOptiScan ES111Prior Scientifichttps://www.prior.com/product/optiscan-es111
    Stage controllerOptiScan ES11Prior Scientifichttps://www.prior.com/product/optiscan-es11-controller
    Universal specimen holderH473Prior Scientifichttps://www.prior.com/product/h473
    Stage mounting bracketH413Prior ScientificN/A
    Joystick control unitCS1521DPPrior Scientifichttps://www.prior.com/product/cs152dp
    Monochrome CMOS CameraMako G- 040BAllied Visionhttps://www.alliedvision.com/en/camera-selector/detail/mako/g-040/
    Power supply for CMOS camera12 V, 2 A, 8-pinAllied Visionhttps://www.edmundoptics.com/p/allied-vision-12v-2a-8-pin-hirose-power-supply/43032/#
    myDAQ University Kit781326-01National Instrumentshttps://www.ni.com/en-us/shop/model/mydaq-university-kit.html
    Fluorescence stereomicroscopeM165 FCLeicahttps://www.leica-microsystems.com/products/light-microscopes/stereo-microscopes/p/leica-m165-fc/
    Hoya colored glass Long-pass filtersHoya Y52 (520 nm), 12.5 mm dia., 1 mm thickHoya Corporationhttps://www.edmundoptics.com/p/hoya-y52-520nm-125mm-dia-1mm-thick-colored-glass-longpass-filter/46497/
    Monochrome CMOS CameraDMK 37BUX273The Imaging Sourcehttps://www.theimagingsource.com/en-us/product/industrial/37u/dmk37bux273/
    • This table lists the hardware components, along with their model numbers, manufacturers, and weblinks to the products.

Movies

  • Figures
  • Tables
  • Extended Data
  • Movie 1.

    Calibrate module of WormTracker. This module is used to determine the pixel-to-micrometer conversion factor for quantifying locomotion and bending properties. The resulting conversion factor must be entered into the Record module before starting the recording. [View online]

  • Movie 2.

    Record module of WormTracker. This module captures worm images, recenters the worm position at 1 s intervals, saves the images, and records the positions and timing of stage movements as the Stage File and Time File, respectively. It allows the user to enter ventral/dorsal orientation information prior to the recording and can control up to three external devices in customizable on/off patterns via TTL signals. [View online]

  • Movie 3.

    Playback module of WormTracker. This module allows users to view recorded sequential images as a movie, adjust the frame rate (by reducing or restoring it), and create movies from the recordings. Images can be displayed in grayscale or binary format, with or without the fitted spline. If spline fitting has been performed, the corresponding spline file is automatically detected and can be activated by clicking the Load tab next to it. Movies can be exported in grayscale or binary, with or without the spline overlay. This module is particularly useful for initially assessing the spline-fitting threshold, quickly verifying fitting results, reducing frame rates for faster analysis, and creating movies for publications or presentations. [View online]

  • Movie 4.

    Fit Spline module of WormTracker. This module performs two functions: (1) automatic head identification and spline fitting and (2) user-assisted verification and correction of the automatically generated spline. The second function can be applied to splines generated by either the Fit Spline or Batch Spline module. [View online]

  • Movie 5.

    Batch Spline module of WormTracker. This module performs automatic spline fitting across multiple recordings, saving users the time required for processing each file individually. As with the Fit Spline module, the results require user-assisted verification and correction using the Fit Spline module. [View online]

  • Movie 6.

    Analyze module of WormTracker. This module quantifies worm bending and locomotion metrics based on the Spline File and the corresponding Stage File and Times File. The results are saved in user-defined Excel files. [View online]

  • Movie 7.

    Batch Analyze module of WormTracker. This module allows users to perform automated analysis across multiple recordings. [View online]

  • Movie 8.

    Curve Analyzer module of WormTracker. This module calculates curvature values by fitting the spline with circles, which are displayed as solid lines (ventral), dash-dot lines (dorsal), or dotted lines (undifferentiated ventral/dorsal). Users can export the curvature values to an Excel file that includes position data (normalized by body length), ventral/dorsal orientation information (if available), and sequential frame numbers. [View online]

  • Movie 9.

    Sleep Recorder module of SleepTracker. This module records worm locomotion activity for detecting sleep-like states. Users can specify the exposure time, interframe interval, and total recording duration. [View online]

  • Movie 10.

    Sleep Analyzer module of SleepTracker. This module quantifies worm locomotor activity over time, with the exported data used to calculate total sleep duration. The number and duration of active events during sleep can also be quantified using the Quick Peaks gadget in OriginPro (OriginLab), based on a threshold of ≥10 μm change in centroid position between consecutive images. The duration of motionless sleep is obtained by subtracting the total duration of active events from the total sleep duration. [View online]

  • Movie 11.

    AP Analyzer. This module quantifies action potential (AP) metrics, including threshold, amplitude, APD50 (AP duration at 50% amplitude), rise and decay times, maximum and minimum slopes, and rise and decay slopes. It also measures afterhyperpolarization (AHP) level and resting membrane potential (RMP) and generates an averaged AP trace along with an AP voltage phase plot. The results can be exported to an Excel file, which includes the data used to create both the averaged AP trace and the phase plot. [View online]

Extended Data

  • Figures
  • Tables
  • Movies
  • Extended Data 1

    Standalone version of the software suite. This executable file allows users to install the standalone version of the software suite. It does not need MATLAB to run. Instructions for installation are described in Extended Data 3. Download Extended Data 1, ZIP file.

  • Extended Data 2

    MATLAB codes for the software suite. This folder contains the MATLAB codes of the software. Users can run the software and configure none “standard” hardware with MATLAB (R2021a or later) installed on their computers. Download Extended Data 2, ZIP file.

  • Extended Data 3

    Installation instructions for the Standalone version and hardware drivers. This file provides a step-by-step guide for installing and launching the standalone version of the software suite, as well as installing the necessary hardware drivers. It also explains how to verify proper stage operation and how to recenter the stage if needed. Download Extended Data 3, DOCX file.

  • Extended Data 4

    A sample WormTracker recording. This folder contains the recording of a wild-type worm (60 seconds, 15 frames per second), along with the associated stage file, time file, and a spline file generated by the Fit Spline module. The images were captured at 50% of the camera's resolution (4 KB/image). Download Extended Data 4, ZIP file.

  • Extended Data 5

    A sample SleepTracker recording. This folder contains the recording of four wild-type worms (10 hrs., 1 frame/10 sec) along with the associated times file. Due to its large size, this recording is stored on the Zenodo server (https://zenodo.org/records/15857492) for download. Download Extended Data 5, DOCX file.

  • Extended Data 6

    A sample trace of action potentials recorded from a mouse suprachiasmatic nucleus neuron. The action potentials were triggered by current injection steps (-10 to +30 pA at 5-pA intervals, 5 sec/step). This file requires ClampFit to open. Download Extended Data 6, ZIP file.

  • Extended Data 7

    A sample trace of spontaneous action potentials recorded from a C. elegans body-wall muscle cell. This file requires ClampFit to open. Download Extended Data 7, ZIP file.

  • Figure 4-1

    CAD design of the polydimethylsiloxane (PDMS) sleep recording chamber. This schematic illustrates the custom-fabricated PDMS membrane used to isolate individual C. elegans during sleep behavior recordings. The membrane features six uniformly spaced circular wells (3.0  mm diameter) embedded in a rectangular frame (14.0  mm × 10.5  mm × 0.65  mm). Download Figure 4-1, TIF file.

Back to top

In this issue

eneuro: 12 (8)
eNeuro
Vol. 12, Issue 8
August 2025
  • Table of Contents
  • Index by author
  • Masthead (PDF)
Email

Thank you for sharing this eNeuro article.

NOTE: We request your email address only to inform the recipient that it was you who recommended this article, and that it is not junk mail. We do not retain these email addresses.

Enter multiple addresses on separate lines or separate them with commas.
Track-A-Worm 2.0: A Software Suite for Quantifying Properties of C. elegans Locomotion, Bending, Sleep, and Action Potentials
(Your Name) has forwarded a page to you from eNeuro
(Your Name) thought you would be interested in this article in eNeuro.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
Print
View Full Page PDF
Citation Tools
Track-A-Worm 2.0: A Software Suite for Quantifying Properties of C. elegans Locomotion, Bending, Sleep, and Action Potentials
Kiranmayi Vedantham, Longgang Niu, Ryan Ma, Liam Connelly, Anusha Nagella, Sijie Jason Wang, Zhao-Wen Wang
eNeuro 27 August 2025, 12 (8) ENEURO.0224-25.2025; DOI: 10.1523/ENEURO.0224-25.2025

Citation Manager Formats

  • BibTeX
  • Bookends
  • EasyBib
  • EndNote (tagged)
  • EndNote 8 (xml)
  • Medlars
  • Mendeley
  • Papers
  • RefWorks Tagged
  • Ref Manager
  • RIS
  • Zotero
Respond to this article
Share
Track-A-Worm 2.0: A Software Suite for Quantifying Properties of C. elegans Locomotion, Bending, Sleep, and Action Potentials
Kiranmayi Vedantham, Longgang Niu, Ryan Ma, Liam Connelly, Anusha Nagella, Sijie Jason Wang, Zhao-Wen Wang
eNeuro 27 August 2025, 12 (8) ENEURO.0224-25.2025; DOI: 10.1523/ENEURO.0224-25.2025
Twitter logo Facebook logo Mendeley logo
  • Tweet Widget
  • Facebook Like
  • Google Plus One

Jump to section

  • Article
    • Abstract
    • Significance Statement
    • Introduction
    • Materials and Methods
    • Tracking and Analysis Algorithm
    • Discussion
    • Footnotes
    • References
    • Synthesis
    • Author Response
  • Figures & Data
  • Info & Metrics
  • eLetters
  • PDF

Keywords

  • action potential
  • C. elegans
  • locomotion
  • MATLAB
  • open-source
  • sleep

Responses to this article

Respond to this article

Jump to comment:

No eLetters have been published for this article.

Related Articles

Cited By...

More in this TOC Section

Open Source Tools and Methods

  • A Common Iba1 Antibody Labels Vasopressin Neurons in Mice
  • RetINaBox: A Hands-On Learning Tool for Experimental Neuroscience
  • The Odor Delivery Optimization Research System (ODORS): An Open-Source Olfactometer for Behavioral Assessments in Tethered and Untethered Rodents
Show more Open Source Tools and Methods

Novel Tools and Methods

  • CABaNe, an automated, high throughput ImageJ macro for cell and neurite analysis
  • Reliable Inference of the Encoding of Task States by Individual Neurons Using Calcium Imaging
  • Rhythms and Background (RnB): The Spectroscopy of Sleep Recordings
Show more Novel Tools and Methods

Subjects

  • Novel Tools and Methods
  • Open Source Tools and Methods
  • Home
  • Alerts
  • Follow SFN on BlueSky
  • Visit Society for Neuroscience on Facebook
  • Follow Society for Neuroscience on Twitter
  • Follow Society for Neuroscience on LinkedIn
  • Visit Society for Neuroscience on Youtube
  • Follow our RSS feeds

Content

  • Early Release
  • Current Issue
  • Latest Articles
  • Issue Archive
  • Blog
  • Browse by Topic

Information

  • For Authors
  • For the Media

About

  • About the Journal
  • Editorial Board
  • Privacy Notice
  • Contact
  • Feedback
(eNeuro logo)
(SfN logo)

Copyright © 2026 by the Society for Neuroscience.
eNeuro eISSN: 2373-2822

The ideas and opinions expressed in eNeuro do not necessarily reflect those of SfN or the eNeuro Editorial Board. Publication of an advertisement or other product mention in eNeuro should not be construed as an endorsement of the manufacturer’s claims. SfN does not assume any responsibility for any injury and/or damage to persons or property arising from or related to any use of any material contained in eNeuro.