diff --git a/connectome_manipulator/connectome_manipulation/manipulation/conn_extraction.py b/connectome_manipulator/connectome_manipulation/manipulation/conn_extraction.py index f11acfd..0f208d5 100644 --- a/connectome_manipulator/connectome_manipulation/manipulation/conn_extraction.py +++ b/connectome_manipulator/connectome_manipulation/manipulation/conn_extraction.py @@ -3,6 +3,8 @@ # SPDX-License-Identifier: Apache-2.0 # Copyright (c) 2024 Blue Brain Project/EPFL +"""Connectome extraction module.""" + import os import json diff --git a/connectome_manipulator/connectome_manipulation/manipulation/conn_removal.py b/connectome_manipulator/connectome_manipulation/manipulation/conn_removal.py index c8c95d9..cd7980d 100644 --- a/connectome_manipulator/connectome_manipulation/manipulation/conn_removal.py +++ b/connectome_manipulator/connectome_manipulation/manipulation/conn_removal.py @@ -3,6 +3,8 @@ # SPDX-License-Identifier: Apache-2.0 # Copyright (c) 2024 Blue Brain Project/EPFL +"""Connection removal module.""" + import os import numpy as np diff --git a/connectome_manipulator/connectome_manipulation/manipulation/conn_rewiring.py b/connectome_manipulator/connectome_manipulation/manipulation/conn_rewiring.py index c85adfc..fc72f16 100644 --- a/connectome_manipulator/connectome_manipulation/manipulation/conn_rewiring.py +++ b/connectome_manipulator/connectome_manipulation/manipulation/conn_rewiring.py @@ -3,6 +3,8 @@ # SPDX-License-Identifier: Apache-2.0 # Copyright (c) 2024 Blue Brain Project/EPFL +"""Connectome (re)wiring module (general-purpose).""" + import libsonata import neurom as nm import numpy as np diff --git a/connectome_manipulator/connectome_manipulation/manipulation/conn_wiring.py b/connectome_manipulator/connectome_manipulation/manipulation/conn_wiring.py index fe7613e..8db9159 100644 --- a/connectome_manipulator/connectome_manipulation/manipulation/conn_wiring.py +++ b/connectome_manipulator/connectome_manipulation/manipulation/conn_wiring.py @@ -3,6 +3,8 @@ # SPDX-License-Identifier: Apache-2.0 # Copyright (c) 2024 Blue Brain Project/EPFL +"""Connectome wiring module (specialized).""" + from datetime import datetime, timedelta import libsonata diff --git a/connectome_manipulator/connectome_manipulation/manipulation/null_manipulation.py b/connectome_manipulator/connectome_manipulation/manipulation/null_manipulation.py index a6acbd9..f10f3ed 100644 --- a/connectome_manipulator/connectome_manipulation/manipulation/null_manipulation.py +++ b/connectome_manipulator/connectome_manipulation/manipulation/null_manipulation.py @@ -3,6 +3,8 @@ # SPDX-License-Identifier: Apache-2.0 # Copyright (c) 2024 Blue Brain Project/EPFL +"""Null manipulation module - does not do anything.""" + from connectome_manipulator import log from connectome_manipulator.connectome_manipulation.manipulation import Manipulation diff --git a/connectome_manipulator/connectome_manipulation/manipulation/syn_prop_alteration.py b/connectome_manipulator/connectome_manipulation/manipulation/syn_prop_alteration.py index c6b50d0..7fc6e26 100644 --- a/connectome_manipulator/connectome_manipulation/manipulation/syn_prop_alteration.py +++ b/connectome_manipulator/connectome_manipulation/manipulation/syn_prop_alteration.py @@ -3,6 +3,8 @@ # SPDX-License-Identifier: Apache-2.0 # Copyright (c) 2024 Blue Brain Project/EPFL +"""Module for alteration of synapse property values.""" + import numpy as np from connectome_manipulator import log, profiler diff --git a/connectome_manipulator/connectome_manipulation/manipulation/syn_removal.py b/connectome_manipulator/connectome_manipulation/manipulation/syn_removal.py index 975328d..18130fa 100644 --- a/connectome_manipulator/connectome_manipulation/manipulation/syn_removal.py +++ b/connectome_manipulator/connectome_manipulation/manipulation/syn_removal.py @@ -3,6 +3,8 @@ # SPDX-License-Identifier: Apache-2.0 # Copyright (c) 2024 Blue Brain Project/EPFL +"""Synapse removal module.""" + import numpy as np from scipy.sparse import csc_matrix diff --git a/connectome_manipulator/connectome_manipulation/manipulation/syn_subsampling.py b/connectome_manipulator/connectome_manipulation/manipulation/syn_subsampling.py index eb45797..46c0008 100644 --- a/connectome_manipulator/connectome_manipulation/manipulation/syn_subsampling.py +++ b/connectome_manipulator/connectome_manipulation/manipulation/syn_subsampling.py @@ -3,6 +3,8 @@ # SPDX-License-Identifier: Apache-2.0 # Copyright (c) 2024 Blue Brain Project/EPFL +"""Synapse subsampling module.""" + import numpy as np from connectome_manipulator import log, profiler diff --git a/connectome_manipulator/model_building/conn_prob_adj.py b/connectome_manipulator/model_building/conn_prob_adj.py index c5386ee..69784b2 100644 --- a/connectome_manipulator/model_building/conn_prob_adj.py +++ b/connectome_manipulator/model_building/conn_prob_adj.py @@ -43,8 +43,7 @@ def extract(circuit, sel_src=None, sel_dest=None, edges_popul_name=None, CV_dict def build(adj_mat, src_node_ids, tgt_node_ids, inverted=False, **_): - """Builds a (deterministic) connection probability model of type ``ConnProbAdjModel`` from an adjacency matrix - (i.e., returning probabilities 0.0 or 1.0 only). + """Builds a (deterministic) connection probability model of type ``ConnProbAdjModel`` from an adjacency matrix (i.e., returning probabilities 0.0 or 1.0 only). Args: adj_mat (scipy.sparse.csc_matrix): Sparse adjacency matrix with boolean entries (i.e., True...connection, False...no connection) diff --git a/connectome_manipulator/model_building/model_types.py b/connectome_manipulator/model_building/model_types.py index 6df8f6d..3557210 100644 --- a/connectome_manipulator/model_building/model_types.py +++ b/connectome_manipulator/model_building/model_types.py @@ -1008,7 +1008,6 @@ def draw_cov(self, src_type, tgt_type, size=1): (As in Chindemi et al. (2022) "A calcium-based plasticity model for predicting long-term potentiation and depression in the neocortex") """ - if self.prop_cov_mat is None: log.warning("No correlated properties!") return np.zeros((size, 0)) diff --git a/connectome_manipulator/model_building/pos_mapping_from_table.py b/connectome_manipulator/model_building/pos_mapping_from_table.py index 4906fd4..deb05ac 100644 --- a/connectome_manipulator/model_building/pos_mapping_from_table.py +++ b/connectome_manipulator/model_building/pos_mapping_from_table.py @@ -147,7 +147,6 @@ def plot(out_dir, nrn_ids, nrn_pos, nrn_lay, model, **_): # pragma: no cover Note: Only mappings to 2D or 3D space are supported for visualization. """ - nrn_pos_model = model.apply(gids=nrn_ids) # Cell positions in 3D original vs. mapped space