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.

How to cite

When you use this eFEL software for your research, we ask you to cite it (this includes poster presentations) by referring to the "Cite this repository" button at the top of the repository page to get various citation formats, including APA and BibTeX.

For detailed citation information, please refer to the CITATION.cff file.

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()

To change the spike detection threshold setting (default is -20 mV)

efel.set_setting('Threshold', -30)

For a full list of available settings, please refer to the Setting class

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]

    # set the threshold for spike detection to -20 mV
    efel.set_setting('Threshold', -20)

    # 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.7.5.tar.gz (107.4 kB view details)

Uploaded Source

Built Distributions

efel-5.7.5-cp312-cp312-win_amd64.whl (221.5 kB view details)

Uploaded CPython 3.12 Windows x86-64

efel-5.7.5-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.7.5-cp312-cp312-macosx_10_9_x86_64.whl (274.3 kB view details)

Uploaded CPython 3.12 macOS 10.9+ x86-64

efel-5.7.5-cp311-cp311-win_amd64.whl (221.4 kB view details)

Uploaded CPython 3.11 Windows x86-64

efel-5.7.5-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.7.5-cp311-cp311-macosx_10_9_x86_64.whl (274.1 kB view details)

Uploaded CPython 3.11 macOS 10.9+ x86-64

efel-5.7.5-cp310-cp310-win_amd64.whl (221.4 kB view details)

Uploaded CPython 3.10 Windows x86-64

efel-5.7.5-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.7.5-cp310-cp310-macosx_10_9_x86_64.whl (274.2 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

efel-5.7.5-cp39-cp39-win_amd64.whl (221.4 kB view details)

Uploaded CPython 3.9 Windows x86-64

efel-5.7.5-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.7.5-cp39-cp39-macosx_10_9_x86_64.whl (274.1 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: efel-5.7.5.tar.gz
  • Upload date:
  • Size: 107.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for efel-5.7.5.tar.gz
Algorithm Hash digest
SHA256 9b0f7e0005f0cb6b4e5f2407420b7145436395521ebc2c93ceeb089477c3d1b6
MD5 c2bba24933feb5ca898e8fbaea3f6214
BLAKE2b-256 47a67b51c95ab9c9e79eb20f5271ba45e61ceb02ad9d4e7705bcfbd260dd3acd

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.7.5-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 221.5 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for efel-5.7.5-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 e3044217a1bbe6140175d39391d459a71a7d574430ddaee0cd6954b713edf5dc
MD5 6600ca8e45220c255b95857c599bf4ed
BLAKE2b-256 7bfc5dc7fb6e61a85023af2476d3d2989229440901b48e1880a9ee7c17ce2cdb

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.7.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bfa192acfcb6f851ec2fac2ad263442a32c1e5307addea2f80be982e7be2f56f
MD5 cca06215d5ed95ae5385ab801b4a98b9
BLAKE2b-256 6ab74b0c2963dbed88697e392cb6de07cacef6bb3cd852217c2d905903e26ca3

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.7.5-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 201d6dd041974c357230d687356af6a83c822eaa872603db48332c0d4ddf5eca
MD5 dfa737a82c94931de54e406eabd70dc2
BLAKE2b-256 a286425510614dc0a0ee01c7fa0b9e75fea80471d14c4e4543fe2d433d836894

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.7.5-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 221.4 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for efel-5.7.5-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 8f7e15411c21e7ab7a3411475c3269853714d85a312eb09bc5fd683223c8e289
MD5 5bb63fe3ed3d1a431ee80014436f28d3
BLAKE2b-256 a6df0b8b5646f808795710496d01af9a8e1812061330f4030282b16eb45786ff

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.7.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 20525d8b49ce6f76bb9c19ed18ebd751c9844bb30beadb137ddda163704e9e5f
MD5 6c395ea8deb898da2af1099a71fd6cbc
BLAKE2b-256 02c196454223abc6ea6b271447a2c244bf8f55a228528150ace4727a275a70b3

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.7.5-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 aeec9da680963ceeb654cda267f2484c28635a88195893cc2886dfe6017b10c8
MD5 cc05b953a8ce69083fd15f028d70bdd2
BLAKE2b-256 4d86828736d5b126655bc55ce24794aa634e179cee45dff2dd9b8abea6b23f62

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.7.5-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 221.4 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for efel-5.7.5-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 2bb06cb2b0c7aa09cf6500c26398990e4f345d4066c4f30b0904fd8f8cef6ed8
MD5 9f117faa5d673b1aa4af0f7238b432a1
BLAKE2b-256 aac62c30a62ab7523ced6b542078c6035e474adae768fc9343568556742bcffd

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.7.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ce7acd9006cea352898f69fe6762050ebbc153e9a8338950730c3fa398016d58
MD5 fe8105e00e4cfe0a601d2277e3c539e2
BLAKE2b-256 ebbb4cda389251150dc54dc46376403120617688caf3004f9714cd1cb6a4fa79

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.7.5-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 824ed47549eba913b7260a7e2142628b6c3df5b6efe05107f99982fced9e838f
MD5 cc9f961e89f8675cc0c725eede92112c
BLAKE2b-256 bf6fdd27e81383efe53e381ad6f219e3e6e97c1e10350efe84a702df725da064

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: efel-5.7.5-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 221.4 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for efel-5.7.5-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 c26fb7364043bf46112256dc490bf1c3aaad01b3e9ce9550d9b7e49dccaaf23c
MD5 09373a5415df770e6bbbbb11e7a53956
BLAKE2b-256 2f7438ded75def16ed90ac0110a698ad49f2140250d7e9e1d2504e50e376bd7d

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.7.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 91642860f346f604a0dd5b2cb8a974edc0266aa03e6d43af7ae0ec72d53e47d8
MD5 c6ebfad20e24e378ca4d1dcb2c016cf0
BLAKE2b-256 747f9686ccc771ca3f149dbf30ed85da22fe9a0622dca8c0862086789fb10e88

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for efel-5.7.5-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 968f0b545176b5ebc6d8ae46ee80dc83900bf1689f321e3f7e53d0c48097e696
MD5 8dff810bd26fed4f4d14e160444a9c54
BLAKE2b-256 3f5de04e6403dfcd7750e8921b034f354a6cc72f57e2a6d145a92f0ce747b9b4

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