moscot.base.problems.BirthDeathProblem.push#

BirthDeathProblem.push(data=None, subset=None, normalize=True, *, split_mass=False, scale_by_marginals=False)#

Push data through the transport_matrix.

Parameters:
  • data (Union[str, ndarray[Any, dtype[float64]], None]) –

    Data to push through the transport matrix. Valid options are:

    • ndarray - array of shape [n,] or [n, d].

    • str - key in adata_src.obs['{data}']. If subset is a list, the data will be a boolean mask determined by the subset. Useful for categorical data.

    • None - the value depends on the subset.

      • list - names in adata_src.obs_names to push.

      • tuple - start and offset indices \((subset[0], subset[0] + subset[1])\). that define a boolean mask to push.

      • None - uniform array of \(1\).

  • subset (Union[str, List[str], Tuple[int, int], None]) – Push values contained only within the subset.

  • normalize (bool) – Whether to normalize the columns of data to sum to \(1\).

  • split_mass (bool) – Whether to split non-zero values in data into separate columns.

  • scale_by_marginals (bool) – Whether to scale by the source :term`marginals` a.

Return type:

ndarray[Any, dtype[float64]]

Returns:

: The transported values, array of shape [m, d].