• Stars
    star
    307
  • Rank 136,109 (Top 3 %)
  • Language
    Python
  • License
    BSD 3-Clause "New...
  • Created over 10 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

phy: interactive visualization and manual spike sorting of large-scale ephys data

phy: interactive visualization and manual spike sorting of large-scale ephys data

Build Status codecov.io Documentation Status GitHub release PyPI release

phy is an open-source Python library providing a graphical user interface for visualization and manual curation of large-scale electrophysiological data. It is optimized for high-density multielectrode arrays containing hundreds to thousands of recording sites (mostly Neuropixels probes).

Phy provides two GUIs:

  • Template GUI (recommended): for datasets sorted with KiloSort and Spyking Circus,
  • Kwik GUI (legacy): for datasets sorted with klusta and klustakwik2.

phy 2.0b1 screenshot

What's new

  • [7 Sep 2021] Release of phy 2.0 beta 5, with some install and bug fixes
  • [7 Feb 2020] Release of phy 2.0 beta 1, with many new views, new features, various improvements and bug fixes...

Links

Hardware requirements

It is recommanded to store the data on a SSD for performance reasons.

There are no specific GPU requirements as long as relatively recent graphics and OpenGL drivers are installed on the system.

Installation instructions

Run the following commands in a terminal:

  1. Create a new conda environment with the conda dependencies:

    conda create -n phy2 -y cython dask h5py joblib matplotlib numpy pillow pip pyopengl pyqt pyqtwebengine pytest python qtconsole requests responses scikit-learn scipy traitlets
    
  2. Activate the new conda environment with conda activate phy2

  3. Install the development version of phy: pip install git+https://github.com/cortex-lab/phy.git

  4. [OPTIONAL] If you plan to use the Kwik GUI, type pip install klusta klustakwik2

  5. Phy should now be installed. Open the GUI on a dataset as follows (the phy2 environment should still be activated):

cd path/to/my/spikesorting/output
phy template-gui params.py

Dealing with the error ModuleNotFoundError: No module named 'PyQt5.QtWebEngineWidget

In some environments, you might get an error message related to QtWebEngineWidget. Run the command pip install PyQtWebEngine and try launching phy again. This command should not run if the error message doesn't appear, as it could break the PyQt5 installation.

Upgrading from phy 1 to phy 2

  • Do not install phy 1 and phy 2 in the same Python environment.
  • It is recommended to delete ~/.phy/*GUI/state.json when upgrading.

Developer instructions

To install the development version of phy in a fresh environment, do:

git clone [email protected]:cortex-lab/phy.git
cd phy
pip install -r requirements.txt
pip install -r requirements-dev.txt
pip install -e .
cd ..
git clone [email protected]:cortex-lab/phylib.git
cd phylib
pip install -e . --upgrade

Troubleshooting

Running phy from a Python script

In addition to launching phy from the terminal with the phy command, you can also launch it from a Python script or an IPython terminal. This may be useful when debugging or profiling. Here's a code example to copy-paste in a new launch.py text file within your data directory:

from phy.apps.template import template_gui
template_gui("params.py")

Credits

phy is developed and maintained by Cyrille Rossant.

Contributors to the repository are:

More Repositories

1

KiloSort

GPU code for spike sorting
MATLAB
175
star
2

allenCCF

Tools to work with Allen Inst CCF data in matlab
MATLAB
122
star
3

Suite2P

Tools for processing 2P recordings
MATLAB
122
star
4

neuropixels

Information about Neuropixels electrode arrays
MATLAB
81
star
5

spikes

cortex lab code for electrophysiology
MATLAB
72
star
6

alyx

Database for experimental neuroscience laboratories
Python
44
star
7

Rigbox

A MATLAB toolbox for running behavioral neuroscience experiments and managing data
HTML
32
star
8

sortingQuality

Functions to assess quality of spike sorting results
MATLAB
30
star
9

widefield

Image processing and tools for widefield imaging
MATLAB
18
star
10

MATLAB-tools

A collection of useful MATLAB libraries
MATLAB
13
star
11

phylib

Lightweight electrophysiological data analysis library
Python
11
star
12

npytools

[WIP] Command-line utilities to deal with NPY array files
Python
7
star
13

Transcriptomics

MATLAB software for analysis of single-cell RNA sequencing data, including probabilistic clustering, latent factor modeling, nbtSNE, visualization tools
MATLAB
5
star
14

wheelAnalysis

MATLAB
4
star
15

LabCI

Automation server for MATLAB & Python continuous integration, written in Node.js
JavaScript
4
star
16

PinkRigs

Shared code for processing data on the pink rigs
Python
3
star
17

psychofit

A module for fitting 2AFC psychometric data
Jupyter Notebook
3
star
18

alyx-matlab

Some MATLAB functions for easier interfacing with an Alyx database
MATLAB
3
star
19

alyx-registrator

1
star
20

groundTruth

first commit
MATLAB
1
star
21

alf2neuroscope

Converts ALF format to be read in neuroscope
Python
1
star
22

phy-plugins

1
star
23

ALF

1
star