Metadata-Version: 2.4
Name: spikewrap
Version: 0.4.0
Summary: Run extracellular electrophysiology analysis with SpikeInterface
Author-email: Joe Ziminski <joseph.j.ziminski@gmail.com>
License: BSD-3-Clause
Project-URL: homepage, https://github.com/JoeZiminski/spikewrap
Project-URL: bug_tracker, https://github.com/JoeZiminski/spikewrap/issues
Project-URL: documentation, https://github.com/JoeZiminski/spikewrap
Project-URL: source_code, https://github.com/JoeZiminski/spikewrap
Project-URL: user_support, https://github.com/JoeZiminski/spikewrap/issues
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Operating System :: OS Independent
Classifier: License :: OSI Approved :: BSD License
Requires-Python: <3.14,>=3.9.0
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: spikeinterface[full]<0.104,>=0.103.2
Requires-Dist: neo>=0.14.3
Requires-Dist: submitit
Requires-Dist: slurmio
Requires-Dist: psutil
Requires-Dist: toml
Requires-Dist: PyYAML
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Requires-Dist: pytest-cov; extra == "dev"
Requires-Dist: pytest-mock; extra == "dev"
Requires-Dist: coverage; extra == "dev"
Requires-Dist: tox; extra == "dev"
Requires-Dist: black; extra == "dev"
Requires-Dist: mypy; extra == "dev"
Requires-Dist: pre-commit; extra == "dev"
Requires-Dist: ruff; extra == "dev"
Requires-Dist: setuptools_scm; extra == "dev"
Requires-Dist: types-setuptools; extra == "dev"
Requires-Dist: types-PyYAML; extra == "dev"
Requires-Dist: types-toml; extra == "dev"
Requires-Dist: mountainsort5; sys_platform != "darwin" and extra == "dev"
Dynamic: license-file

# spikewrap

``spikewrap`` is a tool for automating extracellular electrophysiology analysis.

See the documentation for a quick
[feature overview](https://spikewrap.neuroinformatics.dev/gallery_builds/get_started/slow_feature_overview.html#sphx-glr-gallery-builds-get-started-slow-feature-overview-py)
and to [get started](https://spikewrap.neuroinformatics.dev/get_started/index.html).

## Overview

``spikewrap`` provides a lightweight interface to manage the preprocessing and sorting 
of extracellular electrophysiological data. 

Built on [SpikeInterface](https://spikeinterface.readthedocs.io/en/stable/api.html), ``spikewrap`` offers a convenient wrapper
to run sorting pipelines. It aims to facilitate the sharing of electrophysiology pipelines and standardize project folders.

For example, all runs for a recording session can be preprocessed with:

```python
import spikewrap as sw

subject_path = sw.get_example_data_path() / "rawdata" / "sub-001"

session = sw.Session(
    subject_path=subject_path,
    session_name="ses-001",
    file_format="spikeglx",  # or "openephys"
    run_names="all",
    probe=None,  # optional argument to set probe (neuropixels auto-detected)
)

session.save_sync_channel()

session.preprocess(
    configs="neuropixels+kilosort2_5",
    per_shank=True,
    concat_runs=False,
)

session.save_preprocessed(
    overwrite=True,
    n_jobs=12,
    slurm=True
)
```

This will output a folder structure like:

```
└── derivatives/
    └── sub-001/
        └── ses-001/
            └── ephys/
                ├── run-001/
                │   ├── preprocessed/
                │   │   ├── shank_0/
                │   │   │   └── si_recording/
                │   │   │       └── <spikeinterface binary>
                │   │   └── shank_1/
                │   │       └── si_recording/
                │   │           └── <spikeinterface binary>      
                │   └── sync/
                │       └── sync_channel.npy
                └── run-002/
                    └── ...    
```                   

## Installation

``pip install spikewrap`` 

## Get Involved

Contributions to ``spikewrap`` are welcome and appreciated! Please see our [contributing guide](https://spikewrap.neuroinformatics.dev/community/contributing_guidelines.html) for details, and don't hesitate to ask any questions on our [Zulip Chat](https://neuroinformatics.zulipchat.com/#narrow/stream/406002-Spikewrap).
