plot_pca_and_save: Plot PCA with save option

Description Usage Arguments

View source: R/plot_pca_and_save.R

Description

Plot PCA with save option

Usage

1
2
3
4
5
6
plot_pca_and_save(scores.file, info.name, info.type, PCx = "PC1",
  PCy = "PC2", factor.levels = levels(info.type), aes_fill = NULL,
  savename, savePlot = F, width = 6, height = 2, title = "",
  label = F, savetype = ".pdf", w = 6, h = 3, aspect.ratio = 0.8,
  legend = F, legendname = "default", colors = colpalette[1:4],
  psize = 2, plotLabelname = "none")

Arguments

scores.file

PCA score file (scores file, output of PCA_from_file)

info.name

vector of sample names

info.type

vector of sample types in same order as names

PCx, PCy

PCs to display

factor.levels

ie. levels <- c("Undifferentiated", "Neural crest-like", "Transitory", "Melanocytic"))

aes_fill

column header to color samples by

savename

prefix to save file by

savePlot

default=F

width, height

size of the plot

title

title of the plot

label

column name to label samples by on PCA plot, default = F

savetype

".pdf" or ".png" or ".tiff", etc.

colors

ie. colpalette <- c("Cluster 1"="#4F81BD","Cluster 2"="#C0504D","Cluster 3"="#8064A2","Cluster 4"="#9BBB59")


KSheu/ksheu.lib documentation built on Oct. 14, 2020, 11:55 p.m.