neuropixels-analysis
Analyze Neuropixels neural recordings
Also available from: davila7
This skill provides comprehensive analysis of Neuropixels high-density neural recordings. It handles the complete workflow from raw data loading to publication-ready curated units using SpikeInterface and Kilosort4 algorithms.
Download the skill ZIP
Upload in Claude
Go to Settings → Capabilities → Skills → Upload skill
Toggle on and start using
Test it
Using "neuropixels-analysis". Load my Neuropixels recording and run the complete analysis pipeline
Expected outcome:
- Recording: 384 channels, 600.2 seconds
- Preprocessing complete - 2 bad channels removed
- Drift estimate: 15.3 um
- Kilosort4 found 45 units
- Quality metrics computed
- Allen curation: 28 good units, 12 MUA, 5 noise
Using "neuropixels-analysis". Check for drift and motion in my recording
Expected outcome:
- Motion estimate: 12.8 um peak-to-peak
- No severe drift detected
- Nonrigid motion correction applied
- Corrected recording saved to motion/corrected/
Security Audit
SafeAll 703 static findings are false positives. The scanner incorrectly flags markdown code block backticks as shell commands, scientific terminology (channel, detect, universal) as C2/crypto keywords, and documentation URLs as hardcoded URLs. This is a legitimate neuroscience analysis toolkit using SpikeInterface and Kilosort4 for scientific research.
Risk Factors
⚙️ External commands (3)
📁 Filesystem access (2)
🌐 Network access (1)
Quality Score
What You Can Build
Automated spike sorting pipeline
Process Neuropixels recordings from raw data to sorted spikes with quality metrics for publication.
Batch processing workflow
Apply standardized preprocessing and curation across multiple recording sessions for consistency.
Integration with Phy
Export sorted data to Phy for manual review and fine-tuning of spike sorting results.
Try These Prompts
Load a SpikeGLX recording from /path/to/data and apply standard preprocessing including highpass filtering at 400 Hz, phase shift correction, and common median reference.
Run Kilosort4 spike sorting on the preprocessed recording and compute quality metrics including SNR, ISI violations ratio, and presence ratio.
Check for drift in my Neuropixels recording and apply motion correction if the estimated drift exceeds 20 microns.
Generate a summary plot for unit 15 showing waveforms and autocorrelogram, then analyze whether it appears to be a well-isolated single unit based on the visualization.
Best Practices
- Always check drift before spike sorting - drift above 20 um significantly impacts quality
- Use GPU for Kilosort4 for 10-50x faster processing compared to CPU alternatives
- Save preprocessed data to avoid recomputing filtering steps on subsequent runs
- Review uncertain units in Phy - automated curation provides starting points for manual refinement
Avoid
- Skipping drift estimation before spike sorting can lead to poor unit isolation
- Applying phase shift correction to Neuropixels 2.0 data (only needed for 1.0 probes)
- Using default curation thresholds without considering your experimental requirements
- Processing full recordings without testing on a subset first to verify pipeline