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.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

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

Uploaded Source

Built Distributions

efel-5.6.3-cp312-cp312-win_amd64.whl (201.5 kB view details)

Uploaded CPython 3.12 Windows x86-64

efel-5.6.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.5 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

efel-5.6.3-cp312-cp312-macosx_10_9_x86_64.whl (248.1 kB view details)

Uploaded CPython 3.12 macOS 10.9+ x86-64

efel-5.6.3-cp311-cp311-win_amd64.whl (201.5 kB view details)

Uploaded CPython 3.11 Windows x86-64

efel-5.6.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.5 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

efel-5.6.3-cp311-cp311-macosx_10_9_x86_64.whl (248.0 kB view details)

Uploaded CPython 3.11 macOS 10.9+ x86-64

efel-5.6.3-cp310-cp310-win_amd64.whl (205.1 kB view details)

Uploaded CPython 3.10 Windows x86-64

efel-5.6.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.5 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

efel-5.6.3-cp310-cp310-macosx_10_9_x86_64.whl (248.0 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

efel-5.6.3-cp39-cp39-win_amd64.whl (205.1 kB view details)

Uploaded CPython 3.9 Windows x86-64

efel-5.6.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.5 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

efel-5.6.3-cp39-cp39-macosx_10_9_x86_64.whl (248.0 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

File details

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

File metadata

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

File hashes

Hashes for efel-5.6.3.tar.gz
Algorithm Hash digest
SHA256 788f9d8b61f46f292a3f4c96ac6e74ceefe27e9e0a3867a7b47367bc25aba9a9
MD5 76fc683ee3512247326940fefc67c4b5
BLAKE2b-256 a5cf053f2b40aa0d71210e8d3e1d7b13da966af4d5c33902e16ed3272e16df35

See more details on using hashes here.

File details

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

File metadata

  • Download URL: efel-5.6.3-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 201.5 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.8

File hashes

Hashes for efel-5.6.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 7585c207fb753a3eef59e4ea6ad8d7de33f98a98bb0848ffd9f258374cb4c0e1
MD5 216368d31039faa4f69b6c55824c746f
BLAKE2b-256 95271821548d22000d4a2ddd52572f8e4668de3f65d5c31a8b912e0764818b2b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.6.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6ea31c50213be55b15fb9189a6de2045b89475940a8050d07df64799f5a8d8ed
MD5 4757598515b5eeddab4d16c689bbf05d
BLAKE2b-256 6fa728674d8e39d01eb7939ed336d209cf3b55ec1171cbb3b4a325d50d6ca125

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.6.3-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 c0b035c588261248aff8e7a320c4a203119322b91aff66f435966bd5c4c3165b
MD5 4ab6c783e9537aedbbacf644450c1ab5
BLAKE2b-256 e6b01eb66a33bafb52b23000ae893bdf73d9630d4bce9f8be6fc3084be75f3c6

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for efel-5.6.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 466a500463179571a6afd24a66e330f1862578f3b93c930310b7e1a360bb4bd0
MD5 f17a744b32ad15236d01651827afe353
BLAKE2b-256 85735d7305b54b34ff743c694079fd6eb6336e78a1eb8db27b5247e6510ea5f9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.6.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ffdd8a899ad2d9af1e0895861580722514dae43ef33fca802d238f0680cc529a
MD5 5df66eb4f6487f6e0e80be53f24df3a1
BLAKE2b-256 a305312a5c6c004110bd637205679cc35aaf6ac66c245d22ee2eec1088b687df

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.6.3-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 e02e16e829270167d1547813824197f9a1d7b1fd7f2668bcffa5b1ebd0962210
MD5 53ce19472b33a08d254ee1ad9a18eb19
BLAKE2b-256 1285efa4d261c75ae34aa88c5a4e62baa2fd3238af8a6fb54ea28b6bf7a61253

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for efel-5.6.3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 aed4317f92aed2d976f90cee4cf242374177ad15b25b6d8ccf29c1375731f020
MD5 2c776a57338148eae7e0915c71077ca5
BLAKE2b-256 abdac003993a1e746c20852832521656f70143effa060a519291312c67469424

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.6.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9e521800be1adf1e05ddbf29f7510b77853ac7fa10ac3d2c8e2381041433af84
MD5 2d09f5e245fd2ec64ea2cb4e0f7a65f4
BLAKE2b-256 351e7a7cf10cd2c6a6ce232305a3613ea9962676afea9c527be007c822908e67

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.6.3-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 0abb74c7a7c5cc8db37a7f60de50faeecaeb7477171c28017553294045e126b3
MD5 b7185c6538988a9c95b623332bf7c424
BLAKE2b-256 bdf9dc751a4642c564ac9abbcff3ccd6de091c77f0ae8a5a7660515e62ba65c7

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for efel-5.6.3-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 3649085109a22a248213334176a3d374dce0488f52fd1ec63d352c76d1f16a8c
MD5 a6165df40e788bcdd2ecbc5fa6c2bcad
BLAKE2b-256 a405cea65d81e465f48f728791c4fdf014d5da46faf7bf6083e95be3ae6f8a2b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.6.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7726423c2fca2b62262695e80bc952af33ee281c251f3ac92c193e75bf0efe90
MD5 749b5bd2a8cc3ff369e16461977c3404
BLAKE2b-256 5a075a01eb6d0a8ab3b48f065960f91028977a29ddcd5cc746847099830370e7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for efel-5.6.3-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 6c3c5fbd0679ffab7c046f96f823c6849813f0466ffe0563bb322ece82c0fe24
MD5 4917332cee0695bb961ba128bd12f5e6
BLAKE2b-256 e605f3d80321b92b800d083907b19f855de1e6c403d80e38f86656b506f282ae

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