soft_cluster_gam_fit
cluster_profile_mass.Rd
Aggregate Profile Probabilities by Cluster
Arguments
- cell_profile_prob
A numeric matrix of profile probabilities (cells × profiles).
- cluster_label
A vector of cluster identities (length must match number of rows in `cell_profile_prob`).
Details
Computes the total probability mass for each profile across a set of clusters. Typically used to summarize soft profile assignments (e.g., from Clonotrace) across transcriptional clusters.
Examples
set.seed(1)
prob <- matrix(runif(500), nrow = 100, ncol = 5)
prob <- prob / rowSums(prob)
cluster <- sample(letters[1:4], 100, replace = TRUE)
profile_mass <- cluster_profile_mass(prob, cluster)
#> Error in cluster_profile_mass(prob, cluster): could not find function "cluster_profile_mass"
print(profile_mass)
#> Error in print(profile_mass): object 'profile_mass' not found