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.

How to cite

When you use this eFEL software for your research, we ask you to cite it (this includes poster presentations) by referring to the "Cite this repository" button at the top of the repository page to get various citation formats, including APA and BibTeX.

For detailed citation information, please refer to the CITATION.cff file.

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

Uploaded Source

Built Distributions

efel-5.7.11-cp312-cp312-win_amd64.whl (223.0 kB view details)

Uploaded CPython 3.12 Windows x86-64

efel-5.7.11-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.11-cp312-cp312-macosx_10_13_x86_64.whl (274.4 kB view details)

Uploaded CPython 3.12 macOS 10.13+ x86-64

efel-5.7.11-cp311-cp311-win_amd64.whl (223.0 kB view details)

Uploaded CPython 3.11 Windows x86-64

efel-5.7.11-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.11-cp311-cp311-macosx_10_9_x86_64.whl (275.4 kB view details)

Uploaded CPython 3.11 macOS 10.9+ x86-64

efel-5.7.11-cp310-cp310-win_amd64.whl (223.0 kB view details)

Uploaded CPython 3.10 Windows x86-64

efel-5.7.11-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.11-cp310-cp310-macosx_10_9_x86_64.whl (275.4 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

efel-5.7.11-cp39-cp39-win_amd64.whl (223.0 kB view details)

Uploaded CPython 3.9 Windows x86-64

efel-5.7.11-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.11-cp39-cp39-macosx_10_9_x86_64.whl (275.4 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: efel-5.7.11.tar.gz
  • Upload date:
  • Size: 108.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for efel-5.7.11.tar.gz
Algorithm Hash digest
SHA256 6ff3b4681fb0d27f24ee782484434581894f6a1de920c021698ad78bc5caa5da
MD5 ccca915a75e435eb9af7523dbf04d0e6
BLAKE2b-256 97fef9d0f03b81951c38ed77c9c11e791a666b757fa435e2e84652a91b929c07

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.7.11-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 223.0 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for efel-5.7.11-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 3a051b6018c2d612b9796960723c3bf911488d688cb50d753da6e7d405e6e2a6
MD5 d4a95b64e311c912964fed1198ee028f
BLAKE2b-256 26df5c483708e2dc5e0dea70483312aa46307b862e3038f48e25dac3f0433e4f

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.7.11-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 59a3437d12d7cc5ec7d8008e6d62e1e63e37fb6d476ba4129518155042286690
MD5 c3169642676c9d09fd0edc0daff782ab
BLAKE2b-256 0e157ccecedd2e2a576b5cf7279a0e6819030c82691fb1599795eb610c8b7202

See more details on using hashes here.

Provenance

File details

Details for the file efel-5.7.11-cp312-cp312-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for efel-5.7.11-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 3d349582c8a0896379664a2e292afc82ec88ab9953f674d343282ef4643e7906
MD5 44e2e8c829965baec29f73fcf0eb6ced
BLAKE2b-256 3b1e15b7f1a6ffe90739e290d44aa63b4697221c4ee8690eb7c04482737fd9a5

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.7.11-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 223.0 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for efel-5.7.11-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 2dbde46f3fed956e8e52cccbd4e2047d41b06235438dd6aaba21bec2a2c2845a
MD5 2627f69f5238254f2df5626dffe02c10
BLAKE2b-256 30457c0dcf418524624f18ff6a5aca1fa49ec32e13784afb11a5773cfbe35bc5

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.7.11-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 74b5a4028fc50f769381b6fc0d4f4149249106e5fe2819d433d35342e0dac9de
MD5 b525f1d87ef99bc239c8f304b7f515c2
BLAKE2b-256 b53860b7e38d8d2e3ff8a8ec5dae48b256fd78add4086f842d19927bb865f1cf

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.7.11-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 d1a6e186c052004039c5a5145cb76f087b656076ebec511ede64f0467f7ec4cd
MD5 f245a61e463178d87d76859d59f38892
BLAKE2b-256 a66ec8b444f7118b9851f2a0b2d230960fe697286222673de97b284837e7c710

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.7.11-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 223.0 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for efel-5.7.11-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 4eb91021430ba88c7e36a20fc268dc9b13db9a5076c6b1d86ad1aded44ee705b
MD5 fff11ce53adf25cd56feb90756aa46e7
BLAKE2b-256 32d7b78a9122854c51f3c3ae3deaeb813b3505bab0db158b196acab061f38fa8

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.7.11-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1ff45cd921a9be9100640c9214705d4764ed3d95db9ffc0eb79a958334b8827b
MD5 2810d62c80028f676f06f332747adb78
BLAKE2b-256 a4d920d8d1be8f074c20976fcc38ac696482650bdcc737927b982c120f157674

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.7.11-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 fe8630e0b6d43644ff0ac92d89cd79c5d941647b1d6f8f6f6938fc41da00ba48
MD5 c63ac36b8df7b37ee62740bb41cec55a
BLAKE2b-256 c42ed48a91727d9a7311f70277a4d44940134ca28668f78b05171b6b49fe2ad4

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.7.11-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 223.0 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for efel-5.7.11-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 f268c405f3391d18b169c94f9401d722e33b331c80ec83c78d0864b37dd0a617
MD5 132c974e1e9c2538004ccbfa5e57d1a5
BLAKE2b-256 c755d2f80f9e998dfa25665906c06f555acfa407e9563aab2250ff698b4f69c9

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.7.11-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 cfdd484fe0548b237a01a055e5d4cc2aa816723df776d2b53c707bb1ce809b5d
MD5 5d789f52dc91bb2eed6bfb014bab36f0
BLAKE2b-256 54716d8902c68c5d9b43e5fef608bbadb5496b9a6ac27dc7f88ec9d1e3a6003b

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.7.11-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 6b33284b32cd795f2fdd97bfa8d7fe3aa6547331508953926775d287f0f7bc6e
MD5 4aa948934e4245f586731032c776b3c3
BLAKE2b-256 733bd83472c316fe78fdc60d328bb0059864918d1375d50b7d11bd36dcafc56d

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