Plot similarity measures on a tSNE or umap — plot_cor (original) (raw)
Plot similarity measures on a tSNE or umap
Usage
plot_cor(
cor_mat,
metadata,
data_to_plot = colnames(cor_mat),
cluster_col = NULL,
x = "UMAP_1",
y = "UMAP_2",
scale_legends = FALSE,
...
)
Arguments
input similarity matrix
input metadata with per cell tsne or umap coordinates and cluster ids
colname of data to plot, defaults to all
colname of clustering data in metadata, defaults to rownames of the metadata if not supplied.
metadata column name with 1st axis dimension. defaults to "UMAP_1".
metadata column name with 2nd axis dimension. defaults to "UMAP_2".
if TRUE scale all legends to maximum values in entire correlation matrix. if FALSE scale legends to maximum for each plot. A two-element numeric vector can also be passed to supply custom values i.e. c(0, 1)
passed to plot_dims
Value
list of ggplot objects, cells projected by dr, colored by cor values
Examples
res <- clustify(
input = pbmc_matrix_small,
metadata = pbmc_meta,
ref_mat = cbmc_ref,
query_genes = pbmc_vargenes,
cluster_col = "classified"
)
#> using # of genes: 599
#> similarity computation completed, matrix of 9 x 13, preparing output
plot_cor(
cor_mat = res,
metadata = pbmc_meta,
data_to_plot = colnames(res)[1:2],
cluster_col = "classified",
x = "UMAP_1",
y = "UMAP_2"
)
#> [[1]]
#>
#> [[2]]
#>