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

Uploaded Source

Built Distributions

efel-5.6.7-cp312-cp312-win_amd64.whl (201.8 kB view details)

Uploaded CPython 3.12 Windows x86-64

efel-5.6.7-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.7-cp312-cp312-macosx_10_9_x86_64.whl (248.2 kB view details)

Uploaded CPython 3.12 macOS 10.9+ x86-64

efel-5.6.7-cp311-cp311-win_amd64.whl (201.8 kB view details)

Uploaded CPython 3.11 Windows x86-64

efel-5.6.7-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.7-cp311-cp311-macosx_10_9_x86_64.whl (248.1 kB view details)

Uploaded CPython 3.11 macOS 10.9+ x86-64

efel-5.6.7-cp310-cp310-win_amd64.whl (201.8 kB view details)

Uploaded CPython 3.10 Windows x86-64

efel-5.6.7-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.7-cp310-cp310-macosx_10_9_x86_64.whl (248.1 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

efel-5.6.7-cp39-cp39-win_amd64.whl (201.8 kB view details)

Uploaded CPython 3.9 Windows x86-64

efel-5.6.7-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.7-cp39-cp39-macosx_10_9_x86_64.whl (248.1 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: efel-5.6.7.tar.gz
  • Upload date:
  • Size: 99.6 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.7.tar.gz
Algorithm Hash digest
SHA256 c1a0dfc72198e96f23c26d7c5e68b308d5c52c180d068867c486d8e6b7b8f5dc
MD5 38025e5d78e76fe80a9f60c18de9f695
BLAKE2b-256 317c9a48a2024450a36b817980f4bc4d8797350ba4d295b72b797eb65f3e8e29

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.6.7-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 201.8 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.7-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 fb0dfe9392fce54c0eade00db8b0e782824ba7c77d653c61603d4bb6994ce5ec
MD5 64633a010191635fa3382a50c64be4fc
BLAKE2b-256 562db164b63608c87a009b9063df565e6de42b984e771f1676bdc70c3ce2669f

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 49c42944356517925009cf1b43be8b655850d63ba69a7fa66d62abc0e4ba388f
MD5 a2f1040859f54d76cccee7cd38888368
BLAKE2b-256 cc4fdb629003f18b936182419744480300481285c3cd328d00cc5a243ca6f742

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.7-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 facada9cca53d8a83e25cf5fb5f2c69cb48af809cf4307fc8881c6516c4b7b02
MD5 f495cf27cbca2c6440ffda4fa7f9b5c1
BLAKE2b-256 516794688e6cdc0f40c509a61bf215edb767cc65c1301a7b4a323bea9e89924a

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.6.7-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 201.8 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.7-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 92a830655251d7665d065147bea30a1cfca23ba541227a5d204a702261d9c5c2
MD5 e67070110094a9da3ae1633865f7c7ec
BLAKE2b-256 c744a220a8a595513c6e02b68ab680c32506e02e533bd6bb69db616bb28f9162

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bbdd88200b65f7a8f329ca4fcb0fbd4930a635ee84f209b5d5138ed5e0e3a2be
MD5 fa68d4e9cf74d611e94930e834dfc0be
BLAKE2b-256 7bbcb601aafa300f7ceb547f3f08e3cac6ae9d45ef59cf0e6ed02d116cbbbe63

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.7-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 28a7ddd6a4bec10a5ca24396a4127a8c041cdb45786a52b0424c8b9c82bc4c7c
MD5 1bd76e39b9a6dab5f709c95f8faceb84
BLAKE2b-256 e800f1316b0af15a97b3eecf623bd20a913d34db47fdc725b528b3e7d594b7be

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.6.7-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 201.8 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.7-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 e775ccb8be0dcd231d592ea82e2f74dc8297b239f620f4a38f1c5d54c36e42c0
MD5 ff89c9be3af89587acb18d072d290da8
BLAKE2b-256 a0378706b4ce922e67d1689a9fc443935bd4c61130d110fb4a00013d041cb6c9

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ac08ffaec7162fe37ec49352a6a0cbec844e5d2f98e2dfa0d727cc414b3f6b6d
MD5 5aa4d97db9cd566e693c6a4cb76378c1
BLAKE2b-256 d08632e2bedaca71a874e0ae8d55927998418d474248259a2ba0c8821b0a3d27

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.7-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 76249c2d07989423ca845b098afaa1611fc6a0644135de3b2c6fe2eca0d5cb15
MD5 bd72d8743c17ae10d75b0989a704098d
BLAKE2b-256 550c6dcfc2090fd3c1f69bcce92732e38964c41b98851606b5ae47def725dbfa

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.6.7-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 201.8 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.7-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 41915d08d78921fcae5be7bec55f319e335c462fa63500d0dd83c900769df056
MD5 555cb8d6a4cf405af387cec2f5983f02
BLAKE2b-256 79fcc62fe263ee7e001a214aa59062917b0dbcb2a4cf9690828059ddd12ca9a1

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 01a6309c3f9beb6827cee4eab69a7f5071752715d30944dd414ff55ab3b05869
MD5 e55d05be610625e323f9530866bb2b88
BLAKE2b-256 9ee22413e4fb6816b9d21e101308318a968173a7ea0e2e4017009d17d17adc99

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.7-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 fda2616571ec45d3cf304fa49f46786cd1d70ba1865da5f2fc1980fdd3dd4da0
MD5 73c271e791f1d9e1ff3082a923f77238
BLAKE2b-256 a9c8f283f5a3045d588795adb218f275ea7fbf3e8bc18d7ffb05cb5c9ddfadf2

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