src.paste.stack_slices_pairwise

stack_slices_pairwise(slices, pis, output_params=False)[source]

Align spatial coordinates of sequential pairwise slices.

In other words, align:

slices[0] –> slices[1] –> slices[2] –> …

Parameters
  • slices (List[AnnData]) – List of slices.

  • pis (List[ndarray]) – List of pi (pairwise_align() output) between consecutive slices.

  • output_params (bool) – If True, addtionally return angles of rotation (theta) and translations for each slice.

Return type

Tuple[List[AnnData], Optional[List[float]], Optional[List[ndarray]]]

Returns

  • List of slices with aligned spatial coordinates.

If output_params = True, additionally return:

  • List of angles of rotation (theta) for each slice.

  • List of translations [x_translation, y_translation] for each slice.