R/flywire_googledrive.R
flywire_neurons.Rd
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", ... )
x | flywire IDs for desired. If left as |
---|---|
WithConnectors | logical, if |
local |
|
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 |
zip | logical. If |
... | Additional arguments passed to |
flywire.neurons | a |
request | a |
gsheet | logical, whether or not the request is are googlesheet keys. If they are, every item in their |
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. |
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
# \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") }# }