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.8+
  • 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.getFeatureNames()

The python function to extract features is getFeatureValues(...). 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.getFeatureValues(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

This version

5.3.2

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

Uploaded Source

Built Distributions

efel-5.3.2-cp311-cp311-win_amd64.whl (190.2 kB view details)

Uploaded CPython 3.11 Windows x86-64

efel-5.3.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.8 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

efel-5.3.2-cp311-cp311-macosx_10_9_x86_64.whl (234.1 kB view details)

Uploaded CPython 3.11 macOS 10.9+ x86-64

efel-5.3.2-cp310-cp310-win_amd64.whl (190.2 kB view details)

Uploaded CPython 3.10 Windows x86-64

efel-5.3.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.8 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

efel-5.3.2-cp310-cp310-macosx_10_9_x86_64.whl (234.1 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

efel-5.3.2-cp39-cp39-win_amd64.whl (190.2 kB view details)

Uploaded CPython 3.9 Windows x86-64

efel-5.3.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.8 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

efel-5.3.2-cp39-cp39-macosx_10_9_x86_64.whl (234.1 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

efel-5.3.2-cp38-cp38-win_amd64.whl (190.2 kB view details)

Uploaded CPython 3.8 Windows x86-64

efel-5.3.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.8 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

efel-5.3.2-cp38-cp38-macosx_10_9_x86_64.whl (234.1 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: efel-5.3.2.tar.gz
  • Upload date:
  • Size: 109.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for efel-5.3.2.tar.gz
Algorithm Hash digest
SHA256 475b6db44a3bbdaab9253a829b96f56716c0298236ec4647f8838b5ba01f2ec6
MD5 607afee383ff88353b42628e404b7290
BLAKE2b-256 2357369a8d57929d94f3a2063e88ba705ca022df7e317cf249b33df07717bdc6

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.3.2-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 190.2 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for efel-5.3.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 5f389749bfa859d49f309bf800559e7def3369c24582b76792602d65da9282f7
MD5 935450392e94647562f37975550e182e
BLAKE2b-256 8a4e330ad3eca6a675a712062544039a5142b1fdad090f1f7d385de84ee7699c

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.3.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 17fc41a3ef348e9daa71938fa1831bf117161a430f5489541f4fdfd45d355c18
MD5 b000baa1e6b09f3f929c7a5bc50dfbdc
BLAKE2b-256 3bc7367e379545300919d3fb02115f4bbba58ad792ca0b04bd0741bf25125478

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.3.2-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 2e6d1620c442ecae7cf43d69e63e1e3bc74ee0e762abbcf57de711c32430e9b3
MD5 5f6687e9d8e34dcf05da13ecf0fc3025
BLAKE2b-256 dc9cf77e41bd6d901a29f85b1d1d47b27a41ea783c82c743fcde3be6080fba70

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.3.2-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 190.2 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for efel-5.3.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 64a6de6c8ad691aa5f5c24b827b244dd31b64a0dfe0820398761882f021d6404
MD5 0511fb2659dfd937a1fb131b144dd983
BLAKE2b-256 dd84ef48e5d634e0434ca5e5442689ea52d5e3a0ab441490af5cb8a669c30724

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.3.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 157d78dd1f2e5d7756f8b81278e4537df8f8ab5dad34023d41ac79bc6dcec7d0
MD5 5e61db53dff71d1473986c1a7aa5618f
BLAKE2b-256 3511d807c85a7a919a15fdbef7cd747d4eea5b1f4d753a261b636d3ec8fd44f8

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.3.2-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 c431549509e4157c52638a304e342c80328a520c27d5df0af6799e3d615cb9e8
MD5 fdb4d53731bdf75eb40dd750af745c9f
BLAKE2b-256 d6ccd27804e5684a0d2a7436c2838020a4f989baf40c1820c27fcf67075d7298

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.3.2-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 190.2 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for efel-5.3.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 ba30f5d6f59ae243df1a33c1d4db72baa36f346bd7ea2602e85caf4e75eb2a2a
MD5 3a3965cb3f3c0900ada8d7d8f9d75238
BLAKE2b-256 4f09dfe5c3f0dc35ac34075351c5e9444c41265d02a0e36698a45629d8616631

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.3.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e2dde05b3090323b2d8c3c960ac46237452e554e7e1c7aa46b7c89a243c3ba80
MD5 260c30e6e3f23c243844f643fcf1260d
BLAKE2b-256 83bbc62d52eecf1f5337eff78159e39226ab6d59b28a6d9d88080a6c351ed34a

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.3.2-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 ac525cf657e3c8beeb24ef3f950c60cfd20dd42ee8fa9d3071068b885f79fd85
MD5 a48e148650a6a01121a277b3befe9859
BLAKE2b-256 f050b04542ed6fd11f91ecf4758bde8dd2c82158ee6edd393954f230892e9bd3

See more details on using hashes here.

Provenance

File details

Details for the file efel-5.3.2-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: efel-5.3.2-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 190.2 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for efel-5.3.2-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 9a5857b046a5f9f64a5bffbf220cc3ca7ff151bcbc3cb0d987bad9d37f6fdbee
MD5 55df172efe3706cf8bb7fdec50f81c51
BLAKE2b-256 cb435a0ecd9b09a951d7adc1b8a41905bf07a7e35644fc384720084f9793adbf

See more details on using hashes here.

Provenance

File details

Details for the file efel-5.3.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for efel-5.3.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0f0b147befa597b3329d9448257a0d538b7c6079b849abb8ee5775b865eb4157
MD5 8b369350cd9c79a2aaf39c66315dcb42
BLAKE2b-256 ca4a32188664c593932cf3dc383c27e8823d70e8616a009a6b483699de28c19d

See more details on using hashes here.

Provenance

File details

Details for the file efel-5.3.2-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for efel-5.3.2-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 7ece2507341679983f9da9ce7c4c060eca43b91bf974165bd53eeaf52e07d32a
MD5 cee113b5e550ff64f80b425d82896c4f
BLAKE2b-256 039b5c90237afaf7981ee33dfe9b6dc9327af25b83f8b7e30191cac550f6fa25

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