plotSampleScores: Plot the contamination scores of samples

Description Usage Arguments Details Value Examples

View source: R/quantifyViaDecoupleR.R

Description

The function plotSampleScores creates a barplot or boxplot that visualizes the contamination score values obtained by scoreSamples.

Usage

1

Arguments

scores

tibble

Details

The function takes the argument scores that can be created via scoreSamples.

Value

gg

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
library(SummarizedExperiment)
library(tibble)

f <- system.file("protein_datasets/tanzer2020.RDS", 
    package = "apoptosisQuantification")
tanzer2020 <- readRDS(f)
prot <- assay(tanzer2020)

## use the intensities to calculate scores
scores <- scoreSamples(values = prot, contamination = "apoptosis",fc = 2, n = 1, n_perm = 100)
scores$treatment <- tanzer2020$treatment
plotSampleScores(scores = scores) +
    ggplot2::facet_wrap(~ treatment, scales = "free_x") +
    ggplot2::theme(legend.position = "none")

## use the intensities to calculate scores
scores <- scoreSamples(values = prot, contamination = "necroptosis", n_perm = 100)
scores$treatment <- tanzer2020$treatment
plotSampleScores(scores = scores) +
    ggplot2::facet_wrap(~ treatment, scales = "free_x") +
    ggplot2::theme(legend.position = "none")

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