R/catmaid_nat.R
nsoma.Rd
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", ...)
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.
Character vector of one or more label names that identify somata.
A named integer vector corresponding to the number of neurons
specified by x
.
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 .
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")
#>
#> 3486381 8021456 4354933 4493199 4651929 7843730 8399890 7515491
#> 1 1 1 1 1 1 1 1
#> 7092417 7107433 7198338 7852250 7845346 7851153 7864823 7865652
#> 1 1 1 1 1 1 1 1
#> 7865696 7865767 7873135 7916593 7934904 7935088 8140109 8243455
#> 1 1 1 1 1 1 1 1
#> 8244723 8244823 8245014 8245146 8245513 8245692 8245869 8246081
#> 1 1 1 1 1 1 1 1
#> 8246750 8247451 8248631 8252067 8253413 8256186 11279244 13589251
#> 1 1 1 1 1 1 1 1
#> 14604028 16259595
#> 1 1
# }
if (FALSE) {
nsoma(3486381)
}