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

cluster_by_synapse_placement #191

Open
ArefZarin opened this issue Aug 12, 2019 · 2 comments
Open

cluster_by_synapse_placement #191

ArefZarin opened this issue Aug 12, 2019 · 2 comments
Labels

Comments

@ArefZarin
Copy link

Screen Shot 2019-08-12 at 3 27 50 PM
Screen Shot 2019-08-12 at 3 38 29 PM

Hi Philip,
I am trying to use this function: cluster_by_synapse_placement
Please see the attached error (NameError: name 'core' is not defined), and let me know where things are wrong.
I tried importing core using this line:
from . import core, plotting, utils, config
But it gives me the error which I have attached.
Thanks for your help!

Aref

@schlegelp
Copy link
Collaborator

schlegelp commented Aug 13, 2019

Hi @ArefZarin,

You seem to be calling cluster_by_synapse_placement without the leading pymaid. - did you import the function explicitly by running from pymaid import cluster_by_synapse_placement or did you perhaps copy+paste the code in your Jupyter notebook?

Could you try running this minimal example in a fresh notebook?

import pymaid
import matplotlib.pyplot as plt

# Enter your server and credentials here
rm = pymaid.CatmaidInstance('https://YOURSERVER', 'HTTP_USER', 'HTTP_PW', 'API_TOKEN')

# Fetch your neurons
n = pymaid.get_neurons('annotation:ZarinMNs')

# Cluster by synapse placement
res = pymaid.cluster_by_synapse_placement(n)

# Plot distance matrix
res.plot_matrix()
plt.show()

@ArefZarin
Copy link
Author

Hi Phillip,
I ran your code in a fresh notebook and it worked. See attached cluster. please let me know how can I change the code to incorporate the skids (ideally neuron names) next to the dendrogram? Currently, I can not tell where a given neuron located in the dendrogram. I hope there is a way to get this info, as I like this function a lot!

Screen Shot 2019-08-14 at 9 37 26 PM

Regarding your first question, I had run the import pymaid line and also had done copy+paste the code in the same notebook. So it had messed up the things. Thanks for solving this issue. You are really good at troubleshooting.
Aref

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

No branches or pull requests

2 participants