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

Uploaded Source

Built Distributions

efel-5.7.0-cp312-cp312-win_amd64.whl (221.2 kB view details)

Uploaded CPython 3.12 Windows x86-64

efel-5.7.0-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.0-cp312-cp312-macosx_10_9_x86_64.whl (273.6 kB view details)

Uploaded CPython 3.12 macOS 10.9+ x86-64

efel-5.7.0-cp311-cp311-win_amd64.whl (221.2 kB view details)

Uploaded CPython 3.11 Windows x86-64

efel-5.7.0-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.0-cp311-cp311-macosx_10_9_x86_64.whl (273.5 kB view details)

Uploaded CPython 3.11 macOS 10.9+ x86-64

efel-5.7.0-cp310-cp310-win_amd64.whl (221.2 kB view details)

Uploaded CPython 3.10 Windows x86-64

efel-5.7.0-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.0-cp310-cp310-macosx_10_9_x86_64.whl (273.5 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

efel-5.7.0-cp39-cp39-win_amd64.whl (221.2 kB view details)

Uploaded CPython 3.9 Windows x86-64

efel-5.7.0-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.0-cp39-cp39-macosx_10_9_x86_64.whl (273.5 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: efel-5.7.0.tar.gz
  • Upload date:
  • Size: 107.5 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.0.tar.gz
Algorithm Hash digest
SHA256 e91d7f8fdec71b3241d8334783adbb29a13653a68f1b0f30b956be6ca3daa67b
MD5 6403dcf8fe7dd04036a4803153ba44c9
BLAKE2b-256 d9f47b86339d500b33915baa5f98ce4cd6e3c35fb0a510096987e54364777d33

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.7.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 221.2 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.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 0b6b15dbd553b425575d65444f0782daa8da78aa1f116b5cf725abdbd54fc020
MD5 75aa1ad47d01936c3556a6f170658ea7
BLAKE2b-256 9bdc1c37b7fc72bd74bf063bda6b97bc633f8853ebb5dddd3e1a9e0443516cef

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.7.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 02fe3b875e436000e4c2f9e5c2a3fe182739855e21779d9ac5943177223f53de
MD5 0c29fb08b41c36605809bda1e4045a8a
BLAKE2b-256 04af559619160225e5158c1b22a2e570e1efe6012a16516f38489285acba2776

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.7.0-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 e3ab62c1e6bf583bff433ed10d217d239391891eb56318ec7b62cb7c90a7dd01
MD5 d420fe8b402f51a9a36087c5ade60830
BLAKE2b-256 ff9915ea403c92e2f1f6e838b77d065db0502f58dbf727ed5f75f88702e7e6e3

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.7.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 221.2 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.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 022c2f2ccea180ce928588a1bda90562d6e7a046ff96434a09d02ca317b63b51
MD5 ef33ff511ceb8fbab78372293dac91d7
BLAKE2b-256 ed1220d74b77b129968c19cdc7a0340c34c19a14869939832f1ec91cc77fd00d

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.7.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 be0de7e706b5c7c06f021c2395a56b3543f808d83749fcaaac6b57ff1e455e79
MD5 d97e4756d5964062a022c492b66acf86
BLAKE2b-256 2e123aed7b9d0ece0abd39788be9c3c83e1798d962afc6047a1be2440acd60c5

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.7.0-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 f8f0fc640fd1bbdff9bc8fb9a33acd8cb286c4742aed8ddd1381f870faafbbe5
MD5 94c6732636277610404cededc095d737
BLAKE2b-256 779a7a6ea15a75f9a6f1fb0d9109b31ba4301502247cf2664b9da21d6fb892e5

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.7.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 221.2 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.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 ea9b861f928d6db3980c822c3ad6281f9235a23e43de4827804c2e9e1b4787cc
MD5 35fca983fd53c701fd59349418874d9c
BLAKE2b-256 accfc8582d74178eed192e9ab21ad5faaf3ae10724bd1a627a85620edabcd083

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.7.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 23e97886607c577e87f35f714df6f971ee1842373e8ac15a733c52a2c0a0582a
MD5 78d61e4b75da6f8fd97c69dce1e418c1
BLAKE2b-256 d7ef9eddcb45eb098fa8df68b1c1e5ba44441482a4ce6412f478481ee3cfb687

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.7.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 4f110e03ae9ec3d44bfcdafac1e52fcfbd4fdca450e7ab1197b0137350539f13
MD5 5b452df03baaeed264c7f3ef25004893
BLAKE2b-256 d410a717de2efe1ba8eae8efafcdc3a0e765c68f3fc6bbbc5f8d475c97d15ebd

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.7.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 221.2 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.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 53a25378fa0ebc1c78c6abc321efeb302e43e9007c52fc959c18fbb6e8b23e88
MD5 407966177d64725c2f604d42c8c6261a
BLAKE2b-256 bcfc58575308d3c6544428b19ae8b1451d809835c7b4d723302c679cca52a92e

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.7.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e42ef704f2f40bc4926042a14779c1ec2215cd782e63cd179aa82de018b208fa
MD5 e3ab5e56605c440bebf4ef9b2087e736
BLAKE2b-256 4562541934522e1cceed84de35aeb4aea008a89e9c9a0ea31b2dbaf0d31f8b59

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.7.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 1c27bdfd74fd0d8dcb2a67997e29dfb01b0bad85e2f32d3cd75baeef2b450b3f
MD5 e6acd3eb3ed6a3c3699028bc842918fb
BLAKE2b-256 b4d868617b095213a2a6e96da0a01b0c37a3303743c19447c109ca5c4cd04beb

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