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()

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]

    # 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.16.tar.gz (102.4 kB view details)

Uploaded Source

Built Distributions

efel-5.6.16-cp312-cp312-win_amd64.whl (211.4 kB view details)

Uploaded CPython 3.12 Windows x86-64

efel-5.6.16-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.7 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

efel-5.6.16-cp312-cp312-macosx_10_9_x86_64.whl (263.6 kB view details)

Uploaded CPython 3.12 macOS 10.9+ x86-64

efel-5.6.16-cp311-cp311-win_amd64.whl (211.4 kB view details)

Uploaded CPython 3.11 Windows x86-64

efel-5.6.16-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.7 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

efel-5.6.16-cp311-cp311-macosx_10_9_x86_64.whl (263.6 kB view details)

Uploaded CPython 3.11 macOS 10.9+ x86-64

efel-5.6.16-cp310-cp310-win_amd64.whl (211.4 kB view details)

Uploaded CPython 3.10 Windows x86-64

efel-5.6.16-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.7 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

efel-5.6.16-cp310-cp310-macosx_10_9_x86_64.whl (263.6 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

efel-5.6.16-cp39-cp39-win_amd64.whl (211.4 kB view details)

Uploaded CPython 3.9 Windows x86-64

efel-5.6.16-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.7 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

efel-5.6.16-cp39-cp39-macosx_10_9_x86_64.whl (263.6 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: efel-5.6.16.tar.gz
  • Upload date:
  • Size: 102.4 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.16.tar.gz
Algorithm Hash digest
SHA256 3e51e897a8513757732ad9d8d9bbaadf9285674f7407fa4a6f4310534773c06e
MD5 8a58deca2bd80f549af4376e801dcb60
BLAKE2b-256 7efef456e56a2f8553b39317742d10a9f70f1cd9f020b835b7000b3dc70f68a5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: efel-5.6.16-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 211.4 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.16-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 7418b6aef8b684ada358bcfb417e14a615961a9a4a90e9dee13eebcb2a8fbd1e
MD5 ea22cb7dfa7268ca00275a501bcec373
BLAKE2b-256 26ea638820844cba85a0790cc3474c43b9a5867c891292aa0c7e43c0647b80a2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.6.16-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d54cc8242194fc820203024d8d963fdf5cc165ba169d9de1cd166f22b2c242d7
MD5 4fb976a367590f117ecb78cf35e1977a
BLAKE2b-256 50d4ee09a3d6b9ff0be7f0fc46020f8abd5863eb0cb61f55e4bf5ab0bacd907b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.6.16-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 e59bb347b0abc8486c971da84ef8e3b3cbafaca586e4f0966ae88f87f973000a
MD5 35648de4b41d02b9c4e5275226e1e94d
BLAKE2b-256 8d64932d361ec9f5fa384c0a1fd09558825524d6971ddf1944bc859cfbba7c54

See more details on using hashes here.

File details

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

File metadata

  • Download URL: efel-5.6.16-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 211.4 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.16-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 486d56a0f812bcdf20038a8801df34026682e618ced6d9e877765c851164e7ff
MD5 a5ebe7abad246e6d0aaae4d1b7e5ba6d
BLAKE2b-256 bd8e402b3a2e566242a78b6e15320267fd0ba8c6b0121a6392383704b78ef3a1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.6.16-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1eefca203b6ccba213fa1021b6c75b3634efb0579a5c70c7fd2df3c6061e314a
MD5 0b8872f8d576236f4087594b41a9eca8
BLAKE2b-256 81c5a112bb7f68ad04f29b883771892b746af906e2101b8655c6b598254727e2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.6.16-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 bee57e3f304966edafd1ffeca2b5cc8af5ac3551b668994b5dfd8e8dbb5ce1ec
MD5 30f677c8737af820f440a581044f5c05
BLAKE2b-256 8a095b673ade999de3cc09c0031a42cc64166056ce833e5387181b8bda0062c0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: efel-5.6.16-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 211.4 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.16-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 2fd168859b8d406fc08f89b49944eef192aaddc42379eb8bbbacd287c1a9363e
MD5 3e433628eefe26647c75c1f2a9110d5f
BLAKE2b-256 e0f4fbe10cbd2a8d6ddee374fda4be272b351850d5e482724402932821c68327

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.6.16-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bee1c9d04cbe727aa4e74ddc3c5bef8eeeeff723e1df63ce5f6068b42e694f06
MD5 825ddfff5fbdbab75a828212fd189703
BLAKE2b-256 a62d485b48b36110517a55fa8b2e1b2b2ef6e6533b18b1b22d58124003cd0394

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.6.16-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 843e992f0ce14b5c05a35e5b9244b193d8aac33e38d63aa9bee97f1455a49fda
MD5 c87f9cf717e3771b00ce78799be9f84b
BLAKE2b-256 e42aebee3543087ed3b06ca774e1c89c7cece7516acc83bcf51b21c92abe3748

See more details on using hashes here.

File details

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

File metadata

  • Download URL: efel-5.6.16-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 211.4 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.16-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 7c22c5cabfd8b0a9c25d21f036cd1de5741194e00339f0770276001f0793c4ee
MD5 5282c6822a2d7e29bac5bc8d799b785e
BLAKE2b-256 24f6bf64e2331ef8b63a6d62ecee9164a8f95d59df170da0d2e8a90106f6ed96

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.6.16-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 35cd9ea5675aa7b1aa6c85c4a4fc29a03da64b6be3c0cffa7f96e40f28da8e72
MD5 e3ae6a183cb960c4dc2b23f98138b97c
BLAKE2b-256 5b0549a6d8fc6e93634d2ad6502f6e91d67cf1d5f8d4439919bd8d2211268326

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.6.16-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 414bed0c24ed35f902a418200fa63e67f1a8b64d8cb63986dc766eec803792eb
MD5 9795297a45bd1538759351ca469ea768
BLAKE2b-256 3159b7e3f44d9efdf9586ff81dacbdc3e57b168fc6c844d3c2c54be6ae068db3

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