Code to analyse the connectomes.
vnc_networks/
contains the main codebase It includes the following subdirectories:- the files defining the main classes to work with: ConnectomeReader, Connections, Neurons, CMatrix
vnc_networks/specific_neurons/
: code to analyse specific neuronsvnc_networks/utils/
: utility functions
scripts/
contains the scripts to run the analysisexamples/
contains examples of how to use the codegenerate_plots/
contains the scripts to generate the plots potentially used for the paper
data_dumps/
contains the data dumps used for the analysisplots/
contains the plots generated by the scriptspreprocessing/
contains preprocessed data used for recurring analysis
The codebase is structured around the following classes:
ConnectomeReader
(abstract) with its child classesFAFB
andMANC
: to read the connectome dataConnections
: to load and manipulate the connectomeNeurons
: to load and manipulate the neuronsCMatrix
: to load and manipulate the connectivity matrix- Additionally, the file
params.py
defines all the static information generally necessary such as paths, design choices or data types.
The codebase is designed to be modular and flexible. It is possible to load the connectome and the neurons, and then perform any analysis on them.
The classes interact in the following manner:
ConnectomeReader
allows to access data for a given connectome and version, given that the naming conventiosn and file structures are not consistent between the different datasets. An instance of this class is used by the classes Connections
and Neurons
so that they can get their data.
Connections
loads the connectome and provides methods to extract the connectivity matrix. The connections between neurons can be modified by
providing a list of subdivided Neurons
objects or a list of neurons that are not connected together. An example use case is the split a neuron into subparts
restricted to a specific region of the connectome.
It is possible to initialise a CMatrix
object from the Connections
object, by
providing an adjacency matrix and the ids of the neurons corresponding to the rows and columns of the matrix.
Note on neuron ids: the neuron BodyIds
(specific data type) are the same as the ones used in the connectome online tools such as Neuroglancer. Given that we can subset or split neurons, the neuron ids are remapped to unique ids named UID
. The UID
is used to index the neurons in the CMatrix
object.
Make sure you have conda installed, then run the following from inside this directory to create a new environment
conda create -n vnc python=3.12
conda activate vnc
pip install -e .