cerebellar_models.connectome package¶
Module contents¶
Implementation of the BSB ConnectionStrategy for cerebellar cortex reconstructions.
Submodules¶
cerebellar_models.connectome.presyn_dist_strat module¶
Module for the utility class for postsynaptically-sorted ConnectionStrategy
- class cerebellar_models.connectome.presyn_dist_strat.PresynDistStrat¶
Bases:
InvertedRoIMixin class that id used for ConnectionStrategy that deal with the connections for a pre- and post-synaptic pair sorting them by the post-synaptic cell chunk.
- get_region_of_interest(chunk)¶
Finds all the presynaptic chunks that are within a sphere of defined radius, centered on the postsynaptic chunk.
- Parameters:
chunk (bsb.storage._chunks.Chunk) – Postsynaptic chunk.
- Returns:
list of presynaptic chunks
- Return type:
- radius¶
Radius of the sphere to filter the presynaptic chunks within it.
- cerebellar_models.connectome.presyn_dist_strat.get_close_chunks(chunk, target_chunks, radius)¶
Look for target chunks which are less than radius away from the current one.
- Parameters:
chunk (bsb.storage._chunks.Chunk) – Source chunk.
target_chunks (Set[bsb.storage._chunks.Chunk]) – Target chunk.
- Radius:
Maximum distance from the source chunk.
- Returns:
list of presynaptic chunks
- Return type:
cerebellar_models.connectome.to_glomerulus module¶
Module for the configuration node of every presynaptic cell to Glomerulus ConnectionStrategy
- class cerebellar_models.connectome.to_glomerulus.ConnectomeGlomerulus(*args, _parent=None, _key=None, **kwargs)¶
Bases:
InvertedRoI,ConnectionStrategyBSB Connection strategy to connect a presynaptic cell to Glomeruli.
- connect(pre, post)¶
Central method of each connection strategy. Given a pair of
HemitypeCollection(one for each connection side), should connect cell population using the scaffold’s (available asself.scaffold)bsb.core.Scaffold.connect_cells()method.- Parameters:
presyn_collection (bsb.connectivity.strategy.HemitypeCollection) – presynaptic filtered cell population.
postsyn_collection (bsb.connectivity.strategy.HemitypeCollection) – postsynaptic filtered cell population.
- abstractmethod pre_selection(presyn_pos, glom_pos)¶
Order presynaptic cell ids based on their respective distance to glomerulus
- Parameters:
presyn_pos (numpy.ndarray) – list of presynaptic cell positions
glom_pos (numpy.ndarray) – single glomerulus position
- Returns:
presynaptic cell ids sorted by distance to glomerulus
- Return type:
- class cerebellar_models.connectome.to_glomerulus.ConnectomeMossyGlomerulus(*args, _parent=None, _key=None, **kwargs)¶
Bases:
ConnectomeGlomerulusBSB Connection strategy to connect Mossy fibers to Glomeruli.
- connect(pre, post)¶
Central method of each connection strategy. Given a pair of
HemitypeCollection(one for each connection side), should connect cell population using the scaffold’s (available asself.scaffold)bsb.core.Scaffold.connect_cells()method.- Parameters:
presyn_collection (bsb.connectivity.strategy.HemitypeCollection) – presynaptic filtered cell population.
postsyn_collection (bsb.connectivity.strategy.HemitypeCollection) – postsynaptic filtered cell population.
- get_node_name()¶
- pre_selection(presyn_pos, glom_pos)¶
Order presynaptic cell ids based on their respective distance to glomerulus
- Parameters:
presyn_pos (numpy.ndarray) – list of presynaptic cell positions
glom_pos (numpy.ndarray) – single glomerulus position
- Returns:
presynaptic cell ids sorted by distance to glomerulus
- Return type:
- class cerebellar_models.connectome.to_glomerulus.ConnectomeUBCGlomerulus(*args, _parent=None, _key=None, **kwargs)¶
Bases:
ConnectomeGlomerulus,PresynDistStratBSB Connection strategy to connect UBC to Glomeruli.
- connect(pre, post)¶
Central method of each connection strategy. Given a pair of
HemitypeCollection(one for each connection side), should connect cell population using the scaffold’s (available asself.scaffold)bsb.core.Scaffold.connect_cells()method.- Parameters:
presyn_collection (bsb.connectivity.strategy.HemitypeCollection) – presynaptic filtered cell population.
postsyn_collection (bsb.connectivity.strategy.HemitypeCollection) – postsynaptic filtered cell population.
- get_node_name()¶
- pre_selection(presyn_pos, glom_pos)¶
Order presynaptic cell ids based on their respective distance to glomerulus
- Parameters:
presyn_pos (numpy.ndarray) – list of presynaptic cell positions
glom_pos (numpy.ndarray) – single glomerulus position
- Returns:
presynaptic cell ids sorted by distance to glomerulus
- Return type:
cerebellar_models.connectome.glomerulus_granule module¶
Module for the configuration node of the Glomerulus to Granule ConnectionStrategy
- class cerebellar_models.connectome.glomerulus_granule.ConnectomeGlomerulusGranule(*args, _parent=None, _key=None, **kwargs)¶
Bases:
InvertedRoI,ConnectionStrategyBSB Connection strategy to connect Glomerulus to Granule cells. With a convergence value set to n, this connection guarantees that each Granule cell connects to n unique Glomerulus clusters, where each Glomerulus cluster is connected to a different Mossy fiber.
- boot()¶
- connect(pre, post)¶
Central method of each connection strategy. Given a pair of
HemitypeCollection(one for each connection side), should connect cell population using the scaffold’s (available asself.scaffold)bsb.core.Scaffold.connect_cells()method.- Parameters:
presyn_collection (bsb.connectivity.strategy.HemitypeCollection) – presynaptic filtered cell population.
postsyn_collection (bsb.connectivity.strategy.HemitypeCollection) – postsynaptic filtered cell population.
- convergence: float¶
Convergence value between Glomeruli and Granule cells. Corresponds to the mean number of Glomeruli that has a single Granule cell as target
- depends_on: list[ConnectionStrategy]¶
The list of strategies that must run before this one.
- get_node_name()¶
- load_connections(*args, **kwargs)¶
- pre_cell_types¶
Celltype used for the pre-presyn cell.
- pre_glom_strats¶
Connection Strategies that links Pre-presyn cell to Glomeruli.
- radius¶
Radius of the sphere to filter the presynaptic chunks within it.
- exception cerebellar_models.connectome.glomerulus_granule.TooFewGlomeruliClusters(*args, **kwargs)¶
Bases:
ConnectivityErrorError raised when too few glomerulus clusters are available for a postsynaptic cell.
cerebellar_models.connectome.glomerulus_golgi module¶
Module for the configuration node of the Glomerulus to Golgi ConnectionStrategy
- class cerebellar_models.connectome.glomerulus_golgi.ConnectomeGlomerulusGolgi(*args, _parent=None, _key=None, **kwargs)¶
Bases:
PresynDistStrat,ConnectionStrategyBSB Connection strategy to connect Glomerulus to Golgi cells.
- connect(pre, post)¶
Central method of each connection strategy. Given a pair of
HemitypeCollection(one for each connection side), should connect cell population using the scaffold’s (available asself.scaffold)bsb.core.Scaffold.connect_cells()method.- Parameters:
presyn_collection (bsb.connectivity.strategy.HemitypeCollection) – presynaptic filtered cell population.
postsyn_collection (bsb.connectivity.strategy.HemitypeCollection) – postsynaptic filtered cell population.
- get_node_name()¶
cerebellar_models.connectome.golgi_glomerulus module¶
Module for the configuration node of the Golgi to Glomerulus ConnectionStrategy
- class cerebellar_models.connectome.golgi_glomerulus.ConnectomeGolgiGlomerulus(*args, _parent=None, _key=None, **kwargs)¶
Bases:
ConnectionStrategyBSB Connection strategy to connect Golgi cells to postsynaptic cells through Glomeruli. With a divergence value set to n, this connection guarantees that each golgi cell connects to all postsynaptic cells that are themselves connected to n unique Glomerulus.
- boot()¶
- connect(pre, post)¶
Central method of each connection strategy. Given a pair of
HemitypeCollection(one for each connection side), should connect cell population using the scaffold’s (available asself.scaffold)bsb.core.Scaffold.connect_cells()method.- Parameters:
presyn_collection (bsb.connectivity.strategy.HemitypeCollection) – presynaptic filtered cell population.
postsyn_collection (bsb.connectivity.strategy.HemitypeCollection) – postsynaptic filtered cell population.
- depends_on: list[ConnectionStrategy]¶
The list of strategies that must run before this one.
- divergence: float¶
Divergence value between Golgi cells and Glomeruli. Corresponds to the mean number of Glomeruli targeted by a single Golgi cell
- get_node_name()¶
- glom_cell_types¶
Cell types used for the Glomeruli.
- glom_post_strats¶
Connection Strategies that links Glomeruli to the postsynaptic cells.
- load_connections(*args, **kwargs)¶
cerebellar_models.connectome.glomerulus_ubc module¶
Module for the configuration node of the Glomerulus to UBC ConnectionStrategy
- class cerebellar_models.connectome.glomerulus_ubc.ConnectomeGlomerulusUBC(*args, _parent=None, _key=None, **kwargs)¶
Bases:
PresynDistStrat,ConnectionStrategyBSB Connection strategy to connect any type of Glomerulus to UBC cells.
- boot()¶
- connect(pre, post)¶
Central method of each connection strategy. Given a pair of
HemitypeCollection(one for each connection side), should connect cell population using the scaffold’s (available asself.scaffold)bsb.core.Scaffold.connect_cells()method.- Parameters:
presyn_collection (bsb.connectivity.strategy.HemitypeCollection) – presynaptic filtered cell population.
postsyn_collection (bsb.connectivity.strategy.HemitypeCollection) – postsynaptic filtered cell population.
- get_node_name()¶
cerebellar_models.connectome.io_molecular module¶
Module for the configuration node of the IO to molecular layer interneurons (MLI) ConnectionStrategy
- class cerebellar_models.connectome.io_molecular.ConnectomeIO_MLI(*args, _parent=None, _key=None, **kwargs)¶
Bases:
NotParallel,ConnectionStrategyBSB Connection strategy to connect IO cells to molecular layer interneurons (MLI) cells through PC. IO cells which are connected to a PC should also connect to all the MLIs connected to this PC.
- boot()¶
- connect(pre, post)¶
Central method of each connection strategy. Given a pair of
HemitypeCollection(one for each connection side), should connect cell population using the scaffold’s (available asself.scaffold)bsb.core.Scaffold.connect_cells()method.- Parameters:
presyn_collection (bsb.connectivity.strategy.HemitypeCollection) – presynaptic filtered cell population.
postsyn_collection (bsb.connectivity.strategy.HemitypeCollection) – postsynaptic filtered cell population.
- depends_on: list[ConnectionStrategy]¶
The list of strategies that must run before this one.
- get_node_name()¶
- get_region_of_interest(**kwargs)¶
Returns the list of chunks containing the potential postsynaptic neurons, based on a chunk containing the presynaptic neurons.
- Parameters:
chunk (bsb.storage._chunks.Chunk) – Presynaptic chunk
- Returns:
List of postsynaptic chunks
- Return type:
- io_pc_connectivity¶
Connection Strategy that links IO to PC.
- load_connectivity_set(connection_strat, cell_type)¶
Load the connection locations from a connection strategy that connects the provided cell type to PC.
- Parameters:
connection_strat (bsb.connectivity.strategy.ConnectionStrategy) – Connection strategy to load.
cell_type (str) – Presynaptic cell type name.
- Returns:
A tuple containing: - an array of the presynaptic cell_type connection locations, - an array of the postsynaptic pc connection locations
- load_hemitype_connections(strategies, hemitype)¶
Load the connection locations for all the MLI to PC strategies. Will only keep one connection location information for each unique pair of MLI-PC.
- Parameters:
strategies (list[bsb.connectivity.strategy.ConnectionStrategy]) – Connection strategies to load.
hemitype (bsb.connectivity.strategy.HemitypeCollection) – Hemitype
- Returns:
A tuple containing: - an array of the presynaptic connection locations - an array of the postsynaptic connection locations - an array of the placement set indexes
- mli_pc_connectivity¶
List of Connection Strategies that links MLI to PC.
- pre_cell_pc¶
Celltype used for to represent PC.
- queue(pool: bsb.services.pool.JobPool)¶
Get the queued jobs of all the strategies we depend on.
param pool: pool where the jobs will be queued type pool: bsb.services.pool.JobPool
- Parameters:
pool (bsb.services.pool.JobPool)
cerebellar_models.connectome.io_purkinje module¶
Module for the configuration node of the IO to purkinje cells AfterConnectivityHook
- class cerebellar_models.connectome.io_purkinje.DuplicateSynapses(*args, _parent=None, _key=None, **kwargs)¶
Bases:
AfterConnectivityHookBSB postprocessing to duplicate connections from a connection strategy into multiple synapses per pair.
- conn_strategy: ConnectionStrategy¶
Connection Strategy to on which to apply the postprocessing.
- contacts¶
Number or distribution determining the amount of synaptic contacts one cell will form on another
- get_node_name()¶
- postprocess()¶