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

Uploaded Source

Built Distributions

efel-5.6.15-cp312-cp312-win_amd64.whl (211.4 kB view details)

Uploaded CPython 3.12 Windows x86-64

efel-5.6.15-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.15-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.15-cp311-cp311-win_amd64.whl (211.4 kB view details)

Uploaded CPython 3.11 Windows x86-64

efel-5.6.15-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.15-cp311-cp311-macosx_10_9_x86_64.whl (263.6 kB view details)

Uploaded CPython 3.11 macOS 10.9+ x86-64

efel-5.6.15-cp310-cp310-win_amd64.whl (211.4 kB view details)

Uploaded CPython 3.10 Windows x86-64

efel-5.6.15-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.15-cp310-cp310-macosx_10_9_x86_64.whl (263.6 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

efel-5.6.15-cp39-cp39-win_amd64.whl (211.4 kB view details)

Uploaded CPython 3.9 Windows x86-64

efel-5.6.15-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.15-cp39-cp39-macosx_10_9_x86_64.whl (263.6 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: efel-5.6.15.tar.gz
  • Upload date:
  • Size: 102.4 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.15.tar.gz
Algorithm Hash digest
SHA256 018f72aa4fde27fcd032669c09c859be2e41f53f130b3aad1b178da3a597af42
MD5 b9254a20dc346cce313a37c89238e2b3
BLAKE2b-256 44c0912a2896763380bf7371e96c39790eb343753a7ee8e990368dd5a57ae4ea

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.6.15-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 211.4 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.15-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 30dfc5da2a069b726d78609b26f0421c2ea5c3fd0fd40bbb6661e39e83cf2e5f
MD5 ef9c91c68a8513cd04cc51917143689c
BLAKE2b-256 d922552a6a129f8a5757ade97f84d2972df5132fae25d3b7eb318af74447f5d9

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.15-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b4e1006285da43e240014740d76cb2b6f3e3cffb81982ec6c58100cf2d54cb70
MD5 dbdfe8c9db747e11ba451a38a3b6d659
BLAKE2b-256 965bb9f38d40f9a949c94f1fdd782e955b8773dfa40d79a22ade356f4797b36c

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.15-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 0876af6ea44b46d6142f226f8505e1f20158e040ede0e6754bf47d556cbcfd34
MD5 226557a033697b44fd59f5561939c1e2
BLAKE2b-256 950ee9d45062c94ce968380f7955530c3b98e76ec715036dcfa10c2d479fd143

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.6.15-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 211.4 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.15-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 c02bdc6777dd9e477a3c5a74f897d177b21e3e0e47f9c8eb371d8dababc7c478
MD5 289a54c40ff5cf1c6cf6355653d056cb
BLAKE2b-256 0ae3d71a98fd6cc7b6556ddcc1c32858e55c7826eb9788b5ba16a17a2884d745

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.15-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d8f6df4e031d1b88e0f7acf8f6363f3a19983b73bff3405d1a3fad664bdf5e13
MD5 b3c0984edb62e57ebbaa13051f17c6de
BLAKE2b-256 63a393830f9fae1574e37558d9392bb278d53902075fb7f7f766ee047ccaf3a4

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.15-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 939b49d1f1b59b015975ac34e0b5191a161d95f02e96dbe36e8f9b6df635c0f3
MD5 4ad89f9bc2f77c38941b641fd5cd1810
BLAKE2b-256 587f3b2bb675eaacbcde3c5c12fcfd311d7fa76e86a177db37fa1a278baccad4

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.6.15-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 211.4 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.15-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 f444d300c0773f93156ccac0d071b6b3cf759fd6070dda671cb24d6ad1e7048e
MD5 6a21b07a7ea00440ef2bc995b6de7e65
BLAKE2b-256 d7aa1e07ab44f3fe12c9f107d56238588dc4d707aed5c41ddb7b8bc70f0f4a64

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.15-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a56efa51c2f9910c86cf78442a285bab1b23329783801c80aec8d5f47ede1159
MD5 6390944540f6b3db1f2221fc732d4e8c
BLAKE2b-256 460d3b86484ecc27ef79e5c682c1d41f272f3378d759eaee4b8bbce83a5f42b7

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.15-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 0415ce53f258c3d35d468837dac67ef1f2cabd354cfba94bda0df9e99053db7e
MD5 27b88a3265c96a74d34dbdb8c5661e2b
BLAKE2b-256 afb2fc5e81558d35f92724d56c73bf99a2f1a31af497054a1b746b33bc13becf

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.6.15-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 211.4 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.15-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 3d1e00843021e5d6fece6def4b559b4902ee8bde64aab28a48a77aba6ad26a38
MD5 92425943d55d1f1b88c502fb5ee22f57
BLAKE2b-256 c78cbc458bdc82d7588b369550e896ee516b6032452d2a92ab1279917db39335

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.15-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3692eb2e9ab4b4802bfcc101d45879a52b488f9c530657361ced52861d996a0b
MD5 0a97ae303d9190d78bb6ad792b1a7bd5
BLAKE2b-256 2aa184d5d0e709a9f3dc3a06d4c9a3bf9d05a2d0584e395c945aa08a9286956c

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.15-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 d8dbfd847ee8bde22e170e6837054f6595233e1c5ceb0ab29a374fab2b7eef33
MD5 05be60b1d21f066b5a70114244d9c91b
BLAKE2b-256 f6a4dd56c5ef86e923d66e47d4417498ba0a1d7b080fa4a02b46bb9061d829a4

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