MEA-NAP for Python

MEA-NAP’s analysis pipeline — spike detection, neuronal activity, functional connectivity, and network topology — is being ported from MATLAB to Python, living alongside the original MATLAB codebase in the same repository. It ships as an installable package (meanap) with a desktop GUI, a Python API you can script against directly, and a self-contained HTML report viewer for browsing results.

Tip

New here? Start with Installation, then Quickstart — from a fresh clone to a rendered network plot in about five minutes, using the bundled example dataset.

🚀 Installation

Install with uv and launch the meanap-gui desktop app.

Installation
⚡ Quickstart

Run the bundled example dataset end-to-end and open the HTML report.

Quickstart
🖥️ GUI guide

Every tab in the desktop app — Data, Spike detection, Connectivity, Run, Results — field by field.

GUI guide
📥 Importing sorted data

Start from SpyKING CIRCUS, Kilosort/phy or SpikeInterface units — MaxWell HD-MEAs included — with light-stimulus and stimulus-triggered network analysis.

Importing spike-sorted data
⌨️ Command line

Run a saved parameter file with meanap run — on a server, an HPC node, or in a script — with no window needed.

Running from the command line
🔬 CAT-NAP (calcium imaging)

Analyze suite2p calcium-imaging recordings: denoising, peak detection, trace preview.

CAT-NAP (calcium imaging)
📈 Statistics & ML

Compare groups and ages, decode genotype from the features, and find out which metrics actually carry the difference.

Statistics and machine learning (step 5)
🕸️ Network Viewer

Interactively explore functional connectivity from a completed run, with cell-type overlays.

Network Viewer
📓 Notebook tutorial

Load a real MEA-NAP output file and drive the plotting API directly from Python — runnable, with real output baked in.

Tutorial: driving the network-plotting API directly
☁️ Remote data

Analyse a dataset that doesn’t fit on your disk: paste a Dropbox folder share link and recordings stream through a bounded cache.

Running on remote data
📦 Express mode & bundles

Skip the figures, ship one small .meanap file, and redraw any plot on demand — in PNG or editable SVG — with the built-in viewer.

Express mode and run bundles
♻️ Changing a batch

Add a recording, take one out, or combine separate runs into one pooled analysis — without analysing everything again.

Changing which recordings a run covers
🖧 Shared runs

Split one batch across the computers you have — through a Dropbox or network folder — and pool the results on one of them.

Sharing a run across several computers
📊 Output report

The self-contained, deep-linkable report.html viewer generated after every run.

Output report
🔀 MATLAB vs. Python

What’s ported with exact parity, what’s approximate, and what’s not there yet — read this before relying on the Python port for real analysis.

MATLAB vs. Python: what’s ported, what’s approximate, what’s missing
📚 API reference

Auto-generated reference for the meanap package: pipeline steps, network plotting, CAT-NAP.

API reference

How the Python port relates to MATLAB

The Python port (src/meanap/) mirrors MATLAB’s four core analysis steps —

  1. Spike detection

  2. Neuronal activity (firing rates, burst detection)

  3. Functional connectivity (spike time tiling coefficient)

  4. Network metrics (graph theory, node cartography, small-worldness, …)

— and writes the same output folder structure the MATLAB pipeline produces, so a Python run and a MATLAB run of the same data land in a comparable shape. It is a genuine reimplementation, not a wrapper around MATLAB: no MATLAB license or installation is required to use it.

The Python port is younger than the MATLAB pipeline and does not yet cover every feature (statistical group comparisons across ages/genotypes, for example, are not implemented yet). See MATLAB vs. Python: what’s ported, what’s approximate, what’s missing for the current, honest state of parity before you rely on it for a publication figure.