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

To change the spike detection threshold setting (default is -20 mV)

efel.set_setting('Threshold', -30)

For a full list of available settings, please refer to the Setting class

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]

    # set the threshold for spike detection to -20 mV
    efel.set_setting('Threshold', -20)

    # 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.7.1.tar.gz (107.7 kB view details)

Uploaded Source

Built Distributions

efel-5.7.1-cp312-cp312-win_amd64.whl (221.6 kB view details)

Uploaded CPython 3.12 Windows x86-64

efel-5.7.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.6 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

efel-5.7.1-cp312-cp312-macosx_10_9_x86_64.whl (274.5 kB view details)

Uploaded CPython 3.12 macOS 10.9+ x86-64

efel-5.7.1-cp311-cp311-win_amd64.whl (221.6 kB view details)

Uploaded CPython 3.11 Windows x86-64

efel-5.7.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.6 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

efel-5.7.1-cp311-cp311-macosx_10_9_x86_64.whl (274.3 kB view details)

Uploaded CPython 3.11 macOS 10.9+ x86-64

efel-5.7.1-cp310-cp310-win_amd64.whl (221.6 kB view details)

Uploaded CPython 3.10 Windows x86-64

efel-5.7.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.6 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

efel-5.7.1-cp310-cp310-macosx_10_9_x86_64.whl (274.3 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

efel-5.7.1-cp39-cp39-win_amd64.whl (221.6 kB view details)

Uploaded CPython 3.9 Windows x86-64

efel-5.7.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.6 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

efel-5.7.1-cp39-cp39-macosx_10_9_x86_64.whl (274.3 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: efel-5.7.1.tar.gz
  • Upload date:
  • Size: 107.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for efel-5.7.1.tar.gz
Algorithm Hash digest
SHA256 aa5d22dcfe114b81a8fbfb3cf699efc25b9c8839217f99f8d5db9674fdb05fbe
MD5 8f1cec4ea3b9006c0323987acc8436cb
BLAKE2b-256 0786b07ae0bfa6b8539feae58c05be8a4c0b0f227b2f27488672b54edfb99af6

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.7.1-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 221.6 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for efel-5.7.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 5500246ceafdbb2e1825feb759654156a2443d3a0916f5e489b23955ae7fd884
MD5 b429e199789cbddd5a12a2b6c386611a
BLAKE2b-256 65a46bb270ff1ecbbed2486f6fde7299b4c92b4dd8b9ae5336abcbf3b47ee1c1

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.7.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a181cb8bcbc501290d624d17e825f40040590bcd091a3714b63cb5e46ca231b2
MD5 53d4f1dd838a8eec55136f6ab8452712
BLAKE2b-256 355bd37c76c5e6a45f4fb99b21534a4247dc50dfbc8bcde527a129551f63cb6b

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.7.1-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 ed733b809aee1dba24abb546b48ba3366cd06e14fa264090531a77415cd49a1c
MD5 220fb3daab5f2bcc4bebfa3f75e3d8d1
BLAKE2b-256 bf4a5636917f24d47fddaaf2594faed90e9407d46694408596d0c394df7c5fba

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.7.1-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 221.6 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for efel-5.7.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 f0920397ce54e1d615f16f5ffa9d75a6d20e0bb09d0c014559a92c0462fe89ff
MD5 b6465f0c69c4c3f3710c05053ec51a43
BLAKE2b-256 ae52abf57a3be8fbb84449ca9b38f9f054b8338eb28e7de38a6aea49bb53a422

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.7.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 be92c2397153232d650285d2593d1d116f341869544a6e6f07521e97ce69e367
MD5 5fdb529e12e46dea5f6c4b12f416278b
BLAKE2b-256 f63508b1ad385619667e97b42949ddf197f5b2e7fbf989df1963b451b429401a

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.7.1-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 e4c4a6705eac68437bff8bde617747e9ac924a35123f82890a38080b9743ba5c
MD5 9a7f7f7a39daba6a769fb19f037087c4
BLAKE2b-256 7973aacc08dbb5e92fcca2b4908e0b7e2c73fd4cd5c3497ba76e1a63a50391e5

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.7.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 221.6 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for efel-5.7.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 b00f1cfc7dd021e30830a2fe4b6f1ef1448f1206b0c0df9308034d169f5e634b
MD5 f732517e40e5615525271713a106038a
BLAKE2b-256 d962d248193b64ce4212d68657c50d5389b5c2359d245d697513b675276da933

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.7.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0bf6bc005ff4131b2bd7ba879de098a16132abc082c5a6f4dd2e8ae0531fd241
MD5 6e8587e06cf24bd4a80c4e1ee2eb5541
BLAKE2b-256 8a629f44110edd5f220308f2c961f6aaf6f61ee5e11c4e8263a385d16884d1cc

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.7.1-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 ba593916c39d26104acb8d2d21de353c9db86e0a09579a5fbf97abf4c3c9b673
MD5 e07ec9d2870f4d6b0c8117215d95d6af
BLAKE2b-256 1932a83cbd0176d1370224038e01ba4bbc0a8ab4da60c7fdc09884dc0a60ae1f

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.7.1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 221.6 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for efel-5.7.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 9c77e384a6a22b63c1e15080709b0ccf8459d116a899d0e55879dea67c2671ea
MD5 e8c6bd6ee067b16dfd69da20c022b3ad
BLAKE2b-256 817b1b8f24e349e85b3b6eb34851e896e4f9020b41dafe1cd7221704832c7d0f

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.7.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5abbe9e1dd35bdcacc43fbd3667ad1c657bcf2507cdec5bd6cd99b8706c5779b
MD5 9a613adc8bd81db1c988c26af264b107
BLAKE2b-256 61c6b71cc87076a4e9d6835c4c058f364002e829018cc02a489c1beae29c8fcf

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.7.1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 ae772ec001e01c0bc14c1aa2bca5b2bbb236176d45a17dee9edf7a75f4b46c08
MD5 8a7f401dfc5af25e91881cb0da0787fe
BLAKE2b-256 f3e977bc4ffbfb8aa7d80953747ec67993ca4c3e9916fdcdda6564d01ec31e21

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