plot_pca: plot PCA with given normalized count matrix and sample...

Description Usage Arguments Value

View source: R/plot_pca.R

Description

plot PCA with given normalized count matrix and sample annotation

Usage

1
2
3
4
5
6
7
8
9
plot_pca(
  tpm,
  col_anno,
  color_col,
  shape_col = NULL,
  text_col = NULL,
  point_size = 5,
  plot_file = ""
)

Arguments

tpm

named count matrix/data.frame with column name representing sample names and row name representing gene name/id (required)

col_anno

the column (sample) annotation data.frame with row name match the tpm matrix column name, column name represents the factor to label for PCA plot (required)

color_col

a column name from col_anno that be color aesthetics for PCA (required)

shape_col

a column name from col_anno that be shape aesthetics for PCA. Default = NULL

text_col

a column name from col_anno that be text label aesthetics for PCA. Default = NULL

point_size

sample point size. Default = 5

plot_file

save file to pdf. Default = ""

Value

a list of 4 plots, PCA matrix and PC variance summary. list(pc=pc, pca_summary=pca_summary, plots=plots)


sckinta/deqc documentation built on Jan. 11, 2022, 12:36 a.m.