pylimma.top_treat
- pylimma.top_treat(fit, coef=0, sort_by='p', resort_by=None, **kwargs)[source]
Top-ranked genes after a
treat()fit.Thin wrapper around
pylimma.top_table()that enforces the two guardrails R limma’stopTreatenforces:coefmust be a single coefficient, andsort_by="b"/resort_by="b"are rejected becausetreat()does not produce a B-statistic.- Parameters:
fit (MArrayLM, AnnData, or dict) – Fit object produced by
treat().coef (int or str, default 0) – Single coefficient index or name. Lists are not allowed; if a sequence is supplied only the first element is used and a warning is emitted.
sort_by (str, default "p") – Column to sort by. Passing
"b"raisesValueError.resort_by (str, optional) – Secondary sort column. Passing
"b"raisesValueError.**kwargs – Forwarded to
pylimma.top_table().
- Returns:
Ranked-gene table, same schema as
top_table()minus thebcolumn (whichtreat()does not compute).- Return type:
Notes
R limma’s own
topTreatsource comments that the function “may become deprecated soon as topTable() takes over”; pylimma keeps it for direct R-to-pylimma call-site compatibility.