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

Neuron label #237

Merged
merged 5 commits into from
Jul 5, 2023
Merged

Neuron label #237

merged 5 commits into from
Jul 5, 2023

Conversation

clbarnes
Copy link
Collaborator

@clbarnes clbarnes commented Jul 3, 2023

Resolves #236

Example usage

from pymaid.neuron_label import NeuronLabeller, SkeletonId, NeuronName, Annotations, ThinNeuron

labeller = NeuronLabeller(
    [SkeletonId(), NeuronName(), Annotations(annotator_name="me"), Annotations(annotated_with="my useful annotation")],
    "%1 (%0) personal:%2 annotations:%3{ | }"
)

skid = 1234567
nrn = ThinNeuron(skid)  # only holds the info needed by the labeller, and fetches it lazily

print(labeller.label(nrn))
>>> neuron name (1234567) personal:myfirstann, mysecondann annotations:thing | another thing | and another

@clbarnes clbarnes merged commit 2a452c3 into navis-org:master Jul 5, 2023
0 of 8 checks passed
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

Successfully merging this pull request may close these issues.

Neuron label logic
1 participant