netmap.downstream.markers.plot_jaccard_comparison

netmap.downstream.markers.plot_jaccard_comparison(plot_df, title='Jaccard Similarity: On-Target vs Off-Target')[source]

Create a faceted boxplot comparing Jaccard scores across clusters and gene-set types.

Renders a seaborn.catplot with one column per gene-set type ('Source' and 'Target'), x-axis showing cluster labels, y-axis showing Jaccard similarity, and hue encoding whether the cluster is mapped (is_mapped column). Tick labels are rotated for readability and the legend is repositioned to avoid overlap.

Parameters:
  • plot_df (pd.DataFrame) – DataFrame as returned by prepare_jaccard_analysis_df(), expected to contain at minimum the columns ct, jaccard, is_mapped, and type.

  • title (str) – Figure-level super-title. Defaults to "Jaccard Similarity: On-Target vs Off-Target".

Returns:

The grid object containing the rendered figure. The figure can be saved with g.fig.savefig(...) or displayed with plt.show().

Return type:

seaborn.FacetGrid