Get a large number of skeletonised neurons from FlyWire. The neuronlist is saved as a nat::neuronlistfh object so certain neurons may be read from it without loading the entire, large neuronlist into memory. You will need access to the hemibrain Google Team Drive and have it mounted with Google filestream. If you want to flag flywire neurons that should be added to the Google drive, without doing this yourself, you can use flywire_request. The flywire_basics function will calculate some useful meta-data, namely a point in the primary neurite tract that can be used as a stable reference for this neuron.

flywire_neurons(
  x = NULL,
  WithConnectors = FALSE,
  local = FALSE,
  brain = c("FlyWire", "JRCFIB2018Fraw", "JRCFIB2018F", "FAFB", "FAFB14", "JFRC2",
    "JFRC2013", "JRC2018F", "FCWB"),
  mirror = FALSE,
  type = c("neurons", "swc", "dotprops", "cut_dotprops"),
  zip = TRUE,
  ...
)

flywire_basics(flywire.neurons, ...)

flywire_request(
  request,
  gsheet = FALSE,
  selected_sheet = options()$flywire_flagged_gsheet,
  sheet = "flywire",
  User = "hemibrainr",
  ...
)

Arguments

x

flywire IDs for desired. If left as NULL, all flywire neurons that can be summoned from the hemibrainr Google drive are summoned.

WithConnectors

logical, if TRUE the neuron fetched have predicted synapses located within each neuron at neuron$connectors and have a predicted axon/dendrite split at neuron$d$Label for each point in its skeleton, created using flow_centrality.

local

FALSE or path. By default (FALSE) data is read from options()$remote_connectome_data), but the user can specify an alternative path.

brain

the brainspace in which hemibrain neurons have been registered. Defaults to raw voxel space for the FlyWire project.

mirror

logical, whether or not to read neurons that have been mirrored (i.e. flipped to the 'other' brain hemisphere).

type

When using neurons with flywire_neurons from the Google drive a neuronlistfh object of neuron skeletons (default), the saved .swc files, a nat::dotprops objects or a nat::dotprops object cut to the hemibrain volume. Not all brainspaces supported.

zip

logical. If TRUE then nat::neuronlistz is used to read neurons from a .zip archive. Otherwise, nat::neuronlistfh is used to read neurons from a .rds file with a linked 'data' folder. The .zip method is preferred. Both methods load a dynamic neuronlist, which only loads skeleton data into memory at the point where it is processed.

...

Additional arguments passed to nat::nlapply.and/or fafbseg::skeletor.

flywire.neurons

a neuronlist of flywire neurons in FlyWire space. The flywire_basics function will calculate some useful meta-data, namely a point in the primary neurite tract that can be used as a stable reference for this neuron.

request

a neuronlist, matrix of x,y,z position or flywire ID to add to a Google sheet that records flywire positions flagged to be processed into neuron skeletons that can be called by flywire_neurons.

gsheet

logical, whether or not the request is are googlesheet keys. If they are, every item in their flywire_xyz columns is added to the sheet specified by selected_sheet.

selected_sheet

the Google sheet onto which to add new flywire coordinate. I.e. Google sheet.

sheet

the tab onto which to add your requests.

User

character, the user who is added new data.

Value

A neuronlist object containing flywire skeletons. In the meta-data, it might be useful for some users to note that you will get:

  • "root_id" The ID given to the corresponding volumetric body in flywire. These are used to do things like fetch volumes and are the input to the skeletor function. However, they are highly volatile and change a lot with active tracing.

  • "flywire_xyz" The voxel coordinate of a single point in this neuron, usually a cell body fiber tract position. This is a more accurate way of keeping tract of neuron as it will always correspond to the same 'neuron' even though its related root_id will change with merge/split events in flywire.

  • "hemilineage" An estimated hemilineage identity from both of two naming systems, Ito et al. 2013 and Wong et al. 2013

  • "side" An estimate as to the 'side', i.e. brain hemisphere, in which the neuron lies

  • "skid" The 'skeleton ID' of this neuron's match in CATMAID for FAFBv14

  • "fafb_xyz" The coordinates in nanometres of a point in the neuron, in FAFBv14 space

  • "hemibrain_match" The bodyid of an estimated hemibrain_match

See also

Examples

# \donttest{ if (FALSE) { # Loads all processed flywire neurons as a neuronlistfh object fw.neurons = flywire_neurons() # Get them already bridged to the JRC2018F brainsapce ## (Bogovic et al. 2018, high performance brain space) fw.neurons.jrc2018f = flywire_neurons(brain = "JRC2018F") # Get them already mirrored to the other hemispehre, i.e. flipped fw.neurons.jrc2018f.m = flywire_neurons(brain = "JRC2018F", mirror = TRUE) # Now say you have some flywire ID~s you wants to add ## to the nightly processing so they are available from Google drive. ## And they are stored in a .csv: library(readr) csv = read_csv("/Users/abates/Downloads/FlyWire_list.txt", col_type = cols(.default = "c")) ids = csv[,1][[1]] neurons = skeletor(ids) neurons.with.info = hemibrainr:::flywire_basics(neurons) new.points = nat::xyzmatrix(neurons.with.info[,"flywire_xyz"]) flywire_request(new.points) ## Now they are added to a google sheet, and will be read and ## processed as part of this nightly pipeline: ### https://github.com/flyconnectome/fafbpipeline # Now get some split neurons with synapses fw.split = flywire_neurons(WithConnectors=TRUE) nopen3d() nlscan_split(fw.split[sample(length(fw.split),15)]) # Get neuron dotprops object in hemibrain brainspace, ## ready for NBLAST with hemibrain neurons fw.dps.cut = flywire_neurons(type="cut_dotprops", brain = "JRCFIB2018F") }# }