fish_somapos returns the soma position of each requested
body, preferring the somaLocation field and falling back to
tosomaLocation where the former is missing.
fish_soma_side returns the logical side of each
requested body in the dataset. The side may be derived from a manual
annotation (when one exists), the instance name suffix, or the soma's
position relative to the fish2 midline.
Arguments
- ids
Body ids, a query string (see
fish_ids), or a metadata data.frame as returned byfish_neuprint_meta.- units
Units for the returned coordinates. The neuprint
somaLocation/tosomaLocationvalues are stored in raw voxel coordinates;fish_coordsconverts to the requested units."nm"(the default) scales by the fish2 raw voxel size(16, 16, 15);"raw"passes through;"emraw"returns the (8, 8, 30) nm acquisition grid;"microns"returnsnm / 1000.- as_character
If
TRUE, return a character vector of"x,y,z"strings (the fishr convention for location columns). DefaultFALSE.- method
One of
"auto"(default),"manual","instance","position". See Details.- threshold
Absolute Y displacement (nm) below which
positionreports a soma as midline ("M"). Default0. Ignored byinstanceandmanual.
Value
fish_somapos returns an Nx3 numeric matrix with
columns x, y, z, or a character vector of
"x,y,z" strings when as_character = TRUE. Bodies that
have neither somaLocation nor tosomaLocation produce
NA rows.
fish_soma_side returns a character vector of "L",
"R", "M", "U" or NA, one entry per input
body.
Details
The "side" returned by fish_soma_side is the **logical**
side of the neuron in the dataset, not necessarily the side of the
physical soma. For an ascending fibre entering the brain through a nerve
from outside the EM volume, the side reflects the entry point. Such a
neuron may have its soma on one side of the cord and cross to the other
side before entering the imaged volume; the assigned side will follow
the entry nerve, not the soma.
Methods for fish_soma_side:
autoTry
manualfirst, then fill remainingNAs withinstance, then withposition.manualRead the neuprint
somaSidecolumn directly. ReturnsNAfor bodies that do not have a manual assignment.instanceMatch
_([LRMU])$against thename(orinstance) column.positionClassify each soma by its signed displacement from the fish2 midline via
fish_point_side.thresholdis forwarded as-is; the default0meanspositionnever returns"M"."M"is reserved for bilaterally symmetric unpaired neurons that should be flagged by their instance suffix.
See also
fish_neuprint_meta, fish_point_side,
mirror_fish
Other data-queries:
fish_connection_table(),
fish_ids(),
fish_neuprint_meta(),
register_fish_coconat()
Examples
# \donttest{
meta <- fish_neuprint_meta(109192746)
#> Warning: Clio dataset lookup failed; falling back to baked-in neuprint settings for `fish2`. Clio-backed functionality may be unavailable in this session.
fish_somapos(meta)
#> X Y Z
#> [1,] 898128 426816 158175
fish_somapos(meta, units = "microns")
#> X Y Z
#> [1,] 898.128 426.816 158.175
fish_soma_side(meta)
#> [1] "R"
# }