View source: R/flywire-nuclei.R
flywire_nuclei | R Documentation |
flywire_nuclei
finds nuclei based on known rootids
or nucleus_ids
flywire_nearest_nuclei
returns the nearest nucleus to a
query xyz location. When rawcoords=T
both the input and output
positions are in raw voxels. Note however that distances are still
calculated in nm. xyz
may contain single points unless k>1
,
in which case only one query point is allowed.
flywire_nuclei(rootids = NULL, nucleus_ids = NULL, rawcoords = FALSE, ...)
flywire_nearest_nuclei(xyz, rawcoords = F, k = 1)
rootids |
Character vector specifying one or more flywire rootids. As a
convenience for |
nucleus_ids |
ids from the nucleus table to return (optional, NB only
one of |
rawcoords |
Whether to return coordinates in raw form rather than nm
(default |
... |
Additional arguments passed to |
xyz |
One or more (if |
k |
The number of nearest nuclei to return for each query position. When
|
flywire_nearest_nuclei
caches the nucleus table and then
updates ids of any selected values. This saves time for subsequent queries
assuming that you are returning less than half of the total rows.
A data.frame containing information about nuclei including
id nucleus id
pt_position the XYZ position of the centre of the nucleus. This will
always be in nm when rawcoords=FALSE
even if the remote table stores
raw (uncalibrated) voxel coordinates. It will be a comma separated string
when rawcoords=TRUE since this is most convenient for pasting between
applications.
pt_supervoxel_id corresponding to the nucleus may be missing if the segmentation is disrupted at the location of the nucleus e.g. because of masking issues, missing sections etc.
pt_root_id The current root id (when the pt_position
maps onto
the segmentation.)
volume the volume in cubic microns of the nucleus
For flywire_nearest_nuclei
when rawcoords=T
both the
input and output positions are in raw voxels. Note however that distances
are still calculated in nm.
# an example where there are two nucleus matches
flywire_nuclei(flywire_xyz2id(c(120152, 22864, 3564), rawcoords = TRUE))
nn=flywire_nearest_nuclei(c(480608, 91456, 142560), k=2)
as.data.frame(nn)
flywire_nearest_nuclei('163113, 59074, 5295', rawcoords = TRUE)
## Not run:
# from clipboard e.g. copied from flywire
flywire_nearest_nuclei(clipr::read_clip(), rawcoords = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.