pcaTCGA: Plot Two Main Components of Principal Component Analysis

Description Usage Arguments Value ggbiplot Issues Author(s) See Also Examples

View source: R/pcaTCGA.R

Description

Plots Two Main Components of Principal Component Analysis

Usage

1
2
3
pcaTCGA(x, group.names, title = "", return.pca = FALSE, scale = TRUE,
  center = TRUE, var.scale = 1, obs.scale = 1, ellipse = TRUE,
  circle = TRUE, var.axes = FALSE, alpha = 0.8, add.lines = TRUE, ...)

Arguments

x

A data.frame containing i.e. expressions information. See expressionsTCGA.

group.names

Names of group variable to use in labels of the plot.

title

The title of a plot.

return.pca

Should return pca object additionaly to pca plot?

scale

As in prcomp.

center

As in prcomp.

var.scale

As in ggbiplot.

obs.scale

As in ggbiplot.

ellipse

As in ggbiplot.

circle

As in ggbiplot.

var.axes

As in ggbiplot.

alpha

As in ggbiplot.

add.lines

Should axis lines be added to plot.

...

Further arguments passed to prcomp.

Value

If return.pca = TRUE then a list containing a PCA plot (of class ggplot) and a pca model, the result of prcomp function. If not, then only PCA plot is returned.

ggbiplot

This function is based on https://github.com/vqv/ggbiplot which had to be copied to RTCGA because Bioconductor does not support remote dependencies from GitHub.

Issues

If you have any problems, issues or think that something is missing or is not clear please post an issue on https://github.com/RTCGA/RTCGA/issues.

Author(s)

Marcin Kosinski, m.p.kosinski@gmail.com

See Also

RTCGA website http://rtcga.github.io/RTCGA/Visualizations.html.

Other RTCGA: RTCGA-package, boxplotTCGA, checkTCGA, convertTCGA, datasetsTCGA, downloadTCGA, expressionsTCGA, heatmapTCGA, infoTCGA, installTCGA, kmTCGA, mutationsTCGA, readTCGA, survivalTCGA, theme_RTCGA

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run: 
library(dplyr)
## RNASeq expressions
library(RTCGA.rnaseq)
expressionsTCGA(BRCA.rnaseq, OV.rnaseq, HNSC.rnaseq) %>%
	rename(cohort = dataset) %>%	
	filter(substr(bcr_patient_barcode, 14, 15) == "01") -> BRCA.OV.HNSC.rnaseq.cancer

pcaTCGA(BRCA.OV.HNSC.rnaseq.cancer, "cohort")
pcaTCGA(BRCA.OV.HNSC.rnaseq.cancer, "cohort", add.lines = FALSE)
pcaTCGA(BRCA.OV.HNSC.rnaseq.cancer, "cohort", return.pca = TRUE) -> pca.rnaseq
pca.rnaseq$plot
pca.rnaseq$pca

## End(Not run)

RTCGA documentation built on Nov. 8, 2020, 5:11 p.m.