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.

Citation

When you use this eFEL software for your research, we ask you to cite the following publications (this includes poster presentations):

    @article{efel,
        title={eFEL},
        DOI={10.5281/zenodo.593869},
        url={https://doi.org/10.5281/zenodo.593869}
        abstractNote={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.},
        publisher={Zenodo},
        author={Ranjan, Rajnish and
                Van Geit, Werner and
                Moor, Ruben and
                Rössert, Christian and
                Riquelme, Juan Luis and
                Damart, Tanguy and
                Jaquier, Aurélien and
                Tuncel, Anil},
        year={2023},
        month={Jul}
    }

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.6.29.tar.gz (103.9 kB view details)

Uploaded Source

Built Distributions

efel-5.6.29-cp312-cp312-win_amd64.whl (217.6 kB view details)

Uploaded CPython 3.12 Windows x86-64

efel-5.6.29-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.6.29-cp312-cp312-macosx_10_9_x86_64.whl (270.0 kB view details)

Uploaded CPython 3.12 macOS 10.9+ x86-64

efel-5.6.29-cp311-cp311-win_amd64.whl (217.6 kB view details)

Uploaded CPython 3.11 Windows x86-64

efel-5.6.29-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.6.29-cp311-cp311-macosx_10_9_x86_64.whl (270.0 kB view details)

Uploaded CPython 3.11 macOS 10.9+ x86-64

efel-5.6.29-cp310-cp310-win_amd64.whl (217.6 kB view details)

Uploaded CPython 3.10 Windows x86-64

efel-5.6.29-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.6.29-cp310-cp310-macosx_10_9_x86_64.whl (270.0 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

efel-5.6.29-cp39-cp39-win_amd64.whl (217.6 kB view details)

Uploaded CPython 3.9 Windows x86-64

efel-5.6.29-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.6.29-cp39-cp39-macosx_10_9_x86_64.whl (270.0 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

File details

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

File metadata

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

File hashes

Hashes for efel-5.6.29.tar.gz
Algorithm Hash digest
SHA256 05593877d205864776d527109fd25e0de5e86e596d5fd18d610f2b3f4017081d
MD5 4c176017a4c8c1e3f4c27cfeb726e021
BLAKE2b-256 f7c3e2a9d9b7bc68c918a260c8eb94904b4f24fba7134c60d8ae8a93cfa013fd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: efel-5.6.29-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 217.6 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.6.29-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 19fda595db062537147dcad0393f22b10fee1ce1deebe38f5dfcf9a4060fb698
MD5 5846eadeb5a13669b77f4beabe882423
BLAKE2b-256 8c0dedd9e753425fa11ddc1cec1c35a656588df2a3afea2cb382ce439a425635

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.6.29-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6d3afd6eec11953fb4ed353320e97de8d76b67ebc82fe6a1d075b6964d2aa3de
MD5 41e95c472bb79c5a83ecce61587d2f40
BLAKE2b-256 4289b70b715f333c23d6b0baa344b7fa75b656094bdf9fb9dabfebfae773a508

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.6.29-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 41446b13691296edcbb037571cb0400d37b335a7ed124ccb1df845bbd496f537
MD5 84b4495aa83becb35f3839218740152b
BLAKE2b-256 1c3b30fba8009ceb1887b268d1339936fa803ad0a2fccba90ed63a94dda8f9e0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: efel-5.6.29-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 217.6 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.6.29-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 dd65d2efca72b80ba72323c816757d9c2e0e7695d6c0847feeaed5df68c7a4ff
MD5 ba64adff8ee78d8207773d97d1d058c7
BLAKE2b-256 06aa59e080571780040da45d14300083abd9c2070390d45bffbb62710c4bb6a0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.6.29-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3e6abb54add14108fe6a824294f8b5188e10403f0a974fb29d77dba1439312fc
MD5 df7b62b6405e4a01109665b7a1c2aeb9
BLAKE2b-256 71e0000734c7cf67fbe908f3bab5aa28a7baa43a5c8fd7b748181f3874d21629

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.6.29-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 7e58770703b4481bc42de0f95d3228385e4e181ff80e8b9551fdabd9a96ef897
MD5 f3cfe56739c5908411dc9d209160a68b
BLAKE2b-256 a9a4afa056a2d37b20bfc919be3f648ee4385df80155d9caa5e9f747bacbe963

See more details on using hashes here.

File details

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

File metadata

  • Download URL: efel-5.6.29-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 217.6 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.6.29-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 314a7acd925c14f22143915a38d498ce4584c25d0d3e9a07770b8be15521b920
MD5 8d12f751ce1ccf529bcf6e8595e24bbf
BLAKE2b-256 eda8eb90ad435fe86ef4c883ad75dd9f03cec340b6ba0097324de50f3b33ccaa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.6.29-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e28aeb4afd20f943d7bd838e98dd1d6d2574e349a86d099b391b1716a9c99fd0
MD5 27343e6af53e02ae0225c6e2b2d7029c
BLAKE2b-256 7f9e940bc80f665460a6ee75ee61c110237aca3cb574eb3506902370dd378625

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.6.29-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 dc94b0799f10f3ab1272112ce13472d3dc5c91ab8d0e50e4012d6b073fd6943a
MD5 61af6ab0b60de5f499ae576e706c6bcc
BLAKE2b-256 9727cf04a4d79455bcf79e62e68c33f45fb3a24316ba893216f1f6983f9f43ce

See more details on using hashes here.

File details

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

File metadata

  • Download URL: efel-5.6.29-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 217.6 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.6.29-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 fecbeeac88cd91abe53c277579698ea81f2436c75d86c15aba205f383b7aec34
MD5 14e28d70529c7e1c7169d55ed7f478c2
BLAKE2b-256 d191fe91c42ebc77c42951c96a1fc41fc2ada85a7cdc6796a47143e8ee979c9d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.6.29-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a23b174df1fc10676d20c6f46f19755ad2b12355260078cd6b155d8d76bf59f0
MD5 53532ec85f5f644c395fdafa67af65ea
BLAKE2b-256 0a9ae70c07f00a53a195a19e33043ad83c1e3e4545868b459519615921c0a548

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.6.29-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 2dcdce135812f8e9300313d72a788cce6cf1459b68ed9a7064fde60547567c4e
MD5 367b94efdf6300ae1db2817358605ca9
BLAKE2b-256 d4cdef3d3d913ef2fbca56a5fccb144c3ec00faf500024baca72b2d27c794537

See more details on using hashes here.

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