Skip to content

Commit

Permalink
Use bancr:: to reference package's own data when used in function
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderbates committed Jul 12, 2024
1 parent e037807 commit 271fe85
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
6 changes: 3 additions & 3 deletions R/ggplot2.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 6 additions & 5 deletions R/xform.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down Expand Up @@ -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'){
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
[![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)
<!-- badges: end -->

c
bancr
===========

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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion man/bancr-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 271fe85

Please sign in to comment.