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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.12 Windows x86-64

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

Uploaded CPython 3.11 Windows x86-64

efel-5.6.10-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.10-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.10-cp310-cp310-win_amd64.whl (201.8 kB view details)

Uploaded CPython 3.10 Windows x86-64

efel-5.6.10-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.10-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.10-cp39-cp39-win_amd64.whl (201.8 kB view details)

Uploaded CPython 3.9 Windows x86-64

efel-5.6.10-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.10-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.10.tar.gz.

File metadata

  • Download URL: efel-5.6.10.tar.gz
  • Upload date:
  • Size: 99.7 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.10.tar.gz
Algorithm Hash digest
SHA256 7f404bb85d17947e182f3100b2ae118ba44c0d32812d30d1d446edccba356303
MD5 4c0f3a682c124bc0660d0fc3b6e8c951
BLAKE2b-256 4cf4649fbfc0a9921139b872ce1bbea8493d642e9644c0555c1b6f4e59ea090c

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.6.10-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.10-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 b5ede671a9e6c521530975f99395c40a90fe47b45d00b5d1ccf356e58674b35a
MD5 4dead8810dd7dd7a07b77f14abeabf95
BLAKE2b-256 d8eb4ef7b32934c8f2bf9d57ab2dd8a62b914f722d0d1aa583b98de07d7cb0ba

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.10-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5ad348882e260b31dd72286dac4be1c6596089733698d0cb0172a2e5c8592a90
MD5 2641b9dc6c2d6429ea5cb32cf3f262c2
BLAKE2b-256 0370c653cd47d286e9a66005dfbae1a996703580b270541f103b1fff0f7df7f3

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.10-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 49153aa168562f5ca24f637c3a441cefcbd6c7e3353d0bf6aa0675e76754aa8d
MD5 9c8c3ab2db6e26f8467c0791ecaf191a
BLAKE2b-256 15cc92028a44c20d2f3691a1200e36a27d670464abf13f34df6e2d8cc86fbc9e

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.6.10-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.10-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 64c35ccdc42cea2f3faabbfb6c9d05172d41ab7efc92e130c2b680667e3974d1
MD5 1768c8fa646ced46f5292bf18aee80e3
BLAKE2b-256 443f450b202bc956b226486140755c12b54fe1dc11b265d74c641a639aa0d0c1

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.10-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 27aa094fb4c07bf453783a6f9c584e7877c30b34bb2813ae7ded2a4266e269d2
MD5 9b0fbf62b3e523e0c629aa97c1a0f1d0
BLAKE2b-256 ddfd9eb73d1450965fb1ba5e3ff40a59febd1ca9efc9904d8ff3f8ea6de82e0d

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.10-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 d94e246d2b1f5723ed3b95b4015e347a5883a6bd8ac8b368f682365fa608a09f
MD5 4b43c1610afbc3b79b314f3ede0e5494
BLAKE2b-256 7a82659d0457bab519eb259fcfcab0e8a2c95451e80f4ee9093a9a1adcc6ea43

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.6.10-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.10-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 5b246b78ba3e2185fdda3aa06c36d9bb291de81eff1c142a1417a3234b6506b7
MD5 e6a59d1577e467dc88be25b1181778cb
BLAKE2b-256 ae84ad3daff5d91d1eac3860f6ba09e87a4fa21d0a7444ff5b3c920a4ff4a381

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.10-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 15bb3f25bca4b62a7f7e01c0f049671388357c0556f7ccaabb3f39854dd00c2d
MD5 b6f1fbcf2f8ec173a30d0caff7aec14b
BLAKE2b-256 e31733a0fc87ca8ca3657fc3a9b613f660ed5b5fd39bb70b280bc50bc2f03be8

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.10-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 5b88e47d75b85819f92f94d6aac8ed31f9076e0155bf9005a6e4580cc8526290
MD5 024182214bea72f38c07aa31181460ce
BLAKE2b-256 1f6c277d34c242f2c9782e7a7d69c8ff195f8ba0e0faa8310be39e534371aa75

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.6.10-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.10-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 a4a91d593b8c4c75dd990f66aa0daa2f74d6b3b07ebbf7df31dc69bc88c8c506
MD5 67ae41fda06db13c46ae9c40bdb85c18
BLAKE2b-256 d30e43bd803dcfa1ec57bfd5b8d39180bb21745995e652bb7a95a0c687307351

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.10-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 cbb76615124fc79291652dbce492b19280095509e1bd6e86eae9dddb6fe8e070
MD5 b5141a7644d03857e1d40623062e72c7
BLAKE2b-256 9cab74b7f1ccbababcd1327f6f436d6cfc034a935b4e786c163e3015075d997c

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.10-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 cb5af016f4311cd8f95bc3551fc5e79ba0219cc80e1340776ed22c46e00bd3e9
MD5 c24c95cea5a2c954e231b280d0cc95ba
BLAKE2b-256 d98d7d2a52f097e214a98377148273b8e5a2e95bc1e52291f7234e735cc409b0

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