makeCalls: Make antibody binding positivity calls

Description Usage Arguments Details Value Author(s) Examples

Description

After normalization and data smoothing, this last step makes the call for each peptide of the peptideSet after baseline correcting the peptide intenstities.

Usage

1
2
makeCalls(peptideSet, cutoff = 1.2, method = "absolute", freq = TRUE,
  group = NULL, verbose = FALSE)

Arguments

peptideSet

A peptideSet object. The peptides, after normalization and possibly data smoothing.

cutoff

A numeric. If FDR, the FDR threshold. Otherwise, a cutoff for the background corrected intensities.

method

A character. The method used to make positivity calls. "absolute" and "FDR" are available. See details below.

freq

A logical. If set to TRUE, return the percentage of slides calling a peptide positive. Otherwise, return a logical indicating binding events.

group

A character. Only used when freq is set to TRUE. A character indicating a variable by which to group slides. If non-null the percentage is calculated by group.

verbose

A logical. If set to TRUE, progress information will be displayed.

Details

This function requires specific variables ptid and visit in pData(peptideSet). The variable ptid should indicate subjects, and the variable visit should be a factor with levels pre and post.

If slides are paired for subjects, intensities corresponding to post-visit are substracted from pre. If slides are not paired, slides with pre have intensities averaged by peptides, and averaged peptide intensities are subtracted from slides that have entry post. Calls are made on these baseline corrected intensities.

When method = FDR, a left-tail method is used to generate a threshold controlling the False Discovery Rate at level cutoff. When method = absolute, Intensities exceeding the threshold are labelled as positive.

When freq = TRUE a group variable may be specified. The argument group indicates the name of a variable in pData(peptideSet) by which positive calls should be grouped. The call frequency for each peptide is calculated within groups.

Value

If freq = TRUE, a numeric matrix with peptides as rows and groups as columns where the values are the frequency of response in the group. If freq = FALSE, a logical matrix indicating binding events for each peptide in each subject.

Author(s)

Greg Imholte

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
## This example curated from the vignette -- please see vignette("pepStat")
## for more information
if (require("pepDat")) {

  ## Get example GPR files + associated mapping file
  dirToParse <- system.file("extdata/gpr_samples", package = "pepDat")
  mapFile <- system.file("extdata/mapping.csv", package = "pepDat")

  ## Make a peptide set
  pSet <- makePeptideSet(files = NULL, path = dirToParse,
                         mapping.file = mapFile, log=TRUE)

  ## Plot array images -- useful for quality control
  plotArrayImage(pSet, array.index = 1)
  plotArrayResiduals(pSet, array.index = 1, smooth = TRUE)

  ## Summarize peptides, using pep_hxb2 as the position database
  data(pep_hxb2)
  psSet <- summarizePeptides(pSet, summary = "mean", position = pep_hxb2)

  ## Normalize the peptide set
  pnSet <- normalizeArray(psSet)

  ## Smooth
  psmSet <- slidingMean(pnSet, width = 9)

  ## Make calls
  calls <- makeCalls(psmSet, freq = TRUE, group = "treatment",
                     cutoff = .1, method = "FDR", verbose = TRUE)

  ## Produce a summary of the results
  summary <- restab(psmSet, calls)

}

RGLab/pepStat documentation built on May 8, 2019, 5:56 a.m.