We can match neurons in the hemibrain data with FAFB neurons (hemibrain->FAFB, hemibrain tab) and FAFB neurons have been matched with their hemibrain counterparts (FAFB->hemibrain, fafb tab). These matches are recorded on a Google Sheet on our hemibrain Google Team Drive, to which you will need access through an authenticated account to view and use this function. We can use these function to manipulate the Google Sheet. This include adding new IDs for matching (hemibrain_matching_add), transfer matches between the sheet's hemibrain and FAFB tabs (hemibrain_matching_transfers) and add pre-made matches (hemibrain_add_matches).The function lywire_matching_rewrite updates a Google sheet with correct flywire IDs and stable locations in flywire space, based on CATMAID skids.

flywire_matching_rewrite(
  flywire_ids = names(flywire_neurons()),
  meta = flywire_neurons()[, ],
  catmaid.update = TRUE,
  selected_file = options()$hemibrainr_matching_gsheet,
  reorder = FALSE,
  top.nblast = FALSE,
  nblast = NULL,
  ...
)

hemibrain_add_made_matches(
  df,
  direction = c("both", "hemibrain-FAFB", "FAFB-hemibrain", "hemisphere"),
  User = "flyconnectome",
  selected_file = options()$hemibrainr_matching_gsheet,
  ...
)

hemibrain_matching_add(
  ids = NULL,
  meta = NULL,
  dataset = c("hemibrain", "FAFB", "CATMAID", "flywire", "lm"),
  User = dataset,
  selected_file = options()$hemibrainr_matching_gsheet,
  ...
)

hemibrain_matching_transfers(
  selected_file = options()$hemibrainr_matching_gsheet
)

fafb_matching_rewrite(
  selected_file = options()$hemibrainr_matching_gsheet,
  top.nblast = FALSE,
  reorder = FALSE,
  nblast = NULL,
  ...
)

hemibrain_matching_rewrite(
  ids = NULL,
  selected_file = options()$hemibrainr_matching_gsheet,
  top.nblast = FALSE,
  meta = NULL,
  nblast.hemibrain.catmaid = NULL,
  nblast.hemibrain.flywire = NULL,
  ...
)

flycircuit_matching_rewrite(
  flycircuit.ids = names(flycircuit_neurons()),
  meta = flycircuit_neurons[, ],
  selected_file = options()$hemibrainr_matching_gsheet
)

Arguments

flywire_ids

flywire IDs to add to Google sheet if not already present.

meta

meta data for the given flycircuit IDs.

catmaid.update

logical. Whether or not to update flywire_xyz and root_id columns, based on e CATMAID neuron specified by a skid column.

selected_file

Specifies which Google Sheet to use. Unless you are using a personal Google Sheet, this should be options()$hemibrainr_matching_gsheet.

reorder

logical. Whether or not to re-write the sheet so that it is ordered by hemilineage.

top.nblast

logical. Whether or not to also give the top NBLAST match for each entry.

nblast

if top.nblast is TRUE this nblast matrix is used to update the column top.nblast. If set to NULL defaults to using hemibrain_nblast. Columns should be hemibrain neurons, and rows the other data set.

...

arguments passed to methods for, for example, neuprintr::neuprint_get_meta and elmr::fafb_get_meta.

df

a data.frame of pre-made matches that the user wants to transfer onto the Google Sheet. This will erase any extant matches for the specified neurons. This data frame must have columns: bodyid (i.e. the hemibrain neuron), skid (i.e. the FAFB neuron) and quality (i.e. match quality). Matches have three levels of 'quality', largely dependent on the degree of manual tracing for FAFB neurons - good (could be the same cell), medium (same cell_type) and poor (could be the same or similar cell_type).

direction

the match direction, i.e. hemibrain->FAFB (hemibrain tab) or FAFB->hemibrain (fafb tab). Defaults to updating both.

User

your initials, so updates can be linked to you. There is a limited number of users, each of whom have been assigned a number of neurons to match up. In order to add yourself as a user, simply open this Google Sheet in your browser and add your initials to neurons of your choosing on the rightmost column 'Users'.

ids

either hemibrain bodyids or FAFB skids to add to a Google Sheet. You will want to add IDs where they do not already exist, so that you can use, for example, hemibrain_matching.

dataset

the tab to which to add your new information. You are either adding to information related to hemibrain neurons, or FAFB neurons.

nblast.hemibrain.catmaid

if top.nblast is TRUE this nblast matrix is used to update the column top.nblast. If set to NULL defaults to using hemibrain_nblast. Columns should be hemibrain neurons, and rows CATMAID neurons.

nblast.hemibrain.flywire

if top.nblast is TRUE this nblast matrix is used to update the column top.nblast. If set to NULL defaults to using hemibrain_nblast. Columns should be hemibrain neurons, and rows flywire neurons.

flycircuit.ids

flycircuit IDs to add to Google sheet if not already present.

Value

NULL. Updates the master Google sheet.

Details

Currently, information is recorded in a Google Sheet

See also

Examples

# \donttest{ if (FALSE) { # Add a mising FAFB projection neuron, so we can match it later: hemibrain_matching_add(ids = "16", dataset = "FAFB", User = "ASB") }# }