neuropixels-analysis

Process Neuropixels recordings into spike-sorted units with quality metrics.

33.0k|3.2k|Updated Oct 19, 2025
One-click install
npx skills add https://github.com/K-Dense-AI/claude-scientific-skills --skill neuropixels-analysis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: neuropixels-analysis
Source: https://github.com/K-Dense-AI/claude-scientific-skills/tree/main/scientific-skills/neuropixels-analysis
Command: npx skills add https://github.com/K-Dense-AI/claude-scientific-skills --skill neuropixels-analysis

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires spikeinterface, numpy, pandas, matplotlib, scipy, probeinterface, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

End-to-end Neuropixels data analysis workflow—from preprocessing and drift correction to spike sorting, quality metrics, and Allen/IBL-style curation, with AI-assisted visualization and publication-ready outputs.

Core Features & Use Cases

  • Preprocessing and drift correction: High-pass filtering, phase correction, common reference, and motion correction.
  • Spike sorting: Running KS4/KS3/SpykingCircus2/Mountainsort5 and ensemble comparisons.
  • Postprocessing and metrics: Waveforms, templates, spike amplitudes, and comprehensive quality metrics.
  • Curation and export: Allen/IBL curation criteria; export to Phy or NWB.
  • Visualization: Publication-quality plots and dashboards for unit quality and spike activity.

Quick Start

  1. Install SpikeInterface and neuropixels-analysis dependencies.
  2. Load raw data with si.read_spikeglx, run preprocessing, sorting, and postprocessing, then export results for curation.

Frequently Asked Questions about neuropixels-analysis

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I process Neuropixels recordings from raw data to spike-sorted units?

Neuropixels data analysis processes raw recordings through preprocessing, motion correction, spike sorting with Kilosort4, SpykingCircus2, or Mountainsort5, then applies quality metrics and curation. Load data via SpikeInterface (SpikeGLX, Open Ephys, NWB formats), run the end-to-end workflow, and export curated units to Phy or NWB for publication.

What spike sorting algorithms does this workflow support?

The workflow supports Kilosort4, Kilosort3, SpykingCircus2, and Mountainsort5, with ensemble comparison capabilities. SpikeInterface abstracts these sorters, allowing you to run multiple algorithms on the same preprocessed data and evaluate trade-offs before finalizing curated units.

Can I use this for both Neuropixels 1.0 and 2.0 probes?

Yes, the workflow handles both Neuropixels 1.0 and 2.0 data and supports multiple input formats: SpikeGLX, Open Ephys, and NWB. Probeinterface integration enables probe-specific configuration and geometry handling for accurate preprocessing and sorting.

How does drift correction work in this pipeline?

Drift detection and correction occur during preprocessing using phase shift and motion correction techniques. The workflow identifies and compensates for electrode drift across the recording session, improving spike sorting accuracy and unit quality before sorting algorithms are applied.

What quality metrics are computed for sorted units?

The postprocessing step computes comprehensive quality metrics including spike amplitudes, waveform properties, templates, and Allen/IBL-style curation criteria. These metrics support both automated filtering and AI-assisted visual analysis to identify publication-ready units.

Can I export results to formats other than Phy or NWB?

The workflow exports to Phy and NWB natively. NWB is a standard format compatible with downstream neuroscience analysis tools; Phy enables interactive curation and refinement before final export or archival to other formats via standard conversion pipelines.