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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.12 Windows x86-64

efel-5.6.22-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.22-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.22-cp311-cp311-win_amd64.whl (213.3 kB view details)

Uploaded CPython 3.11 Windows x86-64

efel-5.6.22-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.22-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.22-cp310-cp310-win_amd64.whl (213.3 kB view details)

Uploaded CPython 3.10 Windows x86-64

efel-5.6.22-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.22-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.22-cp39-cp39-win_amd64.whl (213.3 kB view details)

Uploaded CPython 3.9 Windows x86-64

efel-5.6.22-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.22-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.22.tar.gz.

File metadata

  • Download URL: efel-5.6.22.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.22.tar.gz
Algorithm Hash digest
SHA256 c1416d8dacc398e327b1071ef36ab442f6b76465020e0a22029bc8a1e2a1cebe
MD5 680442bbe9f97f0265baa7304dfcc818
BLAKE2b-256 0a61ade6d7a0450cc0ac50f25ef16904c0604fdea309e126a98566eb68215cbc

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.6.22-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.22-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 452e7b0f1146cb0f266ae7c9ffa15ef1ac4ee2f939b199f928fa2bf29d0ee146
MD5 6e2d6e429a7abab4f99c8b386f2a716f
BLAKE2b-256 ae8d9558abb812569a07e91286525c680891d47bf4d170bedd8318f6cafdc7e9

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.22-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ed65b750df3ee5d980023c28ca343c3b5a6eb1d58fb53e4a051ccab5ddd6b75d
MD5 35ddc5d3459f51a180f513abe4cef270
BLAKE2b-256 e330fa8a3798eff630101232da195f5ae9f16b92fef5a339cd24741fa89a3a26

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.22-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 e80e9bfb1dd52cfff2f2728b1809edbecab6a10ecf2bf7648932bfd781d98ca7
MD5 fd45bdc33e67348df38cc49453036ed0
BLAKE2b-256 7369fe0aa14684d6bbfb973777304fb8d57d6069738e54e8722df3276fd15807

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.6.22-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.22-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 54b697caf5eaf5c635f0036b90aba6486adec59443764abc7af2bc9647aa1b84
MD5 97f6592c61a52463268b855acd175eff
BLAKE2b-256 d65e04c057ed29707550c72c2fea5a5cd390a254ceff0dc9b5b2e207f13fb23c

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.22-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9d2167d2a9d59a9980f85c985d2b8503962133b163591b9470ab29a4820aa393
MD5 7b64e7dbbff8454105c3ff8f1c7a9557
BLAKE2b-256 356453fde6aeb1b09b2cf1e4791fe7eed8da51f0c4ec67f883e4dcf2a24d8f83

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.22-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 44c50d18e16586b7b8cfcc9a788fb9041ffac1b61e5d4d8983b4206f5eb86e80
MD5 b4ab2ee0e50fba25548ef3993e3cdee9
BLAKE2b-256 6f1ddea88d0226a4c6812804a275db18233b3c5cc8627609a326aaef332e28f2

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.6.22-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.22-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 638f09313414ac2305f05e578817a3b7c8665f7791756258dd36a06e4fb30b6d
MD5 0ab88847667df94d023942e638a507de
BLAKE2b-256 f0f82780aa121dc3aa5594ff0d6b9110f2b4e5f3d3060d9ac66206e49e643433

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.22-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b8847c426ec2efce8f0102114df8bafaf2837015259081830ab9f3bc7c481fdb
MD5 9ae11edd722aa016eaf0e405f9575406
BLAKE2b-256 390f5c17ff0c8491986649eb7fe34f340dbcf86dae0ce904487771c577e762a5

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.22-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 8143440d705269fcf51463e11bd0c400f3728df801a411ebc97bcf38fd2ade0e
MD5 bbd2037b148760f2dde3dbad54df4793
BLAKE2b-256 12e28c572afa1a2655f473146db01010b896d9b9b2e4450cbaecf29c324c09be

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.6.22-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.22-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 d56e4bcbf43e4d10d739b03fb04db92dfd22af592d4d64623530ea7973534a00
MD5 750fa62d36f9a3afbdc1f8ff1825bf1e
BLAKE2b-256 3205e2d79a8c514c981b35a06ab4ea409143e3a656540dab2bcb3d2fbb80570f

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.22-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3c6bcde5046492ca7b0787db4ba4a5798219191b7d92a92e7462792fa5492856
MD5 132ee59ee6ac350470ded59747f1d50b
BLAKE2b-256 8c6e26ae8af8e894e0efe395f922cac25c8b4072d45a7d557e68135e588910cd

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.22-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 9094ad659a01d47dca42f3486d72bf7174626be64cd2bbb38049358dca0ff33d
MD5 bf7161bcd3e72d8fe8e2794462dc3215
BLAKE2b-256 0fc3a4f88c164c89e1bdbf5b6b3b0b8d36cf9ad683bda79427e56b918bd94151

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