plot_donor_matrix {scITD} | R Documentation |
Plot matrix of donor scores extracted from Tucker decomposition
Description
Plot matrix of donor scores extracted from Tucker decomposition
Usage
plot_donor_matrix(
container,
meta_vars = NULL,
cluster_by_meta = NULL,
show_donor_ids = FALSE,
add_meta_associations = NULL,
show_var_explained = TRUE,
donors_sel = NULL,
h_w = NULL
)
Arguments
container |
environment Project container that stores sub-containers for each cell type as well as results and plots from all analyses |
meta_vars |
character Names of metadata variables to plot alongside the donor scores. Can include more than one variable. (default=NULL) |
cluster_by_meta |
character One metadata variable to cluster the heatmap by. If NULL, donor clustering is done using donor scores. (default=NULL) |
show_donor_ids |
logical Set to TRUE to show donor id as row name on the heamap (default=FALSE) |
add_meta_associations |
character Adds meta data associations with each factor as top annotation. These should be generated first with plot_meta_associations(). Set to 'pval' if used 'pval' in plot_meta_associations(), otherwise set to 'rsq'. If NULL, no annotation is added. (default=NULL) |
show_var_explained |
logical Set to TRUE to display the explained variance for each factor (default=TRUE) |
donors_sel |
character A vector of a subset of donors to include in the plot (default=NULL) |
h_w |
numeric Vector specifying height and width (defualt=NULL) |
Value
The project container with a heatmap plot of donor scores in container$plots$donor_matrix.
Examples
test_container <- plot_donor_matrix(test_container, show_donor_ids = TRUE)