Spike features for a folder of recordings
Use this when you have a folder of patch-clamp recordings (ABF, ATF, NWB) and want one table of their features: spike counts, rheobase, f–I slope, input resistance for current clamp, or holding current and access resistance for voltage clamp.
Run it
$ openreadout batch ephys-features cells/ --set rows=cell --fields clamp_mode,spike_count_total,rheobase_pa,fi_slope_hz_per_pa,input_resistance_mohm3 data sets (3 ok, 0 failed)path format clamp_mode spike_count_total rheobase_pa fi_slope_hz_per_pa input_resistance_mohm─────────────────────────────────── ────── ───────────── ───────────────── ─────────── ────────────────── ─────────────────────cells/pyabf-171116sh-0018.abf abf current_clamp 117 50 0.0655 104.1564cells/pyabf-190619b-0003.abf abf current_clamp 117 120 -0.0538 224.0087cells/pyabf-2019-07-24-0055-fsi.abf abf current_clamp 948 25 0.3717 176.8225cells/ holds three public current-clamp recordings from the pyABF sample data (MIT): 171116sh_0018.abf, 190619b_0003.abf and 2019-07-24 0055 fsi.abf, a fast-spiking interneuron. Each has a series of current steps that drive the cell from silence to repetitive firing. The output on this page is real.
What it tells you
- Each row is one recording (
rows=cell).--fieldskeeps the table narrow; without it you also getmax_firing_rate_hz,tau_ms,sag_ratioandresting_mv. Voltage-clamp files giveholding_current_pa,access_resistance_mohmandmembrane_resistance_mohminstead. clamp_modeis decided from the units: a voltage channel with a current command is current clamp, a current channel with a voltage command is voltage clamp.- Rheobase is the smallest step that makes the cell fire, and the f–I slope is fitted over the steps that do. A negative slope means the rate falls at the larger steps:
190619b_0003fires 98 spikes at 240 pA and 1 at 420 pA (--csv fishows the curve), so look at it before you average slopes. - Check the units before you trust a number. If samples are implausible for the channel’s unit (a current channel labelled
Athat holds values of a few units, say), the report adds a note naming the likely unit.openreadout info FILEshows each channel’s unit. - A file that cannot be analyzed becomes a row with
erroranderror_code, and the run carries on.
Variations
One row per sweep or per spike
rows=sweep (the default) gives one row per sweep, with the stimulus window and level, spike_count, firing_rate_hz, first_spike_latency_ms, the ISI measures and the passive or test-pulse values. rows=spike gives one row per action potential, with threshold, amplitude, half-width and AHP.
One file
openreadout analyze ephys-features cell.abfopenreadout analyze ephys-features cell.abf --csv sweeps > sweeps.csvopenreadout analyze ephys-features cell.abf --csv fi > fi.csv--csv prints one tidy table (sweeps, spikes or fi) instead of the report. A spike must cross −20 mV (--peak-threshold), and its onset is where dV/dt reaches 10 V/s (--dvdt-threshold). --sweeps 0,3,5-9 limits the sweeps. Stimulus steps, and so rheobase and the f–I curve, come from ABF epoch tables only.
Grouped by genotype
openreadout batch ephys-features cells/ -r --set rows=cell \ --sample-sheet genotypes.csv --by genotype -o cells.parquetOpenReadout picks the join key itself (usually the file name) and reports it, and --by adds n, mean, SD, SEM and median per group. --set peak_threshold_mv=-30 passes an option; the names are those of the MCP tool. Writing a CSV of the table above:
$ openreadout batch ephys-features cells/ --set rows=cell -o cells.csv...wrote cells.csv (3 rows × 13 columns, csv, 699 bytes, verified=true)From an assistant
The MCP tool is openreadout_analyze with kind: "ephys-features" and options trace, channel, sweeps, peak_threshold_mv, dvdt_threshold and max_spikes. For a folder, openreadout_batch takes measure: "ephys-features" with the same options plus rows.
More
- Electrophysiology: how every feature is computed, and how it was validated against eFEL and pyABF.
- Many files: sample sheets, group summaries and output formats.
analyzeandbatchreferences.- JSON:
ephys-features, batch table.