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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.12 Windows x86-64

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

Uploaded CPython 3.11 Windows x86-64

efel-5.6.8-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.8-cp311-cp311-macosx_10_9_x86_64.whl (248.1 kB view details)

Uploaded CPython 3.11 macOS 10.9+ x86-64

efel-5.6.8-cp310-cp310-win_amd64.whl (201.8 kB view details)

Uploaded CPython 3.10 Windows x86-64

efel-5.6.8-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.8-cp310-cp310-macosx_10_9_x86_64.whl (248.1 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

efel-5.6.8-cp39-cp39-win_amd64.whl (201.8 kB view details)

Uploaded CPython 3.9 Windows x86-64

efel-5.6.8-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.8-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.8.tar.gz.

File metadata

  • Download URL: efel-5.6.8.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.8.tar.gz
Algorithm Hash digest
SHA256 cd135a75aa8c09ab7bdb2b857e1d5a3b324085b02bf8ca9c2f2d8899543834f0
MD5 257d3b7f785a57c39cbce80654b54b66
BLAKE2b-256 791e31cbb4d223fa5779a1791b711bb7cd79f7dad2bf7ab6bce1a22e8e7c0d2f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: efel-5.6.8-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.8-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 a23d981b13fd6e24d330e34952bcf8148ab6430c5bac43f26c3ab4fdbe1300d9
MD5 0b114249a869d41cd762e5c0da27b680
BLAKE2b-256 1b9e5a6d93683b018fe379f0ec6198b31e14df5a90e6eb7c9c99cbb7207ec8a7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.6.8-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 52ca6fdf83ca800bd2b738a838e44be5ab4d74dad78f0513caf3ed618d8fcf5b
MD5 d0abf94c4e82d420ddf28ed6f96454e6
BLAKE2b-256 4f61d72b54d87bf19da39866d506aa1890f064723300b1bdca5e977c57aa98bf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.6.8-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 c33605621fe803c4286b921be6e979bb58ffe31cd75d520ea2adcbb7b44f5aa2
MD5 c4d3211fb977b7ce4644aec05c2b1669
BLAKE2b-256 fa5e7ac7ee3c0809873d05626482041a57e6ee5d16d2aecb94501e78ea66f791

See more details on using hashes here.

File details

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

File metadata

  • Download URL: efel-5.6.8-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.8-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 3929df6d135abecb63da279354334517f9dbe793d0249381fae6cc281d042b8f
MD5 faefff1b625cad80b7530b01a474486a
BLAKE2b-256 8facd4171caaaa2c1733383f6228f0c3cfe3baf2d0e22d82dc4af4bbe4a9ae5d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.6.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0e6fadc97e7288a750eba9ea095fe6b8ea293737e9353b2e68e94f0988481fcb
MD5 e6d810bf7beeef396e127791b3b81f27
BLAKE2b-256 9ab86ed73da30b118d95a26965eb2c2e7d4f344111a8dc131d88ab73d507dbff

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.6.8-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 54552df0e292ba42f62861d1b47b785d1137e9e07998bbcb76ef10f0639e55a4
MD5 879542e2bffc107945d3b17ea49d7a13
BLAKE2b-256 6a8fac528d3c2225c479bd25fe4ebfc70ac6e73886f9952bf5a0b488dcf5fea7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: efel-5.6.8-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.8-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 48308e6be9a840a3f9576832570f253f6d8e44c0537b67136802b1643806f489
MD5 efb53001d690b9bff5cae3c53288071f
BLAKE2b-256 81c6fc3ff15fe7647c81c6562510077ffae4464d55d1a1a2341a5630a79c1884

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.6.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bcf5640111a53a0f1d58a26d165b2eff82e948c4f18b17778759ca6c38af7c62
MD5 f86a8ee4442b15abbc0af9da5208641c
BLAKE2b-256 342e5b0e17346bbea32e0edcdf834fe11bcd0e82f11f8d7b31aa226f00fb9198

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.6.8-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 434da5b0fff08d2078e869468d08b5dee3710b8548117825f9170fdd0ec9fd39
MD5 7bba147986d7791a1a1df626b9dea364
BLAKE2b-256 b4d6af08ce67cba50a9d520ee64285d7feae463a66c8ddeb0352b820bb9129e8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: efel-5.6.8-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.8-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 ce669930c8dc4fd92a289081a3344f382b9a48a693c741b94db189176644264a
MD5 ec7b67ed29fea2ba20bb57b37e44f1b1
BLAKE2b-256 b272e9f99cf2de22c981ebf55fda8653d395d1b5809b7d369f7459d08881fbe3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.6.8-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 92eb9c31cd06560583c0cbc522ab4503402a4b91ebe6a5fb8bcbe29dd520eb6e
MD5 7052cb618a2405441031a1481d996dc0
BLAKE2b-256 b27c4658ebc221724341caa47997b587fd9b812c050468bd74ad2675a83c9cda

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.6.8-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 e96dec251c468b839320f2db9b843def980748b61cee4222b3d6f0f2c3dc7f2a
MD5 52492beb476f00c9051e6f696335f00d
BLAKE2b-256 cbd8770afe520fb90ce811d4bafc66eb41c397abce20ab76e2b85d0d677a4bfa

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