API Reference
The API reference is generated from the package docstrings. Rebuilding the docs is enough to pick up docstring updates.
Workflow objects
High-level API that coordinates preparation, training, and segmentation. |
|
Normalize methylation input tables into the canonical |
|
Simple container for sample metadata and prepared methylation rows. |
|
Lightweight helper that knows how to build a serializable dictionary from a MethylSegPathway instance and how to write/read YAML. |
|
Create per-CpG window summaries and assign coarse methylation states. |
|
Analyze learned state separation and define rule-based CpG states. |
|
Class to handle segmentation of methylation data using HMMs. |
Enums and labels
Strategies for mapping emissions to biological methylation states. |
|
Canonical biological methylation states used throughout the package. |
|
Supported HMM model types for segmentation. |
HMM backends
Abstract base class for methylseg HMM backends. |
|
Categorical HMM with strong self-transition priors for smoother segments. |
|
Continuous-time HMM backend for sparsely spaced CpGs along a chromosome. |
Utility helpers
Return a fixed biological-state palette keyed by the canonical enum values. |
|
Return a discrete colormap and color lookup for integer cluster labels. |
Advanced utilities and constants
The following helpers are available from methylseg.utils. They are
useful when building custom plots or integrating MethylSeg results into another
visualization workflow. They are documented here without adding them to the
top-level methylseg import surface.
- methylseg.utils.DEFAULT_BIOLOGICAL_STATE_COLORS = {'HIGH': '#FDE725', 'INTERMEDIATE': '#35B779', 'LOW': '#440154', 'PMD': '#31688E'}
dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s
(key, value) pairs
- dict(iterable) -> new dictionary initialized as if via:
d = {} for k, v in iterable:
d[k] = v
- dict(**kwargs) -> new dictionary initialized with the name=value pairs
in the keyword argument list. For example: dict(one=1, two=2)
Return a fixed biological-state palette keyed by the canonical enum values. |
|
Return a discrete colormap and color lookup for integer cluster labels. |
|
Merge biological-state color overrides with the package defaults. |
|
Build a one-row overlay table describing a highlighted genomic interval. |
|
Normalize explicit region overlays for plotting helpers. |
|
Normalize convenience plotting options into overlay arguments. |
|
Annotate a plotting table with colors derived from overlapping regions. |
|
Render prepared state labels with consistent overlays and view controls. |
|
Create an interactive beta scatter plot. |