Skip to contents

Expand cost matrix to account for multiple cells per spot by replicating spot columns.

Usage

build_cost_matrix(cost_matrix, cell_counts)

Arguments

cost_matrix

Original cost matrix (cells x spots).

cell_counts

Vector of cell counts per spot.

Value

A list with:

cost

Expanded cost matrix

spot_mapping

Vector mapping each column to original spot index