vignettes/MSstatsQC_v1.0.0_vignette.R

## ---- eval=FALSE---------------------------------------------------------
#  #A typical multi peptide and multi metric system suitability dataset
#  #This dataset was generated during CPTAC Study 9.1 at Site 54
#  S9Site54 <- read.csv('Sampledata_CPTAC_Study_9_1_Site54.csv', header=TRUE)

## ---- eval=FALSE---------------------------------------------------------
#  #A general MSstatsQC plot function when a guide set (1-20 runs) is used to monitor the mean of a metric
#  APlotFunction( S9Site54, peptide, L = 1, U = 5, metric, normalization = FALSE,
#                        ytitle = "A Plot", type = "mean", selectMean = NULL, selectSD = NULL )

## ---- eval=FALSE---------------------------------------------------------
#  #A general MSstatsQC summary function when a guide set (1-5 runs) is used
#  ASummaryFunction( S9Site54, L = 1, U = 5, listMean = NULL, listSD = NULL )

## ---- eval=FALSE---------------------------------------------------------
#  #Saving plots generated by plotly
#  p<-APlotFunction(S9Site54, peptide="a peptide", metric="a metric")
#  htmlwidgets::saveWidget(p, "Aplot.html")
#  export(p, file = "Aplot.png")
#  
#  #Saving plots generated by ggplot2
#  p<-ASummaryFunction(S9Site54, L=1, U=5)
#  ggsave(filename="Summary.pdf", plot=p)
#  #or
#  ggsave(filename="Summary.png", plot=p)

## ---- eval=FALSE---------------------------------------------------------
#  DataProcess(S9Site54)

## ---- eval=FALSE---------------------------------------------------------
#  #Defining metric of interest within APlotFunction
#  APlotFunction(S9Site54, "LVNELTEFAK", metric = "TotalArea")
#  APlotFunction(S9Site54, "LVNELTEFAK", metric = "RetentionTime")

## ---- eval=FALSE---------------------------------------------------------
#  #Mean and standard deviation of LVNELTEFAK is known
#  APlotFunction(data, "LVNELTEFAK", metric = "RetentionTime", selectMean = 34.5, selectSD = 1 )

## ---- eval=FALSE---------------------------------------------------------
#  # Retention time >> mean is 34.5 and standard deviation is 1.0
#  # Peak assymetry >> mean is 1.0  and standard deviation is 0.01
#  ASummaryFunction(data, listMean=list("Retention time” = 34.5, “Peak asymmetry” = 1.0), listSD = list("Retention time” = 1, “Peak asymmetry” = 0.01))

## ---- eval=FALSE---------------------------------------------------------
#  #Guide set is chosen as the first 20 observations of dataset
#  APlotFunction(data, "peptide", metric = "QC metric", L=1, U=20)

## ---- eval=FALSE---------------------------------------------------------
#  #Guide set is chosen as the first 20 observations of dataset
#  ASummaryFunction(data, L=1, U=20)

## ---- eval=FALSE---------------------------------------------------------
#  # Retention time >> mean is 34.5 and standard deviation is 1.0
#  XmRPlots(S9Site54, "LVNELTEFAK", metric = "RetentionTime", type="mean", selectMean = 34.5, selectSD = 1)

## ---- eval=FALSE---------------------------------------------------------
#  # Retention time >> first 20 observations are used as a guide set
#  XmRPlots(S9Site54, "LVNELTEFAK", metric = "RetentionTime", type="mean", L = 1, U = 20)
#  XmRPlots(S9Site54, "LVNELTEFAK", metric = "TotalPeakArea", type="mean", L = 1, U = 20)

## ---- eval=FALSE---------------------------------------------------------
#  # Retention time >> first 20 observations are used as a guide set
#  XmRPlots(S9Site54, "LVNELTEFAK", metric = "RetentionTime", type="dispersion", L = 1, U = 20)
#  XmRPlots(S9Site54, "LVNELTEFAK", metric = "TotalPeakArea", type="dispersion", L = 1, U = 20)

## ---- eval=FALSE---------------------------------------------------------
#  # Retention time >> first 20 observations are used as a guide set
#  CUSUMPlots(S9Site54, "LVNELTEFAK", metric = "RetentionTime", type="mean", L=1, U=20, ytitle="CUSUMm")
#  CUSUMPlots(S9Site54, "LVNELTEFAK", metric = "TotalPeakArea", type="mean", L=1, U=20, ytitle="CUSUMm")
#  CUSUMPlots(S9Site54, "LVNELTEFAK", metric = "RetentionTime", type="dispersion", L=1, U=20, ytitle="CUSUMv")
#  CUSUMPlots(S9Site54, "LVNELTEFAK", metric = "TotalPeakArea", type="dispersion", L=1, U=20, ytitle="CUSUMv")

## ---- eval=FALSE---------------------------------------------------------
#  # Retention time >> first 20 observations are used as a guide set
#  XmRPlots(S9Site54, "TAAYVNAIEK", metric = "RetentionTime", type="mean", L = 1, U = 20)
#  ChangePointEstimator(S9Site54, "TAAYVNAIEK", metric = "RetentionTime", type="mean", L = 1, U = 20)

## ---- eval=FALSE---------------------------------------------------------
#  # Retention time >> first 20 observations are used as a guide set
#  XmRPlots(S9Site54, "YSTDVSVDEVK", metric = "RetentionTime", type="mean", L = 1, U = 20)
#  ChangePointEstimator(S9Site54, "YSTDVSVDEVK", metric = "RetentionTime", type="dispersion", L = 1, U = 20)

## ---- eval=FALSE---------------------------------------------------------
#  # Retention time >> first 20 observations are used as a guide set
#  XmRRiverPlots(S9Site54, L=1, U=20)
#  XmRRadarPlots(S9Site54, L=1, U=20)

## ---- eval=FALSE---------------------------------------------------------
#  # Retention time >> first 20 observations are used as a guide set
#  CUSUMRiverPlots(S9Site54, L=1, U=20)
#  CUSUMRadarPlots(S9Site54, L=1, U=20)

## ---- eval=FALSE---------------------------------------------------------
#  # A decision map for Site 54 can be generated using the following script
#  # Retention time >> first 20 observations are used as a guide set
#  DecisionMap(S9Site54,method="XmR",peptideThresholdRed = 0.25,peptideThresholdYellow = 0.10,
#                            L = 1,U = 20,type = "mean",title = "Decision map",listMean = NULL,listSD = NULL)
srtaheri/MSstatsQC documentation built on May 30, 2019, 8:41 a.m.