Description Usage Arguments Details Value Examples
Function to plot a heatmap of the data for relevant features, typically the ones with high weights.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
object |
a |
factor |
a string with the factor name, or an integer with the index of the factor. |
view |
a string with the view name, or an integer with the index of the view. Default is the first view. |
groups |
groups to plot. Default is "all". |
features |
if an integer (default), the total number of features to plot based on the absolute value of the weights. If a character vector, a set of manually defined features. |
annotation_features |
annotation metadata for features (rows).
Either a character vector specifying columns in the feature metadata, or a data.frame that will be passed to |
annotation_samples |
annotation metadata for samples (columns).
Either a character vector specifying columns in the sample metadata, or a data.frame that will be passed to |
transpose |
logical indicating whether to transpose the heatmap. Default corresponds to features as rows and samples as columns. |
imputed |
logical indicating whether to plot the imputed data instead of the original data. Default is FALSE. |
denoise |
logical indicating whether to plot a denoised version of the data reconstructed using the MOFA factors. |
max.value |
numeric indicating the maximum value to display in the heatmap (i.e. the matrix values will be capped at |
min.value |
numeric indicating the minimum value to display in the heatmap (i.e. the matrix values will be capped at |
... |
further arguments that can be passed to |
One of the first steps for the annotation of a given factor is to visualise the corresponding weights,
using for example plot_weights
or plot_top_weights
.
However, one might also be interested in visualising the direct relationship between features and factors, rather than looking at "abstract" weights.
This function generates a heatmap for selected features, which should reveal the underlying pattern that is captured by the latent factor.
A similar function for doing scatterplots rather than heatmaps is plot_data_scatter
.
A pheatmap
object
1 2 3 4 | # Using an existing trained model
file <- system.file("extdata", "model.hdf5", package = "MOFA2")
model <- load_model(file)
plot_data_heatmap(model, factor = 1, show_rownames = FALSE, show_colnames = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.