A Shiny web application for analyzing whole-cell current-clamp recordings. Spike Doctor detects action potentials and extracts electrophysiological features from Axon Instruments ABF files using pyABF and eFEL.
- Batch processing of multiple ABF files
- Spike detection with configurable voltage and derivative thresholds
- Electrophysiological feature detection via eFEL
- Interactive plots: raw traces, F-I curves, and phase-plane plots
- Exports: CSV, multi-sheet Excel, and PDF summary plots
- Analysis Logs tab for real-time troubleshooting
- Debug plots with on-demand sweep selector, detection threshold overlay, and marked spike peaks
git clone https://github.com/marsiwiec/spike-doctor.git
cd spike-doctor
docker compose upThen open http://localhost:8000.
Pre-built binaries for all platforms are available:
| Platform | Architecture | Artifact | Run |
|---|---|---|---|
| Windows | x64 | SpikeDoctor-windows-x64.exe |
Download and run directly |
| macOS | x64 (Intel) | SpikeDoctor-macos-x64 |
chmod +x then run |
| macOS | arm64 (Apple Silicon) | SpikeDoctor-macos-arm64 |
chmod +x then run |
| Linux | x64 | SpikeDoctor-linux-x64 |
chmod +x then run |
The console window must stay open while the app is running.
Because the executable is not code-signed, Windows Defender / SmartScreen may show a warning like "Windows protected your PC" or "Microsoft Defender SmartScreen prevented an unrecognized app from starting."
To proceed:
- Click "More info" on the warning dialog.
- Click "Run anyway".
To build from source:
uv pip install pyinstaller pyinstaller SpikeDoctor.spec
git clone https://github.com/marsiwiec/spike-doctor.git
cd spike-doctor
uv sync
uv run shiny run app.pyThen open http://127.0.0.1:8000.
For Nix users, a flake-parts dev shell is included:
git clone https://github.com/marsiwiec/spike-doctor.git
cd spike-doctor
nix develop # or `direnv allow` if using nix-direnv
uv sync
uv run shiny run app.py- Upload one or more
.abffiles. - Adjust parameters if your protocol uses a non-standard stimulus epoch or spike thresholds.
- Select features from the Basic tab or search/filter the Advanced tab.
- View results in the Summary Plots, Results Table, Debug Plots, and Analysis Logs tabs.
- Export as CSV, Excel, or PDF.
- Format: Axon Binary Format (ABF)
- Recording mode: Current clamp only so far
Some older ABF v1 files (e.g., recorded with legacy Axon software or exported from other programs) store data as 32-bit float rather than 16-bit integer. pyABF does not support float-encoded ABF v1 files and will raise:
ValueError: Support for float data is not implemented
Workaround: Open the file in Clampfit, then re-save it as an ABF v2 file:
- Open the file in Clampfit.
- Go to File → Save As...
- Choose ABF 2.0 as the file format.
- Save the file and load it into Spike Doctor.
Alternatively, use the Data File Index feature in Clampfit to batch-convert files to ABF v2.
| Parameter | Description | Default |
|---|---|---|
| Channel | ADC channel to analyze (0-based). | 0 |
| Stimulus Epoch Index | Epoch containing the current step (0-based). Most protocols use epoch 2. | 2 |
| Detection Threshold | Voltage threshold for spike detection (mV). | -20 mV |
| Derivative Threshold | Minimum dV/dt to qualify as a spike (mV/ms). | 10 mV/ms |
The Basic tab exposes commonly used eFEL features with readable names (some of them are simply needed for further calculations):
| Feature | Description |
|---|---|
| Spike Count | Number of action potentials generated during the stimulus period |
| Resting Voltage | Mean membrane potential before stimulus onset (mV) |
| Steady-State Voltage | Mean membrane potential at the end of the stimulus (mV) |
| Voltage Deflection | Steady-state minus resting voltage (mV) |
| Input Resistance | From voltage deflection (MOhm) |
| Mean Firing Frequency | Average spiking rate during the stimulus (Hz) |
| Latency to First Spike | Time from stimulus onset to first AP (ms) |
| Membrane Time Constant | Tau fitted to voltage response to a hyperpolarizing current step (ms) |
The Advanced tab exposes the full eFEL feature library. See the eFEL documentation for details.
- CSV -- Flat table: one row per sweep per file.
- Excel -- One sheet per feature. Rows are sweeps/current steps; columns are files.
- PDF -- Summary plots (2 files per A4 landscape page): raw traces, F-I curve, and phase-plane plot at ~2x rheobase. Perfect for printing out/displaying for overview.
- Capacitance (pF):
Cm = tau / Rin x 1000. Only calculated for hyperpolarizing sweeps without spikes.
See LICENSE.
