Skip to content

Commit

Permalink
major update
Browse files Browse the repository at this point in the history
- new module: b3d
- added nblast all-by-all to rmaid
- improved neuron objects in core
- updated docs
- bugfixes (morpho, igraph and elsewhere)
- made all code pep8-compliant: all 4 space indents now, trailing whitespaces removed, etc.
  • Loading branch information
schlegelp committed Jul 30, 2017
1 parent 0f41330 commit f689e1c
Show file tree
Hide file tree
Showing 60 changed files with 6,240 additions and 4,701 deletions.
Empty file modified .gitignore
100644 → 100755
Empty file.
Empty file modified LICENSE
100644 → 100755
Empty file.
1 change: 1 addition & 0 deletions MANIFEST
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# file GENERATED by distutils, do NOT edit
setup.py
pymaid/__init__.py
pymaid/b3d.py
pymaid/cluster.py
pymaid/core.py
pymaid/igraph_catmaid.py
Expand Down
2 changes: 2 additions & 0 deletions README.md
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ PyMaid is on [ReadTheDocs](http://pymaid.readthedocs.io/ "PyMaid ReadTheDocs").

`pymaid.user_stats` contains functions for user stats and contributions

`pymaid.b3d` interface with [Blender 3D](https://www.blender.org). This can only be used from within Blender. See [ReadTheDocs](http://pymaid.readthedocs.io/ "PyMaid ReadTheDocs") on how to setup PyMaid for Blender.

`pymaid.rmaid` provides an interface with R libraries ([nat](https://github.com/jefferis/nat), [rcatmaid](https://github.com/jefferis/rcatmaid), [elmr](https://github.com/jefferis/elmr), [catnat](https://github.com/alexanderbates/catnat) ) using [rpy2](https://rpy2.readthedocs.io/en/version_2.8.x/). *Attention*: rpy2 is not installed as dependency as it requires R to be installed. In order to use this module you must setup R and install rpy2 manually.

## Installation
Expand Down
Empty file modified dist/pymaid-0.1.tar.gz
100644 → 100755
Empty file.
Empty file modified dist/pymaid-0.11.tar.gz
100644 → 100755
Empty file.
Empty file modified dist/pymaid-0.111.tar.gz
100644 → 100755
Empty file.
Empty file modified dist/pymaid-0.12.tar.gz
100644 → 100755
Empty file.
Empty file modified dist/pymaid-0.13.tar.gz
100644 → 100755
Empty file.
Empty file modified dist/pymaid-0.131.tar.gz
100644 → 100755
Empty file.
Empty file modified dist/pymaid-0.132.tar.gz
100644 → 100755
Empty file.
Empty file modified dist/pymaid-0.133.tar.gz
100644 → 100755
Empty file.
Empty file modified dist/pymaid-0.2.tar.gz
100644 → 100755
Empty file.
Empty file modified dist/pymaid-0.21.tar.gz
100644 → 100755
Empty file.
Empty file modified dist/pymaid-0.22.tar.gz
100644 → 100755
Empty file.
Empty file modified dist/pymaid-0.23.tar.gz
100644 → 100755
Empty file.
Empty file modified dist/pymaid-0.3.tar.gz
100644 → 100755
Empty file.
Empty file modified dist/pymaid-0.31.tar.gz
100644 → 100755
Empty file.
Empty file modified dist/pymaid-0.4.tar.gz
100644 → 100755
Empty file.
Empty file modified dist/pymaid-0.41.tar.gz
100644 → 100755
Empty file.
Empty file modified dist/pymaid-0.42.tar.gz
100644 → 100755
Empty file.
Empty file modified dist/pymaid-0.43.tar.gz
100644 → 100755
Empty file.
Empty file modified dist/pymaid-0.44.tar.gz
100644 → 100755
Empty file.
Empty file modified dist/pymaid-0.45.tar.gz
100644 → 100755
Empty file.
Binary file added dist/pymaid-0.46.tar.gz
Binary file not shown.
Empty file modified docs/Makefile
100644 → 100755
Empty file.
Empty file modified docs/conf.py
100644 → 100755
Empty file.
2 changes: 2 additions & 0 deletions docs/index.rst
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ PyMaid documentation
source/overview
source/rmaid_doc
source/plotting
source/blender
source/pymaid
source/core
source/cluster
Expand All @@ -20,6 +21,7 @@ PyMaid documentation
source/plot
source/user_stats
source/rmaid
source/b3d


Indices and tables
Expand Down
Empty file modified docs/make.bat
100644 → 100755
Empty file.
Empty file modified docs/requirements.txt
100644 → 100755
Empty file.
7 changes: 7 additions & 0 deletions docs/source/b3d.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
The b3d module
---------------

.. automodule:: pymaid.b3d
:members:
:undoc-members:
:show-inheritance:
65 changes: 65 additions & 0 deletions docs/source/blender.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
Blender interface
*****************

Pymaid comes with an interface to import neurons into Blender: :mod:`pymaid.b3d`

.. note::
Blender's Python console does not show all outputs. Please check the terminal
if you experience issues. In Windows simply go to `Help` >> `Toggle System
Console`. In MacOS, right-click Blender in Finder >> `Show Package Contents`
>> `MacOS` >> `blender`.

Installation
============

Blender comes with its own Python 3.5, so you need to install PyMaid for this distribution in order to use it from within Blender.

There are several ways to install additional packages for Blender's built-in Python. The easiest way is probably this:

1. Download `PIPs <https://pip.pypa.io/en/stable/installing/>`_ get-pip.py and save e.g. in your downloads directory
2. run get-pip.py from Blender Python console:

>>> with open('/Users/YOURNAME/Downloads/get-pip.py') as source_file:
... exec(source_file.read())

3. Then use pip to install any given package. Here, we install as Scipy an example:

>>> import pip
>>> pip.main(['install','git+git://github.com/schlegelp/pymaid@master'])

Alternatively run Blender's Python from a Terminal. In MacOS do:
1. Make sure Blender is in your Applications folder
2. Right click on Blender icon -> **Show Package Contents**
3. Navigate to **Contents/Resources/2.XX/python/bin** and run **python3.5m** by drag&dropping it into a Terminal
4. Try above steps from the Terminal

Quickstart
==========

:mod:`pymaid.b3d` provides a simple handler that let's you add, select and manipulate neurons from within the Blender terminal. Try this from within Blender's console:

>>> from pymaid import pymaid, b3d
>>> rm = pymaid.CatmaidInstance('server_url', 'http_user', 'http_pw', 'token')
>>> pymaid.remote_instance = rm
>>> # Fetch a bunch of neurons
>>> nl = pymaid.get_3D_skeleton( 'annotation: glomerulus DA1' )
>>> # Initialise handler
>>> handler = b3d.handler()
>>> # Load neurons into scene
>>> handler.add( nl )
>>> # Colorise neurons
>>> handler.colorize()
>>> # Change thickness of all neurons
>>> handler.neurons.bevel( .02 )
>>> # Select subset
>>> subset = handle.select( nl[:10] )
>>> # Make subset red
>>> subset.color(1,0,0)
>>> # Change color of presynapses to green
>>> handle.presynapses.color(0,1,0)
>>> # Show only connectors
>>> handle.connectors.hide_others()
>>> #Clear all objects
>>> handler.clear()


Empty file modified docs/source/cluster.rst
100644 → 100755
Empty file.
Empty file modified docs/source/core.rst
100644 → 100755
Empty file.
Empty file modified docs/source/igraph.rst
100644 → 100755
Empty file.
Empty file modified docs/source/install.rst
100644 → 100755
Empty file.
1 change: 1 addition & 0 deletions docs/source/intro.rst
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ The project ID is part of the CatmaidInstance and defaults to 1. You can change
... http_pw = 'HTTP_PASSWORD',
... auth_token = 'TOKEN' )


CatmaidNeuron and CatmaidNeuronList objects
-------------------------------------------

Expand Down
Empty file modified docs/source/morpho.rst
100644 → 100755
Empty file.
Empty file modified docs/source/overview.rst
100644 → 100755
Empty file.
Empty file modified docs/source/plot.rst
100644 → 100755
Empty file.
Empty file modified docs/source/plotting.rst
100644 → 100755
Empty file.
Empty file modified docs/source/pymaid.rst
100644 → 100755
Empty file.
Empty file modified docs/source/rmaid.rst
100644 → 100755
Empty file.
1 change: 1 addition & 0 deletions docs/source/rmaid_doc.rst
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ On a fundamental level, you can use every single R function from within Python.
The :mod:`pymaid.rmaid` module requires `rpy2 <https://rpy2.readthedocs.io>`_.
As `rpy2` installation fails if no R is installed, it is not a default
dependency and has to be installed manually *after* R has been set up.
Also: the latest R version supported by `rpy2` appears to be 3.3.3 (Jul/2017).

Quickstart
==========
Expand Down
Empty file modified docs/source/user_stats.rst
100644 → 100755
Empty file.
Empty file modified examples/example_retrieving_connectors.ipynb
100644 → 100755
Empty file.
Empty file modified examples/nblasting.ipynb
100644 → 100755
Empty file.
Empty file modified examples/plot_neurons.ipynb
100644 → 100755
Empty file.
Empty file modified examples/using_R_functions.ipynb
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion pymaid/__init__.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.45"
__version__ = "0.46"
Loading

0 comments on commit f689e1c

Please sign in to comment.