1

I want to look at some statistics over many cells of the GLIF model parameters that are already fitted in the database.

From the tutorial [1], I understand how to get the fitted parameters of a single model using GlifApi().get_neuronal_models_by_id(neuron_model_id). But how can I get a relevant list of neuron models ids ?

I already found how to get a list of cell. So getting the list of models that were fitted to a particular cell is also relevant.

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

1 Answers1

1

If you have a cell's ID, you can use the function in GlifApi called get_neuronal_models() to access that list of neuronal model IDs. The function takes a list of cell IDs and returns metadata (including neuronal model information) associated with those cells.

For example:

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"]

If you run that example, you see that you get information about both GLIF models and biophysical models. If you want to limit it to GLIF models, you can use the neuronal model template IDs to do that.

# 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"]
gouwens
  • 26
  • 2