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

Uploaded Source

Built Distributions

efel-5.6.21-cp312-cp312-win_amd64.whl (213.3 kB view details)

Uploaded CPython 3.12 Windows x86-64

efel-5.6.21-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.21-cp312-cp312-macosx_10_9_x86_64.whl (265.9 kB view details)

Uploaded CPython 3.12 macOS 10.9+ x86-64

efel-5.6.21-cp311-cp311-win_amd64.whl (213.3 kB view details)

Uploaded CPython 3.11 Windows x86-64

efel-5.6.21-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.21-cp311-cp311-macosx_10_9_x86_64.whl (265.8 kB view details)

Uploaded CPython 3.11 macOS 10.9+ x86-64

efel-5.6.21-cp310-cp310-win_amd64.whl (213.3 kB view details)

Uploaded CPython 3.10 Windows x86-64

efel-5.6.21-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.21-cp310-cp310-macosx_10_9_x86_64.whl (265.8 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

efel-5.6.21-cp39-cp39-win_amd64.whl (213.3 kB view details)

Uploaded CPython 3.9 Windows x86-64

efel-5.6.21-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.21-cp39-cp39-macosx_10_9_x86_64.whl (265.8 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: efel-5.6.21.tar.gz
  • Upload date:
  • Size: 103.0 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.21.tar.gz
Algorithm Hash digest
SHA256 90e4e1b6baed365078292f6fbabbbe08ad90b6b7749b6255e255cd964c464ce2
MD5 2ceb11c764f98055f5776957f68058cc
BLAKE2b-256 6f7191b980186fd59e20784c147957283770721ed63bf346255fbf6f49321f2b

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.6.21-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 213.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.21-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 21adcac8f9b54de198b77f50335de839f71055d2acc857696061b1b7aa487da1
MD5 f01095a1428d877bd984c86c4e36a861
BLAKE2b-256 f3bfca7054b8388af6abda1b3458b181333c9346d6a26e0a10e0085b00922490

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.21-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 174f9302fd63740061f5a44f8d3d8f87fd0f48186f54f6ffe96b7dc55ef8fcc5
MD5 784a4f235d35e5c2422dd7e889919279
BLAKE2b-256 df99a822c820c4ba9416f4cf516d9ee692b665d4cf475ece967ff9e73940bbd5

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.21-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 b1d1cf79112d3429d2b22ba6e57caeb88e38d11dcfeed5b11e1fb90b804400a4
MD5 8e39fce7b94d7944c9574ebd805bcb08
BLAKE2b-256 04c92a49430ff4181c33003275475d6012a59a2a766d8760950abd6469a0d8cd

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.6.21-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 213.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.21-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 725711890310232f60e8f262d70aea2a71d7484c8cacb3fe378a63d2e491d533
MD5 5af2643db5eb7e992a06774d0bd623c0
BLAKE2b-256 e7993844a127c97539faf5d28b0f008cb28c6efe7d685c71533ef969b98d4f7f

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.21-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4cb1bae221e8c5a73ce5bdaefcaff724da76e447d8ff5614b027040232756fc4
MD5 4b08b6d3f8560c495c9163528ec25846
BLAKE2b-256 013181452f437374b21e62116a3ae1f1cfe353cbd916650953dd6504fdb827c6

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.21-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 9d8e9c10e199005d62139e6a081c9a98cbe1b9cc2233c9889879ebadb160103a
MD5 d564264e8e4c549953d8af7d8b6e4e89
BLAKE2b-256 c3ef450fc1287f68e8d973112e2e9aa32a92aaf193e633ceda8fb2d9d430d55e

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.6.21-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 213.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.21-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 5d2bac4b8a237aad7df82b0c78124d13ed4522d67380962c45d5ad5fbe6695a3
MD5 a0e5697eb845cbcaca8d370090ae8439
BLAKE2b-256 e4d3b11765bcb86eca89e26d4fe62830f51f0820dd0a41b9cc5510127983b168

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.21-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 409d8b65bb3258a620beeae17cffdffa7aab53d1246b183417ed19ea5987e505
MD5 11ce3fc281749d57d675a1569638dbb8
BLAKE2b-256 628e6c66e8e6b57db377c35b31997ef7c7fc9c377f9df5fb42520d32a7f79e00

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.21-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 d25868f49f2ce7707ad9169b7d84d711a8ea17d296780bb72253e70aebe1b28b
MD5 e2142b4a0b9feb18b284e2e7e439a080
BLAKE2b-256 04b92e828326eb47ef132f9b6ed13a73379b9961624e22b94cd91da553f8565d

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.6.21-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 213.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.21-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 e18963fb90640ef85889c836b03a7b3b63696263ec8c78c37306636a39716767
MD5 ae14efca2589b41cf1a6d1397eace55f
BLAKE2b-256 1ede221aeb52bb8fb18a0b44f225039d61125f0084ff9c3bf4892885edd13ddb

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.21-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7cebc508781f552019001b0f20923fec1f3e40f3ba3a65234d3aaceb3a8fea06
MD5 5c9ff7df61c2d6c9e6412410406601bf
BLAKE2b-256 38666fd10857d259761b5135906e186609ed6c0de0fff3355e7d0527b8b94a6e

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.6.21-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 779ee7f6ffff2d11076ca7e1e8db5a4ee70cc6bcbe24d78bb1584fdf6f6be9bd
MD5 6662993dd5402bb025f1835c3dde6520
BLAKE2b-256 d39b169df5f3eb946fa7d5a21c89d3774678c7026e430d147e25aa317c787211

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