neat.MorphTree.determineSomaType

MorphTree.determineSomaType(file_n)[source]

Determine the soma type used in the SWC file. This method searches the whole file for soma entries.

Only tbe standard three-point soma type and a multi-cylinder description are supported.

Furthermore, the root node of the tree must have index == 1, swc_type == 1 and occur first in the SWC file.

Parameters

file_n (string) – Name of the file containing the SWC description

Returns

soma_type – Integer indicating one of the su[pported SWC soma formats. 1: Default three-point soma, 2: multiple cylinder description

Return type

int

Raises

ValueError – If soma type is not supported (less than three nodes have soma)