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.getFeatureNames()

The python function to extract features is getFeatureValues(...). 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.getFeatureValues(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.4.tar.gz (99.4 kB view details)

Uploaded Source

Built Distributions

efel-5.6.4-cp312-cp312-win_amd64.whl (201.5 kB view details)

Uploaded CPython 3.12 Windows x86-64

efel-5.6.4-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.4-cp312-cp312-macosx_10_9_x86_64.whl (248.1 kB view details)

Uploaded CPython 3.12 macOS 10.9+ x86-64

efel-5.6.4-cp311-cp311-win_amd64.whl (201.5 kB view details)

Uploaded CPython 3.11 Windows x86-64

efel-5.6.4-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.4-cp311-cp311-macosx_10_9_x86_64.whl (248.0 kB view details)

Uploaded CPython 3.11 macOS 10.9+ x86-64

efel-5.6.4-cp310-cp310-win_amd64.whl (201.5 kB view details)

Uploaded CPython 3.10 Windows x86-64

efel-5.6.4-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.4-cp310-cp310-macosx_10_9_x86_64.whl (248.0 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

efel-5.6.4-cp39-cp39-win_amd64.whl (201.5 kB view details)

Uploaded CPython 3.9 Windows x86-64

efel-5.6.4-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.4-cp39-cp39-macosx_10_9_x86_64.whl (248.0 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: efel-5.6.4.tar.gz
  • Upload date:
  • Size: 99.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for efel-5.6.4.tar.gz
Algorithm Hash digest
SHA256 86cb9b66174a5beceac52e9c8f9d5ba443634d1c40ebb876b84de53399c628a4
MD5 7b494293f9e4d990a67492d17e813660
BLAKE2b-256 42165133208e28b0af6a5a6d6e94d2d7333f339ef4a41286ef9628e07a186ae4

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.6.4-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 201.5 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for efel-5.6.4-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 ead66cca7c99c7dc82f6d4b4f3bd5d6449c99a4b308e065f0e6c29b8f683a070
MD5 953acde48b528ad4788af4c0a366acef
BLAKE2b-256 d1bbbd27413ffc51365bdde5882f21d7afe8d9aa70a6f6c04a95e3d815c4244c

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2deae8fb2564ca50cb774fc3d2334bdf9246ecf099090673f638d7e816bc7ad2
MD5 2dd733b70f0777baf1661095e38e424e
BLAKE2b-256 a28105f7520a9544099c016b72f033c9f0849071ef1d946c30669abddfe02c4c

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.4-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 634780c3fa937152296a34af43500721fa8af9ce980d044266c9a4e15fdedc5b
MD5 7c3aae2b03ba8612bc146b575794b564
BLAKE2b-256 5701c0c8e2e60d0bf278ea4bcadc6becd336b273f5ceb1b09bee0d7c43f0db18

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.6.4-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 201.5 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for efel-5.6.4-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 4b923c70fccb16296f9e4501e2cc51ee0e27759e2ba63ce76b4a11057a248b5e
MD5 2528632981a48ba0ecbe99378d05ab20
BLAKE2b-256 8ba4afe65a074e1e3e51fbe1fca0045f0fc62b8786e5fa8e95a66d18733aaef7

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 06cd78163119fe632bd34fe6e812e037387791aa56fe69ce9692e61f5c7ed746
MD5 81ff1eb7ea3c2619d60c187964bcb743
BLAKE2b-256 fa20046964305677205b5721b81cd185bb3b7b315eb6d72997621fdf74f60c9a

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.4-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 735cf522af786352e9e56d170a50eba27173985ab39d2c19a6d5874970b7eee2
MD5 659ad41b0820a0b738d4c74c83e69cea
BLAKE2b-256 6a8e5cc965d2bccae400ad0768a4e1a1b4c32463981c736ee31484c27f42b547

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.6.4-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 201.5 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for efel-5.6.4-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 caa21d1d39fb7c3cf2ad4ed956fd4bc01fc1d10ae93ffd980abe237ca6926054
MD5 09c4ec06df728c48ec5c8ac7897b5c20
BLAKE2b-256 84f138f529d57975ee058f969d2aabed465b53712e2450cd9952497ac854a07a

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ab5223a661ddbac3cdddfd0ef9ee407542f776150c52af5b27848f923106c86a
MD5 c73fd16ab0871c2f1289d99781882124
BLAKE2b-256 fe3a254a5f61712ecfa0e396ea08ead16c5fe4d8a188daee642ea828af48e7fc

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.4-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 bc1fbfcb0929796972d8072a59c935bfc28e735d0816a97b810282127e835669
MD5 6ba09d17c8e0e7d745fb02dbee76f48f
BLAKE2b-256 77a6c15c0efddc00f9ae13ceb6df45f49c057a19ce8516c5befbde234567c521

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.6.4-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 201.5 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for efel-5.6.4-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 37572b4cecd52832bd600afa8dee34f2b432c8f5de7990e8700747a327f3af0f
MD5 30b7d36e5551b89b9e60f9b9d0968a39
BLAKE2b-256 063885a445bed9ad91721d97852ad64e25482726e835d86343ab75a09e3b4006

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b48b71daae16b1ca4cbc471ee1a5987623635e9e9e2fd73c64d3c27ea63d5cc4
MD5 3cbc0aded55f938a68e7997430b0ff6c
BLAKE2b-256 679264454d58f8021761f92e72b3b527421b3746cf79401252cb16a6b3e3ab17

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.4-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 57e1b7771c6eb02260027cdf1d932d8f07195ecbc826c57294c384f8999c3936
MD5 c5efde17c9af673843843b1318cfce2f
BLAKE2b-256 94013c4ba204a2e94107f49b55aaa707f29b6bce5b373ca4a9ead448ca6d2a1c

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