monkeybread.plot.ligand_receptor_scatter

monkeybread.plot.ligand_receptor_scatter(actual_scores, stat_scores, lr_pairs=None, show=True, ax=None, **kwargs)

Plots a scatterplot highlighting the observed ligand-receptor scores and significance.

Uses the results of monkeybread.calc.ligand_receptor_score() and monkeybread.stat.ligand_receptor_score().

Creates a scatterplot where each point is one ligand-receptor pair, the x-axis displays the observed score, and the y-axis displays the p-value from the statistical test.

Parameters:
Return type:

Optional[Axes]

Returns:

: If show = True, returns nothing. Otherwise, returns the Axes object the plot is contained within.

Example

https://raw.githubusercontent.com/immunitastx/monkeybread/main/docs/_static/ligand_receptor_scatter.png