Skip to main content

Curate, visualize, annotate, and share your behavioral ephys data using Python

Project description

Curate, visualize, annotate, and share your behavioral ephys data using Python

PyPI project Anaconda Cloud project GitHub source code conda-forge feedstock constructor recipe Documentation status Travis build status conda-forge build status Coverage status Zenodo archive

Documentation | Release Notes | Issue Tracker

neurotic is an app for Windows, macOS, and Linux that allows you to easily review and annotate your electrophysiology data and simultaneously captured video. It is an easy way to load your Neo-compatible data (see neo.io for file formats) into ephyviewer without doing any programming. Share a single metadata file with your colleagues and they too will quickly be looking at the same datasets!

To use the app, first organize your datasets in a metadata file like this (see Configuring Metadata):

my favorite dataset:
    description: This time it actually worked!

    data_dir:           C:\local_dir_containing_files
    remote_data_dir:    http://myserver/remote_dir_containing_downloadable_files  # optional
    data_file:          data.axgx
    video_file:         video.mp4
    # etc

    video_offset: -3.4  # seconds between start of video and data acq
    epoch_encoder_possible_labels:
        - label01
        - label02
    plots:
        - channel: I2
          ylim: [-30, 30]
        - channel: RN
          ylim: [-60, 60]
        # etc

    filters:  # used only if fast loading is off (lazy=False)
        - channel: Force
          lowpass: 50
        # etc
    amplitude_discriminators:  # used only if fast loading is off (lazy=False)
        - name: B3 neuron
          channel: BN2
          units: uV
          amplitude: [50, 100]
        # etc

another dataset:
    # etc

Open your metadata file in neurotic and choose a dataset. If the data and video files aren’t already on your local computer, the app can download them for you, even from a password-protected server. Finally, click launch and the app will use a standard viewer layout to display your data to you using ephyviewer.

Screenshot

In the screenshot above, the video frame shows a voracious sea slug (Aplysia californica) swallowing a strip of unbreakable seaweed attached to a force transducer. Implanted electrodes recorded from a muscle and the major nerves controlling feeding. The epoch encoder was used to mark the times when seaweed moved into the mouth. Spikes corresponding to activity of identified neurons were detected by neurotic using customizable parameters.

The viewers are easy and intuitive to navigate (see User Interface):

  • Pressing the play button will scroll through your data and video in real time, or at a higher or lower rate if the speed parameter is changed.

  • The arrow/WASD keys allow you to step through time in variable increments.

  • Jump to a time by clicking on an event in the event list or a table entry in the epoch encoder.

  • To show more or less time at once, right-click and drag right or left to contract or expand time.

  • Scroll the mouse wheel in the trace viewer or video viewer to zoom.

  • The epoch encoder can be used to block out periods of time during which something interesting is happening for later review or further analysis (saved to a CSV file).

  • All panels can be hidden, undocked, stacked, or repositioned on the fly.

Electrophysiologists will find this tool useful even if they don’t need the video synchronization feature!

Portability is easy with neurotic! Use relative paths in your metadata file along with a remotely accessible data store such as GIN to make your metadata file fully portable. The same metadata file can be copied to a different computer, and downloaded files will automatically be saved to the right place. Data stores can be password protected and neurotic will prompt you for a user name and password. This makes it easy to share the neurotic experience with your colleagues! 🤪

Installing neurotic

neurotic requires Python 3.6 or later.

Note that the latest release of one of neurotic’s dependencies, pyqtgraph 0.10.0, is incompatible with Python 3.8 or later on Windows unless that dependency is installed via conda-forge (recommended method) (details).

Alternate Method: pip

Install neurotic from PyPI using

pip install neurotic

Note that installation via pip skips one dependency: PyAV, which is required for displaying videos, and without which neurotic will ignore videos. PyAV is not easily installed with pip on some systems, especially Windows. The easiest way to separately install PyAV is using conda:

conda install -c conda-forge av

Updating neurotic

The recommended method of updating neurotic depends on the original method of installation.

If you are unsure what method you used, updating using conda or pip is likely to work. Standalone installers may be safe too, though this could lead to having multiple version installed simultaneously.

Updating with Standalone Installers

If you previously installed neurotic using a standalone installer, you may install a newer version using another installer, either into a different directory or by first uninstalling the old version. Installers can be downloaded from the GitHub Releases page:

