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

Uploaded Source

Built Distributions

efel-5.6.28-cp312-cp312-win_amd64.whl (218.2 kB view details)

Uploaded CPython 3.12 Windows x86-64

efel-5.6.28-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.28-cp312-cp312-macosx_10_9_x86_64.whl (270.3 kB view details)

Uploaded CPython 3.12 macOS 10.9+ x86-64

efel-5.6.28-cp311-cp311-win_amd64.whl (218.2 kB view details)

Uploaded CPython 3.11 Windows x86-64

efel-5.6.28-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.28-cp311-cp311-macosx_10_9_x86_64.whl (270.3 kB view details)

Uploaded CPython 3.11 macOS 10.9+ x86-64

efel-5.6.28-cp310-cp310-win_amd64.whl (218.2 kB view details)

Uploaded CPython 3.10 Windows x86-64

efel-5.6.28-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.28-cp310-cp310-macosx_10_9_x86_64.whl (270.3 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

efel-5.6.28-cp39-cp39-win_amd64.whl (218.2 kB view details)

Uploaded CPython 3.9 Windows x86-64

efel-5.6.28-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.28-cp39-cp39-macosx_10_9_x86_64.whl (270.2 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

File details

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

File metadata

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

File hashes

Hashes for efel-5.6.28.tar.gz
Algorithm Hash digest
SHA256 c4488b15327cde33468d913708e36e544e73adf1d6a71dd8c0000669360d8052
MD5 bce8d3ff4c2216b113e6e74308d0ff65
BLAKE2b-256 4c3a57e15612ae90652b34746e0381007433b899e0c2f0883168a58edf3b7de2

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.6.28-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 218.2 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for efel-5.6.28-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 1565c02a02e8a5d8cf88dad9c6e9b23e94300d803727a2f4f630e2c7c5568554
MD5 f385ccc33e28af58eb36c72baedc6e48
BLAKE2b-256 3ad390bfed549bd302d71fa36e229ed4280e32ed628034b59911c514297fd8bb

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.28-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0761d3d1aee9bac98efcb974b2f68eaafc1d5ccd5cce35c8be5f4532c2d5ed49
MD5 aa0cfc1c278193e70c868b10b717614a
BLAKE2b-256 dbf746457235e3317127fee02008607fe01613d4c5b191a11e738526f9184e33

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.28-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 d43a38afa7c9c37d08f7a9f335f0cb4e86e43e1dc985202b4cf289db2a4aef20
MD5 ee0358e631650d5d9e3e62f5fd7bf15c
BLAKE2b-256 37633cc40ab2a9613739238b40586e1ed4b1c13f113c0ca5b62eb541d3b5526d

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.6.28-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 218.2 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for efel-5.6.28-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 5f78dff22396cb66ec89a5681b6a7a5e8df2e33c34b17c58bc12952a4c6f64ac
MD5 513bfaca5a58e1298b673b8784379241
BLAKE2b-256 cd58208c497f4bd97f04957bac94cbac2da454794c7737cb6b2477d9bfc5b656

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.28-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 88406acd8f174b60ae309e284fa6feeb202750504cce4d6a2fcf04766ddf5514
MD5 7129945d2bc1b4979922499feeca349c
BLAKE2b-256 f336fce4520419c7c8777ed3f91c7e81d66b45f410301caf3d7162c12638a845

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.28-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 793cdb0151fa00e2d75b0a4d959f28d67387f4240b6af63564b59a254307691c
MD5 64f1b7e4328c78453b7ea3fdfc1cb951
BLAKE2b-256 39fb360ad5b92d22db291c58b8e1b7a042186dbc0b879709855324e2b94fe48c

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.6.28-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 218.2 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for efel-5.6.28-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 aeebf5e44f619148bd49d7f1a48c345ad7c886f078ec9f512fde366971114f2f
MD5 a79265acac18424b4fa13f60c94e5166
BLAKE2b-256 33d9383391fa957e3ef259f5b5b596f40ac4ea78c8986762684fbfbfd4b17438

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.28-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7d0ded410d349f090e4761f8b0246e80b1cc951df857519fd7e7313760a45b63
MD5 44665d22f7b5f41f4d76289b900a1937
BLAKE2b-256 7cf0d8a87ddd2905654e1cc80260b598c1bcda6c3f430a689af6989665a1d728

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.28-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 dc311b1203a63983f67c7a44d752ba524ae0a944e72a3b067d7198bf3bf5a794
MD5 0628d94b9015de1ddfd7da19ade5f72b
BLAKE2b-256 808b9d29007754a8abf15d6b1b569dfc7671744278c08712d3fb884860ce0809

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.6.28-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 218.2 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for efel-5.6.28-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 b02666dbcf759b82e5c20e4155c7e993ac763d54446a2cd9029856b6e5745ba1
MD5 71db7d0fc5340a540fd701084af1b222
BLAKE2b-256 d60ccac2e1be1e908c8d6e6df0af57704bc90d57bce84f2458e6020e665c86b1

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.28-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4c0f6774c4fc7f70beb52a84c4e5b8e0deb2f2c17479b124445c507c40c9f452
MD5 a4d9dc58567bf61ac5dcf8909e7cc188
BLAKE2b-256 4323f96f5eb8a583f1351a0b29e84385d1e1094cb33e4b36966f8392df230cba

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.28-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 4bbf10f4dc9122972ff31c07efe9551070dddaa2a232b5da183f940e70ba6fca
MD5 c22f53e65da6ba7d5fe885ec0b88fc3a
BLAKE2b-256 25fc048b12a30ccaae7ba6e4ccfb8d705728e776bf62d8b5c760e512113e8bbc

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