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

Uploaded Source

Built Distributions

efel-5.6.18-cp312-cp312-win_amd64.whl (211.4 kB view details)

Uploaded CPython 3.12 Windows x86-64

efel-5.6.18-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.7 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

efel-5.6.18-cp312-cp312-macosx_10_9_x86_64.whl (263.6 kB view details)

Uploaded CPython 3.12 macOS 10.9+ x86-64

efel-5.6.18-cp311-cp311-win_amd64.whl (211.4 kB view details)

Uploaded CPython 3.11 Windows x86-64

efel-5.6.18-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.7 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

efel-5.6.18-cp311-cp311-macosx_10_9_x86_64.whl (263.6 kB view details)

Uploaded CPython 3.11 macOS 10.9+ x86-64

efel-5.6.18-cp310-cp310-win_amd64.whl (211.4 kB view details)

Uploaded CPython 3.10 Windows x86-64

efel-5.6.18-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.7 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

efel-5.6.18-cp310-cp310-macosx_10_9_x86_64.whl (263.6 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

efel-5.6.18-cp39-cp39-win_amd64.whl (211.4 kB view details)

Uploaded CPython 3.9 Windows x86-64

efel-5.6.18-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.7 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

efel-5.6.18-cp39-cp39-macosx_10_9_x86_64.whl (263.6 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: efel-5.6.18.tar.gz
  • Upload date:
  • Size: 102.4 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.18.tar.gz
Algorithm Hash digest
SHA256 993f9361472116fff66e42c86e800c50c98ccbd463b2aa528ae078b325965751
MD5 62209b607fd0ce884ca484b0adb54cd2
BLAKE2b-256 84162cfb189da82d71d6b608874fa8ca0baa104e2dd489316414685066b5d3ea

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.6.18-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 211.4 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.18-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 abf04178362cd9aa1f59073aaa217cc7a64b0eafff34119006173eb178d1cfdd
MD5 a2aeacbc96d7967201d59bfd0e4cc06e
BLAKE2b-256 b795aef4a8dded8f7c97e12d38c1d56f259b571a8faa61c4028071eebf184fde

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.18-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 11bcc65c3efcd1159b45ba1544a2f1a3cef65cb12490c3524614e8f571ce61b8
MD5 51801141ed723472997b16a6340a5ac6
BLAKE2b-256 300847cafb1cdfd6cfc2de8bcf57dbaa224a6015adaf05d09d9b9b8595e84c0b

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.18-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 3557d21ccad1acc6171a95e599586f56c043eb2b331e4d5fd05be7773ce3b9f4
MD5 e69b21c7bd1d6785b1aa9d8f2db4762e
BLAKE2b-256 ed889954b6f0c80b0be87859ef1b498349aecc9a49c343f2749c13bd56901fa4

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.6.18-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 211.4 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.18-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 24b5646622a4ed18391fff500b885c5b76f2895170a7ed80ab9edf2e33606500
MD5 00e369c1311d4e897b8e27c9d4dfc5ac
BLAKE2b-256 1e54c5cb5efa8122c406fb84c91f9284746be76fc8749091cfc93b18a731b830

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.18-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7da2878e7008fa2f88e33edbf6aabc9e80acef197551150dfd5a768330fe759f
MD5 2493b15f2843297482dea2e1965879b3
BLAKE2b-256 ee719d50e68f4793201489d161df585aa29ac9d28d9b8544d4ca6fe588ba98d0

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.18-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 b40f44f57db801eb62e3ec0b0b8974ea2bf3a1b30add0cb5d3d2a58264ed9ed2
MD5 b078a5dfefcb6829a1c072e2a01b4c76
BLAKE2b-256 9457e27ff0c305f22d3d9a975c3d3ffb26ee294ad05f599dd22fc41f009bac56

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.6.18-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 211.4 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.18-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 fad601ae9bff8fe23d040173e386ed9ce3c3ce55cf0936152b89ca984cd2ebb6
MD5 24398947b4a2c5912dfab59f5194e9e0
BLAKE2b-256 f9499c86f83bbbdedda496a4e8f990147fe2646dc4708da671c0f11e09b8ddf6

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.18-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2be61731809b5525cd2766caeec1bcb0d09def38adc14774723504e49a7299d2
MD5 59be0bd8f4159e2ac4f39d920ea66e19
BLAKE2b-256 a59a22a6b73fbfe40ba1cb4f7934fb42a2c3b02adcdf04dd9f693f46e8b993f9

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.18-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 feb307bdfe5c4b05f48c6a548517df3db88c67a3a71801a53ab9f7c143ad3437
MD5 70b0a3ef68771277a48369956211d9f9
BLAKE2b-256 925c5a183b11823dab501e135ae327554dec34f510085e9434af7bf723daf5e4

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.6.18-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 211.4 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.18-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 0d328a6f88a97a1888d79ff43fd71498767044971ca8ffa0974b6e2d6ea0a5d7
MD5 a14889e2a5af3831ccdc5504e4e86c13
BLAKE2b-256 070eb77e76a1b5af234768fe49650837b3ef717f0595921179370aec4ff18d0a

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.18-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 25e8eaa2e606e71a86bcbc01dbeb8e951ab2e1d7bd310e334e9a95e3fb82d031
MD5 50f71c89e3952f524d1e33f985bd35bf
BLAKE2b-256 16b2152f62c1590c452a82b635a7885f7924ae5879af48e091a8702f5624c75b

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.18-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 2e02f9589c79cbfa28a32becc77a42c4f8680fa07519409d07ddb9bb18428c4f
MD5 d7908ab9455a3c73fa53636926be1d76
BLAKE2b-256 e5a22002f6b412858e688680a8253665e8a52802667fdc854c8f8b2c7b5c8443

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