
Plot a Mixture of Gaussians
GaussiansMixturePlot.Rd
This function plots the mixture model for a component that is composed of gaussians.
All mixture components are plotted.
Optionally, the user can provide a matrix of components by signatures and indicate a sig_of_interest
.
This will result in the lower-weight components (the curves) for the indicated signature being greyed out.
The threshold for this grey-shading functionality can be changed using the threshold
parameter.
Additionally, an inlay plot is created out of the 'important' components if...
Some components have been 'squashed' down
There are any. - i.e. at least 1 weight > 0.05
Usage
GaussiansMixturePlot(
components,
signatures = NULL,
sig_of_interest = 1,
log_flag = FALSE,
component = "segsize",
inlay_flag = TRUE,
threshold = 0.3
)
Arguments
- components
A list of either matrices/dataframes containing the distribution parameters (mean and sd) or S4 objects belonging to the class 'flexmix'.
If providing dataframes, place parameters in rows and each component along the columns.
Mean in row 1, and sd in row 2.- signatures
(optional) A dataframe with components in the rows and signatures in the columns.
- sig_of_interest
(optional) Integer. A single integer corresponding the column from the signatures input param.
- log_flag
(optional) Logical. If TRUE, draw the log-transformed curves instead.
- component
(optional) String. Which component to draw the gaussian curves for. (options: segsize, changepoint, copynumber)
- inlay_flag
(optional) Boolean flag to turn on/off the inlay plot.
- threshold
(optional) Numeric. 'Important' component weights cut-off.
If signatures are provided, the cut-off to use in grey-shading vs. colouring the most important components.