TCGAvisualize_PCA performs a principal components analysis (PCA) on the given data matrix
and returns the results as an object of class prcomp, and shows results in PCA level.
A filtered dataframe or numeric matrix where each row represents a gene,
each column represents a sample from function TCGAanalyze_Filtering
dataDEGsFiltLevel
table with DEGs, log Fold Change (FC), false discovery rate (FDR),
the gene expression level, etc, from function TCGAanalyze_LevelTab.
ntopgenes
number of DEGs genes to plot in PCA
Value
principal components analysis (PCA) plot of PC1 and PC2
Examples
# normalization of genes
dataNorm <- TCGAbiolinks::TCGAanalyze_Normalization(tabDF = dataBRCA, geneInfo = geneInfo,
method = "geneLength")
# quantile filter of genes
dataFilt <- TCGAanalyze_Filtering(tabDF = dataBRCA, method = "quantile", qnt.cut = 0.25)
# Principal Component Analysis plot for ntop selected DEGs
pca <- TCGAvisualize_PCA(dataFilt,dataDEGsFiltLevel, ntopgenes = 200)
if (!(is.null(dev.list()["RStudioGD"]))){dev.off()}
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(TCGAbiolinks)
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/TCGAbiolinks/TCGAvisualize_PCA.Rd_%03d_medium.png", width=480, height=480)
> ### Name: TCGAvisualize_PCA
> ### Title: Principal components analysis (PCA) plot
> ### Aliases: TCGAvisualize_PCA
>
> ### ** Examples
>
> # normalization of genes
> dataNorm <- TCGAbiolinks::TCGAanalyze_Normalization(tabDF = dataBRCA, geneInfo = geneInfo,
+ method = "geneLength")
I Need about 2.5 seconds for this Complete Normalization Upper Quantile [Processing 80k elements /s]
Step 1 of 4: newSeqExpressionSet ...
Step 2 of 4: withinLaneNormalization ...
Step 3 of 4: betweenLaneNormalization ...
Step 4 of 4: exprs ...
> # quantile filter of genes
> dataFilt <- TCGAanalyze_Filtering(tabDF = dataBRCA, method = "quantile", qnt.cut = 0.25)
> # Principal Component Analysis plot for ntop selected DEGs
> pca <- TCGAvisualize_PCA(dataFilt,dataDEGsFiltLevel, ntopgenes = 200)
Warning message:
In prcomp.default(t(expr2), cor = TRUE) :
extra argument 'cor' will be disregarded
> if (!(is.null(dev.list()["RStudioGD"]))){dev.off()}
null device
1
>
>
>
>
>
> dev.off()
Error in dev.off() : cannot shut down device 1 (the null device)
Execution halted