createLoadingsTbl: Create a tibble containing the loading values for marker and...

Description Usage Arguments Details Value Examples

View source: R/quantifyViaLoadings.R

Description

The function createLoadingsTbl creates a tibble containing the loading values for marker and non-marker features.

createLoadingsTbl returns a tibble with three columns:

Usage

1
createLoadingsTbl(vals_markers = vals_markers, vals_all = vals_all)

Arguments

vals_markers

numeric vector

vals_all

numeric vector

Details

In case of multiple assignments of features (e.g. proteins), such a multiple assignment is treated as a marker feature if there is at least one marker feature (defined in names(vals_markers)) in the multiple assignment.

Value

tibble

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
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 loadings of markers and of the complete data set
prot <- assay(tanzer2020)
markers <- readMarkers(type = "apoptosis")
loadings_markers <- apoptosisQuantification:::getLoadingsOfMarkers(
    values = prot, markers = markers)
vals_all <- prcomp(t(prot))$rotation[, 1]
vals_markers <- setNames(loadings_markers$PC1, loadings_markers$feature)
apoptosisQuantification:::createLoadingsTbl(vals_markers = vals_markers, 
    vals_all = vals_all)

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