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

Uploaded Source

Built Distributions

efel-5.6.23-cp312-cp312-win_amd64.whl (213.9 kB view details)

Uploaded CPython 3.12 Windows x86-64

efel-5.6.23-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.23-cp312-cp312-macosx_10_9_x86_64.whl (266.4 kB view details)

Uploaded CPython 3.12 macOS 10.9+ x86-64

efel-5.6.23-cp311-cp311-win_amd64.whl (213.9 kB view details)

Uploaded CPython 3.11 Windows x86-64

efel-5.6.23-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.23-cp311-cp311-macosx_10_9_x86_64.whl (266.4 kB view details)

Uploaded CPython 3.11 macOS 10.9+ x86-64

efel-5.6.23-cp310-cp310-win_amd64.whl (213.9 kB view details)

Uploaded CPython 3.10 Windows x86-64

efel-5.6.23-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.23-cp310-cp310-macosx_10_9_x86_64.whl (266.4 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

efel-5.6.23-cp39-cp39-win_amd64.whl (213.9 kB view details)

Uploaded CPython 3.9 Windows x86-64

efel-5.6.23-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.23-cp39-cp39-macosx_10_9_x86_64.whl (266.3 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: efel-5.6.23.tar.gz
  • Upload date:
  • Size: 103.5 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.23.tar.gz
Algorithm Hash digest
SHA256 0a704470c54fc302c76dfce8ffeeb892966bf3dfe29adcb0e6a5b3e66d199edb
MD5 e635fb1472656ca0ac37a3230e601aa4
BLAKE2b-256 c2d18bef82390ab2f7609ee4fe7f5c383dcbd273034b2551ae432320496d6e01

See more details on using hashes here.

File details

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

File metadata

  • Download URL: efel-5.6.23-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 213.9 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.23-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 5413d69a82a6eade50babbbb50ad8b0c009af5b7ed745b61988b6654fef14357
MD5 e769e07e33ddede0aff0aa77c284d5ef
BLAKE2b-256 e468b41da02356b8b8a77b4a2ddccc64aed242489c89ab85c95f46008affea6b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.6.23-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2d0c7196d0baa5a8285242105e5e2baa77380b651ce49e04199200fd45739fa5
MD5 b2f6e687c119d47633f6f455aaa80afb
BLAKE2b-256 2d01a19de5c78aae23a14e027a6127f5da321068e4eb2e9b407c112fa65f4194

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.6.23-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 64a3526fd9eb29d9257ab6e3d90d0367df224e22f84aa2aca907e33fe14e0add
MD5 294866fa027ff12d631929438defcaae
BLAKE2b-256 f6fbf24d876226c09338482f4c44e57082a5475a209a784ca8afe52bf2fa76f6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: efel-5.6.23-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 213.9 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.23-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 92d03843d8d67ad0fcaadc80a679cf1e8757819f2a7813b431d7704e67dd10a8
MD5 d3fc357190967aa3365937cd2d149db8
BLAKE2b-256 7ca6f8c1a3f1767d01cba937969de4ceb79e7f201718713b0b2416f7e94cf7ec

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.6.23-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f5c0cd05b908531d7bf14d81173f4dfd8fff3dc9ab9534683ea0c815118e69ca
MD5 f95502b770fa327459f82f5019bceabe
BLAKE2b-256 8e103749d6d2671fb333fa76ce4821e22a2af99b36da28f165560aff11f99676

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.6.23-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 5f0e9ed6e29e0297e997a8720a9e3390626c3dc04bbed2fe687cff0482586f7f
MD5 c3cc12ad20f3fe1d072f7ea9ee3a8a99
BLAKE2b-256 2500de5fbc8813e4b026ffcffdbcab79616504eece4a4ca656db984eadc4c168

See more details on using hashes here.

File details

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

File metadata

  • Download URL: efel-5.6.23-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 213.9 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.23-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 6921d535ae4f31af4d7384e7d6abd1ff33a6b25a23cb6ee285cb73b6e30315ef
MD5 c2936c3fd1374ca68820a15b168cbb59
BLAKE2b-256 ab52520b3f24d55c052b89e6ef4c7d7a9d8a44c3bf3b9078084023c6ddb675fc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.6.23-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7ce194f09baa07a99295f14afadc485941279d08bd901240240eaaa0ff3becc7
MD5 cb498c0f70faec2c6c7ab7a2ebd89390
BLAKE2b-256 fbaed61812e9dc2a06a1704df8e52192326885e86f6d510296515fe87bfe20d1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.6.23-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 a010ef87dbcf1d77f48a6907a669c756fd40aa09dd26fb4450c722312a836dbb
MD5 38a3d7f84ec48ab3dcae2243d3549a31
BLAKE2b-256 1a9238564e0d09c40b5fb6d1b758be5ae465c37ac72965e0aa44987178e222be

See more details on using hashes here.

File details

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

File metadata

  • Download URL: efel-5.6.23-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 213.9 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.23-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 d0260dece9d62a44be2185c0666e829d971ebbfb8b68953fd8f34c127c6fd3fb
MD5 30a91f88df718d73faa5787d0f9151f0
BLAKE2b-256 278cdc0e1bc706143902890e7081b008e37bfb327c1714d82e54ca345ca8d0cb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.6.23-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 66ef3e69426d6332dcbb87c35a4e2dec057223846786f7e980ce615f00ce754e
MD5 8ab083063c0c374cb19928010157ba8f
BLAKE2b-256 03acf0c591602a109a33a4de29b47fc45ef4b959ae9f837bd74b71a8b84bebba

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.6.23-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 12f2915bfc0d5daff163288ec09ac803bb67e496c24706031d55368194eff199
MD5 3bb0ce6bb269d302fc29ff70cf899d43
BLAKE2b-256 69225071410a77a3480f1c6b9ab3f3b176e279a471a6f591d5c7e96679646076

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