Switch to unified view

a b/analysis/thresholds_denoised.Rmd
1
---
2
title: "Determine thresholds for protein expression"
3
author: Tobias Roider
4
date: "Last compiled on `r format(Sys.time(), '%d %B, %Y, %X')`"
5
output: 
6
  rmdformats::readthedown
7
  
8
editor_options: 
9
  chunk_output_type: console
10
---
11
12
```{r options, include=FALSE, warning = FALSE}
13
14
library(knitr)
15
opts_chunk$set(echo=TRUE, tidy=FALSE, include=TRUE, message=FALSE, cache.lazy = FALSE,
16
               dpi = 100, cache = FALSE, warning = FALSE, fig.height = 6.5)
17
opts_knit$set(root.dir = "../")
18
options(bitmapType = "cairo")
19
20
```
21
22
# Load packages and functions
23
```{r Load packages and functions}
24
25
library(Seurat)
26
library(tidyverse)
27
library(readxl)
28
library(ggpubr)
29
library(ggrastr)
30
source("R/Functions.R")
31
32
thresh <- list()
33
34
mytheme <- 
35
  theme_bw()+
36
  theme(panel.grid = element_blank())
37
38
```
39
40
# Read and handle data
41
```{r read data}
42
43
Combined_T <- readRDS("output/Tcells_Integrated.rds")
44
df <- readRDS("data/denoised_protein_totalVI.rds")
45
meta_protein <- readRDS("data/meta_protein_totalVI.rds")
46
47
df <- left_join(df, meta_protein %>% select(Barcode_full, log10_prot_size))
48
49
df <- df %>% left_join(., FetchData(Combined_T, vars=c("Barcode_full", "IdentI")), by="Barcode_full")
50
colnames(df) <- gsub(colnames(df), pattern = "_TotalA", replacement = "")
51
df <- filter(df, !is.na(IdentI))
52
df <- sample_frac(df, 0.25)
53
54
```
55
56
# Marker
57
## CD2
58
```{r}
59
60
thresh_tmp <- 75
61
epitope <- "CD2"
62
63
df_tmp <- df %>% 
64
  drop_na() %>% 
65
  mutate(isPos=!!sym(epitope)>thresh_tmp) %>% 
66
  add_prop(keep.n = F, vars = c("IdentI", "isPos"), group.vars = 1) %>% 
67
  filter(isPos==T) 
68
69
df %>% 
70
  drop_na() %>% 
71
  ggplot(aes(x=!!sym(epitope), y=log10_prot_size))+
72
  geom_point_rast(shape=1, stroke=0.1, size=0.25, raster.dpi=300)+
73
  geom_text(data=df_tmp, inherit.aes = F, aes(x=700, y=4, label=round(Prop, 2)))+
74
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
75
  facet_wrap(~IdentI)+
76
  mytheme
77
78
thresh$CD2 <- thresh_tmp
79
80
```
81
82
## CD3
83
```{r}
84
85
thresh_tmp <- 75
86
epitope <- "CD3"
87
88
df_tmp <- df %>% 
89
  drop_na() %>% 
90
  mutate(isPos=!!sym(epitope)>thresh_tmp) %>% 
91
  add_prop(keep.n = F, vars = c("IdentI", "isPos"), group.vars = 1) %>% 
92
  filter(isPos==T) 
93
94
df %>% 
95
  drop_na() %>% 
96
  ggplot(aes(x=!!sym(epitope), y=log10_prot_size))+
97
  geom_point_rast(shape=1, stroke=0.1, size=0.25, raster.dpi=300)+
98
  geom_text(data=df_tmp, inherit.aes = F, aes(x=500, y=4, label=round(Prop, 2)))+
99
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
100
  facet_wrap(~IdentI)+
101
  mytheme
102
103
thresh$CD3 <- thresh_tmp
104
105
```
106
107
## CD4
108
```{r}
109
110
thresh_tmp <- 90
111
epitope <- "CD4"
112
113
df_tmp <- df %>% 
114
  drop_na() %>% 
115
  mutate(isPos=!!sym(epitope)>thresh_tmp) %>% 
116
  add_prop(keep.n = F, vars = c("IdentI", "isPos"), group.vars = 1) %>% 
117
  filter(isPos==T) 
118
119
df %>% 
120
  drop_na() %>% 
121
  ggplot(aes(x=!!sym(epitope), y=log10_prot_size))+
122
  geom_point_rast(shape=1, stroke=0.1, size=0.25, raster.dpi=300)+
123
  geom_text(data=df_tmp, inherit.aes = F, aes(x=500, y=4, label=round(Prop, 2)))+
124
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
125
  facet_wrap(~IdentI)+
126
  mytheme
127
128
thresh$CD4 <- thresh_tmp
129
130
```
131
132
## CD5
133
```{r}
134
135
thresh_tmp <- 125
136
epitope <- "CD5"
137
138
df_tmp <- df %>% 
139
   drop_na() %>% 
140
  mutate(isPos=!!sym(epitope)>thresh_tmp) %>% 
141
  add_prop(keep.n = F, vars = c("IdentI", "isPos"), group.vars = 1) %>% 
142
  filter(isPos==T) 
143
144
df %>% 
145
  drop_na() %>% 
146
  ggplot(aes(x=!!sym(epitope), y=log10_prot_size))+
147
  geom_point_rast(shape=1, stroke=0.1, size=0.25, raster.dpi=300)+
148
  geom_text(data=df_tmp, inherit.aes = F, aes(x=700, y=4, label=round(Prop, 2)))+
149
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
150
  facet_wrap(~IdentI)+
151
  mytheme
152
153
thresh$CD5 <- thresh_tmp
154
155
```
156
157
## CD7
158
```{r}
159
160
thresh_tmp <- 100
161
epitope <- "CD7"
162
163
df_tmp <- df %>% 
164
  drop_na() %>% 
165
  mutate(isPos=!!sym(epitope)>thresh_tmp) %>% 
166
  add_prop(keep.n = F, vars = c("IdentI", "isPos"), group.vars = 1) %>% 
167
  filter(isPos==T) 
168
169
df %>% 
170
  drop_na() %>% 
171
  ggplot(aes(x=!!sym(epitope), y=log10_prot_size))+
172
  geom_point_rast(shape=1, stroke=0.1, size=0.25, raster.dpi=300)+
173
  geom_text(data=df_tmp, inherit.aes = F, aes(x=750, y=3, label=round(Prop, 2)))+
174
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
175
  xlim(0, 1000)+
176
  facet_wrap(~IdentI)+
177
  mytheme
178
179
thresh$CD7 <- thresh_tmp
180
181
```
182
183
## CD8a
184
```{r}
185
186
thresh_tmp <- 35
187
epitope <- "CD8a"
188
189
df_tmp <- df %>% 
190
  drop_na() %>% 
191
  mutate(isPos=!!sym(epitope)>thresh_tmp) %>% 
192
  add_prop(keep.n = F, vars = c("IdentI", "isPos"), group.vars = 1) %>% 
193
  filter(isPos==T) 
194
195
df %>% 
196
  drop_na() %>% 
197
  ggplot(aes(x=!!sym(epitope), y=log10_prot_size))+
198
  geom_point_rast(shape=1, stroke=0.1, size=0.25, raster.dpi=300)+
199
  geom_text(data=df_tmp, inherit.aes = F, aes(x=200, y=3, label=round(Prop, 2)))+
200
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
201
  xlim(0, 250)+
202
  facet_wrap(~IdentI)+
203
  mytheme
204
205
thresh$CD8a <- thresh_tmp
206
207
```
208
209
## CD10
210
```{r}
211
212
thresh_tmp <- 15
213
epitope <- "CD10"
214
 
215
df_tmp <- df %>% 
216
  drop_na() %>% 
217
  mutate(isPos=!!sym(epitope)>thresh_tmp) %>% 
218
  add_prop(keep.n = F, vars = c("IdentI", "isPos"), group.vars = 1) %>% 
219
  filter(isPos==T) 
220
221
df %>% 
222
  drop_na() %>% 
223
  ggplot(aes(x=!!sym(epitope), y=log10_prot_size))+
224
  geom_point_rast(shape=1, stroke=0.1, size=0.25, alpha=0.35, raster.dpi=300)+
225
  geom_text(data=df_tmp, inherit.aes = F, aes(x=65, y=3, label=round(Prop, 2)))+
226
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
227
  xlim(0, 75)+
228
  facet_wrap(~IdentI)+
229
  mytheme
230
231
thresh$CD10 <- thresh_tmp
232
233
```
234
235
## CD103
236
```{r}
237
238
thresh_tmp <- 10
239
epitope <- "CD103"
240
 
241
df_tmp <- df %>% 
242
  drop_na() %>% 
243
  mutate(isPos=!!sym(epitope)>thresh_tmp) %>% 
244
  add_prop(keep.n = F, vars = c("IdentI", "isPos"), group.vars = 1) %>% 
245
  filter(isPos==T) 
246
247
df %>% 
248
  drop_na() %>% 
249
  ggplot(aes(x=!!sym(epitope), y=log10_prot_size))+
250
  geom_point_rast(shape=1, stroke=0.1, size=0.25, raster.dpi=300)+
251
  geom_text(data=df_tmp, inherit.aes = F, aes(x=50, y=3, label=round(Prop, 2)))+
252
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
253
  xlim(0, 75)+
254
  facet_wrap(~IdentI)+
255
  mytheme
256
257
thresh$CD103 <- thresh_tmp
258
259
```
260
261
## CD11b
262
```{r}
263
264
thresh_tmp <- 15
265
epitope <- "CD11b"
266
 
267
df_tmp <- df %>% 
268
  drop_na() %>% 
269
  mutate(isPos=!!sym(epitope)>thresh_tmp) %>% 
270
  add_prop(keep.n = F, vars = c("IdentI", "isPos"), group.vars = 1) %>% 
271
  filter(isPos==T) 
272
273
df %>% 
274
  drop_na() %>% 
275
  ggplot(aes(x=!!sym(epitope), y=log10_prot_size))+
276
  geom_point_rast(shape=1, stroke=0.1, size=0.25, raster.dpi=300)+
277
  geom_text(data=df_tmp, inherit.aes = F, aes(x=75, y=3, label=round(Prop, 2)))+
278
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
279
  xlim(0, 100)+
280
  facet_wrap(~IdentI)+
281
  mytheme
282
283
thresh$CD11b <- thresh_tmp
284
285
```
286
287
## CD11c
288
```{r}
289
290
thresh_tmp <- 40
291
epitope <- "CD11c"
292
 
293
df_tmp <- df %>% 
294
  drop_na() %>% 
295
  mutate(isPos=!!sym(epitope)>thresh_tmp) %>% 
296
  add_prop(keep.n = F, vars = c("IdentI", "isPos"), group.vars = 1) %>% 
297
  filter(isPos==T) 
298
299
df %>% 
300
  drop_na() %>% 
301
  ggplot(aes(x=!!sym(epitope), y=log10_prot_size))+
302
  geom_point_rast(shape=1, stroke=0.1, size=0.25, raster.dpi=300)+
303
  geom_text(data=df_tmp, inherit.aes = F, aes(x=75, y=3, label=round(Prop, 2)))+
304
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
305
  xlim(0, 100)+
306
  facet_wrap(~IdentI)+
307
  mytheme
308
309
thresh$CD11c <- thresh_tmp
310
311
```
312
313
## CD127
314
```{r}
315
316
thresh_tmp <- 35
317
epitope <- "CD127"
318
319
df_tmp <- df %>% 
320
  drop_na() %>% 
321
  mutate(isPos=!!sym(epitope)>thresh_tmp) %>% 
322
  add_prop(keep.n = F, vars = c("IdentI", "isPos"), group.vars = 1) %>% 
323
  filter(isPos==T) 
324
325
df %>% 
326
  drop_na() %>% 
327
  ggplot(aes(x=!!sym(epitope), y=log10_prot_size))+
328
  geom_point_rast(shape=1, stroke=0.1, size=0.25, raster.dpi=300)+
329
  geom_text(data=df_tmp, inherit.aes = F, aes(x=75, y=3, label=round(Prop, 2)))+
330
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
331
  xlim(0, 150)+
332
  facet_wrap(~IdentI)+
333
  mytheme
334
335
thresh$CD127 <- thresh_tmp
336
337
```
338
339
## CD134
340
```{r}
341
342
thresh_tmp <- 22.5
343
epitope <- "CD134"
344
345
df_tmp <- df %>% 
346
  drop_na() %>% 
347
  mutate(isPos=!!sym(epitope)>thresh_tmp) %>% 
348
  add_prop(keep.n = F, vars = c("IdentI", "isPos"), group.vars = 1) %>% 
349
  filter(isPos==T) 
350
351
df %>% 
352
  drop_na() %>% 
353
  ggplot(aes(x=!!sym(epitope), y=log10_prot_size))+
354
  geom_point_rast(shape=1, stroke=0.1, size=0.25, raster.dpi=300)+
355
  geom_text(data=df_tmp, inherit.aes = F, aes(x=75, y=3, label=round(Prop, 2)))+
356
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
357
  xlim(0, 120)+
358
  facet_wrap(~IdentI)+
359
  mytheme
360
361
thresh$CD134 <- thresh_tmp
362
363
```
364
365
## CD137
366
```{r}
367
368
thresh_tmp <- 12.5
369
epitope <- "CD137"
370
371
df_tmp <- df %>% 
372
  drop_na() %>% 
373
  mutate(isPos=!!sym(epitope)>thresh_tmp) %>% 
374
  add_prop(keep.n = F, vars = c("IdentI", "isPos"), group.vars = 1) %>% 
375
  filter(isPos==T) 
376
377
df %>% 
378
  drop_na() %>% 
379
  ggplot(aes(x=!!sym(epitope), y=log10_prot_size))+
380
  geom_point_rast(shape=1, stroke=0.1, size=0.25, raster.dpi=300)+
381
  geom_text(data=df_tmp, inherit.aes = F, aes(x=75, y=3, label=round(Prop, 2)))+
382
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
383
  xlim(0, 120)+
384
  facet_wrap(~IdentI)+
385
  mytheme
386
387
388
thresh$CD137 <- thresh_tmp
389
390
```
391
392
## CD150
393
```{r}
394
395
thresh_tmp <- 20
396
epitope <- "CD150"
397
398
df_tmp <- df %>% 
399
  drop_na() %>% 
400
  mutate(isPos=!!sym(epitope)>thresh_tmp) %>% 
401
  add_prop(keep.n = F, vars = c("IdentI", "isPos"), group.vars = 1) %>% 
402
  filter(isPos==T) 
403
404
df %>% 
405
  drop_na() %>% 
406
  ggplot(aes(x=!!sym(epitope), y=log10_prot_size))+
407
  geom_point_rast(shape=1, stroke=0.1, size=0.25, raster.dpi=300)+
408
  geom_text(data=df_tmp, inherit.aes = F, aes(x=75, y=3, label=round(Prop, 2)))+
409
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
410
  xlim(0, 70)+
411
  facet_wrap(~IdentI)+
412
  mytheme
413
414
thresh$CD150 <- thresh_tmp
415
416
```
417
418
## CD152
419
```{r}
420
421
thresh_tmp <- 10
422
epitope <- "CD152"
423
424
df_tmp <- df %>% 
425
  drop_na() %>% 
426
  mutate(isPos=!!sym(epitope)>thresh_tmp) %>% 
427
  add_prop(keep.n = F, vars = c("IdentI", "isPos"), group.vars = 1) %>% 
428
  filter(isPos==T) 
429
430
df %>% 
431
  drop_na() %>% 
432
  ggplot(aes(x=!!sym(epitope), y=log10_prot_size))+
433
  geom_point_rast(shape=1, stroke=0.1, size=0.25, raster.dpi=300)+
434
  geom_text(data=df_tmp, inherit.aes = F, aes(x=75, y=3, label=round(Prop, 2)))+
435
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
436
  xlim(0, 40)+
437
  facet_wrap(~IdentI)+
438
  mytheme
439
440
thresh$CD152 <- thresh_tmp
441
442
```
443
444
## CD16
445
```{r}
446
447
thresh_tmp <- 15
448
epitope <- "CD16"
449
450
df_tmp <- df %>% 
451
  drop_na() %>% 
452
  mutate(isPos=!!sym(epitope)>thresh_tmp) %>% 
453
  add_prop(keep.n = F, vars = c("IdentI", "isPos"), group.vars = 1) %>% 
454
  filter(isPos==T) 
455
456
df %>% 
457
  drop_na() %>% 
458
  ggplot(aes(x=!!sym(epitope), y=log10_prot_size))+
459
  geom_point_rast(shape=1, stroke=0.1, size=0.25, raster.dpi=300)+
460
  geom_text(data=df_tmp, inherit.aes = F, aes(x=75, y=3, label=round(Prop, 2)))+
461
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
462
  xlim(0, 70)+
463
  facet_wrap(~IdentI)+
464
  mytheme
465
466
467
thresh$CD16 <- thresh_tmp
468
469
```
470
471
## CD161
472
```{r}
473
474
thresh_tmp <- 10
475
476
epitope <- "CD161"
477
478
df_tmp <- df %>% 
479
  drop_na() %>% 
480
  mutate(isPos=!!sym(epitope)>thresh_tmp) %>% 
481
  add_prop(keep.n = F, vars = c("IdentI", "isPos"), group.vars = 1) %>% 
482
  filter(isPos==T) 
483
484
df %>% 
485
  drop_na() %>% 
486
  ggplot(aes(x=!!sym(epitope), y=log10_prot_size))+
487
  geom_point_rast(shape=1, stroke=0.1, size=0.25, alpha=0.2, raster.dpi=300)+
488
  geom_text(data=df_tmp, inherit.aes = F, aes(x=30, y=3, label=round(Prop, 2)))+
489
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
490
  xlim(0, 50)+
491
  facet_wrap(~IdentI)+
492
  mytheme
493
494
thresh$CD161 <- thresh_tmp
495
496
```
497
498
## CD183
499
```{r}
500
501
thresh_tmp <- 15
502
epitope <- "CD183"
503
504
df_tmp <- df %>% 
505
  drop_na() %>% 
506
  mutate(isPos=!!sym(epitope)>thresh_tmp) %>% 
507
  add_prop(keep.n = F, vars = c("IdentI", "isPos"), group.vars = 1) %>% 
508
  filter(isPos==T) 
509
510
df %>% 
511
  drop_na() %>% 
512
  ggplot(aes(x=!!sym(epitope), y=log10_prot_size))+
513
  geom_point_rast(shape=1, stroke=0.1, size=0.25, alpha=0.4, raster.dpi=300)+
514
  geom_text(data=df_tmp, inherit.aes = F, aes(x=75, y=3, label=round(Prop, 2)))+
515
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
516
  xlim(0, 85)+
517
  facet_wrap(~IdentI)+
518
  mytheme
519
520
521
thresh$CD183 <- thresh_tmp
522
523
```
524
525
## CD184
526
```{r}
527
528
thresh_tmp <- 7.5
529
epitope <- "CD184"
530
531
df_tmp <- df %>% 
532
  drop_na() %>% 
533
  mutate(isPos=!!sym(epitope)>thresh_tmp) %>% 
534
  add_prop(keep.n = F, vars = c("IdentI", "isPos"), group.vars = 1) %>% 
535
  filter(isPos==T) 
536
537
df %>% 
538
  drop_na() %>% 
539
  ggplot(aes(x=!!sym(epitope), y=log10_prot_size))+
540
  geom_point_rast(shape=1, stroke=0.1, size=0.25, raster.dpi=300)+
541
  geom_text(data=df_tmp, inherit.aes = F, aes(x=75, y=3, label=round(Prop, 2)))+
542
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
543
  xlim(0, 85)+
544
  facet_wrap(~IdentI)+
545
  mytheme
546
547
thresh$CD184 <- thresh_tmp
548
549
```
550
551
552
## CD185
553
```{r}
554
555
thresh_tmp <- 20
556
epitope <- "CD185"
557
558
df_tmp <- df %>% 
559
  drop_na() %>% 
560
  mutate(isPos=!!sym(epitope)>thresh_tmp) %>% 
561
  add_prop(keep.n = F, vars = c("IdentI", "isPos"), group.vars = 1) %>% 
562
  filter(isPos==T) 
563
564
df %>% 
565
  drop_na() %>% 
566
  ggplot(aes(x=!!sym(epitope), y=log10_prot_size))+
567
  geom_point_rast(shape=1, stroke=0.1, size=0.25, alpha=0.4, raster.dpi=300)+
568
  geom_text(data=df_tmp, inherit.aes = F, aes(x=60, y=3, label=round(Prop, 2)))+
569
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
570
  xlim(0, 70)+
571
  facet_wrap(~IdentI)+
572
  mytheme
573
574
thresh$CD185 <- thresh_tmp
575
576
```
577
578
## CD19
579
```{r}
580
581
thresh_tmp <- 25
582
epitope <- "CD19"
583
584
df_tmp <- df %>% 
585
  drop_na() %>% 
586
  mutate(isPos=!!sym(epitope)>thresh_tmp) %>% 
587
  add_prop(keep.n = F, vars = c("IdentI", "isPos"), group.vars = 1) %>% 
588
  filter(isPos==T) 
589
590
df %>% 
591
  drop_na() %>% 
592
  ggplot(aes(x=!!sym(epitope), y=log10_prot_size))+
593
  geom_point_rast(shape=1, stroke=0.1, size=0.25, raster.dpi=300)+
594
  geom_text(data=df_tmp, inherit.aes = F, aes(x=75, y=3, label=round(Prop, 2)))+
595
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
596
  xlim(0, 70)+
597
  facet_wrap(~IdentI)+
598
  mytheme
599
600
thresh$CD19 <- thresh_tmp
601
602
```
603
604
## CD194
605
```{r}
606
607
thresh_tmp <- 15
608
epitope <- "CD194"
609
610
df_tmp <- df %>% 
611
  drop_na() %>% 
612
  mutate(isPos=!!sym(epitope)>thresh_tmp) %>% 
613
  add_prop(keep.n = F, vars = c("IdentI", "isPos"), group.vars = 1) %>% 
614
  filter(isPos==T) 
615
616
df %>% 
617
  drop_na() %>% 
618
  ggplot(aes(x=!!sym(epitope), y=log10_prot_size))+
619
  geom_point_rast(shape=1, stroke=0.1, size=0.25, raster.dpi=300)+
620
  geom_text(data=df_tmp, inherit.aes = F, aes(x=50, y=3, label=round(Prop, 2)))+
621
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
622
  xlim(0, 70)+
623
  facet_wrap(~IdentI)+
624
  mytheme
625
626
thresh$CD194 <- thresh_tmp
627
628
```
629
630
## CD195
631
```{r}
632
633
thresh_tmp <- 5
634
epitope <- "CD195"
635
636
df_tmp <- df %>% 
637
  drop_na() %>% 
638
  mutate(isPos=!!sym(epitope)>thresh_tmp) %>% 
639
  add_prop(keep.n = F, vars = c("IdentI", "isPos"), group.vars = 1) %>% 
640
  filter(isPos==T) 
641
642
df %>% 
643
  drop_na() %>% 
644
  ggplot(aes(x=!!sym(epitope), y=log10_prot_size))+
645
  geom_point_rast(shape=1, stroke=0.1, size=0.25, raster.dpi=300)+
646
  geom_text(data=df_tmp, inherit.aes = F, aes(x=75, y=3, label=round(Prop, 2)))+
647
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
648
  xlim(0, 50)+
649
  facet_wrap(~IdentI)+
650
  mytheme
651
652
thresh$CD195 <- thresh_tmp
653
654
```
655
656
## CD197
657
```{r}
658
659
thresh_tmp <- 7.5
660
epitope <- "CD197"
661
662
df_tmp <- df %>% 
663
  drop_na() %>% 
664
  mutate(isPos=!!sym(epitope)>thresh_tmp) %>% 
665
  add_prop(keep.n = F, vars = c("IdentI", "isPos"), group.vars = 1) %>% 
666
  filter(isPos==T) 
667
668
df %>% 
669
  drop_na() %>% 
670
  ggplot(aes(x=!!sym(epitope), y=log10_prot_size))+
671
  geom_point_rast(shape=1, stroke=0.1, size=0.25, raster.dpi=300)+
672
  geom_text(data=df_tmp, inherit.aes = F, aes(x=25, y=3, label=round(Prop, 2)))+
673
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
674
  xlim(0, 30)+
675
  facet_wrap(~IdentI)+
676
  mytheme
677
678
thresh$CD197 <- thresh_tmp
679
680
```
681
682
## CD20
683
```{r}
684
685
thresh_tmp <- 35
686
epitope <- "CD20"
687
688
df_tmp <- df %>% 
689
  drop_na() %>% 
690
  mutate(isPos=!!sym(epitope)>thresh_tmp) %>% 
691
  add_prop(keep.n = F, vars = c("IdentI", "isPos"), group.vars = 1) %>% 
692
  filter(isPos==T) 
693
694
df %>% 
695
  drop_na() %>% 
696
  ggplot(aes(x=!!sym(epitope), y=log10_prot_size))+
697
  geom_point_rast(shape=1, stroke=0.1, size=0.25, raster.dpi=300)+
698
  geom_text(data=df_tmp, inherit.aes = F, aes(x=50, y=3, label=round(Prop, 2)))+
699
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
700
  xlim(0, 100)+
701
  facet_wrap(~IdentI)+
702
  mytheme
703
704
thresh$CD20 <- thresh_tmp
705
706
```
707
708
## CD21
709
```{r}
710
711
thresh_tmp <- 40
712
epitope <- "CD21"
713
714
df_tmp <- df %>% 
715
  drop_na() %>% 
716
  mutate(isPos=!!sym(epitope)>thresh_tmp) %>% 
717
  add_prop(keep.n = F, vars = c("IdentI", "isPos"), group.vars = 1) %>% 
718
  filter(isPos==T) 
719
720
df %>% 
721
  drop_na() %>% 
722
  ggplot(aes(x=!!sym(epitope), y=log10_prot_size))+
723
  geom_point_rast(shape=1, stroke=0.1, size=0.25, raster.dpi=300)+
724
  geom_text(data=df_tmp, inherit.aes = F, aes(x=75, y=3, label=round(Prop, 2)))+
725
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
726
  xlim(0, 100)+
727
  facet_wrap(~IdentI)+
728
  mytheme
729
730
thresh$CD21 <- thresh_tmp
731
732
```
733
734
## CD22
735
```{r}
736
737
thresh_tmp <- 30
738
epitope <- "CD22"
739
740
df_tmp <- df %>% 
741
  drop_na() %>% 
742
  mutate(isPos=!!sym(epitope)>thresh_tmp) %>% 
743
  add_prop(keep.n = F, vars = c("IdentI", "isPos"), group.vars = 1) %>% 
744
  filter(isPos==T) 
745
746
df %>% 
747
  drop_na() %>% 
748
  ggplot(aes(x=!!sym(epitope), y=log10_prot_size))+
749
  geom_point_rast(shape=1, stroke=0.1, size=0.25, raster.dpi=300)+
750
  geom_text(data=df_tmp, inherit.aes = F, aes(x=75, y=3, label=round(Prop, 2)))+
751
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
752
  xlim(0, 70)+
753
  facet_wrap(~IdentI)+
754
  mytheme
755
756
thresh$CD22 <- thresh_tmp
757
758
```
759
760
## CD223
761
```{r}
762
763
thresh_tmp <- 7.5
764
epitope <- "CD223"
765
766
df_tmp <- df %>% 
767
  drop_na() %>% 
768
  mutate(isPos=!!sym(epitope)>thresh_tmp) %>% 
769
  add_prop(keep.n = F, vars = c("IdentI", "isPos"), group.vars = 1) %>% 
770
  filter(isPos==T) 
771
772
df %>% 
773
  drop_na() %>% 
774
  ggplot(aes(x=!!sym(epitope), y=log10_prot_size))+
775
  geom_point_rast(shape=1, stroke=0.1, size=0.25, raster.dpi=300)+
776
  geom_text(data=df_tmp, inherit.aes = F, aes(x=40, y=3, label=round(Prop, 2)))+
777
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
778
  xlim(0, 50)+
779
  facet_wrap(~IdentI)+
780
  mytheme
781
782
thresh$CD223 <- thresh_tmp
783
784
```
785
786
## CD23
787
```{r}
788
789
thresh_tmp <- 20
790
791
df %>% 
792
  #drop_na() %>%
793
  ggplot(aes(x=CD23, y=log10_prot_size))+
794
  geom_point_rast(shape=1, stroke=0.1, size=0.25, alpha=0.25, raster.dpi=300)+
795
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
796
  facet_wrap(~IdentI)+
797
  xlim(0, 75)+
798
  mytheme
799
800
thresh$CD23 <- thresh_tmp
801
802
```
803
804
## CD24
805
```{r}
806
807
thresh_tmp <- 20
808
809
df %>% 
810
811
  ggplot(aes(x=CD24, y=log10_prot_size))+
812
  geom_point_rast(shape=1, stroke=0.1, size=0.25, alpha=0.25, raster.dpi=300)+
813
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
814
  facet_wrap(~IdentI)+
815
  xlim(0, 75)+
816
  mytheme
817
818
thresh$CD24 <- thresh_tmp
819
820
```
821
822
## CD244
823
```{r}
824
825
thresh_tmp <- 30
826
827
epitope <- "CD244"
828
829
df_tmp <- df %>% 
830
  drop_na() %>% 
831
  mutate(isPos=!!sym(epitope)>thresh_tmp) %>% 
832
  add_prop(keep.n = F, vars = c("IdentI", "isPos"), group.vars = 1) %>% 
833
  filter(isPos==T) 
834
835
df %>% 
836
  drop_na() %>% 
837
  ggplot(aes(x=!!sym(epitope), y=log10_prot_size))+
838
  geom_point_rast(shape=1, stroke=0.1, size=0.25, raster.dpi=300)+
839
  geom_text(data=df_tmp, inherit.aes = F, aes(x=75, y=3, label=round(Prop, 2)))+
840
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
841
  xlim(0, 200)+
842
  facet_wrap(~IdentI)+
843
  mytheme
844
845
thresh$CD244 <- thresh_tmp
846
847
```
848
849
## CD25
850
```{r}
851
852
thresh_tmp <- 75
853
epitope <- "CD25"
854
855
df_tmp <- df %>% 
856
  drop_na() %>% 
857
  mutate(isPos=!!sym(epitope)>thresh_tmp) %>% 
858
  add_prop(keep.n = F, vars = c("IdentI", "isPos"), group.vars = 1) %>% 
859
  filter(isPos==T) 
860
861
df %>% 
862
  drop_na() %>% 
863
  ggplot(aes(x=!!sym(epitope), y=log10_prot_size))+
864
  geom_point_rast(shape=1, stroke=0.1, size=0.25, raster.dpi=300)+
865
  geom_text(data=df_tmp, inherit.aes = F, aes(x=200, y=3, label=round(Prop, 2)))+
866
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
867
  xlim(0, 400)+
868
  facet_wrap(~IdentI)+
869
  mytheme
870
871
thresh$CD25 <- thresh_tmp
872
873
```
874
875
## CD27
876
```{r}
877
878
thresh_tmp <- 150
879
epitope <- "CD27"
880
881
df_tmp <- df %>% 
882
  drop_na() %>% 
883
  mutate(isPos=!!sym(epitope)>thresh_tmp) %>% 
884
  add_prop(keep.n = F, vars = c("IdentI", "isPos"), group.vars = 1) %>% 
885
  filter(isPos==T) 
886
887
df %>% 
888
  drop_na() %>% 
889
  ggplot(aes(x=!!sym(epitope), y=log10_prot_size))+
890
  geom_point_rast(shape=1, stroke=0.1, size=0.25, raster.dpi=300)+
891
  geom_text(data=df_tmp, inherit.aes = F, aes(x=500, y=3, label=round(Prop, 2)))+
892
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
893
  xlim(0, 750)+
894
  facet_wrap(~IdentI)+
895
  mytheme
896
897
thresh$CD27 <- thresh_tmp
898
899
```
900
901
## CD273
902
```{r}
903
904
thresh_tmp <- 15
905
906
df %>% 
907
  #drop_na() %>%
908
909
  ggplot(aes(x=CD273, y=log10_prot_size))+
910
  geom_point_rast(shape=1, stroke=0.1, size=0.25, alpha=0.25, raster.dpi=300)+
911
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
912
  facet_wrap(~IdentI)+
913
  ##xlim(0, 200)+
914
  mytheme
915
916
thresh$CD273 <- thresh_tmp
917
918
```
919
920
## CD274
921
```{r}
922
923
thresh_tmp <- 15
924
925
df %>% 
926
  #drop_na() %>%
927
928
  ggplot(aes(x=CD274, y=log10_prot_size))+
929
  geom_point_rast(shape=1, stroke=0.1, size=0.25, alpha=0.25, raster.dpi=300)+
930
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
931
  facet_wrap(~IdentI)+
932
  xlim(0, 50)+
933
  mytheme
934
935
thresh$CD274 <- thresh_tmp
936
937
```
938
939
## CD279
940
```{r}
941
942
thresh_tmp <- 110
943
epitope <- "CD279"
944
945
df_tmp <- df %>% 
946
  drop_na() %>% 
947
  mutate(isPos=!!sym(epitope)>thresh_tmp) %>% 
948
  add_prop(keep.n = F, vars = c("IdentI", "isPos"), group.vars = 1) %>% 
949
  filter(isPos==T) 
950
951
df %>% 
952
  drop_na() %>% 
953
  ggplot(aes(x=!!sym(epitope), y=log10_prot_size))+
954
  geom_point_rast(shape=1, stroke=0.1, size=0.25, alpha=0.4)+
955
  geom_text(data=df_tmp, inherit.aes = F, aes(x=750, y=3, label=round(Prop, 2)))+
956
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
957
  xlim(0, 1300)+
958
  facet_wrap(~IdentI)+
959
  mytheme
960
961
thresh$CD279 <- thresh_tmp
962
963
```
964
965
## CD278
966
```{r}
967
968
thresh_tmp <- 200
969
970
df %>% 
971
  drop_na() %>%
972
973
  ggplot(aes(x=CD278, y=log10_prot_size))+
974
  geom_point_rast(shape=1, stroke=0.1, size=0.25, alpha=0.25, raster.dpi=300)+
975
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
976
  facet_wrap(~IdentI)+
977
  xlim(0, 1000)+
978
  mytheme
979
980
thresh$CD278 <- thresh_tmp
981
982
```
983
984
## CD28
985
```{r}
986
987
thresh_tmp <- 30
988
989
df %>% 
990
  #drop_na() %>%
991
  ggplot(aes(x=CD28, y=log10_prot_size))+
992
  geom_point_rast(shape=1, stroke=0.1, size=0.25, alpha=0.25, raster.dpi=300)+
993
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
994
  facet_wrap(~IdentI)+
995
  xlim(0, 200)+
996
  mytheme
997
998
thresh$CD28 <- thresh_tmp
999
1000
```
1001
1002
## CD29
1003
```{r}
1004
1005
thresh_tmp <- 60
1006
1007
df %>% 
1008
  drop_na() %>%
1009
1010
  ggplot(aes(x=CD29, y=log10_prot_size))+
1011
  geom_point_rast(shape=1, stroke=0.1, size=0.25, alpha=0.25, raster.dpi=300)+
1012
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
1013
  facet_wrap(~IdentI)+
1014
  xlim(0, 200)+
1015
  mytheme
1016
1017
thresh$CD29 <- thresh_tmp
1018
1019
```
1020
1021
## CD31
1022
```{r}
1023
1024
thresh_tmp <- 100
1025
1026
df %>% 
1027
  drop_na() %>%
1028
1029
  ggplot(aes(x=CD31, y=log10_prot_size))+
1030
  geom_point_rast(shape=1, stroke=0.1, size=0.25, alpha=0.25, raster.dpi=300)+
1031
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
1032
  facet_wrap(~IdentI)+
1033
  xlim(0, 200)+
1034
  mytheme
1035
1036
thresh$CD31 <- thresh_tmp
1037
1038
```
1039
1040
## CD32
1041
```{r}
1042
1043
thresh_tmp <- 20
1044
1045
df %>% 
1046
  drop_na() %>%
1047
1048
  ggplot(aes(x=CD32, y=log10_prot_size))+
1049
  geom_point_rast(shape=1, stroke=0.1, size=0.25, alpha=0.25, raster.dpi=300)+
1050
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
1051
  facet_wrap(~IdentI)+
1052
  xlim(0, 50)+
1053
  mytheme
1054
1055
thresh$CD32 <- thresh_tmp
1056
1057
```
1058
1059
## CD357
1060
```{r}
1061
1062
thresh_tmp <- 7.5
1063
1064
df %>% 
1065
  drop_na() %>%
1066
1067
  ggplot(aes(x=CD357, y=log10_prot_size))+
1068
  geom_point_rast(shape=1, stroke=0.1, size=0.25, alpha=0.25, raster.dpi=300)+
1069
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
1070
  facet_wrap(~IdentI)+
1071
  xlim(0, 50)+
1072
  mytheme
1073
1074
thresh$CD357 <- thresh_tmp
1075
1076
```
1077
1078
## CD366
1079
```{r}
1080
1081
thresh_tmp <- 20
1082
epitope <- "CD366"
1083
1084
df_tmp <- df %>% 
1085
  drop_na() %>% 
1086
  mutate(isPos=!!sym(epitope)>thresh_tmp) %>% 
1087
  add_prop(keep.n = F, vars = c("IdentI", "isPos"), group.vars = 1) %>% 
1088
  filter(isPos==T) 
1089
1090
df %>% 
1091
  drop_na() %>% 
1092
  ggplot(aes(x=!!sym(epitope), y=log10_prot_size))+
1093
  geom_point_rast(shape=1, stroke=0.1, size=0.25, raster.dpi=300)+
1094
  geom_text(data=df_tmp, inherit.aes = F, aes(x=60, y=3, label=round(Prop, 2)))+
1095
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
1096
  xlim(0, 75)+
1097
  facet_wrap(~IdentI)+
1098
  mytheme
1099
1100
thresh$CD366 <- thresh_tmp
1101
1102
```
1103
1104
## CD38
1105
```{r}
1106
1107
thresh_tmp <- 50
1108
1109
df %>% 
1110
  drop_na() %>%
1111
  ggplot(aes(x=CD38, y=log10_prot_size))+
1112
  geom_point_rast(shape=1, stroke=0.1, shape=1, stroke=0.1, size=0.25, alpha=0.25, raster.dpi=300)+
1113
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
1114
  facet_wrap(~IdentI)+
1115
  xlim(0, 150)+
1116
  mytheme
1117
1118
thresh$CD38 <- thresh_tmp
1119
1120
```
1121
1122
## CD39
1123
```{r}
1124
1125
thresh_tmp <- 12.5
1126
1127
df %>% 
1128
  drop_na() %>%
1129
  ggplot(aes(x=CD39, y=log10_prot_size))+
1130
  geom_point_rast(shape=1, stroke=0.1, shape=1, stroke=0.1, size=0.25, alpha=0.25, raster.dpi=300)+
1131
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
1132
  facet_wrap(~IdentI)+
1133
  xlim(0, 50)+
1134
  mytheme
1135
1136
thresh$CD39 <- thresh_tmp
1137
1138
```
1139
1140
## CD43
1141
```{r}
1142
1143
thresh_tmp <- 150
1144
1145
df %>% 
1146
  drop_na() %>%
1147
  ggplot(aes(x=CD43, y=log10_prot_size))+
1148
  geom_point_rast(shape=1, stroke=0.1, size=0.25, alpha=0.25, raster.dpi=300)+
1149
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
1150
  facet_wrap(~IdentI)+
1151
  xlim(0, 500)+
1152
  mytheme
1153
1154
thresh$CD43 <- thresh_tmp
1155
1156
```
1157
1158
## CD44
1159
```{r}
1160
1161
thresh_tmp <- 150
1162
1163
df %>% 
1164
  drop_na() %>%
1165
  ggplot(aes(x=CD44, y=log10_prot_size))+
1166
  geom_point_rast(shape=1, stroke=0.1, size=0.25, alpha=0.25, raster.dpi=300)+
1167
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
1168
  facet_wrap(~IdentI)+
1169
  xlim(0, 500)+
1170
  mytheme
1171
1172
thresh$CD44 <- thresh_tmp
1173
1174
```
1175
1176
## CD45
1177
```{r}
1178
1179
thresh_tmp <- 50
1180
1181
df %>% 
1182
  drop_na() %>%
1183
  ggplot(aes(x=CD45, y=log10_prot_size))+
1184
  geom_point_rast(shape=1, stroke=0.1, size=0.25, alpha=0.25, raster.dpi=300)+
1185
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
1186
  facet_wrap(~IdentI)+
1187
  xlim(0, 500)+
1188
  mytheme
1189
1190
thresh$CD45 <- thresh_tmp
1191
1192
```
1193
1194
## CD45RA
1195
```{r}
1196
1197
thresh_tmp <- 15
1198
1199
df %>% 
1200
  drop_na() %>%
1201
  ggplot(aes(x=CD45RA, y=log10_prot_size))+
1202
  geom_point_rast(shape=1, stroke=0.1, size=0.25, alpha=0.25, raster.dpi=300)+
1203
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
1204
  facet_wrap(~IdentI)+
1205
  xlim(0, 100)+
1206
  mytheme
1207
1208
thresh$CD45RA <- thresh_tmp
1209
1210
```
1211
1212
## CD45RO
1213
```{r}
1214
1215
thresh_tmp <- 10
1216
1217
df %>% 
1218
  drop_na() %>%
1219
  ggplot(aes(x=CD45RO, y=log10_prot_size))+
1220
  geom_point_rast(shape=1, stroke=0.1, size=0.25, alpha=0.25, raster.dpi=300)+
1221
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
1222
  facet_wrap(~IdentI)+
1223
  xlim(0, 50)+
1224
  mytheme
1225
1226
thresh$CD45RO <- thresh_tmp
1227
1228
```
1229
1230
## CD47
1231
```{r}
1232
1233
thresh_tmp <- 50
1234
1235
df %>% 
1236
  drop_na() %>%
1237
  ggplot(aes(x=CD47, y=log10_prot_size))+
1238
  geom_point_rast(shape=1, stroke=0.1, size=0.25, alpha=0.25, raster.dpi=300)+
1239
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
1240
  facet_wrap(~IdentI)+
1241
  xlim(0, 150)+
1242
  mytheme
1243
1244
thresh$CD47 <- thresh_tmp
1245
1246
```
1247
1248
## CD48
1249
```{r}
1250
1251
thresh_tmp <- 250
1252
1253
df %>% 
1254
  #drop_na() %>%
1255
  ggplot(aes(x=CD48, y=log10_prot_size))+
1256
  geom_point_rast(shape=1, stroke=0.1, size=0.25, alpha=0.25, raster.dpi=300)+
1257
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
1258
  facet_wrap(~IdentI)+
1259
  mytheme
1260
1261
thresh$CD48 <- thresh_tmp
1262
1263
```
1264
1265
## CD56
1266
```{r}
1267
1268
thresh_tmp <- 10
1269
1270
df %>% 
1271
  #drop_na() %>%
1272
  ggplot(aes(x=CD56, y=log10_prot_size))+
1273
  geom_point_rast(shape=1, stroke=0.1, size=0.25, alpha=0.25, raster.dpi=300)+
1274
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
1275
  facet_wrap(~IdentI)+
1276
  xlim(0,50)+
1277
  mytheme
1278
1279
thresh$CD56 <- thresh_tmp
1280
1281
```
1282
1283
## CD57
1284
```{r}
1285
1286
thresh_tmp <- 50
1287
1288
df %>% 
1289
  drop_na() %>%
1290
  ggplot(aes(x=CD57, y=log10_prot_size))+
1291
  geom_point_rast(shape=1, stroke=0.1, size=0.25, alpha=0.25, raster.dpi=300)+
1292
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
1293
  facet_wrap(~IdentI)+
1294
  xlim(0,150)+
1295
  mytheme
1296
1297
thresh$CD57 <- thresh_tmp
1298
1299
```
1300
1301
## CD62L
1302
```{r}
1303
1304
thresh_tmp <- 25
1305
1306
df %>% 
1307
  drop_na() %>%
1308
  ggplot(aes(x=CD62L, y=log10_prot_size))+
1309
  geom_point_rast(shape=1, stroke=0.1, size=0.25, alpha=0.25, raster.dpi=300)+
1310
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
1311
  facet_wrap(~IdentI)+
1312
  xlim(0,100)+
1313
  mytheme
1314
1315
thresh$CD62L <- thresh_tmp
1316
1317
```
1318
1319
## CD69
1320
```{r}
1321
1322
thresh_tmp <- 140
1323
1324
df %>% 
1325
  drop_na() %>%
1326
  ggplot(aes(x=CD69, y=log10_prot_size))+
1327
  geom_point_rast(shape=1, stroke=0.1, size=0.25, alpha=0.25, raster.dpi=300)+
1328
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
1329
  facet_wrap(~IdentI)+
1330
  xlim(0,500)+
1331
  mytheme
1332
1333
thresh$CD69 <- thresh_tmp
1334
1335
```
1336
1337
## CD70
1338
```{r}
1339
1340
thresh_tmp <- 15
1341
1342
df %>% 
1343
  drop_na() %>%
1344
  ggplot(aes(x=CD70, y=log10_prot_size))+
1345
  geom_point_rast(shape=1, stroke=0.1, size=0.25, alpha=0.25, raster.dpi=300)+
1346
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
1347
  facet_wrap(~IdentI)+
1348
  xlim(0,50)+
1349
  mytheme
1350
1351
thresh$CD70 <- thresh_tmp
1352
1353
```
1354
1355
## CD73
1356
```{r}
1357
1358
thresh_tmp <- 50
1359
1360
df %>% 
1361
  drop_na() %>%
1362
  ggplot(aes(x=CD73, y=log10_prot_size))+
1363
  geom_point_rast(shape=1, stroke=0.1, size=0.25, alpha=0.25, raster.dpi=300)+
1364
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
1365
  facet_wrap(~IdentI)+
1366
  xlim(0,75)+
1367
  mytheme
1368
1369
thresh$CD73 <- thresh_tmp
1370
1371
```
1372
1373
## CD79b
1374
```{r}
1375
1376
thresh_tmp <- 7.5
1377
1378
df %>% 
1379
  #drop_na() %>%
1380
  ggplot(aes(x=CD79b, y=log10_prot_size))+
1381
  geom_point_rast(shape=1, stroke=0.1, size=0.25, alpha=0.25, raster.dpi=300)+
1382
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
1383
  facet_wrap(~IdentI)+
1384
  xlim(0,75)+
1385
  mytheme
1386
1387
thresh$CD79b <- thresh_tmp
1388
1389
```
1390
1391
## CD86
1392
```{r}
1393
1394
thresh_tmp <- 12.5
1395
1396
df %>% 
1397
  drop_na() %>%
1398
  ggplot(aes(x=CD86, y=log10_prot_size))+
1399
  geom_point_rast(shape=1, stroke=0.1, size=0.25, alpha=0.25, raster.dpi=300)+
1400
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
1401
  facet_wrap(~IdentI)+
1402
  xlim(0,75)+
1403
  mytheme
1404
1405
thresh$CD86 <- thresh_tmp
1406
1407
```
1408
1409
## CD95
1410
```{r}
1411
1412
thresh_tmp <- 25
1413
1414
df %>% 
1415
  drop_na() %>%
1416
  ggplot(aes(x=CD95, y=log10_prot_size))+
1417
  geom_point_rast(shape=1, stroke=0.1, size=0.25, alpha=0.25, raster.dpi=300)+
1418
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
1419
  facet_wrap(~IdentI)+
1420
  xlim(0,150)+
1421
  mytheme
1422
1423
thresh$CD95 <- thresh_tmp
1424
1425
```
1426
1427
## KLRG1
1428
```{r}
1429
1430
thresh_tmp <- 15
1431
1432
df %>% 
1433
  drop_na() %>%
1434
  ggplot(aes(x=KLRG1, y=log10_prot_size))+
1435
  geom_point_rast(shape=1, stroke=0.1, size=0.25, alpha=0.25, raster.dpi=300)+
1436
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
1437
  facet_wrap(~IdentI, nrow = 2)+
1438
  xlim(0,75)+
1439
  mytheme
1440
1441
thresh$KLRG1 <- thresh_tmp
1442
1443
```
1444
1445
## Lambda
1446
```{r}
1447
1448
thresh_tmp <- 7.5
1449
1450
df %>% 
1451
  ggplot(aes(x=Lambda, y=log10_prot_size))+
1452
  geom_point_rast(shape=1, stroke=0.1, size=0.25, alpha=0.25, raster.dpi=300)+
1453
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
1454
  facet_wrap(~IdentI)+
1455
  xlim(0,150)+
1456
  mytheme
1457
1458
thresh$Lambda <- thresh_tmp
1459
1460
```
1461
1462
## Kappa
1463
```{r}
1464
1465
thresh_tmp <- 20
1466
1467
df %>% 
1468
  ggplot(aes(x=Kappa, y=log10_prot_size))+
1469
  geom_point_rast(shape=1, stroke=0.1, size=0.25, alpha=0.25, raster.dpi=300)+
1470
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
1471
  facet_wrap(~IdentI)+
1472
  xlim(0,150)+
1473
  mytheme
1474
1475
thresh$Kappa <- thresh_tmp
1476
1477
```
1478
1479
## TIGIT
1480
```{r}
1481
1482
thresh_tmp <- 5
1483
1484
df %>% 
1485
  drop_na() %>%
1486
  ggplot(aes(x=TIGIT, y=log10_prot_size))+
1487
  geom_point_rast(shape=1, stroke=0.1, size=0.25, alpha=0.25, raster.dpi=300)+
1488
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
1489
  facet_wrap(~IdentI)+
1490
  xlim(0,50)+
1491
  mytheme
1492
1493
thresh$TIGIT <- thresh_tmp
1494
1495
```
1496
1497
## CD95
1498
```{r}
1499
1500
thresh_tmp <- 30
1501
1502
df %>% 
1503
  drop_na() %>%
1504
  ggplot(aes(x=CD95, y=log10_prot_size))+
1505
  geom_point_rast(shape=1, stroke=0.1, size=0.25, alpha=0.25, raster.dpi=300)+
1506
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
1507
  facet_wrap(~IdentI)+
1508
  xlim(0,150)+
1509
  mytheme
1510
1511
thresh$CD95 <- thresh_tmp
1512
1513
```
1514
1515
## Isotype mouse IgG1
1516
```{r}
1517
1518
thresh_tmp <- 10
1519
1520
df %>% 
1521
  drop_na() %>%
1522
  ggplot(aes(x=mouseIgG1, y=log10_prot_size))+
1523
  geom_point_rast(shape=1, stroke=0.1, size=0.25, alpha=0.25, raster.dpi=300)+
1524
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
1525
  facet_wrap(~IdentI)+
1526
  xlim(0,50)+
1527
  mytheme
1528
1529
thresh$mouseIgG1 <- thresh_tmp
1530
1531
```
1532
1533
## Isotype mouse IgG2a
1534
```{r}
1535
1536
thresh_tmp <- 10
1537
1538
df %>% 
1539
  drop_na() %>%
1540
  ggplot(aes(x=mouseIgG2a, y=log10_prot_size))+
1541
  geom_point_rast(shape=1, stroke=0.1, size=0.25, alpha=0.25, raster.dpi=300)+
1542
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
1543
  facet_wrap(~IdentI)+
1544
  xlim(0,50)+
1545
  mytheme
1546
1547
thresh$mouseIgG2a <- thresh_tmp
1548
1549
```
1550
1551
## Isotype mouse IgG2b
1552
```{r}
1553
1554
thresh_tmp <- 10
1555
1556
df %>% 
1557
  drop_na() %>%
1558
  ggplot(aes(x=mouseIgG2b, y=log10_prot_size))+
1559
  geom_point_rast(shape=1, stroke=0.1, size=0.25, alpha=0.25, raster.dpi=300)+
1560
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
1561
  facet_wrap(~IdentI)+
1562
  xlim(0,50)+
1563
  mytheme
1564
1565
thresh$mouseIgG2b <- thresh_tmp
1566
1567
```
1568
1569
## Isotype hamster IgG
1570
```{r}
1571
1572
thresh_tmp <- 10
1573
1574
df %>% 
1575
  drop_na() %>%
1576
  ggplot(aes(x=hamsterIgG, y=log10_prot_size))+
1577
  geom_point_rast(shape=1, stroke=0.1, size=0.25, alpha=0.25, raster.dpi=300)+
1578
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
1579
  facet_wrap(~IdentI)+
1580
  xlim(0,50)+
1581
  mytheme
1582
1583
thresh$hamsterIgG <- thresh_tmp
1584
1585
```
1586
1587
## Isotype rat IgG
1588
```{r}
1589
1590
thresh_tmp <- 10
1591
1592
df %>% 
1593
  drop_na() %>%
1594
  ggplot(aes(x=ratIgG2b, y=log10_prot_size))+
1595
  geom_point_rast(shape=1, stroke=0.1, size=0.25, alpha=0.25, raster.dpi=300)+
1596
  geom_vline(xintercept = thresh_tmp, size=0.25, linetype="dashed")+
1597
  facet_wrap(~IdentI)+
1598
  xlim(0,50)+
1599
  mytheme
1600
1601
thresh$ratIgG2b <- thresh_tmp
1602
1603
```
1604
1605
# Save thresholds
1606
```{r}
1607
1608
thresh <- data.frame(value=unlist(thresh)) %>% 
1609
  rownames_to_column("Epitope")
1610
1611
#write.csv(thresh, file = "data/threshholds_denProtein.csv")
1612
1613
```
1614
1615
# Session Info
1616
```{r}
1617
1618
sessionInfo()
1619
1620
```