tirank.Visualization.plot_label_distribution_among_conditions
- tirank.Visualization.plot_label_distribution_among_conditions(savePath, group)[source]
Plots the proportional distribution of TiRank labels within different groups.
This function loads prediction scores and calculates the frequency and proportion of each ‘Rank_Label’ (‘Rank+’, ‘Rank-’, ‘Background’) within the categories of a specified ‘group’ column (e.g., cell type, cluster). It then saves a bar plot of these proportions.
- Parameters:
savePath (str) – The base directory containing the ‘3_Analysis’ subfolder.
group (str) – The column name in ‘spot_predict_score.csv’ to use for grouping the data.
- Returns:
None
- Raises:
ValueError – If the specified group column is not found in the loaded DataFrame.