INNER CODE UNIT · Python
mark_runs
open2c/bioframe · src/bioframe/extras.py:546
def mark_runs(
df: pd.DataFrame,
col: str,
*,
allow_overlaps: bool = False,
reset_counter: bool = True,
run_col: str = "run",
cols: tuple[str, str, str] | None = None,
) -> pd.DataFrame:
"""
Mark runs of spatially consecutive intervals sharing the same value of
``col``.
Parameters
----------
df : DataFrame
A bioframe dataframe.
col : str