nat icon indicating copy to clipboard operation
nat copied to clipboard

Implement a 'registry' of neurons

Open jdmanton opened this issue 10 years ago • 5 comments

It would be useful to have some form of 'registry' where sets of neurons originating from the same dataset could be listed. This would allow a user to refer to a neuron by character vector, such as "DvGlutMARCM-F002528_seg001", while still allowing the requisite functions to know that this neuron corresponds to data from FlyCircuit. This would generalise the behaviour of the flycircuit package (and e.g. plot3dfc/pop3dfc) to handle multiple data sources.

Some form of prefix/suffix attached to the character vectors might be useful, especially when combining neurons from multiple datasets.

jdmanton avatar Jul 01 '14 10:07 jdmanton

Something like:

#' @param x A neuronlist whose names will be registered as canonical identifiers for these neurons.
#' @param moreids A named character vector that maps additional identifiers 
#'   onto canonical identifiers. Perhaps also a function that can be applied to names(x)
#' @param prefix A character vector specifying a prefix to add to the identifier. 
#'   Defaults to name of x. (see details).
#' @param sep A character vector specifying a separator between prefix and identifier.
#'   Defaults to ":" name of x.
register.neuronlist<-function(x, moreids=NULL, prefix=NULL, sep=":")

views @ajdm?

jefferis avatar Jul 03 '14 12:07 jefferis

Of course register still seems like a less than ideal name for the generic given how much image registration we do ...

jefferis avatar Jul 03 '14 12:07 jefferis

Looks good to me. Perhaps deposit as an alternative to register?

jdmanton avatar Jul 03 '14 15:07 jdmanton

Looks good to me. Perhaps deposit as an alternative to register?

I wonder if deposit has the suggestion of putting the neurons into a location rather than telling someone about them.

jefferis avatar Jul 05 '14 10:07 jefferis

The main change besides adding the register/deposit function would be to update plot3d.character to use it. Possibly there should be a separate function that fetches neurons by identifier.

jefferis avatar Jul 05 '14 10:07 jefferis