R/hemibrain_googledrive.R
hemibrain_nblast.Rd
Read precomputed data available on the hemibrain Google Team
Drive. This includes body IDs for all hemibrain neurons ((hemibrain_neuron_bodyids
)),
all synapses (hemibrain_synapses
),
neuron-neuron connections (hemibrain_connections
) and an
edgelist (hemibrain_elist
) for all hemibrain neurons, broken down by axon and dendrite
assignments. NBLAST matrices for all neurons against all neurons in the
data set are also available, including ones broken down by neuron
compartment.
hemibrain_nblast( nblast = c("hemibrain", "flywire", "hemibrain-flywire", "hemibrain-fafb14", "hemibrain-flycircuit", "flywire-mirror", "flywire-spine", "hemibrain-primary.neurites", "hemibrain-primary.dendrites", "hemibrain-axons", "hemibrain-dendrites", "hemibrain-spines", "hemibrain-tracts", "hemibrain-arbour", "hemibrain-simplified"), local = FALSE, fafbsegpy = TRUE )
nblast | the NBLAST matrix you would like to retrieve, e.g.
|
---|---|
local |
|
fafbsegpy | logical. If |
a matrix
with named rows and columns describing an NBLAST result.
NBLASTs were made in JRCFIB2018F
space. Hemibrain neurons first had their 'twigs' pruned:
fib.twigs5 = nlapply(all.neurons.flow, prune_twigs, twig_length=5000, .parallel = TRUE, OmitFailures = TRUE)
.
Where all.neurons.flow
can be called with hemibrain_neurons
. Neurons were moved from JRC2018Fraw
to JRC2018F
by:
all.neurons.flow.microns = hemibrainr:::scale_neurons.neuronlist(fib.twigs5, .parallel = TRUE, OmitFailures = TRUE)
For 'compartment' NBLASTs neurons' axons, dendrites, primary neurite tracts, etc., were extracted. E.g.
all.neurons.pnt = primary_neurite_cable(x = all.neurons.flow.microns, .parallel = TRUE, OmitFailures = TRUE)
all.neurons.arbour = arbour_cable(x = all.neurons.flow.microns, .parallel = TRUE, OmitFailures = TRUE)
all.neurons.tract = tract_cable(x = all.neurons.flow.microns, .parallel = TRUE, OmitFailures = TRUE)
For the 'simplified' hemibrain neuron NBLAST, the function nat::simplify_neuron
was used as so:
all.neurons.simp = nat::nlapply(X = all.neurons.flow.microns, FUN = nat::simplify_neuron, n = 1, invert = FALSE, .parallel = TRUE, OmitFailures = TRUE)
Neurons, simplified neurons and compartments were turned into vector cloud using nat::dotprops
as so:
hemibrain.microns.dps =dotprops(all.neurons.flow.microns, k=5, resample=1, .parallel=T, OmitFailures = T)
NBLASTs were run as so:
hemibrain.aba.mean=nat.nblast::nblast_allbyall(hemibrain.twigs5.dps,
.progress='text',.parallel=TRUE, normalisation='mean')
NBLASTs were also run against flywire and flycircuit neurons.
Flywire neurons were pulled from the flywire project as meshes and skeletonised
using fafbseg::skeletor
.
The code for this pipeline can be found as a flyconnectome GitHub repository
# \donttest{ if (FALSE) { # A normalised neuron-neuron NBLASST for all hemibrain neurons hemibrain.nblast = hemibrain_nblast(nblast = "hemibrain") # A normalised neuron-neuron NBLASST for all hemibrain neurons's axons hemibrain.axon.nblast = hemibrain_nblast(nblast = "hemibrain-axons") # And for simplified hemibrain neurons hemibrain.simp.nblast = hemibrain_nblast(nblast = "hemibrain-simplified") }# }