Usage#
This section provides instructions on how to obtain zebrafish tracking data and how to install and set up the Megabouts package for locomotion analysis.
Obtaining Zebrafish Tracking Data#
There are several tools and methods available for tracking zebrafish. Below are some popular options:
BonZeb: BonZeb Website | BonZeb Paper
Stytra: Stytra Website | Stytra Paper
ZebraZoom: ZebraZoom Website | ZebraZoom Paper
If you are working with video recordings of zebrafish larvae, you can also track them using deep learning-based methods:
DeepLabCut: DeepLabCut Website | DeepLabCut Paper
SLEAP: SLEAP Website | SLEAP Paper
Once you have your zebrafish tracking data, you’re ready to analyze it with Megabouts!
Installing Megabouts#
Megabouts is an open-source Python toolbox designed for zebrafish locomotion analysis. To install Megabouts, follow the steps below:
Create a Virtual Environment (using conda): First, create a virtual environment with Python 3.11 using conda:
conda create --name megabouts python=3.11
Then activate the environment:
conda activate megabouts
Install PyTorch [for GPU setup]: Megabouts depends on PyTorch. To enable GPU support, follow the instructions on the PyTorch website to install the appropriate version for your system.
Example installation command:
conda install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia
Make sure to adjust the command based on your system’s GPU or CPU configuration.
Once PyTorch is installed, you can install Megabouts: Choose one of the following installation methods:
From PyPI (stable version):
pip install megabouts
From GitHub (latest development version):
pip install git+https://github.com/orger-lab/megabouts.git
Verify the Installation: After installation, you can verify that Megabouts is properly installed by checking its version:
python -c "import megabouts; print(megabouts.__version__)"
If you see the version number printed without errors, Megabouts has been successfully installed.
Usage Guide#
Now that you’ve installed Megabouts, you can begin analyzing zebrafish locomotion data. Please refer to the Tutorials for detailed instructions and examples.