Skip to main content

Electrophys Feature Extract Library (eFEL)

Project description

eFEL banner
Latest Release latest release
Documentation latest documentation
License license
Build Status actions build status
Coverage coverage
Gitter
Citation DOI

Introduction

The Electrophys Feature Extraction Library (eFEL) allows neuroscientists to automatically extract features from time series data recorded from neurons (both in vitro and in silico). Examples are the action potential width and amplitude in voltage traces recorded during whole-cell patch clamp experiments. The user of the library provides a set of traces and selects the features to be calculated. The library will then extract the requested features and return the values to the user.

The core of the library is written in C++, and a Python wrapper is included. At the moment we provide a way to automatically compile and install the library as a Python module. Instructions on how to compile the eFEL as a standalone C++ library can be found here.

How to cite

When you use this eFEL software for your research, we ask you to cite it (this includes poster presentations) by referring to the "Cite this repository" button at the top of the repository page to get various citation formats, including APA and BibTeX.

For detailed citation information, please refer to the CITATION.cff file.

Requirements

  • Python 3.9+
  • Pip (installed by default in newer versions of Python)
  • C++ compiler that can be used by pip
  • Numpy (will be installed automatically by pip)
  • The instruction below are written assuming you have access to a command shell on Linux / UNIX / MacOSX / Cygwin

Installation

The easiest way to install eFEL is to use pip

pip install efel

In case you don't have administrator access this command might fail with a permission error. In that case you could install eFEL in your home directory

pip install efel --user

Or you could use a python virtual environment

virtualenv pythonenv
. ./pythonenv/bin/activate
# If you use csh or tcsh, you should use:
# source ./pythonenv/bin/activate.csh
pip install efel

If you want to install straight from the github repository you can use

pip install git+git://github.com/BlueBrain/eFEL

Quick Start

First you need to import the module

import efel

To get a list with all the available feature names

efel.get_feature_names()

To change the spike detection threshold setting (default is -20 mV)

efel.set_setting('Threshold', -30)

For a full list of available settings, please refer to the Setting class

The python function to extract features is get_feature_values(...). Below is a short example on how to use this function. The code and example trace are available here

"""Basic example 1 for eFEL"""

import efel
import numpy

def main():
    """Main"""

    # Use numpy to read the trace data from the txt file
    data = numpy.loadtxt('example_trace1.txt')

    # Time is the first column
    time = data[:, 0]
    # Voltage is the second column
    voltage = data[:, 1]

    # Now we will construct the datastructure that will be passed to eFEL

    # A 'trace' is a dictionary
    trace1 = {}

    # Set the 'T' (=time) key of the trace
    trace1['T'] = time

    # Set the 'V' (=voltage) key of the trace
    trace1['V'] = voltage

    # Set the 'stim_start' (time at which a stimulus starts, in ms)
    # key of the trace
    # Warning: this need to be a list (with one element)
    trace1['stim_start'] = [700]

    # Set the 'stim_end' (time at which a stimulus end) key of the trace
    # Warning: this need to be a list (with one element)
    trace1['stim_end'] = [2700]

    # Multiple traces can be passed to the eFEL at the same time, so the
    # argument should be a list
    traces = [trace1]

    # set the threshold for spike detection to -20 mV
    efel.set_setting('Threshold', -20)

    # Now we pass 'traces' to the efel and ask it to calculate the feature
    # values
    traces_results = efel.get_feature_values(traces,
                                           ['AP_amplitude', 'voltage_base'])

    # The return value is a list of trace_results, every trace_results
    # corresponds to one trace in the 'traces' list above (in same order)
    for trace_results in traces_results:
        # trace_result is a dictionary, with as keys the requested features
        for feature_name, feature_values in trace_results.items():
            print("Feature %s has the following values: %s" %
                (feature_name, ', '.join([str(x) for x in feature_values])))


if __name__ == '__main__':
    main()

The output of this example is

Feature AP_amplitude has the following values: 72.5782441262, 46.3672552618, 41.1546679158, 39.7631750953, 36.1614653031, 37.8489295737
Feature voltage_base has the following values: -75.446665721

