Skip to contents

Partition Clones Based on Containment Similarity With Centers From Farthest Point Sampling

Usage

clone_partition(clone_matrix, k = 10, similarity_threshold = 0)

Arguments

clone_matrix

A cells × clones matrix, where non-zero entries indicate clone membership.

k

Integer. Number of clone partitions (default: 10).

similarity_threshold

Numeric threshold for assigning a clone to a group based on similarity (default: 0).

Value

A named list of clone ID vectors, one per partition.

Details

Groups clones into `k` roughly balanced partitions based on containment similarity. Useful for parallelizing clone-level computations (e.g., OT) by minimizing inter-group redundancy.

Examples

mat <- matrix(sample(0:1, 100, replace = TRUE), nrow = 10)
colnames(mat) <- paste0("Clone", 1:10)
partitions <- clone_partition(mat, k = 3)
#> Error in clone_partition(mat, k = 3): could not find function "clone_partition"
str(partitions)
#> Error in str(partitions): object 'partitions' not found