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

Uploaded Source

Built Distributions

efel-5.3.1-cp311-cp311-win_amd64.whl (190.2 kB view details)

Uploaded CPython 3.11 Windows x86-64

efel-5.3.1-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.3.1-cp311-cp311-macosx_10_9_x86_64.whl (234.1 kB view details)

Uploaded CPython 3.11 macOS 10.9+ x86-64

efel-5.3.1-cp310-cp310-win_amd64.whl (190.2 kB view details)

Uploaded CPython 3.10 Windows x86-64

efel-5.3.1-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.3.1-cp310-cp310-macosx_10_9_x86_64.whl (234.1 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

efel-5.3.1-cp39-cp39-win_amd64.whl (190.2 kB view details)

Uploaded CPython 3.9 Windows x86-64

efel-5.3.1-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.3.1-cp39-cp39-macosx_10_9_x86_64.whl (234.1 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

efel-5.3.1-cp38-cp38-win_amd64.whl (190.2 kB view details)

Uploaded CPython 3.8 Windows x86-64

efel-5.3.1-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.3.1-cp38-cp38-macosx_10_9_x86_64.whl (234.1 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

File details

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

File metadata

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

File hashes

Hashes for efel-5.3.1.tar.gz
Algorithm Hash digest
SHA256 ec65563ef1333b084dc3fb0500fd2b506a36ed3adb23022182c2a47c368806b7
MD5 b640c3bcf746cc7460544875134b62d3
BLAKE2b-256 7ed927d05e9b17faa97563c93cb4e0b3c623568003d8e38e9e3fbd446c09460d

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.3.1-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 190.2 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.3.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 70421ec6a48329084dd1dc760f2d724887f5b9c8d548660b027f3aed743fda28
MD5 ecf1b342227438d99b9f7fdd841fd401
BLAKE2b-256 47b1b31bad0b0c8982feaaf71caf08b646b8135b0ccea463eafefa578ec4afac

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.3.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 632a7b517cbfed14b25630f07b32dc3ac0c8087a57650ab3611f82f8c9c9413a
MD5 93cfad56f65caf31a8394d9cfa6837c3
BLAKE2b-256 d9d470d4b243f793fca7334d835d4a2652aed0aecfac01734fc89a5923f8acfe

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.3.1-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 340c4ef37a45c589ebbf219efb1912e72f471441c4417efe4de795bef4e52e5c
MD5 a5f67ee24f0812239925630d4328c09b
BLAKE2b-256 a58ae017e0f2f8a752b82f21b72bbd47d5b20d878cff848467bd697f271ccd04

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.3.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 190.2 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.3.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 a87e1786820d6e96b26e65e6a5bb4e4d8d20b2fcf5b8499c5846a8c5c378b878
MD5 bc178c4d8143b9ab7257be1e563f2650
BLAKE2b-256 fb20472c0dcea9404185fd2c7cd7d57f4523278072770453e522cec2ef750562

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.3.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 fa2e533c245a98487663dab7599721e45cf2905e78f79d75a56faffcbb54e448
MD5 9208ab93759e1ceebeb235d240264ab4
BLAKE2b-256 9af40758312d0913bdafce2f502f9f9cc858007a5a69568371a028700b43671d

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.3.1-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 8f05ee3fa55bcb535bbb1c5598a671da43bd6b0c2fbea857ed6c33fd6cc9dcb8
MD5 a81a4ad3eb559abacdca603c22e5bae2
BLAKE2b-256 d311b320566c6ec8af4906b84a2b4474f105b366930ba53a6f6014d502bfc6dc

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.3.1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 190.2 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.3.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 6f1830452be29f920a4de0e4900e86f4ecc37bac111cd37b421c84101da9bf0e
MD5 d2d2f6a722841609f9a4d9d7091c1e75
BLAKE2b-256 4a224f5be7c45d9608692040e0f38e04042fc1504e959de772de264525b73011

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.3.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1b486bbbabfdc97a902dd2c5214234a553f647b2abba34ef586af80a2f6401f2
MD5 160ccd6895d57c3baed95f1128753831
BLAKE2b-256 c887cd7cea96f063d62cd6fb0e5d3d3fd9ef1040056f3156eda0638750378015

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.3.1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 2ee7a08f610aeff3e7b67bfe565853fbc58cd22e84b85fc5ffd8bbb4e8c71a7f
MD5 43973202494bc98c457b6e8d485eadcb
BLAKE2b-256 ccbaad01171227af6767efe50aada79e855eae9fb55b0ae76779f0b3f48f3f93

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.3.1-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 190.2 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.3.1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 3f75151e8f7154731dfa227547180ad72c9b2d6c1f41f6da674535f90d46c905
MD5 4ac66c100639f1c440396e07b7c349db
BLAKE2b-256 624c0040524b47395a1077e7774ec45d032c5a2de22b90ef32cae39904ca060b

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.3.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1d20c02634b6a12e7a65283e0782a82ff0e8f3f6c04c898f5f5ae217bdb3476f
MD5 da8f49e3f6e2c80db46c331eac12f53f
BLAKE2b-256 6214909c009f74502683368d35409abfb22d11775556aff5ac1790e06fad76a7

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.3.1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 97b34b91e3aa42b20ff8724e5ea97a867633b67abf0919834dfa9d7ee94180cd
MD5 8c679005b11f359340764d6182b3e1f0
BLAKE2b-256 8e31461aac27ac3bdd61e3e4b9e4a510eb54b06e113241d626afed93b3874c33

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