nat icon indicating copy to clipboard operation
nat copied to clipboard

bug in endpoints with multiple subtrees

Open Erginkayam opened this issue 6 years ago • 3 comments

> endpoints(lptcin.mids[[1]], subtrees = 1:2)
Error in UseMethod("as.ngraph") : 
  no applicable method for 'as.ngraph' applied to an object of class "c('seglist', 'list')"
> traceback()
6: as.ngraph(x)
5: endpoints(as.ngraph(x))
4: FUN(X[[i]], ...)
3: lapply(x$SubTrees[subtrees], function(x) endpoints(as.ngraph(x)))
2: endpoints.neuron(lptcin.mids[[1]], subtrees = 1:2)
1: endpoints(lptcin.mids[[1]], subtrees = 1:2)

Erginkayam avatar Jul 23 '18 12:07 Erginkayam

Hi @Erginkayam somehow dropped this last summer, but hit it recently myself. One workaround was to convert the neuron to an ngraph object, but this returns all endpoints rather than allowing you to retrieve them for identified subtrees:

ng=lptcin.mids[[1]]
endpoints(ng)

jefferis avatar Apr 22 '19 10:04 jefferis

I will commit a fix shortly.

jefferis avatar Apr 22 '19 10:04 jefferis

Great, thank you for the heads up!

Erginkayam avatar Apr 24 '19 09:04 Erginkayam