neurom.core.soma

Soma classes and functions.

Functions

make_soma

Make a soma object from a MorphIO soma.

Classes

COLS

Column labels for internal data representation.

Soma

Base class for a soma.

SomaCylinders

Soma composed of cylinders (like in SWC).

SomaNeuromorphoThreePointCylinders

NeuroMorpho compatible soma.

SomaSimpleContour

Type C: multiple points soma.

SomaSinglePoint

Type A: 1point soma.

class neurom.core.soma.COLS[source]

Bases: object

Column labels for internal data representation.

class neurom.core.soma.Soma(morphio_soma)[source]

Bases: object

Base class for a soma.

Holds a list of raw data rows corresponding to soma points and provides iterator access to them.

iter()[source]

Iterator to soma contents.

class neurom.core.soma.SomaCylinders(morphio_soma)[source]

Bases: neurom.core.soma.Soma

Soma composed of cylinders (like in SWC).

points describe the locations of the cylinder start/end points, with their respective radii, much like how neurites are described:

ex:

             /)
            / o)
    ______ /  )
(|)      ) / /
( o )    o )/
(|)_____ )

Here we have a ‘side-view’, with each ‘o’ representing a point, and the radius is the height of a ‘|’ character, and the ‘)’ try and show the curvature of the cylinger

Note: when, as in the case above, the cylinder center points don’t lie in a line, then the overlap between cylinders isn’t taken into account for the area calculation

class neurom.core.soma.SomaNeuromorphoThreePointCylinders(morphio_soma)[source]

Bases: neurom.core.soma.SomaCylinders

NeuroMorpho compatible soma.

Reference:

http://neuromorpho.org/SomaFormat.html

Quote (Tue Feb 28 14:26:56 CET 2017): The first point constitutes the center of the soma, with coordinates (xs, ys, zs) corresponding to the average of all the points in the single contour. An equivalent radius (rs) is computed as the average distance of each point of the single contour from this center. The first point is assigned parent ID -1 as is standard for the root in the SWC format. The second and third soma points, as well as all starting points (roots) of dendritic and axonal arbors have this first point as the parent (parent ID 1). The x and z coordinates as well as the radius of both the second and third soma points are the same as that of the first point. The y coordinates of the second and third points are shifted by -rs and +rs, respectively (Figure 2). The surface area of this soma cylinder equals the surface area of a sphere of radius rs.

class neurom.core.soma.SomaSimpleContour(morphio_soma)[source]

Bases: neurom.core.soma.Soma

Type C: multiple points soma.

Represented by a contour.

The equivalent radius as the average distance to the center.

Note: This doesn’t currently check to see if the contour is in a plane. Also the radii of the points are not taken into account.

class neurom.core.soma.SomaSinglePoint(morphio_soma)[source]

Bases: neurom.core.soma.Soma

Type A: 1point soma.

Represented by a single point.

neurom.core.soma.make_soma(morphio_soma)[source]

Make a soma object from a MorphIO soma.

Parameters

morphio_soma (morphio.Soma) – soma instance of MorphIO