Description Usage Arguments Details Value Examples
View source: R/quantifyViaLoadings.R
The function createLoadingsTbl creates a tibble containing the loading
values for marker and non-marker features. 
createLoadingsTbl returns a tibble with three columns:
feature: name of feature (e.g. protein, in case of multiple
assignment separated by ";"),
type: either "marker" or non-marker
1  | createLoadingsTbl(vals_markers = vals_markers, vals_all = vals_all)
 | 
vals_markers | 
 
  | 
vals_all | 
 
  | 
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.
tibble
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)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.