plotPCsVar | R Documentation |
This function is a part of the data analysis functionality of tcgaCleaneR
.
R2 values of fitted linear models are used to quantity the strength of the (linear) relationships between a single
quantitative source of unwanted variation such as sample (log) library size or tumor purity and global sample
summary statistics such as the first k PCs.
The function runs linear regression between unwanted variations in TCGA RNA-seq like
library size and purity with PCs from computePCA
.
The output is a linear plot that compares the three assays
in SummarizedExperiment
TCGA Cancer data
across n PCs and R-sq.
For variable like Time which is not continuous, dummy variables are used to run
vector correlation stats::cancor
between dummy time variable and n PCs with the same
linear output.
plotPCsVar(pca.data, data, type, nPCs)
pca.data |
list: PCA output from |
data |
S4 data object |
type |
character: The response variable to |
nPCs |
numeric: Number of PCs that needs to be used for regression |
Linear Plot the compares the correlation between library size (or Purity, time) and PCs across three datasets. When output is stored in a object the user can also access values used to plot the linear graphs.
## Not run: plotPCsVar(pca.data, data = brca.data, type = "purity", nPCs = 10) df <- plotPCsVar(pca.data, data = brca.data, type = "time", nPCs = 8) df ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.