connectome_manipulator.connectome_manipulation.manipulation.conn_removal.ConnectomeRemoval¶
Connectome manipulation class for removing connections:
Removes a percentage of randomly selected connections (i.e., all synapses per
connection) according to certain cell and #synapses/connection selection criteria.
The manipulation can be applied through the apply() method.
Optionally, a connection mask can be provided, in which case only connections within that mask will be considered for removal (in addition to the other selecion criteria).
- connectome_manipulator.connectome_manipulation.manipulation.conn_removal.ConnectomeRemoval.apply(self, split_ids, sel_src=None, sel_dest=None, amount_pct=100.0, min_syn_per_conn=None, max_syn_per_conn=None, conn_mask_file=None, **kwargs)¶
Applies a removal of randomly selected connections according to certain selection criteria.
- Parameters:
split_ids (list-like) – List of neuron IDs that are part of the current data split; will be automatically provided by the manipulator framework
sel_src (str/list-like/dict) – Source (pre-synaptic) neuron selection
sel_dest (str/list-like/dict) – Target (post-synaptic) neuron selection
amount_pct (float) – Percentage of randomly sampled connections to be removed
min_syn_per_conn (int) – Minimum #synapses/connection for connections to be considered for removal
max_syn_per_conn (int) – Maximum #synapses/connection for connections to be considered for removal
conn_mask_file (str) – Optional connection mask file (.npz) containing a sparse adjacency matrix in scipy.sparse.csc_matrix format, exactly matching the size of the selected source/target neuron selections and indexed in increasing order; only connections within that mask will be considered for removal
**kwargs – Additional keyword arguments - Not used
Note
Input/output edges (synapse) tables are accessed through the
writerobject:Loading input edges:
edges_table = self.writer.to_pandas()Writing output edges:
self.writer.from_pandas(edges_table_manip)