Return the number of explicitly tagged somata in a (CATMAID) neuron

nsoma(x, ...)

# S3 method for neuronlist
nsoma(x, ...)

# S3 method for neuron
nsoma(x, ...)

# S3 method for default
nsoma(x, soma_label = "soma", ...)

Arguments

x

Objects to count somata e.g. one or more neurons or a specifier passed to catmaid_skids

...

Additional arguments, eventually passed by nsoma.default to catmaid_skids, otherwise ignored.

soma_label

Character vector of one or more label names that identify somata.

Value

A named integer vector corresponding to the number of neurons specified by x.

Details

These functions can cope with loaded neuron objects or CATMAID skid specifications (see catmaid_skids). Note that this function will return 0 for any neuron that does not contain a tags$soma entry, including regular neuron objects .

See also

Examples

nsoma(Cell07PNs)
#> EBH11R EBH20L EBH20R EBI12L EBI22R EBJ23L EBJ3R EBN19L EBO15L EBO53L ECA34L #> 0 0 0 0 0 0 0 0 0 0 0 #> ECB3L LI23L LIC2R LJ5L MC3B MH16L MM14L NA7L NH15L NH29B NI16L #> 0 0 0 0 0 0 0 0 0 0 0 #> NIA8L NIA8R NNA9L NNC4R NNE1L OFD2L OKC9R SDD8L SH21L SL20L TKC8R #> 0 0 0 0 0 0 0 0 0 0 0 #> TL4R TS7L TT27R VA15R VA20R VB37L VB58L #> 0 0 0 0 0 0 0
data("AV4b1") nsoma(AV4b1)
#> [1] 1
# \donttest{ nsoma("ORN PNs")
#> Warning: Assumed you want a complete annotation but found no matches for query "annotation:^ORN PNs$"!
#> integer(0)
# } if (FALSE) { nsoma(3486381) }