natverse / flycircuit

R package flycircuit

Home Page:https://natverse.github.io/flycircuit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

natverse Build Status Docs

flycircuit

Plot and analyse neurons skeletonised from image data released by FlyCircuit.

Installation

Currently there isn't a released version on CRAN, but you can use the devtools package to install the development version:

# if necessary
if(!requireNamespace('devtools')) install.packages("devtools")
devtools::install_github("natverse/flycircuit", dependencies=TRUE)

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

Getting Started

Take a look at the package vignette (also available in fullly processed format through R's help system).

# read FlyCircuit neurons
?fc_read_neurons

# open FlyCircuit
?fc_page

# get FlyCircuit IDs
?fc_get_ids

Getting the data

We have pre-packaged a complete registered/skeletonised version of 16129 neurons from the flycircuit dataset. We are also distributing the all by all NBLAST scores for these neurons. Further details are available at https://gist.github.com/jefferis/bbaf5d53353b3944c090.

You can get the data like so:

devtools::source_gist("bbaf5d53353b3944c090")

You can also read individual skeletons hosted on the FlyCircuit website:

 # Let's read a neuron from the FlyCircuit database
 library(nat.flybrains)
 fcn <- fc_read_neurons("Gad1-F-200234")
 plot3d(fcn)
 plot3d(FCWB)

You could read all skeletons like so:

 # We can also read all neurons
 clear3d()
 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
 left.somas <- function(neuron,bound = boundingbox(FCWB.surf)[1,1]+((boundingbox(FCWB.surf)[2,1]-boundingbox(FCWB.surf)[1,1])/2)){
     r = nat::rootpoints(neuron)
     position = nat::xyzmatrix(neuron$d[r,])
     position[,"X"]>bound
 }
 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)

Acknowledging the data and tools

Any work that uses data from this package should cite

(for the original image data)

Chiang, Ann-Shyn, Chih-Yung Lin, Chao-Chun Chuang, Hsiu-Ming Chang, Chang-Huain Hsieh, Chang-Wei Yeh, Chi-Tin Shih, et al. 2011. Three-Dimensional Reconstruction of Brain-Wide Wiring Networks in Drosophila at Single-Cell Resolution. Current Biology 21(1):1–11. doi: 10.1016/j.cub.2010.11.056

(for the automated traced neuronal skeletons)

Lee, Ping-Chang, Chao-Chun Chuang, Ann-Shyn Chiang, and Yu-Tai Ching. 2012. High-Throughput Computer Method for 3D Neuronal Structure Reconstruction from the Image Stack of the Drosophila Brain and Its Applications. PLoS Computational Biology 8(9):e1002658. doi: 10.1371/journal.pcbi.1002658

(for the package, cell type annotations and NBLAST results)

Costa M, Manton JD, Ostrovsky AD, Prohaska S, Jefferis GSXE. (2016) NBLAST: Rapid, Sensitive Comparison of Neuronal Structure and Construction of Neuron Family Databases. Neuron 91(2):293-311. doi: 10.1016/j.neuron.2016.06.012 (URL: https://doi.org/10.1016/j.neuron.2016.06.012)

This package was created by James Manton, Marta Costa, Alexander Shakeel Bates and Gregory Jefferis.

You can obtain a citation for this package as:

citation(package = "flycircuit")

About

R package flycircuit

https://natverse.github.io/flycircuit

License:GNU General Public License v3.0


Languages

Language:R 96.2%Language:TeX 3.8%