nat.flybrains provides additional data and functions for use with the NeuroAnatomy Toolbox (nat). In particular nat.flybrains defines the physical properties of a number of commonly used template brains in Drosophila neuronatomy including:

along with bridging registrations between some of these template brains (see https://github.com/jefferislab/BridgingRegistrations) and functions to transform objects such as nat neurons from one space to another as simply as:

# convert neuron from IS2 space to JFRC2 space
myneuron.jfrc2=xform_brain(myneuron, sample=IS2, reference=JFRC2)

# flip neuron to opposite hemisphere of JFRC2 space
myneuron.jfrc2.flip=mirror_brain(myneuron.jfrc2, JFRC2)

# to install additional/updated registrations 
# (beyond those distributed as part of the R package)
# Strongly recommended!
download_jefferislab_registrations()

# for more information
JFRC2
IS2
?xform_brain
?mirror_brain

Installation

This package is fully functional but there are presently no plans to release a version to CRAN, since there is a significant amount of data included with the package (and CRAN discourages large packages).

You can, however, download the tar ball, and run R CMD INSTALL on it, or (highly recommended) use the devtools package to install straight from github:

# install devtools package if you don't already have it
if (!require("remotes")) install.packages("remotes")
remotes::install_github("natverse/nat.flybrains")

# to install additional/updated registrations 
# (beyond those distributed as part of the R package)
# Strongly recommended!
nat.flybrains::download_jefferislab_registrations()

Note: Windows users need Rtools and devtools to install this way.