Description Usage Arguments Details Value Examples
Scatterplot of the values of two latent factors.
1 2 3 | plotFactorScatter(object, factors, color_by = NULL, shape_by = NULL,
name_color = "", name_shape = "", dot_size = 1.5, dot_alpha = 1,
showMissing = 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 |
color_by |
specifies groups or values used to color the samples.
This can be either
a character giving the name of a feature present in the training data,
a character giving the same of a covariate (only if using |
shape_by |
specifies groups or values used to shape the samples.
This can be either
a character giving the name of a feature present in the training data,
a character giving the same of a covariate (only if using |
name_color |
name for color legend. |
name_shape |
name for shape legend. |
dot_size |
dot size (default is 1.5). |
dot_alpha |
dot transparency (default is 1.0, no transparency). |
showMissing |
logical indicating whether to include samples for which
|
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.
Similar functions are plotFactorScatters
for doing multiple scatter plots and
plotFactorBeeswarm
for doing Beeswarm plots for single factors.
Returns a ggplot2
object
1 2 3 4 5 6 7 8 9 10 | # Example on the CLL data
filepath <- system.file("extdata", "CLL_model.hdf5", package = "MOFAdata")
MOFA_CLL <- loadModel(filepath)
plotFactorScatter(MOFA_CLL, factors=1:2)
plotFactorScatter(MOFA_CLL, factors=1:2, color_by= "IGHV", shape_by="trisomy12", showMissing=FALSE)
# Example on the scMT data
filepath <- system.file("extdata", "scMT_model.hdf5", package = "MOFAdata")
MOFA_scMT <- loadModel(filepath)
plotFactorScatter(MOFA_scMT, factors=c(1,3))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.