pca_qc: pca_qc

View source: R/MODULE_3_QC_PCA.R

pca_qcR Documentation

pca_qc

Description

Function to produce PCA output for data visualization and QC purposes.

Usage

pca_qc(x, n, outfile = NULL, ID = NULL)

Arguments

x

A numeric matrix containing RNA, RPF, TE or some other type of data. Rows are genes/transcripts and columns are samples. Gene/transcript IDs and sample names may be given as row names and column names, respectively (but not as additional non-numeric columns or rows).

n

The number of principal components to be plotted

outfile

The path and name of the output pdf file containing the PCA plots (optional). Default: NULL.

ID

A vector containing group IDs to color-code the samples on the PCA plot (must correspond to the order of samples in x) (optional). Default: NULL.

Details

A summary of the PC analysis is printed out to standard output. If outfile is not specified, PCA plots will be printed to standard output i.e. the plots panel in Rstudio.

Examples

pca_qc(te_LMCN.v2.stnd[,-1], n = 4)
The first column of input data (transcript ID) had to be removed to create a full-numeric input dataset.

goodarzilab/Ribolog documentation built on Oct. 7, 2022, 10:14 p.m.