forked from statOmics/SGA
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mzIDuniprotTutorial.Rmd
124 lines (89 loc) · 3.43 KB
/
mzIDuniprotTutorial.Rmd
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
---
title: "Tutorial: Evaluate pyrococcus searches using uniprot and peptide shaker"
author:
- name: Lieven Clement
affiliation:
- Ghent University
output:
html_document:
code_download: true
theme: flatly
toc: true
toc_float: true
highlight: tango
number_sections: true
linkcolor: blue
urlcolor: blue
citecolor: blue
---
# Load Libraries
```{r}
library(TargetDecoy)
library(RCurl)
library(mzID)
```
# Download data in working directory
```{r}
download.file(
url = "https://raw.githubusercontent.com/statOmics/PDA22GTPB/data/identification/pyroUniprot.mzid",
destfile = "pyroUniprot.mzid"
)
```
# Load Data in R
```{r}
path2File <- "pyroUniprot.mzid"
mzidUniprot <- mzID(path2File)
```
# Launch the Shiny Gadget
Explore the results for search eninge scores to find correct names of search engine scores in the mzID.
```{r eval=FALSE}
evalTargetDecoys(mzidUniprot)
```
# Evaluate target decoy assumptions
## Peptide Shaker
```{r}
evalTargetDecoys(
object = mzidUniprot,
decoy = "isdecoy",
score = "peptideshaker psm score",
log10 = FALSE)
```
We observe that
- the histogram shows that Peptide Shaker gives a very good separation between good targets and bad targets.
- the histogram and PP show that the distribution of bad target peptideshaker PSM scores have the same distribution of decoy peptideshaker PSM scores.
- The PP-plot shows that the ratio of decoys on targets is a good estimate of the expected fraction of bad target hits that are returned ($\hat\pi_b=\frac{\# \text{decoys}}{\#\text{targets}}$ is a good estimate of the fraction of bad target hits). We can thus assume that it is equaly likely that a bad PSM hit will match to a target sequence or a decoy sequence.
- It is not really required to assess the assumptions of the search engines used by peptide shaker because there are no problems.
- For completeness we still evaluate the different search engines used by peptide shaker.
## MSGF+
```{r}
evalTargetDecoys(
object = mzidUniprot,
decoy = "isdecoy",
score = "ms-gf:specevalue",
log10 = TRUE)
```
- The plots show that
the distribution of the MSGF+ PSM scores are nicely bimodal.
- The separation between good target PSM scores and bad target PSM scores is less pronounced than for peptide shaker. So it is beneficial to include the other engines with peptideshaker.
- We do not see deviations from the target decoy assumptions.
## Omssa
```{r}
evalTargetDecoys(
object = mzidUniprot,
decoy = "isdecoy",
score = "omssa:evalue",
log10 = TRUE)
```
- The separation between good target PSM scores and bad target PSM scores is less pronounced for omssa than for peptide shaker. So it is beneficial to include the other engines with peptideshaker.
- We do not see deviations from the target decoy assumptions.
## X!Tandem
```{r}
evalTargetDecoys(
object = mzidUniprot,
decoy = "isdecoy",
score = "x!tandem:expect",
log10 = TRUE)
```
- The separation between good target PSM scores and bad target PSM scores is less pronounced for X!Tandem than for peptide shaker. So it is beneficial to include the other engines with peptideshaker.
- The decoy PSM score distribution has the same shape as the PSM score distribution of bad targets.
- There seems to be some evidence that bad PSM hits are more likely to go to target than to decoy sequences. However, this does not lead to problems when combining X!tandem with other engines in peptide shaker.