This means that the eFEL found 5 action potentials in the voltage trace. The amplitudes of these APs are the result of the 'AP_amplitude' feature. The voltage before the start of the stimulus is measured by 'voltage_base'. Results are in mV.

Full documentation

The full documentation can be found here

Funding

This work has been partially funded by the European Union Seventh Framework Program (FP7/2007­2013) under grant agreement no. 604102 (HBP), the European Union’s Horizon 2020 Framework Programme for Research and Innovation under the Specific Grant Agreement No. 720270, 785907 (Human Brain Project SGA1/SGA2) and by the EBRAINS research infrastructure, funded from the European Union’s Horizon 2020 Framework Programme for Research and Innovation under the Specific Grant Agreement No. 945539 (Human Brain Project SGA3). This project/research was supported by funding to the Blue Brain Project, a research center of the École polytechnique fédérale de Lausanne (EPFL), from the Swiss government’s ETH Board of the Swiss Federal Institutes of Technology.

Copyright (c) 2009-2024 Blue Brain Project/EPFL

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

efel-5.7.4.tar.gz (107.4 kB view details)

Uploaded Source

Built Distributions

efel-5.7.4-cp312-cp312-win_amd64.whl (221.5 kB view details)

Uploaded CPython 3.12 Windows x86-64

efel-5.7.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.6 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

efel-5.7.4-cp312-cp312-macosx_10_9_x86_64.whl (274.3 kB view details)

Uploaded CPython 3.12 macOS 10.9+ x86-64

efel-5.7.4-cp311-cp311-win_amd64.whl (221.4 kB view details)

Uploaded CPython 3.11 Windows x86-64

efel-5.7.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.6 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

efel-5.7.4-cp311-cp311-macosx_10_9_x86_64.whl (274.1 kB view details)

Uploaded CPython 3.11 macOS 10.9+ x86-64

efel-5.7.4-cp310-cp310-win_amd64.whl (221.4 kB view details)

Uploaded CPython 3.10 Windows x86-64

efel-5.7.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.6 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

