olink_pca: PCA analysis of olink data

Description Usage Arguments Value Author(s) Examples

View source: R/PCA.R

Description

Given a SummarizedExperiment object, perform the PCA analysis implemented in Bioconductor package PCAtools.

Usage

1
olink_pca(se, colby = NULL, shape = NULL, metavars = NULL, removeVar = 0.1)

Arguments

se

a SummarizedExperiment object.

colby

character(1): the metadata column in se to use for colour.

shape

character(1): the metadata column in se to use for shape.

metavars

character(n): the metedata columns with numeric values in se to correlate with principal components.

removeVar

numeric(1): remove this fraction of variables based on low variance. DEFAULT = 0.1. OPTIONAL.

Value

A list of ggplot and tibble objects.

Author(s)

Ge Tan

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
npxFn <- system.file("extdata",
                     c("20200507_Inflammation_NPX_1.xlsx",
                       "20200625_Inflammation_NPX_2.xlsx"),
                     package = "OlinkR")
metaFn <- system.file("extdata", "Inflammation_Metadata.xlsx", package = "OlinkR")
se <- as_se(read_npx(npxFn, metaFn))
ans <- olink_pca(se, colby = "condition_Factor", shape = "Donor_Factor",
                 metavars = "Weight_Numeric")

npxFn <- system.file("extdata", "OlinkAnalyze_extdata", "npx_data2.xlsx",
                     package = "OlinkR")
metaFn <- system.file("extdata", "OlinkAnalyze_extdata",
                      "npx_data2_meta.xlsx", package = "OlinkR")
se <- as_se(read_npx(npxFn, metaFn))
ans <- olink_pca(se, colby = "Treatment_Factor", shape = "Time_Factor")

ge11232002/OlinkR documentation built on Jan. 17, 2022, 8:28 p.m.