Skip to contents

This function calculates and builds a heatmap of component-wise wasserstein distances between two mixture models.
Also known as calculating the 'Earth Mover's Distance'. A CN-feature is indicated by the user using the "component" parameter for this function. The mixture models for this feature in each set of component models are then pulled out and compared. In short, for each component in each mixture model indicated, a distance will be calculated.

Usage

WassDistancePlot(cm_a, cm_b, component)

Arguments

cm_a

A list of S4 objects each of class 'flexmix'. Likely the output from the FitMixtureModels function.

cm_b

A list of S4 objects each of class 'flexmix'. Likely the output from the FitMixtureModels function.

component

Which CN-feature models to compare to one another. (options: segsize, copynumber, bp10MB, osCN, bpchrarm)

Value

A list. One ggplot and its corresponding matrix.