PCA3D.Rd
3D PCA plot.
PCA3D( pca, x = "PC1", y = "PC2", z = "PC3", color.key = NULL, color = NULL, cex = 1.5, col = "black", ticktype = "detailed", bty = "g", box = TRUE, theta = 140, phi = 20, d = 3, colkey = FALSE, label.size = 0.5, legend.pos = "bottom", legend.horiz = TRUE, legend.inset = -0.1, legend.bg = "white", legend.bty = "n", legend.ncol = NULL, main = NULL, ... )
pca | PCA results of |
---|---|
x | The principal component to display on the x axis. Default: PC1. |
y | The principal component to display on the y axis. Default: PC2. |
z | The principal component to display on the z axis. Default: PC3. |
color.key | Group to color the points. When set NULL, select first column of metadata. Default: NULL. |
color | Colors used. When set NULL, select color from Set1 of |
cex | Point size. Default: 1.5. |
col | Point edge color. Default: black. |
ticktype | Axis ticktype, chosen from: detailed and simple. Default: detailed. |
bty | The type of the box, the default draws only the back panels, chosen from: f, b, b2, g, bl, bl2, u, n. Default: g. |
box | Should the bounding box for the surface be displayed. Default: TRUE. |
theta | Angles defining the viewing direction. |
phi | Angles defining the viewing direction. |
d | a value which can be used to vary the strength of the perspective transformation. Values of d greater than 1 will lessen the perspective effect and values less and 1 will exaggerate it. Default: 3. |
colkey |
|
label.size | Label font size. Default: 0.5. |
legend.pos | Legend position. Default: bottom. |
legend.horiz | Logical; if TRUE, set the legend horizontally rather than vertically (specifying horiz overrides the ncol specification). Default: TRUE. |
legend.inset | Inset distance(s) from the margins as a fraction of the plot region when legend is placed by keyword. Default: -0.1. |
legend.bg | The background color for the legend box. Note that this is only used if bty != "n". Default: white. |
legend.bty | The type of box to be drawn around the legend, chosen from 0 and n. Default: n. |
legend.ncol | The number of columns in which to set the legend items. Default: NULL (set the legend horizontally). |
main | Title of the plot. Default: NULL. |
... | Parameters for |
3D PCA plot.
library(DESeq2) library(DEbPeak) count.file <- system.file("extdata", "snon_count.txt", package = "DEbPeak") meta.file <- system.file("extdata", "snon_meta.txt", package = "DEbPeak") count.matrix <- read.table(file = count.file, header = TRUE, sep = "\t") meta.info <- read.table(file = meta.file, header = TRUE) dds <- DESeq2::DESeqDataSetFromMatrix(countData = count.matrix, colData = meta.info, design = ~condition)#> Warning: some variables in design formula are characters, converting to factorskeep.genes <- rowSums(DESeq2::counts(dds, normalized = FALSE)) >= 10 dds <- dds[keep.genes, ] pca_res <- PCA(deobj = dds, transform.method = "rlog")#>#>PCA3D(pca = pca_res, color.key = "condition", main = "3D PCA")