Package Help

Provides an overview of the package


hemibrainr: Code for Working with Data from Janelia FlyEM's Hemibrain Project``

General skeleton functions

hemibrain_read_neurons() scale_neurons() hemibrain_neurons()

Read neurons from the hemibrain connectome project


Download all automatically split neurons from the hemibrain project

primary_neurite() primary_branchpoint()

Retrieve the primary neurite (cell body fibre) for a neuron


Pre-process hemibrain skeletons


Calculate the overlap score between a neurons axon dendrite


Prune vertices from a neuprint neuron (taking care of synapse etc information)


Remove erroneous branchlets to beautify neuron skeletons

Neuronal compartments (axons, dendrites)


Determine a neuron's dendrite and axon by calculating flow centrality

plot3d_split() nlscan_split() plot3d_somas()

Plot neurons split up by flow centrality

axonic_points() dendritic_points() mixed_points() primary_dendrite_points() primary_neurite_points() axonal_endings() dendritic_endings() axonic_endings() primary_dendrite_endings() primary_neurite_endings() axonic_cable() dendritic_cable() arbour_cable() unsure_cable() primary_dendrite_cable() primary_neurite_cable() tract_cable()

Extract axonic/dendritic points/cable from a neuron/neuronlist


Split neurons into axon and dendrites using pre-computed split points


Get the positions of key points in a 'split' neuron


Split a neuron using stored 'splitpoints'


Get useful metrics for each neuron's axon and dendrite

hemibrain_metrics hemibrain_metrics_polypre_centrifugal_distance hemibrain_metrics_polypre_centrifugal_synapses

Neuron metrics for all neurons in the hemibrain dataset

hemibrain_all_splitpoints hemibrain_splitpoints_polypre_centrifugal_distance hemibrain_splitpoints_pre_centrifugal_distance hemibrain_splitpoints_polypre_centrifugal_synapses

Axon-dendrite split points calculated for all hemibrain neurons

manually_assign_labels() hemibrain_prune_online() hemibrain_correctsoma()

Manually assign the dendrite and axon to a neuron

Somas and lineages


Soma / best 'root point' locations for hemibrain neurons


Re-root (a) hemibrain neuron/neurons


Hemilineages names from T. Lee, K. Ito and V. Hartenstein

Synapses and neuron and ROI meshes

hemibrain_extract_synapses() hemibrain_extract_connections() hemibrain_extract_compartment_edgelist()

Extract synapse location and labels, and edgelists from a neuron/neuronlist


Remove incorrectly placed synapses

hemibrain_neuron_meshes() hemibrain_mito_meshes()

Read hemibrain neurite or mitochondrial meshes into an R neuronlist object


Get some or all the region of interest meshes in the hemibrain project

The hemibrain mesh hemibrain_glomeruli_summary odour_scenes

Meshes for Antennal Lobe (AL) glomeruli



Flexible grouping of rows/columns of a raw adjacency matrix

hemibrain_connectivity_similarity() hemibrain_connectivity_similarity_distance() hemibrain_connectivity_similarity_matrix()

Calculate a connectivity similarity score between two connectivity profiles



Get meta information for hemibrain neurons


Return body ids for large classes of neurons

rn.ids orn.ids hrn.ids pn.ids upn.ids mpn.ids vppn.ids dan.ids mbon.ids alln.ids ton.ids lhn.ids dn.ids kc.ids apl.ids cent.ids lc.ids

Bodyids for neuron classes


Find the antennal lobe glomerulus for hemibrain body ids

standard_transmitters() standard_statuses() standard_lineages() standard_compartments() standardise() standard_workflow()

Use standard names and spellings


Return consistent cell body fiber annotation for neurons

fafb_hemibrain_annotate() fafb_set_hemilineage() fafb_set_transmitter()

Set annotations for FAFB neurons in CATMAID based on hemibrain results


Hemibrain neurons in different Olfactory layers

Meta information of certain neuron classes

Neuron matching across datasets

Includes functions for loading a range of different neuronal datasets and assigning matches between related neurons.

hemibrain_matches() lm_matches()

Retrieve matched up neurons between the hemibrain and FAFB

hemibrain_matched lm_matched

Manually verified neuron matches between the hemibrain and FAFB dataset


Update neuron match information on a google sheet

hemibrain_task_update() hemibrain_adjust_saved_split()

Manually review split neurons and save your results to a Google Sheet for everyone to use

hemibrain_type_plot() hemibrain_multi3d()

Plot chosen neurons and see all neurons in that type


Cut neurons to the hemibrain volume


hemibrain_colours hemibrain_blender_colours hemibrain_blender_colors hemibrain_colors hemibrain_fig_colours hemibrain_fig_colors hemibrain_colour_ramp() hemibrain_bright_colours hemibrain_bright_colors hemibrain_bright_colour_ramp()

Some nice colours used by Schlegel and Bates et al. 2020 (in prep.) and Li et al. 2020 (in prep)

add_field() add_field_seq()

Add a field to neuron objects (inc. in a neuronlist)


Manually add a Label annotation to a neuron

hemibrain_settags() hemibrain_seetags() hemibrain_carryover_tags() metadata_add_tags()

Set and see tags on a neuron object inc. within a neuronlist


Plot motivations from InspiroBot


Orient the hemibrain in an RGL viewer


Colours for labels used in Schlegel and Bates et al.2021

R annotation pipelines


Adjust and correct hemibrain neurons somas.

LR_matching() hemibrain_matching() lm_matching() fafb_matching()

Match up neurons between the hemibrain and FAFB

Set hemibrainr to work with google drive

hemibrainr_set_drive() hemibrainr_team_drive() hemibrainr_rclone() hemibrainr_rclone_unmount()

Set data source for precomputed information

Access hemibrain google drive data

hemibrain_neuron_bodyids() hemibrain_elist() hemibrain_meta() hemibrain_synapses() hemibrain_connections()

Read precomputed hemibrain data from the hemibrainr Google Drive


Read precomputed NBLASTs from the hemibrainr Google Drive

Access flywire google drive data

flywire_neurons() flywire_basics() flywire_request()

Download a large set of well-traced skeletonised neurons from FlyWire

flywire_meta() flywire_failed() flywire_contributions() flywire_ids() flywire_elist() flywire_connections() flywire_synapses()

Read precomputed flywire data from the hemibrainr Google Drive


Update the root_id column in a set of google sheets based on flywire_xyz positions

Access light-level google drive data

flycircuit_neurons() lm_lhns()

Read flycircuit neurons from hemibrainr Google Drive

Manipulate googlesheets for neuron matching

flywire_matching_rewrite() hemibrain_add_made_matches() hemibrain_matching_add() hemibrain_matching_transfers() fafb_matching_rewrite() hemibrain_matching_rewrite() flycircuit_matching_rewrite()

Manage hemibrain-FAFB neuron matches