Contents

1 Import data

Read mzID file via mzID package. I use a small mzID file that is packaged in the mzID package as an example. You van replace the example file by using the path to your mzID file.

library(mzID)
exampleFiles <- list.files(system.file('extdata', package = 'mzID'),
                           pattern = '*.mzid', full.names = TRUE)
mzIDexample<-mzID(exampleFiles[[2]])
## reading 55merge_tandem.mzid... DONE!

2 Evaluate decoys

2.1 With shiny app

The evalTargetDecoy function allows you to specify the variables If you do not know the names of the variables in the mzID file with the decoy flag and the score you can launch the function while only specifying the mzID file you have read in R. Then a shiny app will launch to select the variables and to set the log10 flag and the number of bins in the histogram. You can evaluate the plots in the shiny app. If you push in the stop button, you return to R and the plots are made in your R session. Five plots are returned, the separate plots (PP-plot, histogram and zooms of these) and a multipanel plot with all of them together.

decoyPlots<-evalTargetDecoys(mzIDexample)
## 
## Listening on http://127.0.0.1:6485
## Warning: Removed 5 rows containing missing values (geom_point).

To see one specific plot you can use the name of the plot

names(decoyPlots)
## [1] "ppPlot"        "histogram"     "ppPlotZoom"    "histogramZoom"
## [5] "together"
decoyPlots$histogramZoom

Visualise all plots:

decoyPlots
## $ppPlot

## 
## $histogram

## 
## $ppPlotZoom
## Warning: Removed 5 rows containing missing values (geom_point).

## 
## $histogramZoom

## 
## $together

2.2 Without shiny app

If you know which variables you want to display you can skip the shiny app. Note, that the log10 flag is TRUE because we typically transform an e-value via -log10 so large transformed values are better.

decoyPlots<-evalTargetDecoys(object=mzIDexample,decoy="isdecoy",score="x\\!tandem:expect",log10=TRUE,nBins=30)
## Warning: Removed 5 rows containing missing values (geom_point).
decoyPlots$together