-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- plot.plot3d: - made vispy canvas persistent - added new functions: clear3d() and close3d() - morpho: new function prune_by_strahler() - core: - new neuron attribute: n_open_ends - new functions: prune_distal_to(), prune_proximal_to() and prune_by_strahler() - made summary() function public - renamed update() to reload() - added tqdm to more for loops - rmaid: - made nblast() and nblast_allbyall() more consistent with R version - bugfixes in morpho, b3d, core - updated docs
- Loading branch information
Showing
13 changed files
with
517 additions
and
139 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
Morphological Analyses | ||
********************** | ||
|
||
This section should give you an impression of how to access and compute morphological properties of neurons. | ||
|
||
Basic properties | ||
================ | ||
|
||
Many basic parameters are readily accessible through attributes of :class:`pymaid.core.CatmaidNeuron` or :class:`pymaid.core.CatmaidNeuronList` | ||
|
||
>>> from pymaid import pymaid | ||
>>> rm = pymaid.CatmaidInstance('server_url','user','pw','token') | ||
>>> pymaid.remote_instance = rm | ||
>>> nl = pymaid.get_3D_skeletons('annotation:glomerulus DA1') | ||
>>> # Access single attribute: e.g. cable lengths [um] | ||
>>> nl.cable_length | ||
>>> # .. or get a full summary as pandas DataFrame | ||
>>> df = nl.summary() | ||
>>> df.n_connectors.tolist() | ||
[437, 394, 326, 307, 356, 483, 316, 960, 438, 408, 553, 335, 380, 316, 620] | ||
|
||
Cutting, pruning, pasting | ||
========================= | ||
|
||
The :mod:`pymaid.morpho` module let's you perform (virtual) surgery on neurons. :class:`pymaid.core.CatmaidNeuron` and :class:`pymaid.core.CatmaidNeuronList` have also some thin wrappers for :mod:`pymaid.morpho` functions (e.g. :func:`pymaid.core.CatmaidNeuron.prune_by_strahler` is a wrapper for :func:`pymaid.morpho.prune_by_strahler`). | ||
|
||
Some examples continuing with above neuronlist ``nl``: | ||
|
||
>>> from pymaid import morpho, core, plot | ||
>>> # Cut a neuron in two using either a treenode ID or (in this case) a node tag | ||
>>> distal, proximal = morpho.cut_neuron( nl[0], cut_node='SCHLEGEL_LH' ) | ||
>>> # Plot neuron fragments | ||
>>> core.CatmaidNeuronList( [ distal, proximal ] ).plot3d() | ||
>>> # Alternatively, we can also just prune bits off a neuron objects | ||
>>> nl[0].prune_distal_to('SCHLEGEL_LH') | ||
>>> nl[0].plot3d() | ||
>>> # To undo, simply reload the neuron from server | ||
>>> nl[0].reload() | ||
>>> # These operations can also be performed on a collection of neurons | ||
>>> nl.prune_distal_to('SCHLEGEL_LH') | ||
>>> nl.plot3d(clear3d=True) | ||
>>> # Again, let's undo | ||
>>> nl.reload() | ||
>>> # Something more sophisticated: pruning by strahler index | ||
>>> nl.prune_by_strahler( to_prune = [1,2,3] ) | ||
>>> nl.plot3d(connectors=True,clear3d=True) | ||
|
||
For morphological comparisons using NBLAST, see * :ref:`_rmaid_link`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = "0.46" | ||
__version__ = "0.47" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.