diff --git a/DESCRIPTION b/DESCRIPTION index f7ca484..28ca4c6 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -11,13 +11,13 @@ License: GPL-3 LazyData: TRUE Depends: R (>= 2.10), - nat.flybrains + nat.flybrains, + nat.nblast Imports: nat, rgl, nat.templatebrains, catmaid, - nat.nblast, nabor, igraph, Morpho, diff --git a/R/nblast_fafb.R b/R/nblast_fafb.R index ebbe3c3..9255959 100644 --- a/R/nblast_fafb.R +++ b/R/nblast_fafb.R @@ -38,10 +38,7 @@ fetchdp<-function(skids, mirror=TRUE, conn=NULL, ...) { #' #' @examples #' \dontrun{ -#' # load dps object (see details) -#' -#' # load https://github.com/jefferislab/nat.flybrains -#' library(nat.flybrains) +#' # first load dps object (see details) #' #' # nblast neuron 27884 #' PN27884f=nblast_fafb(27884, mirror = FALSE) @@ -50,7 +47,13 @@ fetchdp<-function(skids, mirror=TRUE, conn=NULL, ...) { #' # plot results, just top hit #' plot3d(PN27884f, hits=1) #' } -nblast_fafb <- function(skids, db=dps, conn=NULL, mirror=TRUE, normalised=TRUE, .parallel=T, ...) { +nblast_fafb <- function(skids, db=NULL, conn=NULL, mirror=TRUE, normalised=TRUE, .parallel=T, ...) { + if(is.null(db)){ + if(exists('dps')) db=get('dps') else{ + stop("You must have the dps object containing flycircuit neurons loaded!\n", + "See details of nblast_fafb documentation!") + } + } n=fetchn(skids=skids, mirror=mirror, conn=conn) if(length(n)>1) n=elmr::stitch_neurons(n) else n=n[[1]] diff --git a/man/nblast_fafb.Rd b/man/nblast_fafb.Rd index 897c41a..0e51eb3 100644 --- a/man/nblast_fafb.Rd +++ b/man/nblast_fafb.Rd @@ -4,7 +4,7 @@ \alias{nblast_fafb} \title{NBLAST EM tracing against flycircuit neurons} \usage{ -nblast_fafb(skids, db = dps, conn = NULL, mirror = TRUE, +nblast_fafb(skids, db = NULL, conn = NULL, mirror = TRUE, normalised = TRUE, .parallel = T, ...) } \arguments{ @@ -40,10 +40,7 @@ Still depends on an object called \code{dps} containing registered } \examples{ \dontrun{ -# load dps object (see details) - -# load https://github.com/jefferislab/nat.flybrains -library(nat.flybrains) +# first load dps object (see details) # nblast neuron 27884 PN27884f=nblast_fafb(27884, mirror = FALSE)