permuteFeatures: Calculate score values by calculating difference between...

Description Usage Arguments Details Examples

View source: R/quantifyViaDecoupleR.R

Description

The function permuteFeatures calculates the difference between the mean of marker features (e.g. proteins) and random samples of the feature universe (features in values). The scores will be a relative quantification of the marker features to the universe feature intensities. Samples that undergo apoptosis (or any other contamination) will have different differences than uncontaminated samples.

The output will be a tibble containing the differences in means for the samples and repetitions.

Usage

1
2
3
4
5
6
permuteFeatures(
  values,
  args_fct,
  contamination = c("apoptosis", "necroptosis"),
  seed = 2022
)

Arguments

values

data.frame

args_fct

list of arguments, has to contain the entries n_perm (numeric(1)) and signatures (tibble)

contamination

character(1), either "apoptosis" or "necroptosis"

seed

numeric(1)

Details

The number of repetitions is defined by n_perm.

The function will be called in scoreSamples.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
library(SummarizedExperiment)
f <- system.file("protein_datasets/tanzer2020.RDS", 
    package = "apoptosisQuantification")
tanzer2020 <- readRDS(f)
prot <- assay(tanzer2020) |>
    as.data.frame()

## define a list with paramters
args_fct <- list()
args_fct[["signatures"]] <- readMarkers(type = "apoptosis", fc = 2, n = 1)
args_fct[["n_perm"]] <- 100

## run the function
permuteFeatures(values = prot, args_fct = args_fct, 
    contamination = "apoptosis", seed = 2022)

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