mantispy.pl.cell_cycle#

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

DNA per group colored by phase.

One panel per group of by shows the DNA distribution colored by 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 project_cell_cycle() has run on.

dna_feature str

The DNA intensity feature the phases were assigned from, drawn on a log scale, or an obs column such as the dna_content() output, drawn as it is.

by str | None (default: 'Metadata_Plate')

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

key str (default: 'cell_cycle_phase')

obs column holding the assigned phase, whose values are matched against PHASE_COLOURS, so a phase named anything else is not drawn. The default is the phase project_cell_cycle() writes.

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.

ncols int | None (default: None)

Panels per row, or None for one row.

Return type:

None

Returns:

None; this plot always creates its own figure, a grid 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 neither a feature nor an obs column.

  • ValueError – dna_feature names both a feature and an obs column, or the object has no layer named layer.