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.8+
  • 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.getFeatureNames()

The python function to extract features is getFeatureValues(...). 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]

    # Now we pass 'traces' to the efel and ask it to calculate the feature
    # values
    traces_results = efel.getFeatureValues(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.2.10.tar.gz (110.0 kB view details)

Uploaded Source

Built Distributions

efel-5.2.10-cp311-cp311-win_amd64.whl (190.9 kB view details)

Uploaded CPython 3.11 Windows x86-64

efel-5.2.10-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.8 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

efel-5.2.10-cp311-cp311-macosx_10_9_x86_64.whl (234.8 kB view details)

Uploaded CPython 3.11 macOS 10.9+ x86-64

efel-5.2.10-cp310-cp310-win_amd64.whl (190.9 kB view details)

Uploaded CPython 3.10 Windows x86-64

efel-5.2.10-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.8 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

efel-5.2.10-cp310-cp310-macosx_10_9_x86_64.whl (234.8 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

efel-5.2.10-cp39-cp39-win_amd64.whl (190.9 kB view details)

Uploaded CPython 3.9 Windows x86-64

efel-5.2.10-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.8 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

efel-5.2.10-cp39-cp39-macosx_10_9_x86_64.whl (234.8 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

efel-5.2.10-cp38-cp38-win_amd64.whl (190.9 kB view details)

Uploaded CPython 3.8 Windows x86-64

efel-5.2.10-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.8 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

efel-5.2.10-cp38-cp38-macosx_10_9_x86_64.whl (234.8 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: efel-5.2.10.tar.gz
  • Upload date:
  • Size: 110.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for efel-5.2.10.tar.gz
Algorithm Hash digest
SHA256 aca7e0edf245197b9acb9ac56dfe5b4c2801b632843cffe6b2013b899a6f12fe
MD5 2af969a3e23b6945f793cb1627bd25e2
BLAKE2b-256 6ff48d3e5b9e479e23c86b157f2b39be45d3bffecedf9bd623a1524c3145ca11

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.2.10-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 190.9 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for efel-5.2.10-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 2f4270f57f209778ba4ee5175a585d5d03d1211e4dd497ca591079548d4b4e89
MD5 da0562a862b6e1e35dad8c4a7a0016dd
BLAKE2b-256 0b26774bddb16c4915f2c6791cad7c5dc2f6b41b7957ce7ae9839666825e74d7

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.2.10-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 00bd0ad1e224b235deeb55ce6fe9c9ee0c837c64db5b095db791404545634730
MD5 297680b80072e7f1667dbf7907ebabf1
BLAKE2b-256 87963b94d4bd91b2ba34ff82cacb4121e7f4dde447ae6930bdfa82055cdb6dc7

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.2.10-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 05211d9e71c5ae7b42835f6067a576f84ea39da4c05717d633fd7b1dc7e43379
MD5 4e7ebccc511491cb5eb8de5b9fe64938
BLAKE2b-256 1bd208ad31a3ee418bb5317b0cdca89cf78c132723679b60abadc0b62c307968

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.2.10-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 190.9 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for efel-5.2.10-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 619b67393f736259e93e4f9ed88b3958418f82ad6de35e3a79eb76f513586a48
MD5 869e9e0e73679c2083e47f50d1f6f923
BLAKE2b-256 8aad6f517e31985d5abe0fea6f518ecaee91f617ff4c335037c497195a861710

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.2.10-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b3e242c84f8a088f3af31f91ef2089055e6ca2160b9c157ac149dadc97e2e1ee
MD5 1185e2854eac43f9f9304eb807bbd70d
BLAKE2b-256 161b695e2688606382f25b2a2fbd7e11dc44f2b01bd74b1d7d4164efd62abb44

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.2.10-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 e792f95197d943236339886d9153e78b5bf0165d95489934d7ef73bfd6591d0b
MD5 9173547f6a6f2f55288d010bc751377b
BLAKE2b-256 24073c22e5a88dff313827ce0b8c3622d2f3168cd7703e6c05cf005a2fa81ed9

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.2.10-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 190.9 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for efel-5.2.10-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 ddfc528a7f89289b5ae1f09dadcafa3aab4a4e082002295f2a3b17551009f2cc
MD5 3f1da9211aba6fd0ae669a4ce5802954
BLAKE2b-256 6cad106005927d41a4a3f568f4fab9123c2d434c8ce4c33028ed7d14aca0cd26

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.2.10-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6e7675e4d0deb67154806dab717bdda285e586c1a07f81fe80318be2d437ccde
MD5 ac1e4a739a8ae8a3af77b84eda917637
BLAKE2b-256 2a299d945eb48609aea47f728d719044fb4b3753a851b10870515d34391a5e0a

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.2.10-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 17417d56873a54e6c7f715680757cf80f21c46dda8fb9808ca35c04517e5733c
MD5 eca8f2161d8cc9ba2d89cb295316f402
BLAKE2b-256 685e99f75a676c3da6665c918a729a0ba598d12c0c8adcb8c82f3d4f131e6a8a

See more details on using hashes here.

Provenance

File details

Details for the file efel-5.2.10-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: efel-5.2.10-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 190.9 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for efel-5.2.10-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 6bbcd0dbe7a758db79abed6385ed6f4c6a5360695638eb8a54718bb9348423d0
MD5 93dfa90ffb6c2b95394a8ce36a09b6ea
BLAKE2b-256 741509459199a8e9b3944d6fb2520ae7e0d55df2b232a9d6021e4e38717a6bba

See more details on using hashes here.

Provenance

File details

Details for the file efel-5.2.10-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for efel-5.2.10-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5828a85d96e4170a599f0b38ba4a8a33fe83ed319e143ce4701451394d44dd1a
MD5 f5e48241f7b655067c44f621cab278c5
BLAKE2b-256 7e737990d76c11ee41f6ef33ad1cd08817709ba25f544b1dd6d313631bfa4170

See more details on using hashes here.

Provenance

File details

Details for the file efel-5.2.10-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for efel-5.2.10-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 2dec163d5b0060635c541d2e4a4828ce20bc6ddab9632842b0ea22c3e8a1f8ac
MD5 bc96aced943850ea5815e02e1637a1af
BLAKE2b-256 cbb7fb4d161193e2571ab586d8aa40c61edc59d8aa588f58175fcdcee50fff09

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