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

Uploaded Source

Built Distributions

efel-5.6.19-cp312-cp312-win_amd64.whl (212.5 kB view details)

Uploaded CPython 3.12 Windows x86-64

efel-5.6.19-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.7 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

efel-5.6.19-cp312-cp312-macosx_10_9_x86_64.whl (264.7 kB view details)

Uploaded CPython 3.12 macOS 10.9+ x86-64

efel-5.6.19-cp311-cp311-win_amd64.whl (212.5 kB view details)

Uploaded CPython 3.11 Windows x86-64

efel-5.6.19-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.7 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

efel-5.6.19-cp311-cp311-macosx_10_9_x86_64.whl (264.7 kB view details)

Uploaded CPython 3.11 macOS 10.9+ x86-64

efel-5.6.19-cp310-cp310-win_amd64.whl (212.5 kB view details)

Uploaded CPython 3.10 Windows x86-64

efel-5.6.19-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.7 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

efel-5.6.19-cp310-cp310-macosx_10_9_x86_64.whl (264.7 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

efel-5.6.19-cp39-cp39-win_amd64.whl (212.5 kB view details)

Uploaded CPython 3.9 Windows x86-64

efel-5.6.19-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.7 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

efel-5.6.19-cp39-cp39-macosx_10_9_x86_64.whl (264.7 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: efel-5.6.19.tar.gz
  • Upload date:
  • Size: 103.3 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.19.tar.gz
Algorithm Hash digest
SHA256 84616b3ecc95182c0951568b8cf0b3ae2753a6400a17663f1fb1d8f23bbbba48
MD5 acfbe2e41f9f8ce71a8969c146100740
BLAKE2b-256 43b46ab3a6ee6c87fa7f4273ad896002891c5484aab1f3d8ae8f08205921dc4b

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.6.19-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 212.5 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.19-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 4f7526857b9ceb824038f1a915d0e73a3dde20526e670c3ffc13b621029b462b
MD5 5f4bfce315e3cb9d54fab0cc4e05f74a
BLAKE2b-256 eb1d589b32f0d394ac8cc858ce0ef1eb88a5db0eb186ea604351901f1c50ce98

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.19-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 abefb8e283326f8e76d098cf9820cc5c2bbd781bbe4d1b582ca780e82e5807af
MD5 0efbe6087055accfa5f04f7794083a4a
BLAKE2b-256 32181c489c30acbcd26f317a98f3b53444dc9e5f791760a23966bdc268cdd675

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.19-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 ae77cf37fb7026404b06c5af382bd75ecc68bf07415b8c0e050046375a7af28c
MD5 42c4da670860712c35f5385d31b4d668
BLAKE2b-256 d5eae00fd05679410af047f9bf46e0139ca5c77c1dfa15484334ee0f8273510c

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.6.19-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 212.5 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.19-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 6be71fffbff6ac0a5dfc5b21afa06f1132938e92ea8dc0d3b13779927ada4a57
MD5 75746d550dd27de30f767a8ebd735596
BLAKE2b-256 1b273b1525d19ee14a80a089e97e9c2cad52de6fcedd167b396b3c64c4f9aef5

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.19-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e993f06dcebdf68386f064e37c8ca22cb4028cac587735fad6c57331b9f319d3
MD5 9d55becc74feb97f27a543f5f38c25a0
BLAKE2b-256 85710f6a334085e828e7b76afac98fab5b8dc7187a052e9380ae4ab370bce93c

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.19-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 f17d53434662201408b035c8fa1f0bfaa7304411317963c7e975f12c4600d561
MD5 74fe3e712806d4b0a2d51cbb14a04c92
BLAKE2b-256 de8540bde0e08bab4eb8352e49e345def7a6fb2f823f5b7f7769b69465a73f53

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.6.19-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 212.5 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.19-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 7610031cee8a97ce3c47aee8362aee3bb623239bacd3da16248143f29df34c54
MD5 0fce14e9cf2cc16ca244ed8c813434d9
BLAKE2b-256 06bc6ba27e513c5deff49e44c2ce990e06d9daffb0c720986e32158d38d4a2d7

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.19-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b081b6a6ee7e604b56836def9befbeb759b0b0eb10c3b5d4738cc8c1c9d1263a
MD5 b17d8834a49c3cc8cb0c9b16cffeea70
BLAKE2b-256 8dc9c4efa20d4f39c25facce5c39af94dcc92b832062e85371a1cc3bbde8c0e6

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.19-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 4205242abc6fe78430e21ee5c76f9099c7869015c4d31220024b6d74318e4388
MD5 1b95e1f0e6b3766436fd564b5e062dab
BLAKE2b-256 56c5123b16bf843bf16fee67642418e5e99031b03fd1a25f3b5cc9d72d70094d

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.6.19-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 212.5 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.19-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 c97db8a68a0b202537637cf38f851fc10229a6203bbbde3d96dcb9abc2518281
MD5 56a1ba7f412cbb4c23739d2190d86333
BLAKE2b-256 318de8928f20205b7f290f39424ddeffba2553eda8960a7d598be92e27b766be

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.19-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ac6c4f3573d790afd0efe5f0562fc562c7b5b58d3556a650101fe935e8ab99f1
MD5 c3343ff222fe3e52f112d20ee52a3f9e
BLAKE2b-256 2f6e6b70e91564e26e44c880486c0daa37a7695bdc8d57ad8a976b0468c79e18

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.19-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 f4cf35639533c95a055afa24022d2d267f9ea68a40261d5d9dfbbd635e7e109e
MD5 83eb72e05b1f6137a3d67082dc83ccc3
BLAKE2b-256 0897c6d931d94a2ea6298da3d53e57c24302a49f5eb8588df5b556e9a897ae0d

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