This repository contains the MATLAB code developed for the electrophysiological analysis of Multi-Electrode Array (MEA) recording in Hydra vulgaris
The code permits to extract the main electrophysiological parameters, perform the contraction pulse (CP) sorting and compare different datasets from MEA traces recorded in vivo in H. vulgaris polyps.
Contraction Pulses (CP) detection and feature extraction were performed from MEA recordings. First and second derivatives were calculated using the centered finite difference method for equally spaced data.
Temporal distribution (Raster Plot) of detected peaks in the original full-length traces

Hy CP Sorting computes:
• the single CP duration (CPI), their sum for burst (BurstTime) and their sum
for recording file (CTime);
• the intercontraction burst duration (IcBI) and their sum (ETime);
• the number of bursts (nBurst) and the number of IcBI (nIcBI);
• the number of CP events for each burst (nCPBurst) and recording file (nCP).

Traces alignment to the duration of the shortest one to ensure consistent comparisons between recordings.
Temporal distribution (Raster Plot) of detected peaks in the original full-length traces (black traces) respect to their analyzed segments (Dotted lines represent the time of the shorter traces)

This project is licensed under the GNU General Public License v3.
The following researchers contributed to develope, optimize and improve the code:
- Silvia Santillo – Original code development and analysis design
- Martina Blasio – Algorithm refinements and testing
- Giuseppina Tommasini – Curation of code publication
- Claudia Tortiglione – Supervision of result quality
If you would like to contribute, please fork this repository and submit a pull request.
If you are going to use this code in a publication, please kindly cite:
Santillo, S., Blasio, M., Tommasini, G., & Tortiglione, C. (2025). Decoding Hydra bioelectrical activity by microelectrode array (Version 1.0.0) [Computer software]. https://doi.org/10.5281/zenodo.17424682
