plot_fit: Plot fits.

View source: R/plot_fit.R

plot_fitR Documentation

Plot fits.

Description

This function is like plot_data, but shows information about a fit model.

As plot_data, this function uses a what parameter to dispatch visualization to a number of internal functions. For the fits one can visualize:

  • (what = "CNA") A genome-wide plot of Copy Number Alteration profiles (inferred) per cluster;

  • (what = "mixing_proportions") The normalized size of each cluster, per modality;

  • (what = "density") The density per cluster and segment, split by modality. By default this is shown only for segments that differ for a segment CNA value among one of the inferred clusters;

  • (what = "heatmap") The same heatmap plot from plot_data with what = "heatmap", where rows are sorted by cluster and cluster annotations reported;

  • (what = "scores") The scores used for model selection;

  • (what = "posterior_CNA") The posterior probability for CNA values;

This function has the same logic of plot_data with respect to the ellipsis and input parameters.

Usage

plot_fit(x, what = "CNA", ...)

Arguments

x

An object of class rcongasplus.

what

Any of "CNA", "density", "mixing_proportions", "heatmap" or "scores".

...

Parameters forwarded to the internal plotting functions.

Value

A ggplot plot, or a more complex cowplot figure.

Examples

data("example_object")

# Genome-wide segments plo
plot_fit(example_object, what = 'CNA')

# Density plot
plot_fit(example_object, what = 'density')

# Mixing proportions
plot_fit(example_object, what = 'mixing_proportions')

# Fit heatmap
plot_fit(example_object, what = 'heatmap')

# Scores for model selection
plot_fit(example_object, what = 'scores')

# Posterior for CNAs
plot_fit(example_object, what = 'posterior_CNA')

Militeee/rcongas documentation built on Nov. 1, 2024, 2:38 a.m.