From 271fe85bfae2618ea7fa15f45e85781ced6bc5f5 Mon Sep 17 00:00:00 2001 From: alexanderbates Date: Thu, 11 Jul 2024 21:22:38 -0400 Subject: [PATCH] Use bancr:: to reference package's own data when used in function --- R/ggplot2.R | 6 +++--- R/xform.R | 11 ++++++----- README.md | 7 ++++--- man/bancr-package.Rd | 2 +- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/R/ggplot2.R b/R/ggplot2.R index 6685c93..030eb3b 100644 --- a/R/ggplot2.R +++ b/R/ggplot2.R @@ -56,9 +56,9 @@ banc_neuron_comparison_plot <- function(neuron1, check_package_available('ggpubr') glist <- list() title.col <- "black" - if(is.null(banc_brain_neuropil)) {utils::data("banc_brain_neuropil.surf", envir = environment()); banc_brain_neuropil <- banc_brain_neuropil.surf} - if(is.null(banc_vnc_neuropil)) {utils::data("banc_brain_neuropil.surf", envir = environment()); banc_vnc_neuropil <- banc_vnc_neuropil.surf} - if(is.null(banc_neuropil)) {utils::data("banc_brain_neuropil.surf", envir = environment()); banc_neuropil <- banc_neuropil.surf} + if(is.null(banc_brain_neuropil)) {banc_brain_neuropil <- bancr::banc_brain_neuropil.surf} + if(is.null(banc_vnc_neuropil)) {banc_vnc_neuropil <- bancr::banc_vnc_neuropil.surf} + if(is.null(banc_neuropil)) {banc_neuropil <- bancr::banc_neuropil.surf} for(view in names(banc_rotation_matrices)){ # Choose mesh diff --git a/R/xform.R b/R/xform.R index 0cd6af5..cb39f1c 100644 --- a/R/xform.R +++ b/R/xform.R @@ -386,15 +386,15 @@ banc_to_JRC2018F <- function(x, }else{ if(inverse){ # Result is in nm - utils::data("jrc2018f_to_banc_tpsreg", envir = environment()) + # utils::data("jrc2018f_to_banc_tpsreg", envir = environment()) xyz2 <- Morpho::applyTransform(xyz, - trafo = jrc2018f_to_banc_tpsreg, + trafo = bancr::jrc2018f_to_banc_tpsreg, inverse = FALSE) }else{ # Result is in um - utils::data("banc_to_jrc2018f_tpsreg", envir = environment()) + # utils::data("banc_to_jrc2018f_tpsreg", envir = environment()) xyz2 <- Morpho::applyTransform(xyz, - trafo = banc_to_jrc2018f_tpsreg, + trafo = bancr::banc_to_jrc2018f_tpsreg, inverse = FALSE) } } @@ -524,8 +524,9 @@ banc_mirror <- function(x, } # use pre-calculated tps reg + # utils::data("banc_mirror_tpsreg", envir = environment()) x.banc.m <- Morpho::applyTransform(xyz, - trafo = utils::data("banc_mirror_tpsreg", envir = environment())) + trafo = bancr::banc_mirror_tpsreg) # convert from um to original banc.units if necessary if(banc.units=='um'){ diff --git a/README.md b/README.md index ffbe1f8..d7b7c37 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![R-CMD-check](https://github.com/flyconnectome/banc/workflows/R-CMD-check/badge.svg)](https://github.com/flyconnectome/banc/actions) [![R-CMD-check](https://github.com/flyconnectome/bancr/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/flyconnectome/bancr/actions/workflows/R-CMD-check.yaml) - +c bancr =========== @@ -12,7 +12,7 @@ The goal of **bancr** is to support analysis of the Brain And Nerve Cord dataset aka (*BANC*), especially autosegmentation data. Those data are made available by the *BANC* project led by Wei-Chung Allen Lee (Harvard) and collaborators including Zetta.ai and the FlyWire team at Princeton. -Anyon can request access to the data [here](https://flywire.ai/banc_access). +Anyone can request access to the data [here](https://flywire.ai/banc_access). Learn more on the [BANC wiki](https://github.com/jasper-tms/the-BANC-fly-connectome/wiki/). To access banc resources, you must have permissions to access the [banc @@ -356,6 +356,7 @@ And then get known *FAFB-FlyWire* neurons. # Which directs you towards the active FAFB-FlyWire segmentation # Define the IDs we wish to fetch +# these are from the 783 materialisation (i.e.) published version fw.an1.ids <- c("720575940626768442", "720575940636821616") # Get neuron meshes @@ -443,7 +444,7 @@ Acknowledgements ---------------- The BANC data set was collected at Harvard Medical School in he laboratory of Wei-Chung Allen Lee, by Minsu Kim and Jasper Phelps. -The segmentation and synapse prediction was built by [Zett.ai](https://zetta.ai/). +The segmentation and synapse prediction was built by [Zetta.ai](https://zetta.ai/). The neuron reconstruction effort has been hosted and support by [FlyWire](https://flywire.ai/). This R package was built from principles developed by Greg Jefferis at the Laboratory of Molecular Biology. diff --git a/man/bancr-package.Rd b/man/bancr-package.Rd index cfad73d..e71fe78 100644 --- a/man/bancr-package.Rd +++ b/man/bancr-package.Rd @@ -4,7 +4,7 @@ \name{bancr-package} \alias{bancr} \alias{bancr-package} -\title{bancr: Support Access to the Brain And Nerve Cord (BANC) Dataset} +\title{bancr: R Client Access to the Brain And Nerve Cord (BANC) Dataset} \description{ Access to the BANC 'righty' EM dataset, focussing on support for BANC autosegmentation. Organised as a wrapper around the fafbseg package. }