跳转到主要内容

电生理特征提取库 (eFEL)

项目描述

eFEL banner
最新发布 latest release
文档 latest documentation
许可证 license
构建状态 actions build status
覆盖率 coverage
Gitter
引用 DOI

简介

电生理特征提取库(eFEL)允许神经科学家自动从神经元(无论是在体外还是在线模拟)记录的时间序列数据中提取特征。例如,在细胞整体膜片钳实验中记录的电压轨迹中的动作电位宽度和幅度。库的用户提供一组轨迹并选择要计算的特征。然后库将提取所需特征并将值返回给用户。

库的核心是用C++编写的,并包含一个Python包装器。目前,我们提供了一种自动编译和安装库作为Python模块的方法。如何将eFEL编译为独立C++库的说明可以在这里找到。

引用方法

当您使用此eFEL软件进行您的科研工作时,我们要求您引用它(包括海报展示),请通过参考仓库页面顶部的“引用此仓库”按钮来获取各种引用格式,包括APA和BibTeX。

有关详细的引用信息,请参阅CITATION.cff文件。

要求

  • Python 3.9+
  • Pip(Python的新版本默认安装)
  • pip可用的C++编译器
  • Numpy(pip将自动安装)
  • 以下说明假设您有权访问Linux / UNIX / MacOSX / Cygwin的命令行

安装

安装eFEL最简单的方法是使用pip

pip install efel

如果您没有管理员权限,此命令可能会因权限错误而失败。在这种情况下,您可以在您的家目录中安装eFEL

pip install efel --user

或者,您可以使用python虚拟环境

virtualenv pythonenv
. ./pythonenv/bin/activate
# If you use csh or tcsh, you should use:
# source ./pythonenv/bin/activate.csh
pip install efel

如果您想直接从github仓库安装,可以使用

pip install git+git://github.com/BlueBrain/eFEL

快速入门

首先需要导入模块

import efel

获取所有可用特征名称的列表

efel.get_feature_names()

更改动作电位检测阈值设置(默认为-20 mV)

efel.set_setting('Threshold', -30)

有关所有可用设置的完整列表,请参阅设置类

提取特征的Python函数是get_feature_values(...)。以下是如何使用此函数的简短示例。代码和示例轨迹可在这里找到

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

此示例的输出是

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

这意味着eFEL在电压轨迹中发现了5个动作电位。这些AP的幅度是'AP_amplitude'特征的结果。测量刺激开始前的电压为'voltage_base'。结果以mV为单位。

完整文档

完整文档可在这里找到

资助

本工作部分由欧洲第七框架计划(FP7/2007-2013)资助,项目编号为604102(HBP),欧洲联盟的“地平线2020”研究与创新框架计划,具体资助协议编号为720270,785907(人类脑计划SGA1/SGA2),并由EBRAINS研究基础设施资助,该基础设施从欧洲联盟的“地平线2020”研究与创新框架计划资助,具体资助协议编号为945539(人类脑计划SGA3)。此项目/研究得到了对洛桑联邦理工学院(EPFL)的Blue Brain项目的资助,该项目是瑞士联邦理工学院的一个研究中心,由瑞士政府ETH委员会资助。

版权(c)2009-2024 Blue Brain Project/EPFL

项目详情


发布历史 发布通知 | RSS源

下载文件

下载适合您平台的文件。如果您不确定该选择哪个,请了解有关安装包的更多信息。

源分发

efel-5.7.10.tar.gz (108.3 kB 查看哈希值)

上传时间

构建分发

efel-5.7.10-cp312-cp312-win_amd64.whl (222.9 kB 查看哈希值)

上传时间 CPython 3.12 Windows x86-64

efel-5.7.10-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.6 MB 查看哈希值)

上传时间 CPython 3.12 manylinux: glibc 2.17+ x86-64

efel-5.7.10-cp312-cp312-macosx_10_13_x86_64.whl (274.3 kB 查看哈希值)

上传时间 CPython 3.12 macOS 10.13+ x86-64

efel-5.7.10-cp311-cp311-win_amd64.whl (222.8 kB 查看哈希值)

上传时间 CPython 3.11 Windows x86-64

efel-5.7.10-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.6 MB 查看哈希值)

上传于 CPython 3.11 manylinux: glibc 2.17+ x86-64

efel-5.7.10-cp311-cp311-macosx_10_9_x86_64.whl (275.3 kB 查看哈希值)

上传于 CPython 3.11 macOS 10.9+ x86-64

efel-5.7.10-cp310-cp310-win_amd64.whl (222.8 kB 查看哈希值)

上传于 CPython 3.10 Windows x86-64

efel-5.7.10-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.6 MB 查看哈希值)

上传于 CPython 3.10 manylinux: glibc 2.17+ x86-64

efel-5.7.10-cp310-cp310-macosx_10_9_x86_64.whl (275.3 kB 查看哈希值)

上传于 CPython 3.10 macOS 10.9+ x86-64

efel-5.7.10-cp39-cp39-win_amd64.whl (222.8 kB 查看哈希值)

上传于 CPython 3.9 Windows x86-64

efel-5.7.10-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.6 MB 查看哈希值)

上传于 CPython 3.9 manylinux: glibc 2.17+ x86-64

efel-5.7.10-cp39-cp39-macosx_10_9_x86_64.whl (275.3 kB 查看哈希值)

上传于 CPython 3.9 macOS 10.9+ x86-64

由以下机构支持

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF 赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误日志 StatusPage StatusPage 状态页面