
Plot SHAP Magnitude vs Occurrence
plot_shap_occurrence.RdThis function creates a scatter plot of SHAP magnitude (aggregated_max) against occurrence count for each gene, colored by gene status. An optional horizontal line can be added to indicate a threshold for SHAP magnitude. Marginal density plots are included on the axes to show the distribution of occurrence counts and SHAP magnitudes.