catmaid_entities_from_models: Convert between entity (neuron) and model (skeleton) ids

View source: R/catmaid_annotations.R

catmaid_entities_from_modelsR Documentation

Convert between entity (neuron) and model (skeleton) ids

Description

catmaid_entities_from_models converts from neuron ids to skeleton ids

catmaid_models_from_entities converts skeleton ids to from neuron ids

Usage

catmaid_entities_from_models(skids, pid = 1, conn = NULL, ...)

catmaid_models_from_entities(nids, pid = 1, conn = NULL, ...)

Arguments

skids

One or more numeric skeleton ids or a character vector defining a query (see catmaid_skids or examples for the syntax).

pid

Project id (default 1)

conn

A catmaid_connection objection returned by catmaid_login. If NULL (the default) a new connection object will be generated using the values of the catmaid.* package options as described in the help for catmaid_login.

...

Additional arguments passed to the catmaid_fetch function

nids

Neuron (entity) ids

Details

This will normally be used to turn skeleton ids into neuron ids which are used e.g. for annotation purposes. This is probably not something that many end users will need but is required e.g. by catmaid_remove_annotations_for_skeletons.

Value

For catmaid_entities_from_models an integer vector of entity ids each named by the corresponding model id (usually a skeleton id).

For catmaid_models_from_entities a list of model ids (usually skeleton ids) named by the corresponding entity ids. Formally there may be multiple skeletons per neuron.

See Also

Used by catmaid_remove_annotations_for_skeletons

Examples

ents=catmaid_entities_from_models('ORN PNs left', conn=vfbcatmaid('l1em'))
ents
mods=catmaid_models_from_entities(unname(ents), conn=vfbcatmaid('l1em'))
str(mods)

jefferis/rcatmaid documentation built on Aug. 16, 2022, 8:52 p.m.