e_model_packager.thalamus.workflow

Workflow to build Thalamus e-model packages.

Functions

memodel_target(mtype, etype, gid, fname)

Return the target (fname) inside memodel directory.

Classes

CollectMEModels(*args, **kwargs)

Submits the model package preparation tasks.

CreateFactsheets(*args, **kwargs)

Task that creates factsheets for an emodel package.

CreateNWB(*args, **kwargs)

Applies the protocols and saves the results in an NWB.

MemodelParameters(*args, **kwargs)

Parameter class to contain common MeModel parameters across various tasks.

PackageTarget(*args[, prefix, create_parent])

Specific target for first category outputs.

PrepareMEModelDirectory(*args, **kwargs)

Creates the MEModelDirectory with static files.

RunPyScript(*args, **kwargs)

Task to run the python script for an emodel.

ThalamusMicroStudioPackages(*args, **kwargs)

The skeleton task to perform the workflow.

class CollectMEModels(*args, **kwargs)

Bases: WrapperTask

Submits the model package preparation tasks.

static remove_unwanted_morphologies(metype_gids)

Removes the packages with undesired morphologies.

Parameters:

metype_gids (dict) – key: mtype, etype tuple value: cell ids.

Returns:

filtered version of the metype_gids input.

Return type:

dict

requires()

Returns the tasks required.

class CreateFactsheets(*args, **kwargs)

Bases: MemodelParameters

Task that creates factsheets for an emodel package.

output()

Morphology factsheet json.

requires()

The directory must be present.

static round_factsheet_values(factsheet: dict, n_digits: int) dict

Round the values into smaller decimal points.

run()

Write the factsheets.

save_etype_factsheet()

Write etype factsheet json.

save_morphology_factsheet()

Dump morphology factsheet json.

class CreateNWB(*args, **kwargs)

Bases: MemodelParameters

Applies the protocols and saves the results in an NWB.

configfile

name of emodel config file containing protocol info.

property emodel_name

Emodel name in cells standard.

output()

NWB output.

requires()

Requires the output paths to be made.

run()

Creates and saves the nwb containing protocol responses.

class MemodelParameters(*args, **kwargs)

Bases: SmartTask

Parameter class to contain common MeModel parameters across various tasks.

mtype

morphological type

etype

electrophysiological type

gid

id of cell in the circuit

class PackageTarget(*args, prefix=None, create_parent=True, **kwargs)

Bases: OutputLocalTarget

Specific target for first category outputs.

Initializes a FileSystemTarget instance.

Parameters:

path – the path associated with this FileSystemTarget.

class PrepareMEModelDirectory(*args, **kwargs)

Bases: MemodelParameters

Creates the MEModelDirectory with static files.

static add_recipe_data_to_config(output_config_dir, params_path, features_path, protocol_path, mtype)

Add params, features and protocol paths and mtype to config files.

property cell_attributes

Return the Cell attributes.

copy_emodel_config(emodel)

Copy config files into output directory.

static copy_emodel_config_files(input_dir, output_dir, emodel, params_path, features_path, protocol_path)

Copy params, features and protocols from config.

static copy_local_config_files(output_config_dir)

Copies the local config and protocols to the destination.

copy_static_files() None

Copies static package files.

property emodel_attributes

Returns the emodel attributes.

extract_synapses(circuit_config_path)

Extracts the synapses from the circuit.

Parameters:

circuit_config_path (str) – Path to circuit config.

static fill_in_config_default_values(config_dict)

Fill in config dict with default values.

Parameters:

config_dict (dict) – the configuration dictionary

fill_in_emodel_config(emodel, morph_fname)

Fill in emodel config.

Args: emodel(str): emodel name. morph_fname(str): morphology filename.

output()

Returns multiple outputs in a dict.

run()

Writes the package data.

write_cell_info(cell_info_path)

Create cell_info.json file and write it.

class RunPyScript(*args, **kwargs)

Bases: MemodelParameters

Task to run the python script for an emodel.

configfile

name of config file in /config to use when running script

output()

Produces the python recordings.

requires()

Requires the output paths to be made.

run()

Executes the python script.

class ThalamusMicroStudioPackages(*args, **kwargs)

Bases: WrapperTask

The skeleton task to perform the workflow.

requires()

The required Tasks.

memodel_target(mtype, etype, gid, fname)

Return the target (fname) inside memodel directory.