View source: R/plot_embedding.R
biplot_corral | R Documentation |
Generate biplot for corral object
biplot_corral( corral_obj, color_vec, text_vec, feat_name = "(genes)", nfeat = 20, xpc = 1, plot_title = "Biplot", text_size = 2, xjitter = 0.005, yjitter = 0.005, coords = c("svd", "PC", "SC") )
corral_obj |
list outputted by the |
color_vec |
vector; length should correspond to the number of rows in v of |
text_vec |
vector; length should correspond to the number of rows in u of |
feat_name |
char; the label will in the legend. Defaults to |
nfeat |
int; the number of features to include. The function will first order them by distance from origin in the selected dimensions, then select the top n to be displayed. |
xpc |
int; which PC to put on the x-axis (defaults to 1) |
plot_title |
char; title of plot (defaults to *Biplot*) |
text_size |
numeric; size of the feature labels given in |
xjitter |
numeric; the amount of jitter for the text labels in x direction (defaults to .005; for |
yjitter |
numeric; the amount of jitter for the text labels in y direction (defaults to .005; for |
coords |
char; indicator for sets of coordinates to use. |
ggplot2 object of the biplot
library(DuoClustering2018) library(SingleCellExperiment) zm4eq.sce <- sce_full_Zhengmix4eq() zm4eq.countmat <- counts(zm4eq.sce) zm4eq.corral_obj <- corral(zm4eq.countmat) gene_names <- rowData(zm4eq.sce)$symbol ctvec <- zm4eq.sce$phenoid biplot_corral(corral_obj = zm4eq.corral_obj, color_vec = ctvec, text_vec = gene_names)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.