Skip to contents

Randomly draw replicate sample pairs and plot log2 intensity scatter plots. The plot title shows sample names, and the subtitle reports the R2 value.

Usage

plot_rep_scatter(exp, rep_col, n_pairs = 9)

Arguments

exp

A glyexp::GlycomicSE(), glyexp::GlycoproteomicSE(), or SummarizedExperiment::SummarizedExperiment() object.

rep_col

Column name in sample_info used to define replicate groups. Samples with the same value in this column are treated as replicates (e.g. c("A", "A", "A", "B", "B", "B") indicates three replicates for sample A and three for sample B).

n_pairs

Number of replicate pairs to draw at random.

Value

A patchwork object containing replicate scatter plots.

Examples

library(SummarizedExperiment)

exp <- glyexp::real_experiment
replicate <- rep(c("A", "B"), length.out = ncol(exp))
colData(exp)$replicate <- replicate
plot_rep_scatter(exp, rep_col = "replicate", n_pairs = 4)