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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.12 Windows x86-64

efel-5.6.14-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.14-cp312-cp312-macosx_10_9_x86_64.whl (263.7 kB view details)

Uploaded CPython 3.12 macOS 10.9+ x86-64

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

Uploaded CPython 3.11 Windows x86-64

efel-5.6.14-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.14-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.14-cp310-cp310-win_amd64.whl (211.4 kB view details)

Uploaded CPython 3.10 Windows x86-64

efel-5.6.14-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.14-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.14-cp39-cp39-win_amd64.whl (211.4 kB view details)

Uploaded CPython 3.9 Windows x86-64

efel-5.6.14-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.14-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.14.tar.gz.

File metadata

  • Download URL: efel-5.6.14.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.14.tar.gz
Algorithm Hash digest
SHA256 5c282e049ad2b929c596475a7656e5bf14cbd6d19036d1ccd65a3712beb2b185
MD5 41978773df7dbe79517c01315dc1fd91
BLAKE2b-256 5508340fc70119fa066dd0fc6b23b4c545083a9b4fcef74c3e5aa6b2a2cc4331

See more details on using hashes here.

File details

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

File metadata

  • Download URL: efel-5.6.14-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.14-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 2d21be9eb8e2ff77cf7a27e9b7dfdb523164be3f27caa985819526e0a925b150
MD5 40c6f21b7d088a75934355d54ac65244
BLAKE2b-256 c4924fbbbb6fdab974eabf0238c8a3bc088562047258125446805449b2ad7d7d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.6.14-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ec1e6d74842470da1ea519168c4d08b3aa653e2a93ae0cf289f59227b532a944
MD5 a8f181c52fd0a26848b3eb7e1f973fbb
BLAKE2b-256 62bbe79bba767b1a7899adfa1d20fdc59d64c8f61dfa08040cf739cc5a8a1ee7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.6.14-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 cac92f7471c8ac4c6bc1fec7e37603cd5f2d086dff044e7c5dd50016342fa9a5
MD5 3cd06f7f80756cd639d59d11489f78d6
BLAKE2b-256 a040ae2ce8570039f2dc0e3353d11fae9298fa67821bafdda9d66698db97fbe2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: efel-5.6.14-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.14-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 d35ddf88e48ed6e90b9d1eecdd55d496e30dab7b28d9a25c0efcb5727da544fd
MD5 4f8c03071710af7a36e43324e7a3cf5b
BLAKE2b-256 a8d1fe86349ce9d7098776cd845e522c099b97cde82120ab8502a0ec36263ef0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.6.14-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 683cfa3c94875e08149b2de24279a3521fe5bc801981735adc303027eadb75a2
MD5 d063a4200c217f392401f0dc172c4775
BLAKE2b-256 7f885e143f46e61955fc4f131881a21aa2bfe9573f8ba7b473c4c4d72d42490b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.6.14-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 7af98b31bb1dae003dbc271adc68d37a2074700e3b5ac7c71426607f04bf7e14
MD5 6641404cd3f5152d86cbf58de486ec74
BLAKE2b-256 cffbbf16702d62ddd7a31ce8b243a2cee9f8fc98c3c60b2694ece54489cb52dc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: efel-5.6.14-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.14-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 14227e37f0b6de4bea023de3d22507bce144018e94e0cc286ef0329f6dd6c02f
MD5 21d76067c7bfa6bcf2fedf9d5884295a
BLAKE2b-256 91653653063399328f60a26aa12c2f00cf65307c38b30183fbae52a8a9722a8c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.6.14-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3aa79ff9bc035422f6a4bc5e7ac28c69e4662d09cf45d3670539f95434f39531
MD5 753061891771b23d0839576459c2432c
BLAKE2b-256 99016cf4267321d10c44fb5eb02ee6ac917260cb0a3f05210ce91b6d6ec0fe11

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.6.14-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 de4d2a3a994b605f2774bb6b7de2afafd325488ed9f8836b45b7dd4c7299c13a
MD5 d49c132a27ffc35601f5aa638a19e06a
BLAKE2b-256 a76c440d52dc2c9b97de084ba84adfc38d32a0d616eb4fb23af88110ab09986d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: efel-5.6.14-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.14-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 ad5e0a24c678d7eb4b761a830766807060bb6bc70ed98d7288d25b0e3e4e8094
MD5 0a37c1c05289689588848cca6ce2a956
BLAKE2b-256 5411ccf300912fcba2a4e1ebe3109892f84fd957c324fc22da7af39a1ec508ca

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.6.14-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 421749401aed323c487330701f87158a00ca71452a1c2b694b94b9f93bf59eeb
MD5 377f798cf8c4fdcaea67dffa3698cddf
BLAKE2b-256 32018de1bdbd755fb512bb82e2bc19f6f3834e0a41f95d52b95e3d3e57c626f7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.6.14-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 24b7c450ac8f02af95a6d326fa07563b392fd10cbdf352811e4e9c54e748ce79
MD5 1a2c271fdcc44aa2fe63bd05425c44fa
BLAKE2b-256 6ed3a9067d1b25c858104af82e90f5bd688d00d4f6a7151e9b9b683d95ca3e77

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