pace.pace_fit#

pace.pace_fit(counts, x=None, y=None, cell_type=None, *, pairs=None, resp_term=None, null_correlation=True, n_threads=1, verbose=False, **kwargs)[source]#

Fit PACE and attach every reporting layer.

Runs pace_model(), pace_shrink(), pace_decompose() and pace_drivers() in turn, which is what you want unless you mean to stop partway or re-run a later stage with different settings.

Takes the same inputs as pace_model(): a cells-by-genes count matrix with coordinates and labels, or an AnnData with cell_type naming the obs column.

Parameters:
  • pairs – Which (focal, neighbour) pairs to rank. None does every ordered pair.

  • resp_term – For a condition fit, which condition term carries the responder layer.

  • null_correlation – Passed to pace_shrink().

Returns:

  • PaceFit, with neighbour_slopes, variance_decomposition,

  • single_frame, top_drivers and contam_fraction filled in.