From 7ea1c568083fdab70e4460c190647e11e87cb3a4 Mon Sep 17 00:00:00 2001 From: Gregory Jefferis Date: Wed, 1 May 2024 18:28:03 +0100 Subject: [PATCH] fanc_cellid_from_segid also respects latest table --- R/ids.R | 7 ++++++- man/fanc_cellid_from_segid.Rd | 5 +++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/R/ids.R b/R/ids.R index 07dd934..f9593bf 100644 --- a/R/ids.R +++ b/R/ids.R @@ -158,6 +158,9 @@ fanc_ids <- function(x, integer64=NA) { #' Convert between FANC cell ids and root ids #' +#' @description Converts between FANC cell ids (should survive most edits) and +#' root ids (guaranteed to match just one edit state). See details. +#' #' @details CAVE/PyChunkedGraph assigns a 64 bit integer root id to all bodies #' in the segmentation. These root ids are persistent in a computer science #' sense, which is often the exact opposite of what neuroscientists might @@ -202,8 +205,10 @@ fanc_ids <- function(x, integer64=NA) { #' \donttest{ #' fanc_cellid_from_segid(fanc_latestid("648518346486614449")) #' } -fanc_cellid_from_segid <- function(rootids=NULL, timestamp=NULL, version=NULL, cellid_table = 'cell_ids', rval=c("ids", 'data.frame')) { +fanc_cellid_from_segid <- function(rootids=NULL, timestamp=NULL, version=NULL, cellid_table = NULL, rval=c("ids", 'data.frame')) { rval=match.arg(rval) + if(is.null(cellid_table)) + cellid_table=fanc_cellid_table() if(!is.null(rootids)) { rootids=fanc_ids(rootids, integer64=F) idlist=list(pt_root_id=rootids) diff --git a/man/fanc_cellid_from_segid.Rd b/man/fanc_cellid_from_segid.Rd index c3501b8..d4e9455 100644 --- a/man/fanc_cellid_from_segid.Rd +++ b/man/fanc_cellid_from_segid.Rd @@ -9,7 +9,7 @@ fanc_cellid_from_segid( rootids = NULL, timestamp = NULL, version = NULL, - cellid_table = "cell_ids", + cellid_table = NULL, rval = c("ids", "data.frame") ) @@ -54,7 +54,8 @@ character vector or an \code{bit64::integer64} vector depending on the \code{integer64} argument. } \description{ -Convert between FANC cell ids and root ids +Converts between FANC cell ids (should survive most edits) and +root ids (guaranteed to match just one edit state). See details. } \details{ CAVE/PyChunkedGraph assigns a 64 bit integer root id to all bodies