Native R implementation of the SAINTq interaction score (Teo et al., Proteomics 2016, doi:10.1002/pmic.201500499) for protein-level LFQ data stored in a DEprot object. No external saintq binary is required.

At the protein level SAINTq is identical to the intensity module of SAINTexpress / SAINT-MS1 (Teo et al., J Proteomics 2014; Choi et al., J Proteome Res 2012). This function reproduces that published model: a semi-supervised two-component mixture in which, for every prey, the background ("false") component is estimated from the negative-control runs and the "true" component is placed at a fixed fold-change above that background (the \(\theta_T = 5\,\theta_F\) rule of SAINTexpress). For each bait replicate the posterior probability of a true interaction is obtained by Bayes' theorem; AvgP is the average over replicates, MaxP the maximum, the fold change is mean(bait)/mean(control), and BFDR is the Bayesian FDR computed directly from the probabilities.

SAINTq(
  DEprot.object,
  metadata.column,
  control,
  bait = NULL,
  fold = 5,
  prior.pi = NULL,
  sd.scale = 1,
  min.sd = 0.1,
  control.background = NULL,
  best.n.rep = NULL,
  which.data = "imputed",
  viridis.palette = "magma",
  viridis.direction = -1,
  viridis.begin = 0.15,
  viridis.end = 0.9,
  verbose = TRUE
)

Arguments

DEprot.object

A DEprot (or DEprot.analyses) object.

metadata.column

String indicating the ID of the column of the metadata that holds the group label of each sample.

control

String indicating the group name in metadata.column that represent the negative controls (e.g. IgG, empty vector).

bait

String (or character vector) indicating the group name(s) in metadata.column to score as bait. Each distinct value is scored separately against the control. Default: NULL, scores every 'non-control' group.

fold

Numeric value > 0. Fold change separating the true component from the background, i.e. mean_True = mean_False + log2(fold). Default: 5 (default in SAINTexpress).

prior.pi

Either NULL (estimate the prior proportion of true interactions by Expectation-Maximization, default) or a fixed value between 0 and 1. Default: NULL.

sd.scale

Numeric value > 0. Standard deviation of the true component relative to the background (sigma_T = sd.scale * sigma_F). Default: 1.

min.sd

Numeric value >= 0. Lower bound on the per-prey background SD, to avoid over-confident scores from preys with near-constant controls. Default: 0.1.

control.background

Optional numeric (log2 scale). Background level used for preys never detected in the controls. Default: NULL, uses the lowest observed control value.

best.n.rep

Optional integer. If set, AvgP averages only the top best.n.rep replicate probabilities of each bait (equivalent to SAINTexpress's "best R replicates"). NULL uses all replicates.

which.data

String indicating which data should be used. One among "imputed", "randomized", "normalized", "raw". Default: "imputed".

viridis.palette

Character string indicating the color map option to use (passed to viridis). Eight options are available: "magma" (or "A"), "inferno" (or "B"), "plasma" (or "C"), "viridis" (or "D"), "cividis" (or "E"), "rocket" (or "F"), "mako" (or "G"), "turbo" (or "H"). Default: "magma".

viridis.direction

Sets the order of colors in the scale. If 1 colors are as output by viridis_pal, if -1 the order of colors is reversed. Default: -1.

viridis.begin

The (corrected) hue in [0,1] at which the color map begins. Default: 0.15.

viridis.end

The (corrected) hue in [0,1] at which the color map ends. Default: 0.9.

verbose

Logical. Print progress. Default: TRUE.

Value

An object of class DEprot.SAINTq.

Faithfulness

This is an independent re-implementation of the published model, not a re-wrapping of the C++ program. It returns scores with the same definitions and behavior, but exact numbers can differ from the official SAINTq binary because of low-level differences (parameter estimation, missing-value and control-compression heuristics). For publication-critical work, validate a subset against the official tool.

References

Teo G. et al. (2016) SAINTq. Proteomics 16:2238-2245. Teo G. et al. (2014) SAINTexpress. J Proteomics 100:37-43. Choi H. et al. (2012) SAINT-MS1. J Proteome Res 11:2619-2624.

Examples

if (FALSE) { # \dontrun{
  sq <- SAINTq(DEprot.object = dpo,
               metadata.column = "Target",
               control = "IgG",
               bait = "BRD4")


  sq_BRD4_HDAC1 <- SAINTq(DEprot.object = dpo,
                          metadata.column = "Target",
                          control = "IgG",
                          bait = c("BRD4", "HDAC1"))


  sq_all <- SAINTq(DEprot.object = dpo,
                   metadata.column = "Target",
                   control = "IgG",
                   bait = NULL)  #all non-IgG samples in 'Target'
} # }