HoloNet.plotting.ce_hotspot_plot#

HoloNet.plotting.ce_hotspot_plot(ce_tensor, adata, lr_df, plot_lr, scale=True, centrality_measure='degree', consider_cell_role='sender_receiver', max_iter=100, tol=0.0001, diff_thres=0.05, fname=None, **kwargs)#

Plot the centrality of each spot in one LR CE network, representing the hotspot of one LR pair.

Parameters
ce_tensor Tensor

A CE tensor (LR_pair_num * cell_num * cell_num)

adata AnnData

Annotated data matrix.

lr_df DataFrame

The used preprocessed LR-gene dataframe, must contain the ‘LR_pair’ column.

plot_lr str

The LR pair (in the ‘LR_pair’ column of lr_df) need to be visualized.

scale bool (default: True)

If True, scale the centrality to 0-1 when plotting

centrality_measure str (default: 'degree')

Select to use degree or eigenvector centrality.

consider_cell_role str (default: 'sender_receiver')

One value selected in ‘receiver’, ‘sender’ and ‘sender_receiver’, determining the function calculating the in-degrees, out-degrees, or the sum of them, See in ‘compute_ce_network_degree_centrality’ function.

max_iter int (default: 100)

Maximum iteration number for get stable eigenvector centrality. See in ‘compute_ce_network_eigenvector_centrality’ function.

tol float (default: 0.0001)

Defining stablity, we need the eigenvector centralities similar to the last iteration in how many cells. See in ‘compute_ce_network_eigenvector_centrality’ function.

diff_thres float (default: 0.05)

Defining stablity, the centrality of cells differs less than how much we consider similar. See in ‘compute_ce_network_eigenvector_centrality’ function.

fname str | Path | NoneUnion[str, Path, None] (default: None)

The output file name. If None, not save the figure. Note that not add path name, sc.pl.spatial will add ‘show’ before the file name.

kwargs

Other paramters in ‘feature_plot’ function.