neurom.core.soma

Soma classes and functions.

Functions

check_overlaps(soma, points[, exclude_boundary])

Check if soma overlaps with points.

get_area(soma)

Calculate soma area.

get_center(soma)

Calculate soma center.

get_radius(soma)

Calculate soma radius.

get_volume(soma)

Calculate soma volume.

make_soma(morphio_soma)

Make a soma object from a MorphIO soma.

Classes

Soma(morphio_soma)

Base class for a soma.

SomaCylinders(morphio_soma)

Soma composed of cylinders (like in SWC).

SomaNeuromorphoThreePointCylinders(morphio_soma)

NeuroMorpho compatible soma.

SomaSimpleContour(morphio_soma)

Type C: multiple points soma.

SomaSinglePoint(morphio_soma)

Type A: 1point soma.

class neurom.core.soma.Soma(morphio_soma)

Base class for a soma.

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

Constructor.

Parameters:

morphio_soma (morphio.Soma) – instance of soma of MorphIO class

property area

Calculate soma area.

property center

Obtain the center from the first stored point.

iter()

Iterator to soma contents.

overlaps(points, exclude_boundary=False)

Check that the given points are located inside the soma.

property points

Get the set of (x, y, z, r) points this soma.

property radius

Return radius of soma.

to_morphio()

Return morphio instance.

property volume

Calculate soma volume.

class neurom.core.soma.SomaCylinders(morphio_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

Constructor.

Parameters:

morphio_soma (morphio.Soma) – instance of soma of MorphIO class

class neurom.core.soma.SomaNeuromorphoThreePointCylinders(morphio_soma)

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.

Initialize a SomaNeuromorphoThreePointCylinders object.

class neurom.core.soma.SomaSimpleContour(morphio_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.

Constructor.

Parameters:

morphio_soma (morphio.Soma) – instance of soma of MorphIO class

class neurom.core.soma.SomaSinglePoint(morphio_soma)

Type A: 1point soma.

Represented by a single point.

Constructor.

Parameters:

morphio_soma (morphio.Soma) – instance of soma of MorphIO class

neurom.core.soma.check_overlaps(soma, points, exclude_boundary=False)

Check if soma overlaps with points.

neurom.core.soma.get_area(soma)

Calculate soma area.

neurom.core.soma.get_center(soma)

Calculate soma center.

neurom.core.soma.get_radius(soma)

Calculate soma radius.

neurom.core.soma.get_volume(soma)

Calculate soma volume.

neurom.core.soma.make_soma(morphio_soma)

Make a soma object from a MorphIO soma.

Parameters:

morphio_soma (morphio.Soma) – soma instance of MorphIO