Skip to content

Commit

Permalink
Quick fix for superLevel multiple arg match
Browse files Browse the repository at this point in the history
  • Loading branch information
jefferis committed Jan 30, 2020
1 parent f4148de commit 95d12ba
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/roi.R
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ neuprint_ROI_mesh <- function(roi, dataset = NULL, conn = NULL, ...){
}

# hidden
neuprint_check_roi <- function(rois, dataset = NULL, conn = NULL, ...){
possible.rois = neuprint_ROIs(dataset=dataset,conn=conn, superLevel = NULL, ...)
neuprint_check_roi <- function(rois, superLevel = NULL, dataset = NULL, conn = NULL, ...){
possible.rois = neuprint_ROIs(dataset=dataset,conn=conn, superLevel = superLevel, ...)
if(!all(rois%in%possible.rois)){
stop("Regions of interest provided that are not demarcated in dataset ", dataset, " for server ", neuprint_login(conn)$server,
". Please call neuprint_ROIs(superLevel = NULL) to see the available ROIs.")
Expand Down
3 changes: 3 additions & 0 deletions tests/testthat/test-connectivity.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ test_that("neuprint_connection_table works", {
expect_equal(neuprint_connection_table(c(818983130, 1796818119),
progress = TRUE),
t1)

expect_is(neuprint_connection_table(c(818983130, 1796818119), prepost = "POST",
by.roi = TRUE, roi = "LH(R)"), 'data.frame')
})

test_that("neuprint_connection_table works", {
Expand Down

0 comments on commit 95d12ba

Please sign in to comment.