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

Uploaded Source

Built Distributions

efel-5.6.2-cp312-cp312-win_amd64.whl (205.2 kB view details)

Uploaded CPython 3.12 Windows x86-64

efel-5.6.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.5 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

efel-5.6.2-cp312-cp312-macosx_10_9_x86_64.whl (248.1 kB view details)

Uploaded CPython 3.12 macOS 10.9+ x86-64

efel-5.6.2-cp311-cp311-win_amd64.whl (205.1 kB view details)

Uploaded CPython 3.11 Windows x86-64

efel-5.6.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.5 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

efel-5.6.2-cp311-cp311-macosx_10_9_x86_64.whl (248.0 kB view details)

Uploaded CPython 3.11 macOS 10.9+ x86-64

efel-5.6.2-cp310-cp310-win_amd64.whl (205.2 kB view details)

Uploaded CPython 3.10 Windows x86-64

efel-5.6.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.5 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

efel-5.6.2-cp310-cp310-macosx_10_9_x86_64.whl (248.0 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

efel-5.6.2-cp39-cp39-win_amd64.whl (205.1 kB view details)

Uploaded CPython 3.9 Windows x86-64

efel-5.6.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.5 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

efel-5.6.2-cp39-cp39-macosx_10_9_x86_64.whl (248.0 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

File details

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

File metadata

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

File hashes

Hashes for efel-5.6.2.tar.gz
Algorithm Hash digest
SHA256 26534c673595b1132d94edaa2e364343fcb71bdb119e3b5beb3e07ba19de6bc9
MD5 94074e557b09df21d5b7541eb274cdbd
BLAKE2b-256 f2560379971d1c327dac664ff3ffdf49aadbf4ee5e1e1dba3861484068405958

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.6.2-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 205.2 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.8

File hashes

Hashes for efel-5.6.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 5833ece0e3ec5918ae8108ee7bd4aabc63c40bd9a845cae87bc40e23e67fe13c
MD5 6023763b53e24fe1cd251c3ef6b9ea62
BLAKE2b-256 3625cd1989f49fa5029b542560111557b1a3eddfe695117ac9650e9bdf639fcb

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d5a21c14af6233cd6c9673e4ac158bdf8713ac37f2a24e8bc541c109b9bedc55
MD5 f3de86c932f3b91685b78579afb9d4b4
BLAKE2b-256 4697e97771cfbf3142b084407439e969d849505ba3e97d349d57c96ac0cc6708

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.2-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 b97b04335b61813ea14fffcddea23b75402ce80451beea825e1691117334eee8
MD5 76922a708e48f655c0f8200c98a9bba1
BLAKE2b-256 9f09f029205be207ba26f29b5f925b87530d823c7b21f9953c5305ee3dae12bd

See more details on using hashes here.

Provenance

File details

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

File metadata

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

File hashes

Hashes for efel-5.6.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 c853ca0f769a273849ff4a45d127a4d7343769183b9721e0521ec5e4a3399ee2
MD5 cf653840c764fb4bcba2234bd27b468b
BLAKE2b-256 d0d08421660fd9b0d931bb4a85559ff085bf636415aa4f45739c22cd325385e0

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d11847736337c66ff556b893342752aa31285bcdb12fbdcd4aadccdcea20b38d
MD5 8e2ccf6a7d22a4ae62b32c36e25ae6bb
BLAKE2b-256 33486fe0fd269638dd332055ab02ab84cfa6423070e7f84814aaac46c71a3c63

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.2-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 4eb708ab5f3b8123bd590dd646e59a914183e72805d64bfede6abfcad1c7a1d0
MD5 9cb5a8706eb5ebe9dd3031e67725ec78
BLAKE2b-256 0707fb6a755f382a0978e750e60ffe2cad124ed15a41734f59991302878d30ca

See more details on using hashes here.

Provenance

File details

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

File metadata

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

File hashes

Hashes for efel-5.6.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 2e8e9c6a5346de4e34d8191032167aa27fcc0b01d808bdac823be4ac51c91d72
MD5 9952f1ede4dea9eb4c51136fc7502ae6
BLAKE2b-256 87b258c6b2a8a6443f8310afb4be17dbd235a4f213cef56ed8a43be6a1d5564a

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 42ae139e7915fad321bd68a9c949b08cdf5bf9304f6a4b6de8c9a6b394b4d9c0
MD5 994e11feec7f89d0ed7904f6dd05f31b
BLAKE2b-256 f407419e8658d68b512d6a12b6a3439f419dfb02ae7e3b3372c580d15ea28b27

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.2-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 746b92d47182200c53fac3b7ed6fcf200fab2da6b706cec495910be8b046ea8c
MD5 de5005f2172e91c50e7b78ffe14506aa
BLAKE2b-256 fdb2fb7d7faffbc3757955dff7b875fe5edaf12d6cdad62af48e664452854790

See more details on using hashes here.

Provenance

File details

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

File metadata

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

File hashes

Hashes for efel-5.6.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 97405ebfd7f319f3ce0414603111ad7e8f9bd4735660669d1ea89fcd21c77b91
MD5 7e190b7ecaa6c0c585c407331c68318d
BLAKE2b-256 b761d46fd3602c702598302a8f079533e2d9c9cec048fab085840220323fef00

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 84ff0da81abb75e71c195f64edf2d77e019d16350e0ada59ce88c3d0aa8eb955
MD5 d54ee59ad5aac2214474ace9dc42c677
BLAKE2b-256 66711a7423c20899fbf83d27c1aed4b364d8dfbeb832b6859f6bce416742e68f

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.2-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 18e838ace89053c69a06a07a74d3093fbc61b30a685cf9518264be20efa2c4f1
MD5 142feb038abf2a03136f5176cf904fb4
BLAKE2b-256 ba84444f490c301140e2e71fcf4e2fd65eaa647e6b113c65e3d24129478e7c14

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