-
Notifications
You must be signed in to change notification settings - Fork 0
/
pep_clivage.Rmd
188 lines (101 loc) · 3.9 KB
/
pep_clivage.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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
---
title: "Peptidomique_clivages"
author: "Marion Hardy"
date: "2023-04-13"
output:
html_document:
toc: true
theme: spacelab
highlight: monochrome
editor_options:
chunk_output_type: console
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(message = FALSE, cache = TRUE, echo = FALSE, warning = F, cache.lazy = F)
library(tidyverse)
library(readxl)
```
# Peptidomic data
```{r data loading}
data = read_xlsx("./data/Peptidomics36_peptides_site clivage.xlsm")
prot = read_xlsx("./data/BVDE_929_data.xlsx", sheet = "PeptideGroups")
head(data)[1:9] %>%
knitr::kable()
```
data\$\`Amino acid before\` I'm guessing this is the aa before the cleavage
data\$\`Amino acid after\` this is the aa following the cleaved sequence
We want to select the peptides that have either an M or a C at one or both of these places.
```{r, include=TRUE}
data1 =
data %>%
filter(`Amino acid before`%in%c("M","C")|
`Amino acid after`%in%c("M","C"))
nrow((data1))
```
We have 267 peptides which satisfy those conditions.
Now we want to keep the ones which are oxidized.
```{r}
pepox =
data1 %>%
filter(!is.na(`Oxidation (M) site IDs`))
pepox %>%
select(Sequence, `Amino acid before`,`Amino acid after`,Proteins, `Oxidation (M) site IDs`) %>%
knitr::kable()
```
There are 15 of these peptides.
Now we want to see if the protein they are a part of is found oxidized in H2O2 or in the ctrl conditions of the proteomics analysis Sophie did BVDE929.
First, we will filter those proteomics data.
```{r, include=TRUE, echo=TRUE}
prot =
prot %>%
filter(Contaminant != "TRUE")
# Reduce the number of rows to keep only the ones of interest
prot = prot[,c(3:5,9,10:11,16:23,29:44)]
colnames(prot)[11:14] = c("F1_H2O2","F1_ctrl","F2_H2O2","F2_ctrl")
# Filter out peptides which appear in <4 conditions
cols = sapply(prot[15:30], grepl, pattern = "Not.*{2,}")
prot = prot[rowSums(cols) >= 3, ]
# Add the "oxidated" and "not oxidated" annotations
prot =
prot %>%
mutate(state = case_when(
grepl("xidation", Modifications) ~ "Oxidated",
!grepl("xidation", Modifications) ~ "Not oxidated"))
```
Keep only the enriched in H2O2 and ctrl.
```{r, include=TRUE, echo=TRUE}
prot_f =
prot %>%
filter(`Abundance Ratio: (F1, H2O2) / (F1, Non R)` != 1 |
`Abundance Ratio: (F2, H2O2) / (F2, Non R)` != 1,
`Abundance Ratio Adj. P-Value: (F2, H2O2) / (F2, Non R)`<= 0.05|
`Abundance Ratio Adj. P-Value: (F1, H2O2) / (F1, Non R)`<= 0.05)
length(unique(prot_f$`Annotated Sequence`))
table(prot_f$`Abundance Ratio: (F2, H2O2) / (F2, Non R)`>1)
```
I get 19 peptides/proteins significantly enriched in ctrl and 37 enriched in H2O2.
Now, get the master protein accession from the peptidomic data and grepl to see if they appear in the prot data.
```{r, include=TRUE, echo=TRUE}
library(stringr)
# pepox =
# pepox %>%
# mutate(Uniprot = str_match(pepox$Proteins, "(^tr|sp)\\|(.*?)\\|")[,3])
#
# str_match(pepox$Proteins, "^(tr|sp|\\;tr|\\;sp)\\|(.*?)\\|$")
common =
prot_f %>%
filter(`Master Protein Accessions`%in%pepox$Uniprot)
dim(common)
```
There are no proteins that were significantly enriched in H2O2 or control whose peptides can also be found to have a cystein or a methionine next to the cleave site.
But, if I don't filter on the abundance ratio pval in the proteomics data, then I get 66 peptides in common:
```{r}
common =
prot %>%
filter(`Master Protein Accessions`%in%pepox$Uniprot)
dim(common)
common %>%
select(`Annotated Sequence`,Modifications, `Master Protein Accessions`, `Abundance Ratio: (F2, H2O2) / (F2, Non R)`,
`Abundance Ratio Adj. P-Value: (F2, H2O2) / (F2, Non R)`,state) %>%
knitr::kable()
```