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

Uploaded Source

Built Distributions

efel-5.6.26-cp312-cp312-win_amd64.whl (217.4 kB view details)

Uploaded CPython 3.12 Windows x86-64

efel-5.6.26-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.6.26-cp312-cp312-macosx_10_9_x86_64.whl (269.9 kB view details)

Uploaded CPython 3.12 macOS 10.9+ x86-64

efel-5.6.26-cp311-cp311-win_amd64.whl (217.4 kB view details)

Uploaded CPython 3.11 Windows x86-64

efel-5.6.26-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.6.26-cp311-cp311-macosx_10_9_x86_64.whl (269.8 kB view details)

Uploaded CPython 3.11 macOS 10.9+ x86-64

efel-5.6.26-cp310-cp310-win_amd64.whl (217.4 kB view details)

Uploaded CPython 3.10 Windows x86-64

efel-5.6.26-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.6.26-cp310-cp310-macosx_10_9_x86_64.whl (269.8 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

efel-5.6.26-cp39-cp39-win_amd64.whl (217.4 kB view details)

Uploaded CPython 3.9 Windows x86-64

efel-5.6.26-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.6.26-cp39-cp39-macosx_10_9_x86_64.whl (269.8 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: efel-5.6.26.tar.gz
  • Upload date:
  • Size: 103.9 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.26.tar.gz
Algorithm Hash digest
SHA256 051a8d2efc67b53f51ea0a12705d531424a83e903f2188d0c5a6691e1ff07b31
MD5 b59721ddec00d83899b4364129bd67e3
BLAKE2b-256 51a5b1bddb4331737dd1975ee24703c4f52e033f49d9555eb60374ce27256e8f

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.6.26-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 217.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.26-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 44379947cebd9200efbb74d1cc3a2758e333e970329315c57905e340089e8422
MD5 39c46febad593729bb215fb194b2d7e8
BLAKE2b-256 058fb4d0bdca01e990e12844fdd60dd2e548d468135e08ede39bb0b60ad17ad7

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.26-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5114a6d5c33c98a4883acc1cb97be6983f2708e769ecf891a73cfdd3e448fa39
MD5 ef3c13654118f6cd6ae32e0921a3edb5
BLAKE2b-256 05ab5084257dcd928187812324ed7ddd104f21254343c2b2a2eb69b762d281b0

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.26-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 999dbb950ec78b3ec88d6da5da2c1e8f9c685bbd02488ddc732ed401108cd701
MD5 2a1ff0dc2e99decafc6828d33ca0cfcf
BLAKE2b-256 e2a80749049438fa40dd2cbc074a14be8a722e0220825e743511cafecf240245

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.6.26-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 217.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.26-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 9a179d818fbeebb4800f7fcbf24e4e8104da0c4870231fd36d416d5df5e94cde
MD5 75de4b686ea9b65ad7b7a10598e9470b
BLAKE2b-256 f650ff28ea532ab34c1e094ba20d35f9f746370ccd35a682a3946800a55bce92

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.26-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f0cdcc549f1b7f309541916dc0d8670cdcbff847096a1870c042dbacf18929ea
MD5 1476555725a8b0014f36fc82f7379c25
BLAKE2b-256 1e8014590b03932abcf6c222eae5211af5d6877ad0043d3b773b06ac5feb8531

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.26-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 ab57ab1fac17e4ef068be9c9bf925d4158971cba4035126a606e3d1e49d8e794
MD5 2b501752dee5c427cd63c997868e5389
BLAKE2b-256 dc644d1fbe5e1dcf92435613f5b47a0d6ccb6e344507ece9d58240e0321e1383

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.6.26-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 217.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.26-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 637cd0381cac765c382c89e86656a522c7244acba1c06c5938745f594780b5ba
MD5 e7ccff806755dbd87454a75af9358426
BLAKE2b-256 5b1e06b2a8fe4350af6d022b2839f0804f83c9d13981ebb93dd0bd1077d5ddae

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.26-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ff747fd088723ed1f90410ee9b9ee608b66e857942d6d018722cd63ebb5efeb6
MD5 1e04f3f752b97d4a4aba6f671d8f98a2
BLAKE2b-256 6f15b0381431eb9fe8bd47d8494812c9bede1c6efaf4d64579dda8e2e13330a5

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.26-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 dfecff376e113d884075c9b0e15c4ee538e37e0d1d48f3836cd9ce443fc47b2d
MD5 5944a92fb717c19a9df73411e06d182b
BLAKE2b-256 c2848a51197767b454618ee679a3cbbbd24b6e844831225cc4ae8bcf6073e412

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.6.26-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 217.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.26-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 05fb0d170271f5bb110171c1df81c996ca73b6c0ad6008abe8c4b6343ba33a4f
MD5 37014ce6c9be0317ca2c57dc1525c90a
BLAKE2b-256 b3497c0478caf636ebfdc3bc4525076cb3e7a76ea6e61b9595972bc2f0619c7c

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.26-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 69dc062ff0b3a2b06be96bfb50a94b6114003f4461d34d0f007332688f8d7d59
MD5 c921337b1366cd076dad8ca1fd8e3b16
BLAKE2b-256 ebd192d3c32c5106c4bd935c237c281fd51e9af608f2827097207bbf53b232e0

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.26-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 64e68314aa0ad8db1ef09f9fbaa163013b6bd47fe5320a3e8bd4356e54ad0909
MD5 30bcff893b7e54dfffffac5502f170e4
BLAKE2b-256 128c2d1c1a9e3e7086a5fd06c3e8d8ba6c2f325aefebc46d2e009859df2824e6

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