natverse / neuprintr

R client utilities for interacting with the neuPrint connectome analysis service
http://natverse.org/neuprintr
3 stars 3 forks source link

Error in neuprint_connection_table when using by.roi = T and no connections #157

Closed mmc46 closed 1 year ago

mmc46 commented 2 years ago

When a bodyid doesn't have input or output connections, there's an error when trying to use by.roi = T.

library(neuprintr)
#> Registered S3 method overwritten by 'nat':
#>   method             from
#>   as.mesh3d.ashape3d rgl

neuprint_connection_table(15059, partners = "outputs", conn = malevnc::manc_neuprint())
#> [1] bodyid  partner prepost weight 
#> <0 rows> (or 0-length row.names)
neuprint_connection_table(15059, partners = "outputs", by.roi = T, conn = malevnc::manc_neuprint())
#> Error in nc$data[sapply(nc$data, function(x) !is.null(x[[roicol]]))]: invalid subscript type 'list'