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

Uploaded Source

Built Distributions

efel-5.6.20-cp312-cp312-win_amd64.whl (213.3 kB view details)

Uploaded CPython 3.12 Windows x86-64

efel-5.6.20-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.6 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

efel-5.6.20-cp312-cp312-macosx_10_9_x86_64.whl (265.9 kB view details)

Uploaded CPython 3.12 macOS 10.9+ x86-64

efel-5.6.20-cp311-cp311-win_amd64.whl (213.3 kB view details)

Uploaded CPython 3.11 Windows x86-64

efel-5.6.20-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.6 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

efel-5.6.20-cp311-cp311-macosx_10_9_x86_64.whl (265.8 kB view details)

Uploaded CPython 3.11 macOS 10.9+ x86-64

efel-5.6.20-cp310-cp310-win_amd64.whl (213.3 kB view details)

Uploaded CPython 3.10 Windows x86-64

efel-5.6.20-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.6 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

efel-5.6.20-cp310-cp310-macosx_10_9_x86_64.whl (265.8 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

efel-5.6.20-cp39-cp39-win_amd64.whl (213.3 kB view details)

Uploaded CPython 3.9 Windows x86-64

efel-5.6.20-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.6 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

efel-5.6.20-cp39-cp39-macosx_10_9_x86_64.whl (265.8 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: efel-5.6.20.tar.gz
  • Upload date:
  • Size: 103.0 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.20.tar.gz
Algorithm Hash digest
SHA256 b3a1e92189810abf7c644a8f4ddf70327e214525df29159f7b31f688364b08b5
MD5 bc4810e2a4f4dfb12287dc3a504c9e40
BLAKE2b-256 7f8ec4daa4b4696a6a845313e2e0faaf3aa8843145d6040b7e326cd9d480a639

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.6.20-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 213.3 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.20-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 09605a73f248fb380a9fb8044f2b50c6efc674a87d4f5141c60d17dfecee9754
MD5 c0b830610cbddaf4f5ac98cf448c58ba
BLAKE2b-256 e69a400e4cdaae1a36cf6e580cd3daf87c5bb10615eabd2e8537fde4e28fa982

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.20-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bbfe002b9e0ae0840a947e2bd54208140562782c62decec7718038a3aea6e6d2
MD5 fab6b4eeaa63fb6f572deadb7ff9a67f
BLAKE2b-256 f7e6e97c3c943d0079f2e83345a8b1e007eaab09dc9b4391bf3e699b19a03c40

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.20-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 ce48aa95512666d1dc917ad5c39716e9f5e8b16c68665418a8defcb9959c42dc
MD5 9d6db2e79f9ca3a982c077090481b9ef
BLAKE2b-256 731f419bdd93c4f81959580eaaff60a1aca53cdbb097e1ab5b302aff6735715e

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.6.20-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 213.3 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.20-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 0840197a939dbf1540ad3562dc1f1ae3d7b3bd25831d3a322c979228d0fd0df8
MD5 df08e70ff9abd30834972dbb8d2d632c
BLAKE2b-256 855e2f72929d6c9799ba41ef3f9cd5f323006a11174402747b9c7c4b94137d2c

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.20-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 dc0822ec27f3161bdea144c5ab4f475b12d8260116713f5fdebbbb14edc2b5f8
MD5 fbea30c277c156412e6505cb014d23ca
BLAKE2b-256 a1f02224ed2f3a83982b55e5fa3113d6b9427d988c51f06c969e8f92127d54ee

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.20-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 5534d75b6b6638d9aeaa35b965581641de5c5fb2c8b476503f4a60ca048115a2
MD5 57f99e7779656338f8c7537f19909682
BLAKE2b-256 03c5e7ab3411bb40279ac4bb15e9ab6739ded78f0b3c72c4d47d8ebf50806265

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.6.20-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 213.3 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.20-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 697a091ec00c969ba5e6288a147ea63ba92b8760628dbee532e1857cc6e9f327
MD5 2479405a41e37ce5918af7dd4fd27735
BLAKE2b-256 e1a9e3faee07664286b4840c97ebfc38ba8eee8800f5a0388be5659f20f84911

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.20-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ab09c6fbf146ed40b71245646b05b8515c34b8cd3cb249aeba761c14a2b2e04d
MD5 171ca70db05d55d394266fc67c6d6bde
BLAKE2b-256 db6437160ab277a293ce9df7b985f3099a1072f230f1e7656ef3add0d7d51a1c

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.20-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 81ef197f4d6bcbbd6d947beaa1940af758b8c67ddbe8813beb77ae0dcb146319
MD5 b2f7b42b7735731277ad752ccfe879f0
BLAKE2b-256 d9a559d8ac6bc2184ec76e46f0556fd5771e18d81ede682042a9fb6b0269c6cb

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.6.20-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 213.3 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.20-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 e9550376f76c742b9bacbfd8862ee840b0e49acf8b02278165f8b04962f21beb
MD5 60481c64489854dc412e771034de154e
BLAKE2b-256 e6b4a8cd76ab9c4dce525fffb04967e0519241f6057f76eb1207014031c82d26

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.20-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 fe1991a947be11c65097eb82289e077310305ab7327936a14954288e94d071c1
MD5 2ade4cb3878ab51e6b274e9f6eb7d69c
BLAKE2b-256 ab2759a5410cf8f424c8834cad904fc62f4c78b3d5ea5546f47bf373f0d09cd4

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.20-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 eeee79de459f632c67f937ca37193a6a5267cf74cd28209bb266a6e416eb4a9e
MD5 4efbcd8e3ba1f22d5200654a031aa711
BLAKE2b-256 44281d2f8ad35c16448ad0ff5277d92810cea63549ebef57c70d66cb3dd2e612

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