Make a matrix plot of PCA with top PCs

pca_matrix_plot_init(
  data,
  features = "all",
  group_by = NULL,
  scale = TRUE,
  n = 4,
  loading = FALSE,
  n_loadings = 10,
  gene_id = "SYMBOL"
)

Arguments

data

expression matrix

features

vector of gene symbols or 'all', specify the genes used for PCA, default 'all'

group_by

character, specify the column to be grouped and colored, default NULL

scale

logical, if to scale data for PCA, default TRUE

n

num, specify top n PCs to plot

loading

logical, if to plot and label loadings of PCA, default 'FALSE'

n_loadings

num, top n loadings to plot; or a vector of gene IDs; only work when loading = TRUE

gene_id

character, specify which column of IDs used to calculate TPM, also indicate the ID type of expression data's rowname, could be one of 'ENSEMBL', 'SYMBOL', 'ENTREZ'..., default 'SYMBOL'

Value

matrix plot of PCA