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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.12 Windows x86-64

efel-5.7.2-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.2-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.2-cp311-cp311-win_amd64.whl (221.6 kB view details)

Uploaded CPython 3.11 Windows x86-64

efel-5.7.2-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.2-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.2-cp310-cp310-win_amd64.whl (221.6 kB view details)

Uploaded CPython 3.10 Windows x86-64

efel-5.7.2-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.2-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.2-cp39-cp39-win_amd64.whl (221.6 kB view details)

Uploaded CPython 3.9 Windows x86-64

efel-5.7.2-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.2-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.2.tar.gz.

File metadata

  • Download URL: efel-5.7.2.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.2.tar.gz
Algorithm Hash digest
SHA256 0ffd0189350b8d4b6398d39aa01c2a7fcbbc95afc5c413ef53b18b3f495a0e7e
MD5 7c7b1092762c9485c8e16b1405b7c234
BLAKE2b-256 7fa624f95bcb6277435048bbcc600d90dfee1387cc00b0d905a216f419073730

See more details on using hashes here.

File details

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

File metadata

  • Download URL: efel-5.7.2-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.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 bf99c8dd4f31e621fffd0d49355a8afff02fd94e85ca95f07b96af63785e09be
MD5 83413705adbd2235a8b5a086ead9d972
BLAKE2b-256 455f9ea319b6922883e9f69d2d9258c22a44c49a45dd2d792c4f84b504828986

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.7.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4c0b116848d131949568f3d2897319a29e9af393c37355f201c9f484f8857d65
MD5 4a549ad7ecf7ba5b398bbe1aa6aa3452
BLAKE2b-256 b543d2e9c48083919e5ef39e1fa203335262dab8e7aa7a1ac77785bd4a4a2054

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.7.2-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 5495424eee38ac945f0aa5c19180e51957249d198b559905577101c251e1d376
MD5 c5e7c1ea0c55e1c489193cc6b7d7265c
BLAKE2b-256 e49e783cb4878ed15208764f13fe1540c89a936688a8ee6ef91417c4a64fb642

See more details on using hashes here.

File details

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

File metadata

  • Download URL: efel-5.7.2-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.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 2fe552661d0721bd5ee134812ca1c144550084dd7c226185bc8ddf478478a504
MD5 360d64e8c403351036d93e57b81e1ae9
BLAKE2b-256 f230e3054acfff8387ee1a0e0bf2bff0c12124fd4c3a1d7b7ea5d8fb44b2c39e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.7.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8ee2c3ac84b27bb8fbc54243e53521b67490ebc17545f557147f80854ec425ed
MD5 199e26b8467317d6eed0d1d94fda8250
BLAKE2b-256 a7f4cfff9438f22c479ee0ddf1b27a942cb7cf2928441c79fe40e8620ea93ab7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.7.2-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 f471d92f59f1e8448c123df778f220f8d8fb06d90f4f7d5addc9306aac0d2f69
MD5 1a424f617b15a38f5c2eaef85c13185a
BLAKE2b-256 390ebce9bd912501af64b5337edd571f656ca27cffa9ba280d37a2d799f3b0f6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: efel-5.7.2-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.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 a801bef609be9b0d356f4fc1ec3b2f849774fe5e7ffb69d34adea0f82ecbedec
MD5 3eb8aea9cf0c27e488137ba99d3aab5a
BLAKE2b-256 47f99bb6a3fd3eca389749437602e4bf4a8138252b5f3df08b18f44884d90adb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.7.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0b2cb8569dd418cb7de6ba450050b4c9b5f07faf9a146fb5ce3965ec421f837f
MD5 0ff633415d1fb46041fbdacda2a0b6b3
BLAKE2b-256 e3dd361a87b1bfe34d52c9f742c23fc5730ee643db759b14a1c72661ffe1da94

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.7.2-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 a73f9e8f960a4eae6c637211b5e488cf765cd35d2f4834e9b9fbe6728b733e58
MD5 e2edb7586e95f595e57bcf7198dc65ec
BLAKE2b-256 ca819691c1f6948c94ad9eb82cb3659dc975b3bebd53938a82419539d529e353

See more details on using hashes here.

File details

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

File metadata

  • Download URL: efel-5.7.2-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.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 20254dc9ae86e4ee3de20389e005a2363826fb7dc33b1aafd7e2835586998d1f
MD5 134912955b8ac0d7ce6f2883296a0631
BLAKE2b-256 e9eadf627a2cef48e4f6ff72fc48221144c84fb98b7024ecebac40c992ab0a69

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.7.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c0417f7d10d0b6f30d71c499df3f2a568480b8d6fd3e335658f448d5bc6a5889
MD5 6e519b10ef2f258e919f7cf7bbcdc0e6
BLAKE2b-256 5696155a7c21562a805b0721ad7f70b9d47ec51507ac6ea3944f3b950c3e4b5f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.7.2-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 82ea675467c19830f6a2859089c6336f8a93e65ddda5ab15a3d2185b94c1a99d
MD5 b14db746532ace296ff4051d01c9c3e9
BLAKE2b-256 c33c3a81fa77ee4f0a6fa9f7c87f838aa6eff8f4f0212e0bfbdd70784ff74a62

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