pyXenium.mechanostress.compute_distance_expression_coupling#

compute_distance_expression_coupling(*, growth_table, expression_df=None, adata=None, genes=None, tumor_enriched_genes=None, annotation_col='Annotation', tumor_label='Tumor', cell_id_col='cell_id', distance_col='dist_to_nearest_stromal', min_cells=3, min_nonzero_cells=3)#

Compute gene-wise Spearman coupling to tumor-stromal distance.

Parameters:
  • growth_table (DataFrame)

  • expression_df (DataFrame | None)

  • adata (Any)

  • genes (Iterable[str] | None)

  • tumor_enriched_genes (Iterable[str] | None)

  • annotation_col (str)

  • tumor_label (str)

  • cell_id_col (str)

  • distance_col (str)

  • min_cells (int)

  • min_nonzero_cells (int)

Return type:

DataFrame