neurom.core.soma¶
Soma classes and functions.
Functions

Make a soma object from a MorphIO soma. 
Classes

Base class for a soma. 

Soma composed of cylinders (like in SWC). 

NeuroMorpho compatible soma. 

Type C: multiple points 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 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 volume¶
Gets soma volume assuming it is a sphere.
 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 ‘sideview’, 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
Initialize a SomaCyliners object.
 property center¶
Obtain the center from the first stored point.
 overlaps(points, exclude_boundary=False)¶
Check that the given points are located inside the soma.
 property volume¶
Return the volume of soma.
 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.
 property volume¶
Return the volume of the soma.
 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.
Initialize a SomaSimpleContour object.
 property center¶
Obtain the center from the average of all points.
 overlaps(points, exclude_boundary=False)¶
Check that the given points are located inside the soma.
The contour is supposed to be in the plane XY, the Z component is ignored.
 class neurom.core.soma.SomaSinglePoint(morphio_soma)¶
Type A: 1point soma.
Represented by a single point.
Initialize a SomaSinglePoint object.
 neurom.core.soma.make_soma(morphio_soma)¶
Make a soma object from a MorphIO soma.
 Parameters:
morphio_soma (morphio.Soma) – soma instance of MorphIO