Learn R Programming

pepStat (version 1.6.2)

summarizePeptides: Add information to a peptideSet and summarize peptides

Description

This function merges the replicates and adds information from a peptide collection to a peptideSet. This collection can include coordinates, alignment information, Z-scales, and other peptide information.

Usage

summarizePeptides(peptideSet, summary = "median", position = NULL)

Arguments

peptideSet
A peptideSet, as created by makePeptideSet
summary
A character string. The method used for merging replicates. Available are: "mean" and "median".
position
A data.frame or GRanges object. A peptide collection such as the ones available in pepDat. See details below and vignettes for more information.

Value

  • An object of class peptideSet with added columns and updated ranges.

Details

The object in the position argument will be passed to create_db, it can either be a GRanges object with a peptide as a metadata column, or a data.frame that can be used to create such GRanges.

Some peptide collections can be found in the pepDat package.

See Also

makePeptideSet, create_db, create_db

Examples

Run this code
## 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)

}

Run the code above in your browser using DataLab