### R code from vignette source 'vignettes/pepStat/inst/doc/pepStat.Rnw' ################################################### ### code chunk number 1: pepStat.Rnw:12-14 ################################################### library(knitr) opts_chunk$set(tidy=FALSE) ################################################### ### code chunk number 2: loading-libraries ################################################### library(pepDat) library(pepStat) ################################################### ### code chunk number 3: read-data ################################################### mapFile <- system.file("extdata/mapping.csv", package = "pepDat") dirToParse <- system.file("extdata/gpr_samples", package = "pepDat") pSet <- makePeptideSet(files = NULL, path = dirToParse, mapping.file = mapFile, log=TRUE) ################################################### ### code chunk number 4: data-content ################################################### read.csv(mapFile) ################################################### ### code chunk number 5: read-data-ctrl ################################################### pSetNoCtrl <- makePeptideSet(files = NULL, path = dirToParse, mapping.file = mapFile, log = TRUE, rm.control.list = c("JPT-control", "Ig", "Cy3"), empty.control.list= c("empty", "blank control")) ################################################### ### code chunk number 6: plot-slide ################################################### plotArrayImage(pSet, array.index = 1) ################################################### ### code chunk number 7: plot-residuals ################################################### plotArrayResiduals(pSet, array.index = 1, smooth = TRUE) ################################################### ### code chunk number 8: create-pep-load-data ################################################### peps <- read.csv(system.file("extdata/pep_info.csv", package = "pepDat")) head(peps) ################################################### ### code chunk number 9: create-db ################################################### pep_custom <- create_db(peps) ################################################### ### code chunk number 10: create-db-GR ################################################### pep_custom <- create_db(pep_custom) ################################################### ### code chunk number 11: summarizePeptideSet ################################################### psSet <- summarizePeptides(pSet, summary = "mean", position = pep_custom) ################################################### ### code chunk number 12: normalizeArray ################################################### pnSet <- normalizeArray(psSet) ################################################### ### code chunk number 13: slidingMean ################################################### psmSet <- slidingMean(pnSet, width = 9) ################################################### ### code chunk number 14: slidingMean-splitbyclade ################################################### psmSetAg <- slidingMean(pnSet, width = 9, split.by.clade = FALSE) ################################################### ### code chunk number 15: makeCalls ################################################### calls <- makeCalls(psmSet, freq = TRUE, group = "treatment", cutoff = .1, method = "FDR", verbose = TRUE) ################################################### ### code chunk number 16: makeCalls-aggregate ################################################### callsAg <- makeCalls(psmSetAg, freq = TRUE, group = "treatment", cutoff = .1, method = "FDR") ################################################### ### code chunk number 17: restab ################################################### summary <- restab(psmSet, calls) head(summary) ################################################### ### code chunk number 18: plot-inter ################################################### library(Pviz) summaryAg <- restab(psmSetAg, callsAg) plot_inter(summaryAg) ################################################### ### code chunk number 19: plot-clade ################################################### plot_clade(summary, clade=c("A", "M", "CRF01"), from = 300, to = 520) ################################################### ### code chunk number 20: shinyApp (eval = FALSE) ################################################### ## shinyPepStat()