bsxplorer.RegionStat.categorise

RegionStat.categorise(context: Literal['CG', 'CHG', 'CHH'] | None = None, p_value: float = 0.05, min_n: int = 0, save: str | Path | None = None) tuple[polars.dataframe.frame.DataFrame, polars.dataframe.frame.DataFrame, polars.dataframe.frame.DataFrame][source]

Categorise regions as BM (Body Methylation), IM (Intermediate Methylated) and UM (Undermethylated) according to Takuno and Gaut

E.g. for CG: \(P_{CG}<0.05, P_{CG}\geq0.05, P_{CG}\geq0.05\ and\ N_{CG}\geq20\)

Parameters:
  • context – Methylation context (CG, CHG, CHH).

  • p_value – P-value for operation.

  • min_n – Minimal counts for cytosines methylated in selected context.

  • save – Path where files with BM, IM, UM genes will be saved (None if saving not needed).

Returns:

BM, IM, UM pl.DataFrame

Return type:

tuple[pl.DataFrame, pl.DataFrame, pl.DataFrame]