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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.11 Windows x86-64

efel-5.3.0-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.0-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.0-cp310-cp310-win_amd64.whl (190.2 kB view details)

Uploaded CPython 3.10 Windows x86-64

efel-5.3.0-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.0-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.0-cp39-cp39-win_amd64.whl (190.2 kB view details)

Uploaded CPython 3.9 Windows x86-64

efel-5.3.0-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.0-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.0-cp38-cp38-win_amd64.whl (190.2 kB view details)

Uploaded CPython 3.8 Windows x86-64

efel-5.3.0-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.0-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.0.tar.gz.

File metadata

  • Download URL: efel-5.3.0.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.0.tar.gz
Algorithm Hash digest
SHA256 7995faea881a669542d69dc926c460f56a3b569d627dda43879598fa3f0277f8
MD5 5d46f94c7bc2ad8ef363e13279fce076
BLAKE2b-256 30559d15556bbbac502a2f06e6f70d1d90cc2274d7977fbd7142119f8274299f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: efel-5.3.0-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.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 a22c0718f024bc1c1b14588b85ffa52cd5fd13cf466f41555ab17cc8329e1934
MD5 305b99b879609d79cc83d73660e8a7c6
BLAKE2b-256 584f056214f6484b77d0a9311d1b4b90056bb4ec4f97a9d5793f894d10fc5ce3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 03b9c25ce8ef45ae6a2d82f8d104a13a264edfa4319a23c7a92256e03da13e1a
MD5 cbe7c4f4abf3c5be8da01891669e3fe1
BLAKE2b-256 e2cbcb28c8c9165a293e80dba2bbda266005d7cdbb343e5fd7b0817bd077d2e7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.3.0-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 2a0bfcd47994314c4bd934a3b064a0a9643cec41b2fe9c2c38b5acc76846ea9b
MD5 7613c0a6d95de055cd06029dc565ec7a
BLAKE2b-256 1daba692d58ef14e5dd42d9bdbcd26ee4fb759bf369a0e98c7973e57a4a689c9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: efel-5.3.0-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.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 bd5434855d4fed2a9dcbc0739d97c7c0e9a9a10ef655f6f8984bd3901e21eee8
MD5 b3de1effd88d5043c9dc2d11ebc1869c
BLAKE2b-256 5cc45b71a2324522e34d9b96ca882fe8ba2ff2a1ee54a9d7b3ed56cce7c1f2b3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0f197e532658a9bb9000d110ec11a8e8b30dce59854db4e7a36accc6bda0ff80
MD5 0df046b978ff9e906d6ae1ccfb7ed258
BLAKE2b-256 ac5eba9d2ffc3c8aa69d077601cb414f689c1c43f96867beaf6b5583061f09fb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.3.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 773378f109c1cfd2eeafe32a7cc3c895d994efc259541765bea95a5a74e0c55c
MD5 9e6f0c635e27206dbdd5a776ca12ad02
BLAKE2b-256 4d27cdd1b01ba9476b14ab0440e2b1188b6cb11fad7c3fb9c830e1f81a1a6a0f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: efel-5.3.0-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.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 ed58481cac5e6431c57a6d49bc5639d4fcb4f88be651d9c47c4a6cae00ac9307
MD5 48535f81d4333173bd3299169faefec7
BLAKE2b-256 2d0bb856a897f7a26a9f325510112dbc2505cae38752c8b6b3f0ace2a3411808

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5dfa6acead1f4c5fb18edddcabdb1c0229fdeea245855774fb9c755b1cb95541
MD5 9fe2983a49c9a0df9b6bbe060a1f3b7b
BLAKE2b-256 f1fd22df4731d96d32529936a78341969da2da25ab6d80fd656380774407d3e0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.3.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 36705e9f48b5d776aaa0f646ac0c9fc4d5fd7878617bdc5568241167212be4c3
MD5 34f9539352b33f29c6559a6fbe90c61a
BLAKE2b-256 7c5cf6b2025c8bcb54bf489083adf1ab4496021896036a41d44f7178df1df310

See more details on using hashes here.

File details

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

File metadata

  • Download URL: efel-5.3.0-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.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 f57e1f8592acd02348faa12c20b6b2ea49e3e54982938a5aa329a242d3075581
MD5 d2f6e12f9c03a4722dab31070c95e7e8
BLAKE2b-256 303dbd8dd18de8f50399fd8359309c5ebdbd5ce60cc3bee02f50bc94f921504b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9195565a6bba2513c8bc2450847da4a849c8e3fe442b8a9f652cd4b7fb236bbf
MD5 3af315872e629c30fdb1107e673e3b1c
BLAKE2b-256 241bc625a29a306c9327ad49e29515d302e5360a026d1bf0b0409b2f25234d38

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.3.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 4e2ab62e1efd488d0902b70648cdf04156f5e1e7afad52ab0d987db1a86c6b28
MD5 1153c774f059a300b56522fa30ea1893
BLAKE2b-256 e81cc7fc58d7d002277f87ec2ca6d2b642e6a2be9aa676d31a2abfa48cc5c952

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