Reads FlyCircuit skeletons from http://www.flycircuit.tw/, and bridges them into the FCWB space.

fc_read_neurons(fc.ids, xform = TRUE, ...)

Arguments

fc.ids

vector of valid FlyCircuit neuron ids. To acquire these in bulk, see fc_get_ids and flycircuit-ids.

xform

Whether or not to tranform neurons from their original space to the FCWB template space.

...

additional arguments passed to methods

Source

http://www.flycircuit.tw/

Value

A neuronlist of FlyCircuit neurons registered in the intersex FCWB brain space

See also

Examples

# Let's read a neuron from the FlyCircuit database library(nat.flybrains)
#> Loading required package: nat.templatebrains
#> #> Attaching package: ‘nat.flybrains’
#> The following object is masked from ‘package:flycircuit’: #> #> FCWBNP.surf
fcn <- fc_read_neurons("Gad1-F-200234") plot3d(fcn) plot3d(FCWB)
# NOT RUN { # We can also read all neurons clear3d() # nb this will take tens of minutes to hours fc.ids = fc_get_ids() fcns <- fc_read_neurons(fc.ids) plot3d(fcns) plot3d(FCWB, alpha = 0.1) ## Now mirror all neurons to the right of the brain # estimate whether soma is on left or right of midline # nb this assumes that FCWB brain surface is mirror symmetric # which is apporoximately but not exactly the case left.somas <- function(neuron, surf = FCWB.surf) { bb=boundingbox(surf) midline=(bb[1,1]+bb[2,1])/2 r = nat::rootpoints(neuron) somaposition = nat::xyzmatrix(neuron$d[r,]) somaposition[,"X"]>midline } leftsomas = unlist(nat::nlapply(fcns,left.somas)) fcsleft = nat.templatebrains::mirror_brain(fcns[leftsomas], brain = FCWB) fcns = c(fcns[!names(fcns)%in%names(fcsleft)],fcsleft) # }