efel-5.7.4-cp310-cp310-macosx_10_9_x86_64.whl (274.1 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

efel-5.7.4-cp39-cp39-win_amd64.whl (221.4 kB view details)

Uploaded CPython 3.9 Windows x86-64

efel-5.7.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.6 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

efel-5.7.4-cp39-cp39-macosx_10_9_x86_64.whl (274.1 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

File details

Details for the file efel-5.7.4.tar.gz.

File metadata

  • Download URL: efel-5.7.4.tar.gz
  • Upload date:
  • Size: 107.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for efel-5.7.4.tar.gz
Algorithm Hash digest
SHA256 f4ff390db11f708e60c27a0fd4dc6a637ec23b94758782d7be09193af99ba913
MD5 6601533d312b1180c7fa538fc23a4de2
BLAKE2b-256 0b68dbd39d81558abc6fd0bb3265f94831a4e0b9ef80a1b956bb123fff3a7b40

See more details on using hashes here.

Provenance

File details

Details for the file efel-5.7.4-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: efel-5.7.4-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 221.5 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for efel-5.7.4-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 901a4e8449054993970c1331a1dd3a94943c4f4e8c71db8d3cbd267aa771d6e4
MD5 0b6e22dc5f7e5e5c458dbcdaaef3fc9b
BLAKE2b-256 e23cbe7637ce6451b1e1c7340d7b3b404f124db094951cbb300482a27f560c40

See more details on using hashes here.

Provenance

File details

Details for the file efel-5.7.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for efel-5.7.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 718bad59f71c683af3083d854387df43486f5f7f3a51169af7a3b743dc97f661
MD5 bd4eeedfcde94b2cb6d8da1f7dbe95af
BLAKE2b-256 ffbdd94352c76da1ba5ac85476559ff9faf6e4ba8334b7f0eba730ccbd542220

See more details on using hashes here.

Provenance

File details

Details for the file efel-5.7.4-cp312-cp312-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for efel-5.7.4-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 8c8749b4b9e8bc188894d8ab60851a0513a16564d3a0a4eb958478c449ee12d6
MD5 e0c06f1ec8c499c2cbef10e21efe22e1
BLAKE2b-256 b1bc868d56ef4ca8d1f9319cfa3f52c069d8132f6fb867188dc958623745b26e

See more details on using hashes here.

Provenance

File details

Details for the file efel-5.7.4-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: efel-5.7.4-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 221.4 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for efel-5.7.4-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 a7fd15f3baa8e48d66963a674aff2ddef166ed04fc0679d5fb8740ad7f966083
MD5 bd05581ec2145af7c901e1aa631d384f
BLAKE2b-256 9538b7ef75279a9dce66b32c3be8a1f27426d5ef50a2f692dfa97aa3b5f4a4da

See more details on using hashes here.

Provenance

File details

Details for the file efel-5.7.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for efel-5.7.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 85a64b98b72f96c9283015348b07cf4f71f53ddfb2411712515875088cbac35e
MD5 72081f7a4ddff37c19965032edc1c0db
BLAKE2b-256 0189c94b0810f078168227ba0b4d72c9e33b5402c3faf1a893889ce21645bd4b

See more details on using hashes here.

Provenance

File details

Details for the file efel-5.7.4-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for efel-5.7.4-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 1b252940a53cf6df21d5ebc122cf03652efcc5e5f10eb2cafe6e93afcbb925da
MD5 0e5b2cf63293b50761ba521020859020
BLAKE2b-256 fbb11ca0c509e958e4ae45df35c7ded6aed7625f332d5abd75b1e9b2b8ccfddc

See more details on using hashes here.

Provenance

File details

Details for the file efel-5.7.4-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: efel-5.7.4-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 221.4 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for efel-5.7.4-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 22d79d82f6f1c2574e957aea1d72a96548ce12697cb1c016ce39e6b8426e9f56
MD5 b5fee8e50805bf635b3f419f7c7df40e
BLAKE2b-256 9af8b1970b26260bcabf48c52d13f356ee02af060d5f894cc4621aeef1128533

See more details on using hashes here.

Provenance

File details

Details for the file efel-5.7.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for efel-5.7.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e2cd26d0b9276399052717462d98049dc5fc7f62240550ca76c1b7fa61541058
MD5 38b1b338f481db59372cd2b04e644e33
BLAKE2b-256 9ac9b3f1dca6864fd5ed4a7eafbb60b2f185d2d16d9bd4fb1b8e1771d16bc200

See more details on using hashes here.

Provenance

File details

Details for the file efel-5.7.4-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for efel-5.7.4-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 7a1357a3c3cbbfafad3f5e8831b8e0a0ba9289261494b62e471043d412fb914e
MD5 67ee691efd6b1faa5b29bfa46c657e96
BLAKE2b-256 51b2acf557c9acd72b5f7b6e55e93275ef7f3edff579deecfde18e574228a2fe

See more details on using hashes here.

Provenance

File details

Details for the file efel-5.7.4-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: efel-5.7.4-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 221.4 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for efel-5.7.4-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 0fbc2970a2cc5c8882b68979ab6636e495eb92c82856e43d52d51b3e42a97f10
MD5 e1893f058b6a56607e1491221d0c1367
BLAKE2b-256 2bbf910e9c6d1734b99145abd989f40b901e63a2d82ef8e10443f34639b4e82e

See more details on using hashes here.

Provenance

File details

Details for the file efel-5.7.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for efel-5.7.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c9a9b45e3c89755a8b2f3597040d20404b2e898616600e0aa0df8e83c7b80e64
MD5 535c843e98327c79e5d9aff51c80614e
BLAKE2b-256 8a06a0a22ac72a40c1c7a2ba517c271dc6e29c71c059bd836fd936efa2c58a8a

See more details on using hashes here.

Provenance

File details

Details for the file efel-5.7.4-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for efel-5.7.4-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 df107e6694db8d70db946393d1af34df983bf4c97b7f6f6af109996b6ed45949
MD5 c3cb3d2c6b27826f8540321906b7c58a
BLAKE2b-256 b0c3488bd85cdbd3a529977875d02c4e091503e7f4a72a39040519854c78bf84

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