Author: Simon Avrillon β Nantes UniversitΓ©
This repository contains a tutorial presented at ISB 2025 demonstrating how to perform EMG signal decomposition with Julia. It includes data preprocessing, decomposition using convolutive blind source separation, and result visualisation.
- Julia
- Python (with the package MNE)
- Jupyter notebook
- (Optional) VScode with Julia, Python, and Jupyter extensions installed
- Setup the project locally
Open the terminal and clone this repository:
git clone https://github.com/simonavrillon/ISB25-tutorial.gitcd ISB25-tutorial- Install Julia
Download and install Julia from the official Julia website. Add Julia to your system's PATH if needed.
Verify the installation in your terminal:
julia --version- Launch Julia by typing:
juliaIn the Julia REPL, run the following:
using PkgPkg.add("IJulia")This will install the IJulia package and, if Jupyter is not already installed on your system, it will prompt to install it via Conda.
- After installation, you can open the notebook in VScode with the extensions Julia, Python, and Jupyter installed (recommended). Alternatively, launch Jupyter Notebook directly from Julia:
using IJulianotebook()Open the notebook and follow the instructions. You can then run the first cell of the notebook to install all the packages for Julia. It is recommended to install all packages before starting the tutorial, as the installation may take longer than 10 minutes.
To run the tutorial, you'll need to manually download five files corresponding to a single EMG contraction, provided in BIDS format:
π Temporary folder with the data: https://download.drive.shadow.tech/s/4SjitaLBHEKKmBY
π Dataset DOI: https://doi.org/10.7910/DVN/L9OQY7
If you download the data directly from the dataset, thake the following five files:
- sub-01_task-isometric30percentmvc_run-01_channels.tsv
- sub-01_task-isometric30percentmvc_run-01_coordsystem.json
- sub-01_task-isometric30percentmvc_run-01_electrodes.tsv
- sub-01_task-isometric30percentmvc_run-01_emg.edf
- sub-01_task-isometric30percentmvc_run-01_emg.json
π Place these files in the directory data and make sure your full path matches the loading code in the notebook.
The tutorial walks through:
- Loading and filtering raw EMG signals
- Visualising EMG channels
- Applying convolutive blind source separation for EMG decomposition
- Post-processing and visualisation of motor unit spike trains