DOI: 10.5061/dryad.t76hdr87b
title: Data from: Directed and acyclic synaptic connectivity in the human layer 2-3 cortical microcircuit

description: The computational capabilities of neuronal networks are fundamentally
 constrained by their specific connectivity. Previous studies of cortical
 connectivity have been mostly carried out in rodents; however, whether the
 principles also apply to the evolutionary expanded human cortex is
 unclear. Here we studied network properties within the human temporal
 cortex using samples obtained from brain surgery. We analyzed multi-neuron
 patch-clamp recordings in layer 2-3 pyramidal neurons and identified
 substantial differences compared to rodents. Reciprocity showed random
 distribution, synaptic strength was independent from connection
 probability and connectivity of the supragranular temporal cortex followed
 a directed and mostly acyclic graph topology. Application of these
 principles in neuronal models increased the dimensionality of network
 dynamics suggesting a critical role for cortical computation.
description: Multi-neuron patch-clamp recordings of pyramidal neurons and
 their monosynaptic connections were performed on human cortical tissue
 (layers 2-3) obtained from epilepsy or tumor resection surgery. The
 methodological approach was described in a previous technical report: Peng
 et al., <em>eLife</em> 2019. The cellular and synaptic
 physiology of this dataset are described in another study: Planert et al.,
 <em>bioRxiv</em> 2023. In this study, we focused on
 higher-order connectivity analysis, including reciprocity, directionality,
 and network motifs. We further performed analysis and simulation of
 recurrent neural networks based on a reservoir computing framework.
 Details of our analytical approach and network models are described in the
 supplementary material of this manuscript. This
 repository includes the processed data and code to generate the results,
 simulations, and visualization of the publication. For details, please see
 the Readme file.
