tirank.TrainPre.IdenHub

tirank.TrainPre.IdenHub(savePath, cateCol1, cateCol2, min_spots)[source]

Identifies “hubs” by combining two categorical cluster labels.

This function creates a new ‘combine_cluster’ column by merging two existing cluster labels (e.g., ‘patho_class’ and ‘leiden_clusters’). It also filters out any combined clusters that have fewer than min_spots members, labeling them as ‘NA’.

Parameters:
  • savePath (str) – The main project directory path.

  • cateCol1 (str) – The name of the first categorical column in ‘spot_predict_score.csv’.

  • cateCol2 (str) – The name of the second categorical column.

  • min_spots (int) – The minimum number of spots required to keep a combined cluster.

Returns:

None