navis-org / navis

Python library for analysis of neuroanatomical data.
https://navis.readthedocs.io
GNU General Public License v3.0
81 stars 29 forks source link

Neurons from Navis neuPrint tutorial load but without connection tables (no n_connectors) #135

Open Neurophila opened 5 months ago

Neurophila commented 5 months ago

Description When following the Navis neuPrint tutorial currently found at https://navis.readthedocs.io/en/latest/source/tutorials/neuprint.html I encounter an issue when trying to load in the example neurons in which the connector tables do not load (no n_connectors).

To Reproduce I copied and pasted the lines of code found in the example notebook exactly as they are written, with the exception being I used my authorization token stored as a variable. When I run the following lines:

mbon_skeletons = neu.fetch_skeletons(neu.SegmentCriteria(instance='.*MBON.*_R', regex=True))
mbon_skeletons.head()

I get this output: image_2023-12-12_161540352

Expected behavior I expected these tables to populate with n_connectors. I am uncertain if I should be explicitly importing these connection tables elsewhere or if they should be populated already as in the example notebook.

Your system

schlegelp commented 5 months ago

Thanks for the detailed report!

neu.fetch_skeletons (and neu.fetch_mesh_neuron) have a with_synapses parameter that defaults to False. I suspect that used to be True when the tutorial was first written.

In any event, change this line should work:

>>> mbon_skeletons = neu.fetch_skeletons(neu.SegmentCriteria(instance='.*MBON.*_R', regex=True),
...                                      with_synapses=True)

I have also updated the tutorial on readthedocs but the changes haven't propagated to the website yet (probably some under-the-hood caching).

schlegelp commented 5 months ago

Looks like the updated tutorial is now visible. You might still have to deep-reload the website though.

Neurophila commented 5 months ago

Thank you for such a quick response, we have n_connectors now!