Skip to contents

Clusters models by total likelihood, diploid and nondiploid distance to integer copy number, and selects the best (mu, rho) model.

Usage

ClusterModels(models_dis)

Arguments

models_dis

A data frame or tibble with model metrics, including columns: total_log_likelihood, diploid_distance_to_integer, nondiploid_distance_to_integer, ploidy, mu, rho, diploid_n, etc.

Value

A list with:

Final_mu

Best model's mutation multiplicity.

Final_rho

Best model's tumor purity.

total_distance_to_integer

Total distance to integer copy number for the best model.

total_likelihood

Total log-likelihood for the best model.

models

The full, clustered, and sorted model data frame.

Details

Models are clustered using change point detection on likelihood and distance metrics. The best model is selected by a series of sort criteria.

Examples

# models_dis <- ... # output from SelectModelByDis
# ClusterModels(models_dis)