CelLink
  • Installation
  • Tutorials
  • API documentation
CelLink
  • API documentation
  • CelLink.model
  • CelLink.model.Cellink
  • CelLink.model.Cellink.balanced_ot
  • View page source

CelLink.model.Cellink.balanced_ot

Cellink.balanced_ot(arr1, arr2, lambd=5e-3, matching_ratio=1, numItermax=1000, direction=1, sparse=False)[source]

stage I of celLink: perform balanced optimal transport, filter out the matched cells and retain the unmatched cells.

Parameters:
  • arr1 (np.array) – The shared-feature arr1

  • arr2 (np.array) – The shared-feature arr2

  • matching_ratio (int) – The mass ratio of cells in arr1 compared with arr2

  • lambd (float, default = 1e-1) – The penalty coefficient of entropy regularization of BOT

  • numItermax (int) – Max number of iterations of sinkhorn algorithms

  • direction (int, default = 1) – The direction to align between modalities. If direction is 1, align arr2-feature to arr1. If direction is 2, align arr1-feature to arr2. For linear sum assignment case (sparse = True and iterative = False), direction value does not matter.

Returns:

  • match_result (dictionary) – keys are the cell-cell correspondence matrix to the matched cells and values are the correspondence vectors.

  • ori_cell_id (list,) – Cell ids for unmatched cells

Previous Next

© Copyright Xin Luo.

Built with Sphinx using a theme provided by Read the Docs.