nichesphere.tl.pval_filtered_HMdf

nichesphere.tl.pval_filtered_HMdf#

nichesphere.tl.pval_filtered_HMdf(testDF, oneCTinteractions, p, cell_types)#

Get dataframe for scores heatmap from dataframe obtained from diffColoc_test()

Parameters:
  • testDF (pd.DataFrame) – dataframe with cell pairs as indexes and columns ‘statistic’ and ‘p-value’ (often resulting from diffColoc_test())

  • oneCTinteractions (list) – list of single cell interactions (celltype-celltype)

  • p (float) – threshold p-value to filter

  • cell_types (pd.Series or list) – list/series of cell types

Returns:

testHM – Dataframe of cell types x cell types with significant ‘statistic’ values

Return type:

pd.DataFrame