👉 Download installers here (listed under “Assets”) 👈

Alternatively, if a new installer is not currently available for your platform, or if you would just like a much faster method, you may use the command line tools provided by the installer (via the “Anaconda Prompt” on Windows, or the Terminal on macOS and Linux):

conda update -c conda-forge neurotic

Updating with conda

If you installed neurotic with conda, you can update to the latest release using

conda update -c conda-forge neurotic

Updating with pip

If you installed neurotic using pip, you can update to the latest release available on PyPI using

pip install -U neurotic

Development Version

If you are interested in trying new, unreleased features of neurotic, you may install the latest development version from GitHub using

pip install -U git+https://github.com/jpgill86/neurotic.git

Note that if you install the development version, you may also need the latest development version of ephyviewer, which you can get using

pip install -U git+https://github.com/NeuralEnsemble/ephyviewer.git

Getting Started

If you installed neurotic into a conda environment, first activate it:

conda activate <environment name>

Launch the app from the command line:

neurotic

Several examples are provided. Select one, download the associated data, and then click “Launch”. See User Interface for help with navigation.

Disabling “Fast loading” before launch will enable additional features including amplitude-threshold spike detection and signal filtering.

To inspect the metadata file associated with the examples or to make changes to it, click “Edit metadata”. See Configuring Metadata for details about the format.

If you prefer Jupyter notebooks, you can launch an example notebook instead, which includes a tutorial for using neurotic’s API:

neurotic --launch-example-notebook

The command line interface accepts other arguments too:

usage: neurotic [-h] [-V] [--debug] [--no-lazy] [--thick-traces]
                [--show-datetime] [--ui-scale {tiny,small,medium,large,huge}]
                [--theme {light,dark,original,printer-friendly}]
                [--launch-example-notebook]
                [file] [dataset]

neurotic lets you curate, visualize, annotate, and share your behavioral ephys
data.

positional arguments:
  file                  the path to a metadata YAML file (default: an example
                        file)
  dataset               the name of a dataset in the metadata file to select
                        initially (default: the first entry in the metadata
                        file)

optional arguments:
  -h, --help            show this help message and exit
  -V, --version         show program's version number and exit
  --debug               enable detailed log messages for debugging
  --no-lazy             do not use fast loading (default: use fast loading)
  --thick-traces        enable support for traces with thick lines, which has
                        a performance cost (default: disable thick line
                        support)
  --show-datetime       display the real-world date and time, which may be
                        inaccurate depending on file type and acquisition
                        software (default: do not display)
  --ui-scale {tiny,small,medium,large,huge}
                        the scale of user interface elements, such as text
                        (default: medium)
  --theme {light,dark,original,printer-friendly}
                        a color theme for the GUI (default: light)
  --launch-example-notebook
                        launch Jupyter with an example notebook instead of
                        starting the standalone app (other args will be
                        ignored)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

neurotic-1.4.1.tar.gz (118.7 kB view details)

Uploaded Source

Built Distribution

neurotic-1.4.1-py3-none-any.whl (121.7 kB view details)

Uploaded Python 3

File details

Details for the file neurotic-1.4.1.tar.gz.

File metadata

  • Download URL: neurotic-1.4.1.tar.gz
  • Upload date:
  • Size: 118.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200209 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for neurotic-1.4.1.tar.gz
Algorithm Hash digest
SHA256 5b65ca5003f42948594de44ba4d7eb3afab875614f1709c88df7ca59b1957e2e
MD5 1397479e21201642401e4d32cc2e707b
BLAKE2b-256 50df2c577d4584225120b34390b34b00fd5a5d22b36ecf9f08a35604688660f4

See more details on using hashes here.

Provenance

File details

Details for the file neurotic-1.4.1-py3-none-any.whl.

File metadata

  • Download URL: neurotic-1.4.1-py3-none-any.whl
  • Upload date:
  • Size: 121.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200209 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for neurotic-1.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e6037e4711aa0f29286322338d7e737e8d2100954380b3104fbd5f1bfaf41ead
MD5 5a73bbfe8cca4ab2e6dedae4b00b3668
BLAKE2b-256 0d743bcfc9cfa43774293e9e4947b67cdd5ed3cdf62e08d14c751f9dac781a52

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page