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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.12 Windows x86-64

efel-5.6.12-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.12-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.12-cp311-cp311-win_amd64.whl (201.8 kB view details)

Uploaded CPython 3.11 Windows x86-64

efel-5.6.12-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.12-cp311-cp311-macosx_10_9_x86_64.whl (248.2 kB view details)

Uploaded CPython 3.11 macOS 10.9+ x86-64

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

Uploaded CPython 3.10 Windows x86-64

efel-5.6.12-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.12-cp310-cp310-macosx_10_9_x86_64.whl (248.2 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

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

Uploaded CPython 3.9 Windows x86-64

efel-5.6.12-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.12-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.12.tar.gz.

File metadata

  • Download URL: efel-5.6.12.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.12.tar.gz
Algorithm Hash digest
SHA256 1acf44d35c33720fe2ae0e5f0c0f94dcf1e034bb9807e66ba0cab4c407565fee
MD5 aeab6644305b78dcf741de12e88c235b
BLAKE2b-256 bdbf8ff9ca132937fe6fc821640acef656288ff0378bb6842b252b7493ade4ee

See more details on using hashes here.

File details

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

File metadata

  • Download URL: efel-5.6.12-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.12-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 1318a9510e17b2d69fe6c184aacb081975d83b96f8e670dafbd26cff67a86ce8
MD5 114b8c2b1c43560c936d670cc1609b55
BLAKE2b-256 8e9b8a088dae1939da2df1b8e63457584c61ab94a73d45a1805fc7ff2097483f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.6.12-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b328b296395965c48607e91b75ee2eb72d7a156a2d6313eb6b5ef1e841ad72f2
MD5 3a7686f6c48dfbc3705b8182f51e77c4
BLAKE2b-256 90a3edc3b0f1660465a1dec560cbf8243080cb457606c1a1ee24815fe95109cb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.6.12-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 e129a25a0c65b88ef666d00843e14a4b59b9e87431f10c2d3fd32e447b96f4d5
MD5 64f37e407652827e3bebbf0dab2dff54
BLAKE2b-256 b1245369459b2c6f02b983b986793a38bf1dc1717388444bc16b1e82e12737f9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: efel-5.6.12-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.12-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 8713f2d7f40815dd83dca3ecbeacbd4a30c3843a9e88d67e36cce39912592cc5
MD5 a221a5e3c654614a0d07792fbbd7c24d
BLAKE2b-256 5d2b54a0b9313e93dc7e6a42eee6a2cafe39bb71254765625cee21a3dabb6945

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.6.12-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d873c7a215d6d5f1e0a335aeb12fe572e267e2a5726f6829c04463188dc16948
MD5 dc82763c907bd66e2fa1375ea4d1addf
BLAKE2b-256 f840b3b6708be632d3f4b1973f82e51db916d7bdc08ad19d7a54b5820f8e6e41

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.6.12-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 270258268bcc7bb13f657f897b416454a3fe12f1beb02eb4fb7c1dc3c5b2b7cb
MD5 541a660e6152327c1ead896182e5c904
BLAKE2b-256 63be52d3987af5c404d1876cdc774152f1d04ee13a2f48402e04a42315db9a34

See more details on using hashes here.

File details

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

File metadata

  • Download URL: efel-5.6.12-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.12-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 1e34beaceed1f174f9d8967077dc22652666aaf40e55ab59d02309e6ed9221e0
MD5 419062eba88f70d2eae9e31aa2c86f1c
BLAKE2b-256 bed1272ecd09f54239216eb6a1bb40373acb7d00a0375143feef838a46355002

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.6.12-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b8354355f1d44abfc933c6f222b40f074e4261a570c0ffb7d9ecffe5b30330b7
MD5 65f0b0c01bf06907cba1d5b1e603f93c
BLAKE2b-256 e04ee20c1692c32c9cb087c23d9f6ebfa05477ef5a5f9eeb98b038e0cea0160b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.6.12-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 55250ae3f2038b8f9eb7b307f7f95b9f150b0afa8b0bf5552141571e83ae3be0
MD5 ea804920af7db4899d2905fc0738e912
BLAKE2b-256 cd053a196db12282323975fe1bb661c91adec0163971c312f6a04abffa6e946a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: efel-5.6.12-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.12-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 629c41c57bce84c27d47ccc2c834b05be5cf1d0a93b6f42e905d24802111d6f3
MD5 6bd02763380b0062450208ea21b4031e
BLAKE2b-256 f11cb1b9defde103cf1828f7053d3f91d963973599897c2725842bd0e7db8441

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.6.12-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d1362c848e0533be9128a3f16278a0301ab6f2ede3b139030de88b4beb63699b
MD5 d4fb9a24f7be29b79cddebca93cad4a8
BLAKE2b-256 27bd0b14c5f86449b343e14daa92069fa12f234d9d714c77af52ef5beee7d3ea

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.6.12-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 91116f501c7179d0d850dd5af30ec21915c117b771a194bb05a30454babce366
MD5 979d0c62cd447d084ee659ef5144da85
BLAKE2b-256 cfe5daee59530d26d9bee349fdcba80ca3630bdb77629f3f4635fd74d7bf30b0

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