alma

Automated Limb Motion Analysis (ALMA) v2.0

What is new in ALMA v2.0?

Check out our paper:

Aljovic, A., Zhao, S. et al. A deep learning-based toolbox for Automated Limb Motion Analysis (ALMA) in murine models of neurological disorders. Commun Biol 5, 131 (2022). https://doi.org/10.1038/s42003-022-03077-6

A behavioral data analysis toolbox for motor research in rodents.

To get started

The program has been tested on Windows, Mac, and Linux systems with Python 3.10, and should function even on low-end laptops. However, at least 8 GB RAM is recommended. Performance will vary depending on your data size and hardware.

  1. Installation prerequisites: Python 3.10, and (mini)conda (Miniconda documentation).
  2. Download / clone this repository to your computer.
  3. Open a terminal and navigate to the folder.
    cd Downloads/alma
    
  4. Create and activate the Conda environment (Python 3.10):
    conda env create -f conda_env_python_3_10.yml
    conda activate venv_python_3_10
    
  5. Launch ALMA:

On Windows/Linux/macOS:

python ./alma.py

Demo data

We provide a demo kinematic video and the corresponding DLC CSV in the repository so you can quickly try the full pipeline end‑to‑end.

Important: Data quality requirements

DeepLabCut labeling and recording setup

For accurate kinematic analysis, ensure:

  1. Side-view recording: Position your camera to capture a clear lateral (side) view of the animal, similar to the demo video. The recording should show:
    • Full visibility of the limb from toe to hip/iliac crest
    • Perpendicular camera angle (90° to the direction of movement)
    • Consistent distance from the camera throughout the recording
  2. DeepLabCut labeling quality: ALMA’s accuracy depends on DLC tracking quality:
    • Label all required bodyparts: toe, MTP, ankle, knee, hip, iliac crest
    • Validate tracking on a few frames before bulk analysis
    • Poor tracking (jittery coordinates, bodypart swaps) will affect kinematic parameters
  3. Supported bodypart naming: ALMA automatically detects common aliases:
    • Toe: toe, toeR, toeL, toe_r, toe_l
    • Iliac crest: iliac crest, crest, crestR, iliacR
    • Other bodyparts follow similar patterns (see paper for full list)

Understanding kinematic settings

ALMA v2.0 provides extensive control over analysis parameters. Here’s what each setting does and why it matters:

Experimental setup

Speed & calibration (Treadmill)

Spatial calibration method

Movement analysis settings

Stride filtering (Optional)

Why these parameters matter:

Troubleshoot

PySide6 installation issues: If you encounter issues with PySide6 installation, try:

pip install --upgrade pip
pip install pyside6

For Linux systems, you may need additional dependencies:

sudo apt-get install libxcb-xinerama0

In some cases (particularly some Linux distributions), you might need to install some libraries such as libsdl or libpng12. This problem can be identified by errors when starting the app, such asImportError: libSDL2-2.0.so.0: cannot open shared object file: No such file or directory). Try to solve the ImportError accordingly, e.g.,

sudo apt-get install libsdl2-2.0

and,

sudo add-apt-repository ppa:linuxuprising/libpng12
sudo apt update
sudo apt install libpng12-0

If you run into problem installing, please open an issue with the details (error traces) and your system specs (operating system, python version, …) on Github, and we will get back to you.

For more information or support, please visit our wiki page or contact us.