Code used for H01 paper

Code used for the H01 paper (A petavoxel fragment of human cerebral cortex reconstructed at nanoscale resolution) is shared below.

Quality checks of acquired raw EM data

https://github.com/lichtman-lab/mSEM_workflow_manager/tree/9f293f31f1f2b2398ec0cd94b1e1b8e497a75fbf

Preprocessing data for valid tissue detection

https://github.com/google-research/connectomics/tree/19e9ea5d29a2c9f1e6af41da17c6c5237402de4f/connectomics/volume/processor

Fine-scale Realignment

https://github.com/google-research/sofima/tree/45ca4b12ba1fa9777c8c287ccb1b56fafe60b4dc

Flood-Filling Networks

https://github.com/google/ffn/tree/f92852d8a7659125def757f97c18f3730b1f52c4

Preprocessing segmentation data to remove holes and island segments

https://github.com/google-research/connectomics/blob/19e9ea5d29a2c9f1e6af41da17c6c5237402de4f/connectomics/volume/processor/segmentation.py#L118

Skeletonization of segmentation data

https://github.com/seung-lab/kimimaro/tree/bf0de206b2af766a832913b2ea9922ddc8993d90

Correction of merge errors based on soma annotations and subcompartment classifications

https://github.com/google-research/connectomics/blob/19e9ea5d29a2c9f1e6af41da17c6c5237402de4f/connectomics/segmentation/consistency.py

UNet architecture used for synapse identification

https://github.com/UdonDa/3D-UNet-PyTorch/tree/484a8cae0a0ac34cbdcb792c3dac6a547f2827d3

Training split synapse merging algorithm

https://github.com/ashapsoncoe/h01/blob/7d9d435d5da7eed6ac01462d605c694ee1d3fef5/train_synapse_merger_upper_and_lower_thresholds.py

Applying split synapse synapse merging algorithm

https://github.com/ashapsoncoe/h01/blob/7d9d435d5da7eed6ac01462d605c694ee1d3fef5/get_syn_pairs_with_skel_dists_and_apply_merge_model_parallel.py

MATLAB scripts for analysis

MATLAB scripts listed here can be run by downloading the repository of all MATLAB code from https://storage.googleapis.com/h01_paper_public_files/H01_Matlab_analysis_scripts.zip and executing the relevant script

Computation of volumes occupied by each class of cellular structure in each layer

https://storage.googleapis.com/h01_paper_public_files/H01_Matlab_analysis_scripts/Volume_Occupancy/volume_occupancy.m

Compute and analyse layer 5 and 6 triangular neurons’ basal dendrite angles

https://storage.googleapis.com/h01_paper_public_files/H01_Matlab_analysis_scripts/Triangular_Cells_And_Other/H01_humananalysis_master.m

Compute spine detachment rates

https://storage.googleapis.com/h01_paper_public_files/H01_Matlab_analysis_scripts/Google_Spine_Analysis/google_spine_analysis_july2023.m

Render projection images using VASTtools

https://storage.googleapis.com/h01_paper_public_files/H01_Matlab_analysis_scripts/VastTools/vasttools.m

Calculate minimal distances between different cell types and blood vessels

https://storage.googleapis.com/h01_paper_public_files/H01_Matlab_analysis_scripts/Blood_Vessel_Distance/bv_mindistance.m

Python scripts for analysis

Python scripts for analysis of the data are available from the h01 github repository https://github.com/ashapsoncoe/h01. Supporting files, in .zip or original format, for individual scripts are included in the repository, or if large, within a publically-available google cloud storage repository, as indicated in the script in question. Several scripts use Google Cloud BigQuery databases which are not publicly available and require a credentials file to access. However, the data contained within these databases is freely available for download from the released data page.

Randomly select segments by point sampling

https://github.com/ashapsoncoe/h01/blob/7d9d435d5da7eed6ac01462d605c694ee1d3fef5/get_segments_to_proofread_point_sampling.py

Obtain split and merge error statistics for proofread neurons

https://github.com/ashapsoncoe/h01/blob/7d9d435d5da7eed6ac01462d605c694ee1d3fef5/get_split_and_merge_stats_for_proofread_neurons.py

Plot split errors across the z-axis for axons and dendrites

https://github.com/ashapsoncoe/h01/blob/7d9d435d5da7eed6ac01462d605c694ee1d3fef5/plot_splits.py

Plot synapse density and E:I ratio

https://github.com/ashapsoncoe/h01/blob/7d9d435d5da7eed6ac01462d605c694ee1d3fef5/plot_synapse_density_and_ei_ratio.py

Compute E:I ratios of synapses onto neurons

https://github.com/ashapsoncoe/h01/blob/7d9d435d5da7eed6ac01462d605c694ee1d3fef5/get_neuron_e_to_i_ratios.py

Compute cortical layer bounds

https://github.com/ashapsoncoe/h01/blob/a469c5b4fdc83e30554ecd83b4b131e9279e4848/get_circular_cluster_bounds.py

Classify all segments by their cortical layer

https://github.com/ashapsoncoe/h01/blob/a469c5b4fdc83e30554ecd83b4b131e9279e4848/classify_layers_all_segments.py

Train algorithm to identify shaft of skeletonized axons

https://github.com/ashapsoncoe/h01/blob/a469c5b4fdc83e30554ecd83b4b131e9279e4848/train_skeleton_pruner.py

Apply algoritm to identify axonal shafts and classify synapses as en passant or terminal bouton

https://github.com/ashapsoncoe/h01/blob/a469c5b4fdc83e30554ecd83b4b131e9279e4848/prune_a_batch_of_skeletons_ig_parallel.py

Estimation of distributions of distances from synapse to axonal shaft

https://github.com/ashapsoncoe/h01/blob/a469c5b4fdc83e30554ecd83b4b131e9279e4848/fit_distribution_to_synapse_distances.py

Sample points around an axon according the distribution of distances of synpases from the axonal shaft

https://github.com/ashapsoncoe/h01/blob/a469c5b4fdc83e30554ecd83b4b131e9279e4848/sample_points_around_neurites.py

Sample a range of axons based on their strongest connection to a post-synaptic partner

https://github.com/ashapsoncoe/h01/blob/a469c5b4fdc83e30554ecd83b4b131e9279e4848/get_sample_of_axons_organised_by_strength.py

Analyse axonal connection strengths

https://github.com/ashapsoncoe/h01/blob/a469c5b4fdc83e30554ecd83b4b131e9279e4848/connection_strengths_analysis.py

https://github.com/ashapsoncoe/h01/blob/a469c5b4fdc83e30554ecd83b4b131e9279e4848/discrete_gof_tests_pooled_excitatory_inhibitory.r