plot_group_kernel: Heatmap plot showing the group-group correlations per factor

View source: R/mefisto.R

plot_group_kernelR Documentation

Heatmap plot showing the group-group correlations per factor

Description

Heatmap plot showing the group-group correlations inferred by the model per factor

Usage

plot_group_kernel(object, factors = "all", groups = "all", ...)

Arguments

object

a trained MOFA object using MEFISTO.

factors

character vector with the factors names, or numeric vector indicating the indices of the factors to use

groups

character vector with the groups names, or numeric vector with the indices of the groups of samples to use, or "all" to use samples from all groups.

...

additional parameters that can be passed to pheatmap

Details

The heatmap gives insight into the clustering of the patterns that factors display along the covariate in each group. A correlation of 1 indicates that the module caputred by a factor shows identical patterns across groups, a correlation of zero that it shows distinct patterns, a negative correlation that the patterns go in opposite directions.

Value

Returns a ggplot,gg object containing the heatmaps

Examples

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

bioFAM/MOFA2 documentation built on Feb. 1, 2024, 6:41 a.m.