mantispy.pl.cell_cycle#

mantispy.pl.cell_cycle(adata, dna_feature, by='Metadata_Plate', key='Metadata_CellCyclePhase', layer=None)[source]#

Log DNA intensity per group, colored by assigned phase.

Two separated peaks with the phases split between them indicate a working assignment; a single broad distribution indicates a failed one.

Parameters:
adata AnnData

Single-cell object cell_cycle_phase() has run on.

dna_feature str

The DNA intensity feature the phases were assigned from.

by str | None (default: 'Metadata_Plate')

obs column whose groups become panels, or None for a single panel over every row.

key str (default: 'Metadata_CellCyclePhase')

obs column holding the assigned phase, whose values are matched against PHASE_COLOURS, so a phase named anything else is not drawn.

layer str | None (default: None)

Layer to read the intensity from, or None for X. Only positive values are drawn, since the plot takes their logarithm.

Return type:

ndarray | None

Returns:

None; this plot always creates its own figure, a (1, n_groups) row of panels sharing an x axis, one per group of by, each holding one filled histogram per phase.

Raises:
  • KeyError – obs has no key column, or dna_feature is not one of var_names.

  • ValueError – The object has no layer named layer.