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

Uploaded Source

Built Distributions

efel-5.6.25-cp312-cp312-win_amd64.whl (217.3 kB view details)

Uploaded CPython 3.12 Windows x86-64

efel-5.6.25-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.6.25-cp312-cp312-macosx_10_9_x86_64.whl (269.7 kB view details)

Uploaded CPython 3.12 macOS 10.9+ x86-64

efel-5.6.25-cp311-cp311-win_amd64.whl (217.3 kB view details)

Uploaded CPython 3.11 Windows x86-64

efel-5.6.25-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.6.25-cp311-cp311-macosx_10_9_x86_64.whl (269.7 kB view details)

Uploaded CPython 3.11 macOS 10.9+ x86-64

efel-5.6.25-cp310-cp310-win_amd64.whl (217.3 kB view details)

Uploaded CPython 3.10 Windows x86-64

efel-5.6.25-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.6.25-cp310-cp310-macosx_10_9_x86_64.whl (269.7 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

efel-5.6.25-cp39-cp39-win_amd64.whl (217.3 kB view details)

Uploaded CPython 3.9 Windows x86-64

efel-5.6.25-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.6.25-cp39-cp39-macosx_10_9_x86_64.whl (269.7 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: efel-5.6.25.tar.gz
  • Upload date:
  • Size: 103.7 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.25.tar.gz
Algorithm Hash digest
SHA256 d6a077216b60478ab5b6a99d1641c7d34e4c4356a235725be9153a99b5cb113e
MD5 f5b60a3b0c3850d7d6f31a878d319ac1
BLAKE2b-256 b9e4845b9fc64eccdd51b6221465c03c248f5d6c305e373da441bf2af2d86191

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.6.25-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 217.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.25-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 28a8b7d6e1f5bbaba02ecd3e4375cdcfc078ed293589f405468cb73144e35beb
MD5 2db596917845dd27b1f7a02467c407e6
BLAKE2b-256 e774ab05dfffb73128ecc1b81dc8748f969056e8ed9fa78d4e71a0497c93e2ea

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.25-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d0e3c516836ac961a025819f061e0af5ec0d453a5794f06b8cdf30084b1235be
MD5 1537bc8c02e7202ac89a5ef396a3437e
BLAKE2b-256 8e58103df9be0c0c07fad9e12be4bcb5c2780396f946c36bc21dc28f64498343

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.25-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 d3de60b9440a524a0af9d8289ae312fdfba6837bf3c4e5f3d271b6fbee69c7c3
MD5 43bf1ce2c48284143b8849b743fd43d7
BLAKE2b-256 ddf1b23b51efe2c629260b9ece2a37745ddeeb6c6c65a9b5190b306988704ab0

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.6.25-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 217.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.25-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 d4c7568c1e38523eba8c16b7785222dbedff52c1711f8d1c8a9132e231f9d71c
MD5 c77924a1f12a32aae95a329b51e8657d
BLAKE2b-256 09da6279e23e901ea70cf535a64227347fc799a5d2141e2c1ee0e5df3f58d80a

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.25-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d63681cc2b4f4ab9d58bce5f716bfdd1e98d2ac80ef61c5fb0cb5df5fe6bd45b
MD5 cb269edd738259075723a1a54f249e39
BLAKE2b-256 4016910689a2fa55457be444397c29badd83d2b7f208032cfad682f576cd2072

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.25-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 ab5c268196c89973ce900c80f524a65a882e5fcffeec2605a8ebd085ad5adc1b
MD5 90ee0c2a7da16536b40ef0268e36a311
BLAKE2b-256 43b026fad6afedd206645448a3f115f187ad2a3c42627655c9c2fba2172998fc

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.6.25-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 217.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.25-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 744338510e4cfb76a695fd388ad254fbe662f17d1eb13e8a6d8929a20b498a2c
MD5 0b14844751973aeac461a158c09e77f4
BLAKE2b-256 fd7a9714db7a22c6dd31dca545d8396a94223f873a450621ca8f4cea3da51f7c

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.25-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c449bd92414506f5d731b2acb3b3534b1260fe58a4c3ef45aa90470c9f41d8ea
MD5 74d364f1706b4a3fcbea75d34689ed71
BLAKE2b-256 2d609584bae34fe1fe4bec6b237f7857cdb8427134327e2aeb55931bca1ea461

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.25-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 62fd952af49d21262d5c8408317da195ead533889c2f72ada90fec77cedf84fa
MD5 2834951ce4954ae573a19c38497c311a
BLAKE2b-256 e256b5bd616dbc500aecf08bebc07cb4b243448ec733432a009a865cf7cec85c

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.6.25-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 217.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.25-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 07b7285a9049471c7df23c654c4794cf789ddbc0ac1b267ef0b61b57062a1f60
MD5 b01b0d220d70df6757cf7280ba33e87a
BLAKE2b-256 cc554c5e131cf5ef8ca9cdd166e197a2bd3bab26b023b9ff634298ade38ffb1f

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.25-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 222d6fb70cb9a38c1c8a2a6dccf05163bf5cb4aac67976b4daa77674af443a38
MD5 e55609a40b144d921c52e64737bc4574
BLAKE2b-256 7b83ac4a789a75a554ea81fd3edff3fec2262306ca79a793abdef62ec357f53e

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.25-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 721dfbc16256f627e20eff224932408db816dd73e0f85061fa3c1dc4484a9fa9
MD5 7a315c8acc0e854fe1c1c02fcf67610a
BLAKE2b-256 5c785a6ee6898c2dae8dae00bd669fbd03a30518e9fa6bef7a253b34da22a465

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