获取适合的 GLIF 模型 ID 列表

Get the list of fitted GLIF model ids

我想查看数据库中已拟合的 GLIF 模型参数的许多单元格的一些统计数据。

从教程 [1] 中,我了解了如何使用 GlifApi() 获取单个模型的拟合参数。get_neuronal_models_by_id(neuron_model_id)。但是我怎样才能获得神经元模型 ID 的相关列表?

我已经找到了如何获取单元格列表。因此,获取适合特定单元格的模型列表也很重要。

[1] http://alleninstitute.github.io/AllenSDK/glif_models.html

如果您有细胞 ID,则可以使用 GlifApi 中名为 get_neuronal_models() 的函数来访问该神经元模型 ID 列表。该函数采用细胞 ID 列表和与这些细胞关联的 returns 元数据(包括神经元模型信息)。

例如:

from allensdk.api.queries.glif_api import GlifApi

# Specify the IDs of the cells you are interested in
cell_ids = [486239338, 323540736]

# Get the metadata associated with those cells
ga = GlifApi()
nm_info = ga.get_neuronal_models(ephys_experiment_ids=cell_ids)

# Print out the IDs and names of models associated with those cells
for cell_info in nm_info:
    print "Cell ID", cell_info["id"]
    for nm in cell_info["neuronal_models"]:
        print "Neuronal model ID:", nm["id"]
        print "Neuronal model name:", nm["name"]

如果你 运行 这个例子,你会看到你获得了关于 GLIF 模型和生物物理模型的信息。如果你想将其限制为 GLIF 模型,你可以使用神经元模型模板 ID 来做到这一点。

# Define a list with all the GLIF neuronal model templates
GLIF_TEMPLATES = [
    395310469, # GLIF 1 - LIF
    395310479, # GLIF 2 - LIF + reset rules
    395310475, # GLIF 3 - LIF + afterspike currents
    471355161, # GLIF 4 - LIF + reset rules + afterspike currents
    395310498, # GLIF 5 - GLIF 4 + threshold adaptation
]

# Only print info for the GLIF models
for cell_info in nm_info:
    print "Cell ID", cell_info["id"]
    for nm in cell_info["neuronal_models"]:
        if nm["neuronal_model_template_id"] in GLIF_TEMPLATES:
            print "Neuronal model ID:", nm["id"]
            print "Neuronal model name:", nm["name"]