AllenInstitute / AllenInstitute/AllenSDK

How to exhaustively download and instance all the conductance based neuron models?

Open
#415 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

external
Dominant language
Jupyter Notebook
Stars
398
Forks
163
PR merge metrics
No merged PRs in 30d

Description

I am trying to exhaustively download and instance all the conductance based neuron models, and then instantiate them as NEURON simulator models.
I am trying the code below, but I am running into errors

def run_all_cell_bio_configs():
    try:
        with open('all_allen_cells.p','rb') as f:
            cells = pickle.load(f)

    except:
        ctc = CellTypesCache(manifest_file='cell_types/manifest.json')
        cells = ctc.get_cells()
        with open('all_allen_cells.p','wb') as f:
            pickle.dump(cells,f)
    bp = BiophysicalApi()

    #bp.cache_stimulus = False # change to False to not download the large stimulus NWB file
    #neuronal_model_id = 472451419    # get this from the web site as above
    for cell in cells:
        #import pdb; pdb.set_trace()
        try:
            bp.cache_data(cell['id'], working_directory='.')
            os.subprocess('nrnivmodl ./modfiles')   # compile the model (only needs to be done once)
            #import pdb; pdb.set_trace()
            print(runner)
        except:
            pass

    return cells

def allen_morph_model(description):
    utils = Utils.create_utils(description)
    h = utils.h

    #The next step is to get the path of the morphology file and pass it to NEURON.

    # configure model
    manifest = description.manifest
    morphology_path = description.manifest.get_path('MORPHOLOGY')
    utils.generate_morphology(morphology_path.encode('ascii', 'ignore'))
    utils.load_cell_parameters()

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the shown CellTypesCache and BiophysicalApi calls, then trace how the manifest, cached data, and Utils model-loading path are expected to work. Check the NEURON compilation and model-instantiation steps against the documented API behavior. Done means there is a confirmed workflow for downloading and instantiating every conductance-based model, with the reported errors accounted for.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
bioinformatics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.