natverse / rcatmaid

R package providing API access to the CATMAID web image annotation tool
https://natverse.github.io/rcatmaid
GNU General Public License v3.0
9 stars 6 forks source link

New function to convert between neuron id and skeleton id #161

Closed mmc46 closed 2 years ago

mmc46 commented 4 years ago

Neuron id is in the output of the 'Export CSV' option in the Neuron Search widget, not skid.
I'm finding users often generate this csv, and it would be useful to have a function that converts from neuron id to skeleton id.

jefferis commented 2 years ago

We have a function to do the reverse, catmaid_entities_from_models, which uses the neurons/from-models endpoint. Looks like this would need the get-all-skeletons endpoint which operates on one neuron at a time: https://github.com/catmaid/CATMAID/blob/2964e04e6e9772aff5d305e72c1b878030fe0e25/django/applications/catmaid/urls.py#L261

tomka commented 2 years ago

Because I needed to do bulk conversion of neuron IDs to skeleton IDs as well (in the CATMAID front-end), I recently added the {project_id}/neurons/all-skeletons API, which can operate on lists of neuron IDs: urls.py definition. For larger collections of neuron IDs this should be faster than individual look-ups. This is only part of the dev branch yet though and deployed only to the itanna.io server, but not yet neuropil (or VFB I suppose).