plotPCA: Plot Heatmap

Description Usage Arguments Value Author(s) Examples

View source: R/plotPCA.R

Description

This function plots the following PCA plots: screeplot and biplot

Usage

1
2
plotPCA(data, sampleTypes, pathToOutput = "", log2 = FALSE,
  pseudoCount = NULL)

Arguments

data

quantified data to be visualized (finalOutput_molPct.csv)

sampleTypes

file that associates column names of MS1 with sampleTypes

pathToOutput

the directory path to save the plots

log2

logical argument that specifies whether or not data has to be log2 transformed

pseudoCount

pseudo count added to the data if the data is log2 transformed in order to avoid negative infinite values in the data

Value

four plot images: a scree plots (screePlot_species.png & screePlot_classes.png) and a biplot (PCA_biplot_species.png & PCA_biplot_classes.png) for both species and classes.

Author(s)

André Vidas Olsen

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# load sample types file and data to be used for visualization
sampleTypes <- read.csv(system.file("extdata", "sampleTypes.csv",
 package = "lipidQ"), stringsAsFactors = FALSE)

data <- read.csv(system.file("extdata/dataTables/checks",
 "finalOutput_molPct.csv", package = "lipidQ"), stringsAsFactors = FALSE)

# create pca scree and biplot from log2 transformed data with 0.0001 added
# pseudo counts
plotPCA(data, sampleTypes, pathToOutput = "", log2 = TRUE,
 pseudoCount = 0.0001)

ELELAB/lipidQ documentation built on Feb. 24, 2020, 12:54 a.m.