plot_weights_heatmap: Plot heatmap of the weights

View source: R/plot_weights.R

plot_weights_heatmapR Documentation

Plot heatmap of the weights

Description

Function to visualize the weights for a given set of factors in a given view.
This is useful to visualize the overall pattern of the weights but not to individually characterise the factors.
To inspect the weights of individual factors, use the functions plot_weights and plot_top_weights

Usage

plot_weights_heatmap(
  object,
  view = 1,
  features = "all",
  factors = "all",
  threshold = 0,
  ...
)

Arguments

object

a trained MOFA object.

view

character vector with the view name(s), or numeric vector with the index of the view(s) to use. Default is the first view.

features

character vector with the feature name(s), or numeric vector with the index of the feature(s) to use. Default is 'all'.

factors

character vector with the factor name(s), or numeric vector with the index of the factor(s) to use. Default is 'all'.

threshold

threshold on absolute weight values, so that weights with a magnitude below this threshold (in all factors) are removed

...

extra arguments passed to pheatmap.

Value

A pheatmap object

Examples

# Using an existing trained model on simulated data
file <- system.file("extdata", "model.hdf5", package = "MOFA2")
model <- load_model(file)
plot_weights_heatmap(model)

bioFAM/MOFA2 documentation built on June 12, 2024, 3:57 p.m.