plot_weights_scatter | R Documentation |
Scatterplot of the weights values for two factors
plot_weights_scatter(
object,
factors,
view = 1,
color_by = NULL,
shape_by = NULL,
dot_size = 1,
name_color = "",
name_shape = "",
show_missing = TRUE,
abs = FALSE,
scale = TRUE,
legend = TRUE
)
object |
a trained |
factors |
a vector of length two with the factors to plot. Factors can be specified either as a characters using the factor names, or as numeric with the index of the factors |
view |
character vector with the voiew name, or numeric vector with the index of the view to use. Default is the first view. |
color_by |
specifies groups or values used to color the features. This can be either
|
shape_by |
specifies groups or values used to shape the features. This can be either
|
dot_size |
numeric indicating dot size. |
name_color |
name for color legend (usually only used if color_by is not a character itself) |
name_shape |
name for shape legend (usually only used if shape_by is not a character itself) |
show_missing |
logical indicating whether to include dots for which |
abs |
logical indicating whether to take the absolute value of the weights. |
scale |
logical indicating whether to scale all weights from -1 to 1 (or from 0 to 1 if |
legend |
logical indicating whether to add a legend to the plot (default is TRUE). |
One of the first steps for the annotation of factors is to visualise and group/color them using known covariates such as phenotypic or clinical data. This method generates a single scatterplot for the combination of two latent factors.
Returns a ggplot2
object
# Using an existing trained model on simulated data
file <- system.file("extdata", "model.hdf5", package = "MOFA2")
model <- load_model(file)
plot_weights_scatter(model, factors = 1:2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.