thor.analy.get_tf_activity
- thor.analy.get_tf_activity(adata: AnnData, layer: str | None = None, net_df: DataFrame | None = None, smooth_radius: float | None = 200) AnnData [source]
Infer TF activity using the CollecTRI database. This function calculates the pathway score for each cell using Univariate Linear Model.
- Parameters:
adata (
anndata.AnnData
) – Annotated data matrixlayer (
str
, optional) – Layer to use for the calculationnet_df (
pandas.DataFrame
, optional) – DataFrame with the network information. It should contain the following columns: - source: name of the TF - target: name of the regulated gene - weight: weight of the genesmooth_radius (
float
, optional) – Radius for the smoothing. Default is 200.
- Returns:
Annotated data matrix with the TF as the var_names and the score as the X
- Return type: