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

This version

5.6.6

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

Uploaded Source

Built Distributions

efel-5.6.6-cp312-cp312-win_amd64.whl (201.7 kB view details)

Uploaded CPython 3.12 Windows x86-64

efel-5.6.6-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.6-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.6-cp311-cp311-win_amd64.whl (201.7 kB view details)

Uploaded CPython 3.11 Windows x86-64

efel-5.6.6-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.6-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.6-cp310-cp310-win_amd64.whl (201.7 kB view details)

Uploaded CPython 3.10 Windows x86-64

efel-5.6.6-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.6-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.6-cp39-cp39-win_amd64.whl (201.7 kB view details)

Uploaded CPython 3.9 Windows x86-64

efel-5.6.6-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.6-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.6.tar.gz.

File metadata

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

File hashes

Hashes for efel-5.6.6.tar.gz
Algorithm Hash digest
SHA256 86d6429b286193671349fd63710b7c7111cfc026c84726cdfeb177b343d0a401
MD5 f4276a7e11c1f2ede9e0418ed465386c
BLAKE2b-256 b05a850af54a302e573931c5380e3c61941a55c7ad6971fafe3ab5c765eb7532

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.6.6-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 201.7 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for efel-5.6.6-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 2446909353832deeaabf8c8dd84406977b0acc5e890d539aba80b5658bfa7199
MD5 05ea0887ef783da65c8a01aa0eec8dda
BLAKE2b-256 132b5a1ffd27a5c7b1711ae38df7c195486393b578839dde9c13f1026f6d8c67

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 020230be4384020457958677c07bba3c4e26a59c53b4af0cea15794e46e85569
MD5 a158ad3cbe60656605cf415119dbfb1c
BLAKE2b-256 b1fba6ed7fa585d869cb8e9bc8ad431e32761d7531550478430a93bc1f0a96bc

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.6-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 f0d85b6327e350ca8c025aed8da9ca08c2edcdcb3ed008ef5445e7cd77d04044
MD5 f32034bb8ab39e7477338e8f9a3565a3
BLAKE2b-256 62081f81bbd3d476b2128b72eae3d6a0ca0370958e4bf771894c55790154ff1a

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.6.6-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 201.7 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for efel-5.6.6-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 617adf2184933888812a2c7da78666a87f24becda81800392d1aabd347873936
MD5 ff235058626efb60a13b428ea39b6ca0
BLAKE2b-256 eb87ed0e1e121b64764669769cbe4f6533895e3156b780ebc48ec15080e25c89

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e02e98c17108734b9e707e5b2896538824002fa2bc74da8138a97da0f51f2e45
MD5 a3a753104410a4a5c901164ef363b2e6
BLAKE2b-256 dfaad25dfdac80b6da186796f7f588d5db49f18cb7e97dfa537f185114ccfe25

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.6-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 2b50bbdfd26ba69343aefcb1e31e60c9478b1e05b985ca418c9a1abc3f20da95
MD5 f8f1ce2dba3cec6f049a14e66958e7bd
BLAKE2b-256 7dd9b1fcc4c9b4a7d23e4636fe2e78205551089437e587b58b93e7ae6f8fcec3

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.6.6-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 201.7 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for efel-5.6.6-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 f8b0f31b5237b0ebcb66b1c310009c8de80df95478677f3b48305dc4dbde2e0a
MD5 747673d5300f188202cd08fcbc1222f2
BLAKE2b-256 fba7cd90aac38efa9514bd203faa4fb607262faf5d7eae807e5621c226c8a822

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3539d4dad28615eeb1089da0227b898b3cc3143e0f72d88f1434017119cdf65f
MD5 cb02ee80ad4e2641e97c51a09eb9f7e4
BLAKE2b-256 14bf4061d8c9efc8dc27a4fdba0d261c621684cdfbe2d2766b4aff1584042b01

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.6-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 5249003b36f48f4e61005e2a908e645232bde88a53477b6dbb49bbd17e7c024e
MD5 ed2c8cf00c41984c76097441cd6c9649
BLAKE2b-256 f5462865aae71919dc775ea7267045667cfc2952ff876315ae6c2df4858676fe

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.6.6-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 201.7 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for efel-5.6.6-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 f6d4eb4766e3ccc9bc0ea687ae99b0af5f9d940c3a76ba711d087aaa9a43a0b8
MD5 e424952ba632c51441990fc9b44a3ca4
BLAKE2b-256 dc8d5db03769a35ec676914359c3e04602e89fe0151ca8a39c9bbf3cd5e946a7

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.6-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 362c4e212057a08101715025128b2b08ae01cc4302c1b56f2b441b6e67d60421
MD5 13262b4b066c6c07f464521546e95c26
BLAKE2b-256 781ceccadaa24d7b97717136cdc3b573604fa82c6ed721e646021cd38c1120f8

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.6-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 91b744b3b84519b3df9f116d90f7454a977db213986f6175cf156915c7a6c5d5
MD5 ea2bcfa126df197aada5b5db3a33fec2
BLAKE2b-256 bbdb04d09692ed839790259f71111f77c42e00fbb958069021fd295b5eb8ccf3

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