Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug in endpoints with multiple subtrees #376

Open
Erginkayam opened this issue Jul 23, 2018 · 3 comments
Open

bug in endpoints with multiple subtrees #376

Erginkayam opened this issue Jul 23, 2018 · 3 comments

Comments

@Erginkayam
Copy link

> 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)
@jefferis
Copy link
Collaborator

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
Copy link
Collaborator

I will commit a fix shortly.

@Erginkayam
Copy link
Author

Great, thank you for the heads up!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants