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
Infer TF activity using the CollecTRI database. This function calculates the pathway score for each cell using Univariate Linear Model.
- Parameters:
adata (AnnData) – Annotated data matrix
layer (str, optional) – Layer to use for the calculation
net_df (pd.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 gene
smooth_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:
AnnData