plot_group_kernel {MOFA2} | R 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)

[Package MOFA2 version 1.4.0 Index]