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

Uploaded Source

Built Distributions

efel-5.6.11-cp312-cp312-win_amd64.whl (201.8 kB view details)

Uploaded CPython 3.12 Windows x86-64

efel-5.6.11-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.11-cp312-cp312-macosx_10_9_x86_64.whl (248.3 kB view details)

Uploaded CPython 3.12 macOS 10.9+ x86-64

efel-5.6.11-cp311-cp311-win_amd64.whl (201.8 kB view details)

Uploaded CPython 3.11 Windows x86-64

efel-5.6.11-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.11-cp311-cp311-macosx_10_9_x86_64.whl (248.2 kB view details)

Uploaded CPython 3.11 macOS 10.9+ x86-64

efel-5.6.11-cp310-cp310-win_amd64.whl (201.8 kB view details)

Uploaded CPython 3.10 Windows x86-64

efel-5.6.11-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.11-cp310-cp310-macosx_10_9_x86_64.whl (248.2 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

efel-5.6.11-cp39-cp39-win_amd64.whl (201.8 kB view details)

Uploaded CPython 3.9 Windows x86-64

efel-5.6.11-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.11-cp39-cp39-macosx_10_9_x86_64.whl (248.1 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: efel-5.6.11.tar.gz
  • Upload date:
  • Size: 99.6 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.11.tar.gz
Algorithm Hash digest
SHA256 7ba2e0caf4af27367ebd00ac23bbe1b5e0e199349f2aab7c28b24c5a5715981f
MD5 1337f340fa4c594c84cec2048768975e
BLAKE2b-256 96984dd6cb53165f03d39999362f5859599392af52075ad1c61c25f61cd62632

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.6.11-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 201.8 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.11-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 b4d97d85d9c3d662c22812cb3ffeafbf12bd1ba9f9bd0690e158a6f5b608ecc8
MD5 eac9e15ebd21b0025f45cb0834ef4ad2
BLAKE2b-256 84593e9dc01f1c75a1a47c55c938f76ef250b474bd1b5144379776276b12ac48

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.11-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 cd3adc9c9e5da50b4f9cdbc36ed7969f53bd85bbdb84d09106ae0df27752434c
MD5 e218a1a9647345c359054ae085922811
BLAKE2b-256 cca2342a2280b82f93c23e2ce6c7f87ddfbd1ea8666c6e007a4a28aa81a77bbd

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.11-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 59eab01bb86133a8db044bc8f4e1b29d94001a7059178c72512d1ac658a234a2
MD5 12c28fcf7d95fcb84c9a68ca0ff7f3c8
BLAKE2b-256 ccf7b405a56f37f26129c455ce667f70ae35a9164d30416abe92a5a74e5da01a

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.6.11-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 201.8 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.11-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 b4ebb2e6339a19c335a15dcf40f7775364d1771d01723bcc8148550dcd7ee345
MD5 04f06c759ad70c17a687399e65192050
BLAKE2b-256 e7244f12ca9e6167f89cd8c116a892453e2613e4838d7d58dd35091c2bab5136

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.11-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 55ab28227a4e90603728a841fde7540ef38944626fe64f48caa6d038896f69e3
MD5 334947c69d36eafd2843aa1d6e6b0c1e
BLAKE2b-256 b40cae686cde185e98a209deb23ada6964ac4ff1140c4bd2d50206abf806de25

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.11-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 241405ec6a7ed6e620646e2b772e8ede4d8d65c123b2ddaba15751271a1d4264
MD5 87bdcf01914bc918557a09d2fe474172
BLAKE2b-256 559c3d58ea89648aeb1604b16d273824afa28645497e90aec158fc98aa0827de

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.6.11-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 201.8 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.11-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 bb2bda804ab71c83cece78f8fc808ccaa0c9440cd147b1a8bc5ba67a27568e08
MD5 47c558e9929f872d47a7adbda6626d65
BLAKE2b-256 c64f4a7ad5c0ca66a32ebbeeea995f9d1532a167431346b83c20dcff7e39e897

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.11-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9dfd44a2152e21ead6d9f8d8e3d65283908346a378089e5c9d1c104acaa7ce0a
MD5 4965f6bb6fd3931381d0476683f84c53
BLAKE2b-256 5bb47bff3cc5f2866a17637196f680edd176d1d47f8879b5a0fe46c85ac46f1e

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.11-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 657f8fb211c439fae884b8582f6d96897b1c9c31f446ff8a6d0ad34809a81fa8
MD5 afafb994aa00691f7f776767fb275acf
BLAKE2b-256 7380c52785c0ee7f1dcbe6aa928793a2122b44188dcf982261790d22fa81274f

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.6.11-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 201.8 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.11-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 eb1b76413608f6d07972eec67ef4e6c7e4de41dc6d3e39a804e334f46b53375a
MD5 62571fb2767e19fd96b8534571763f91
BLAKE2b-256 600769b1bf64590599f290b9eefd556f64b0079543291e97f87cb46d57fe9c89

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.11-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 77d9a246c7be7ccb2c2aad70de259ab0922e38420d9497d877a17c586f8ce592
MD5 c1c405578be556c9540d18506818a533
BLAKE2b-256 dd3d693d1a579335989a7efabba662fb2699a45ccfa81f4d0e7359b9fae95de8

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.11-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 249d687856935cae93eca448e05ca164b468ac81f36c3fe03943b042f9ff0e41
MD5 f546683e569ea376c0173ffb8c44449c
BLAKE2b-256 504b238e66dec30bcc4c190d9b73674b1fa6b090a7e7494a46f80508f57dfc47

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