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

indexing error in prune_synapseless_branches #24

Open
jefferis opened this issue Oct 3, 2020 · 2 comments
Open

indexing error in prune_synapseless_branches #24

jefferis opened this issue Oct 3, 2020 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@jefferis
Copy link
Contributor

jefferis commented Oct 3, 2020

hemibrain_clean_skeleton calls prune_synapseless_branches

https://github.com/flyconnectome/hemibrainr/blob/36f255878d9c8cbf256ad8b1c8f0dd746d384a8c/R/hemibrain_read_neurons.R#L183-L184

but this has a logic error where point indexes and identifiers are mixed. For example in the example below prune is filled with the contents of the PointNo column (i.e. identifiers in line 211) but then used to subscript the PointNo column in line 239

https://github.com/flyconnectome/hemibrainr/blob/36f255878d9c8cbf256ad8b1c8f0dd746d384a8c/R/hemibrain_read_neurons.R#L211-L241

In the example below this results in prune_synapseless_branches returning c(NA,NA,NA) for the axonic cable.

al.local.neurons="1702323386"
neurons = neuprintr::neuprint_read_neurons(al.local.neurons)
neurons.split = hemibrain_flow_centrality(neurons)
neurons.cleaned = hemibrain_clean_skeleton(neurons.split)
@jefferis jefferis added the bug Something isn't working label Oct 3, 2020
@jefferis
Copy link
Contributor Author

jefferis commented Oct 3, 2020

This means that the example for hemibrain_clean_skeleton skeleton fails. This is a good example of code that should have a test (not necessarily with all the neurons in the example).

@alexanderbates
Copy link
Collaborator

I have started to fix this and make a test, but I need to think about what I want to achieve now with this function.

jefferis added a commit that referenced this issue Oct 6, 2020
* this is run when generating pkgdown site
* 28 neurons seems a bit excessive
* but see #24 which means this doesn't work at the moment anyway
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants