mantispy.pl.pathway_coherence

mantispy.pl.pathway_coherence#

mantispy.pl.pathway_coherence(adata, key='pathway_coherence', top=15, ax=None)#

Coherence per gene set, the significant ones marked.

Sets are ordered by coherence, as in the table. Under a permutation null every coherent set ties at the p-value floor, so the q-value marks significance and coherence ranks the sets.

Parameters:
  • adata (AnnData) – Object holding the table pathway_coherence() wrote.

  • key (str (default: 'pathway_coherence')) – Name of that table in uns["mantispy"].

  • top (int (default: 15)) – How many sets to draw, taken by coherence.

  • ax (Axes | None (default: None)) – Axes to draw on, or None for a new figure.

Return type:

Axes

Returns:

The axes drawn on, with one bar per set labeled by how many of its genes were in the screen, colored by whether its q-value is below 0.05.

Raises:
  • KeyErroruns["mantispy"] holds no table under key.

  • ValueError – That table is empty, which is what happens when no set had enough of its genes in the screen.