bluepyemodel.icselector.icselector

ICSELECTOR Select a set of NEURON mechanisms, parameters and bounds from corresponding genes. Gene names can be selected from a file mapping genes to different ME-T types. Corresponding channels are selected from a file mapping channels and parameters to genes.

Classes

ICSelector(ic_map_path, gene_map_path[, ...])

Selects NEURON mechanisms, with parameters, value bounds, and distributions.

class ICSelector(ic_map_path, gene_map_path, mode='mixed', status='latest')

Bases: object

Selects NEURON mechanisms, with parameters, value bounds, and distributions. Uses reference files for MET-type to gene mapping, gene to channel mapping, and channel to parameter mapping.

Parameters:
  • ic_map_path (str) – path to ic_mapping file (.json)

  • gene_map_path (str) – path to gene mapping file (.csv)

  • mode (str) – types of ion channel model to select. Options are ‘generic’, ‘genetic’, and ‘mixed’ (default).

  • status (str) – model status. Options are ‘stable’ and ‘latest’.

get(name)

Get mechanism corresponding to gene or channel.

Parameters:

name (str) – name of a gene or channel.

Returns:

selected mechanism

Return type:

mech (Mechanism)

get_cell_config_from_ttype(key_words)

Get all information related to cell model configuration from mechanisms selected based on genetic expression profiles.

Parameters:

key_words – keys to select MET-types

Returns:

mechanism parameters per compartment mechanisms (list [dict,]): mechanisms per compartment distributions (list [dict,]): definitions of subcellular distributions nexus_keys (list [dict,]): name and modelid for each mechanism

Return type:

parameters (list [dict,])

get_gene_mapping()

Get a dict of all selected genes and mapped channels. :returns: all selected genes and mapped channels :rtype: genes (dict)

get_mechanisms(selected_only=True)

Get all available mechanisms from the icmapping file.

Parameters:

selected_only (bool) – flag to get only selected channels

Returns:

mechanisms with all associated info

fields

Return type:

mechs (dict [Mechanism])

get_selected_cell_types()

Get met types selected from the gene mapping table.

Returns:

all selected cell types

Return type:

(list)

select(name)

Select mechanism for inclusion in configuration.

Parameters:

name (str) – name of a gene or channel.

set_mode(mode)

Select configuration mode.

Parameters:

mode (str) – ‘generic’, ‘genetic’, or ‘mixed’

set_status(status)

Select model types.

Parameters:

status (str) – ‘stable’ or ‘latest’