methylseg.MethylationStates

class methylseg.MethylationStates(*values)[source]

Bases: MethylEnum

Canonical biological methylation states used throughout the package.

__init__(*args, **kwds)

Methods

from_string(s)

Parse a string or scalar value into an enum member.

convert_to_numeric(arr)

Convert methylation-state labels into integer codes.

Attributes

LOW

PMD

INTERMEDIATE

HIGH

LOW = 0
PMD = 1
INTERMEDIATE = 2
HIGH = 3
static convert_to_numeric(arr)[source]

Convert methylation-state labels into integer codes.

Parameters:

arr – Array-like of MethylationStates values or already numeric state labels.

Returns:

Integer array suitable for model fitting, serialization, or plotting.

Return type:

numpy.ndarray