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

Uploaded Source

Built Distributions

efel-5.6.13-cp312-cp312-win_amd64.whl (211.3 kB view details)

Uploaded CPython 3.12 Windows x86-64

efel-5.6.13-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.13-cp312-cp312-macosx_10_9_x86_64.whl (263.6 kB view details)

Uploaded CPython 3.12 macOS 10.9+ x86-64

efel-5.6.13-cp311-cp311-win_amd64.whl (211.3 kB view details)

Uploaded CPython 3.11 Windows x86-64

efel-5.6.13-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.13-cp311-cp311-macosx_10_9_x86_64.whl (263.5 kB view details)

Uploaded CPython 3.11 macOS 10.9+ x86-64

efel-5.6.13-cp310-cp310-win_amd64.whl (211.3 kB view details)

Uploaded CPython 3.10 Windows x86-64

efel-5.6.13-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.13-cp310-cp310-macosx_10_9_x86_64.whl (263.5 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

efel-5.6.13-cp39-cp39-win_amd64.whl (211.3 kB view details)

Uploaded CPython 3.9 Windows x86-64

efel-5.6.13-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.13-cp39-cp39-macosx_10_9_x86_64.whl (263.5 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: efel-5.6.13.tar.gz
  • Upload date:
  • Size: 102.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.13.tar.gz
Algorithm Hash digest
SHA256 525355da6ba023f8ca8ceeafa01bcaff3cd99887247737dd4b33de3659b1ae42
MD5 72d58acda721d267b11d307ed75965ad
BLAKE2b-256 eee6ed5a68f78290b2ea8a05abc04bf23cf7534618a9821d7edb96f5c74ba0f5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: efel-5.6.13-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 211.3 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.13-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 a052325406c697da47abe5cf7c720376807aefc34db2e017b7ca2f236c7e3409
MD5 6322d1f35f0530a05b77d8b195519999
BLAKE2b-256 547e030d6a08486155a7e710599a0419067999753461c947fe2cb41ce261a7c7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.6.13-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 569719a8d122f538e70ce71746f6ccc06c8054157698fdda00de17f0a9c5b661
MD5 4b9720ddf59b2b7510778077c5f72bda
BLAKE2b-256 e1b54c9d98997a0d99f2b018c88d1fa4ba8205f47e24ad03664f1d20d901b8d8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.6.13-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 16bce01d3103035782069df6bdd11c7bb3e059ab744050e9673b1250883049d8
MD5 00e756f3a6196b082d80b66a1f7dc701
BLAKE2b-256 2b9493373ad587ec47b57884e457f5fdf6affc4b3fb989c827b98d1bae9adb29

See more details on using hashes here.

File details

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

File metadata

  • Download URL: efel-5.6.13-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 211.3 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.13-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 eac7d2058118f5852d86cdeaaed9dea2f1196cbcbd0ce9c0a1971560952ad437
MD5 ee84f5efb8f4c7f2ea7ba3c6e7ccc8ce
BLAKE2b-256 a4f7f9eab8fbe91b7e1876574b813e7872441359c8463698c5fd789fb99bc246

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.6.13-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e5a451a7bef6f11c299bb93cfdeb5f87c4487d89b09860c04aac576cdc99dd64
MD5 5d7ef4b15c766a039244d377b456a19c
BLAKE2b-256 cdb8dff139ab0d73ebf198441707a3de231901b26b8e187ab03fe6d0368ef62c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.6.13-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 7fb19163024bae35f91f9748a7fdcc4e48dc79de95803297cd5531a11f4752b1
MD5 149c8c181a0174503c35102583cdded7
BLAKE2b-256 194ed340cd3ba695bfe072597bdbde1a0a8739f1f007b408773e6d2650073942

See more details on using hashes here.

File details

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

File metadata

  • Download URL: efel-5.6.13-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 211.3 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.13-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 858a7bda7a0b109a03138920685b93447a97662020c0b8d9f7a0f082b60a2005
MD5 b14ea58c9a4d590fa3f11fefd6f403fc
BLAKE2b-256 800bd27b225fb714476e14c41241ff4c5f9f55cc61acb15acfb8d8295fc2a214

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.6.13-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8c002d273d4f5f245a676758fe4a301e62a9aeb2c9b650ab657ce6efd997ea09
MD5 0de5eb4d77cc74b016dbf861ca5c3f12
BLAKE2b-256 16d6aa8bd773ece3824a955ad4c7e93f04e36fee558b9ab7a5b998823ce0c14a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.6.13-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 14797000ac2d1e5c8e7d3db488a6015e571dc0227681bcc5a6b9d3d4812ef204
MD5 5943ef4e2e6fac4ef730f162f652234f
BLAKE2b-256 a270866b568e560c47db6e9511501bf1423af76007e743944428f1e05a896f78

See more details on using hashes here.

File details

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

File metadata

  • Download URL: efel-5.6.13-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 211.3 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.13-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 e6020e7b94c9bec3462e0eb9c8ca75d6322846bb047955cb4350f3aea0bdaa74
MD5 c731caa1d1b4c0faa2287823625e4ab2
BLAKE2b-256 a4e822d01888594d7dc85cf424cf7b2bac3c875d3eaf1921e6f606f50b1c2ec6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.6.13-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0e1017bc8cc7a999f796bd7b5823d1567eea98be8d96e5bcc26b8579e7d3bb2c
MD5 27050fa38a75ac9a56996b747e43601b
BLAKE2b-256 a652457bcb491ab9fd7d5314e5f51f4796a0604bb46f0001c00949d9b88962a1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.6.13-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 91d5dd9531124aef65486b209c96a4d4bb3ae972c274d3fd042b8b667ff36609
MD5 ffcffb12149a7bf7c91a09cb845c875f
BLAKE2b-256 66328e451f9a40bc43abd34840f8cb099eaf25ac429baaa70ab6d9a82dedaf16

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