segmentation

Classes that interact with the outputs of different protein segmentations

Submodules

Package Contents

exception segmentation.ParsingError[source]

Bases: Exception

Raised when an issue was encountered during parsing the inputs. Will contain as __cause__ the original exception that triggered it.

class segmentation.SegmentationParser(*paths: list[pathlib.Path | str])[source]

The base class for all segmentation parsers.

paths = ()[source]
abstract parse() collections.abc.Iterator[Tuple[str, int, str]][source]

The return value is a collection of items of the form:

("<method name>", <number of domains>, "<chopping>")

They could be collected into a list or yield-ed. The write_segmentations() function only expects that this method returns an iterable object.

segmentation.write_segmentations(seg_objects: list[SegmentationParser], output_file: pathlib.Path | str)[source]

Invoke the given segmentation parsers and collect their output in a TSV.