我想查看已安装在数据库中的GLIF模型参数的许多单元格的一些统计信息。
从教程[1]中,我了解如何使用GlifApi()得到单个模型的拟合参数.get_neuronal_models_by_id(neuron_model_id)。但是如何获得神经元模型ID的相关列表呢?
我已经找到了如何获取单元格列表。因此,获取适合特定单元格的模型列表也是相关的。
[1] http://alleninstitute.github.io/AllenSDK/glif_models.html
答案 0 :(得分:1)
如果您有手机的ID,则可以使用名为get_neuronal_models()
的GlifApi
中的功能来访问神经元模型ID列表。该函数获取单元格ID列表并返回与这些单元格关联的元数据(包括神经元模型信息)。
例如:
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"]