description: # Data from: Directed and acyclic synaptic connectivity in the human layer
 2-3 cortical microcircuit ## Data structure The `\data` folder contains
 preprocessed and anonymized data objects and tables from each patient
 cohort (er = epilepsy resection, tr = tumor resection) at different levels
 of analysis (cellular, connection, cluster level). These tables have been
 extracted through an automated pre-processing pipeline that has been
 described in the primary dataset manuscript (Planert et al., *bioRxiv*
 2023:
 [https://doi.org/10.1101/2021.11.08.467668)](https://doi.org/10.1101/2021.11.08.467668\)) **data_matrix_xx.mat:** This is a MATLAB data structure where each entry corresponds to one recorded cluster of neurons. * `data.matrix`: Adjacency matrix where rows and columns correspond to pre- and postsynaptic neurons, respectively. 1 indicates a connection, and 0 indicates no connection. * `data.index`: An index that corresponds to the `data_index` of the different data tables. **tcell_xx.csv:** This is a table where each row corresponds to one recorded neuron (node list) with the following properties: * `cellid`: Unique identifier for each cell. * `clusterid`: Identifier for the cluster to which the cell belongs. * `patientid`: Identifier for the patient (anonymized) to which the cell belongs. * `data_index`: An index that corresponds to the data_index of the data matlab object. * `channel`: The recording channel. * `type`: The type of cell (here only pyramidal neurons (1) are included). * `coordinate`: The spatial coordinates of the cell within the brain slice. * `distance_pia` / `piadistance`: The distance of the cell from the pial surface. * `s11_out_found`, `s11_out_reciprocal`, `s11_out_tested`: Variables related to outbound synaptic connections from this cell. * `s11_in_found`, `s11_in_tested`, `s11_in_reciprocal`: Variables related to inbound synaptic connections to this cell. * `pc_clustersize`: The size of the cluster in terms of simultaneously recorded pyramidal neurons. **tconnection_xx.csv:** This is a table where each row corresponds to one tested connection (edge list) with the following properties: * `cellid_pre`, `cellid_post`: Identifiers for the presynaptic and postsynaptic cells, respectively. * `synapseid`: Unique identifier for the testex connection between the pre and post cells. * `patientid`: Identifier for the patient (anonymized) of the connection. * `clusterid`: Identifier for the cluster of the connection. * `data_index`: An index that corresponds to the data_index of the data matlab object. * `synapse_type`: The type of connection. Here only between pyramidal neurons (s11). * `connected`: Logical vector indicating whether a synaptic connection exists between the pre- and post-cells (1 = connected, 0 = not connected). * `reciprocal`: Logical vector indicating whether the connection is reciprocal (1 = reciprocal, 0 = not reciprocal). * `distance`: The inter-somatic distance between the pre- and post-cells. * `avg_psp_amplitude`: The average postsynaptic potential amplitude (EPSP) of this connection. * `cluster_n_pc`: The number of pyramidal neurons in the cluster with this connection. * `cluster_distance_pia`: The distance of the cluster from the pial surface. * `cluster_s11_prob`: The connection probability within the respective cluster. **tcluster_xx.csv:** This is a table where each row corresponds to one recorded cluster of neurons with the following properties: * `clusterid`: Unique identifier for each cluster. * `patientid`: Identifier for the patient (anonymized) of the cluster. * `data_index`: An index that corresponds to the data_index of the data matlab object. * `distance_pia`: The distance of the cluster from the pial surface. * `s11_amp_mean`: The mean EPSP amplitude of all found connections within the cluster. * `s11_found`, `s11_reciprocal`, `s11_tested`: Variables related to found, reciprocal, and tested connections within the cluster. * `s11_prob`: The connection probability within the cluster. * `s11_recprob`: Reciprocal connectivity of the cluster. * `s11_recprob_er`: Expected reciprocity of Erdös-Renyi random model given the cluster-specific connection probability (het-ER model). * `s11_recprob_ratio`: Ratio of observed reciprocity divided by het-ER model. * `n_pc`: The number of pyramidal neurons within the cluster. Note that data containing indirect identifiers and clinical parameters of the patients are not shared.  ## Code Structure and Usage All analyses on the pre-processed data were performed using custom MATLAB or Python scripts that have been uploaded to this repository. Below is an overview of the folder structure with a brief description of the functions. `code/`: Folder containing all the code used for analysis of pre-processed data. * `pipeline_motifs_er.m`, `pipeline_motifs_tr.m`: These scripts call all the necessary functions to extract the motif occurrence from the pre-processed data and compare them to randomly generated network models. They generate the temporary `motif_stat` MATLAB structure that is needed for subsequent plotting. * `motifs/`, `graph_metrics/`, `common_neighbour/`, `cycles/`: These folders contain functions that are called within `pipeline_motifs.m` to extract and count motifs based on connectivity matrices or connection tables. * `random_model/`: This folder contains the functions that are called within 'pipeline_motifs.m` to generate the random network models (ER, het-ER, spatial het-ER). * `plot/`: Contains scripts to plot the main and supplementary figures based on the extracted data tables and `motif_stat`. The MATLAB "gramm" package is needed for plotting (see below). * `simulate_networks/`: Contains Python scripts to simulate the models for our reservoir computing framework. * **Requirements:** python3, with standard libraries (numpy, matplotlib, sklearn). * **Use:** To launch the simulations use `main.py`. To visualize filters and poles, use `filterMeaning.py` * `networkGeneration.py` generates networks with different topologies in the form of matrices. * `reservoirDynamics.py` simulates neural dynamics (requires inputs and network structure). * `tasksData.py` reads the data for the tasks (folder `data`). * `ReservoirComputingTasks.py` uses reservoir computing (requires task data and network structures). * `measure_dynamics` computes various metrics of the network dynamics. * `tests.py` contains scripts to launch various tests on the relationship between network topology and dynamics or task performance. * `plotFunctions` generates the necessary plots. * `main.py` launches all the simulations for the manuscript and the supplement. ### Third-Party Functions * Morel, Pierre. “Gramm: Grammar of Graphics Plotting in Matlab.” *The Journal of Open Source Software*, vol. 3, no. 23, The Open Journal, Mar. 2018, p. 568, doi:10.21105/joss.00568. * François Beauducel (2023). 2-D histogram plot ([https://github.com/beaudu/hist2d/releases/tag/v1.4](https://github.com/beaudu/hist2d/releases/tag/v1.4), GitHub. * Jeff Howbert (2011). Count all cycles size 3 to 9 in simple undirected graph ([https://www.mathworks.com/matlabcentral/fileexchange/32709-count-all-cycles-size-3-to-9-in-simple-undirected-graph](https://www.mathworks.com/matlabcentral/fileexchange/32709-count-all-cycles-size-3-to-9-in-simple-undirected-graph), MATLAB Central File Exchange.