plotPCAandLoadings: Plot PCA and loadings of markers and non-markers

Description Usage Arguments Details Value Examples

View source: R/quantifyViaLoadings.R

Description

The function creates a PCA plot and a plot of the loadings. The markers and non-markers are colour-coded in the loadings plot.

Usage

1
plotPCAandLoadings(values, markers, x_coord = "PC1", y_coord = "PC2")

Arguments

values

matrix or data.frame

markers

tibble

x_coord

character(1), specifying the principal component on the x axis

y_coord

character(1), specifying the principal component on the y axis

Details

The function plotPCAandLoadings takes as input a matrix, data.frame, or tibble (values) that stores the intensities of samples column "value" and the information on marker/non-marker in the column "type".

Value

plotly

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
library(MatrixQCvis)
library(SummarizedExperiment)

## load data set of Tanzer et al. (2020)
## source: https://www.ebi.ac.uk/pride/archive/projects/PXD014966
f <- system.file("protein_datasets/tanzer2020.RDS", 
    package = "apoptosisQuantification")
tanzer2020 <- readRDS(f)

## get the intensities and markers
values <- assay(tanzer2020)
markers <- readMarkers(type = "apoptosis")

## plot the PCA and loadings plot
plotPCAandLoadings(values = values, markers = markers)

tnaake/apoptosisQuantification documentation built on Feb. 20, 2022, 5:37 p.m.