catmaid_get_annotations_for_skeletons: Get or set annotations for neurons from CATMAID

View source: R/catmaid_annotations.R

catmaid_get_annotations_for_skeletonsR Documentation

Get or set annotations for neurons from CATMAID

Description

Pretty obviously: catmaid_get_annotations_for_skeletons gets annotations from one or more neurons.

Pretty obviously: catmaid_set_annotations_for_skeletons sets annotations for one or more neurons. Although adding annotations is non-destructive, please use carefully since this will be making changes on the server!

Usage

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

catmaid_set_annotations_for_skeletons(
  skids,
  annotations,
  pid = 1,
  conn = NULL,
  ...
)

catmaid_remove_annotations_for_skeletons(
  skids,
  annotations,
  force = FALSE,
  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

annotations

Character vector of one or more named annotations to add to the specified neurons.

force

Whether to force the catmaid server to remove multiple annotations (default FALSE) to provide some protection against accidents.

Details

Note that annotations will be created on the catmaid server if they do not already exist (and will not be re-created if they do already exist.)

Value

For catmaid_get_annotations_for_skeletons a data.frame containing the following columns

  • skid The skeleton id

  • annotation The annotation string

  • id The annotation id

  • uid The user id for the annotation

For catmaid_set_annotations_for_skeletons a list containing information about the annotations that have just been added. For catmaid_remove_annotations_for_skeletons a list containing information about the annotations that have just been removed.

See Also

catmaid_query_by_annotation, catmaid_get_meta_annotations catmaid_fetch, catmaid_skids

Examples

## Not run: 
catmaid_get_annotations_for_skeletons(skids=c(10418394,4453485))
catmaid_get_annotations_for_skeletons("name:ORN (left|right)")
catmaid_get_annotations_for_skeletons("annotation:ORN PNs$")

## End(Not run)
## Not run: 
catmaid_set_annotations_for_skeletons(skids=c(10418394,4453485), 'myselection')
catmaid_set_annotations_for_skeletons(skids="annotation:ORN PNs$", 'my pns')

## End(Not run)
## Not run: 
nn=c(10418394,4453485)
catmaid_set_annotations_for_skeletons(skids=nn, 'mytest')
catmaid_remove_annotations_for_skeletons(nn, 'mytest')

## End(Not run)

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