-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCytobands.Rmd
770 lines (592 loc) · 27.8 KB
/
Cytobands.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
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
---
title: "Cytobands"
author: "Alicia Pliego"
output:
html_document:
toc: true
toc_float: true
toc_collapsed: true
toc_depth: 3
number_sections: true
theme: sandstone
---
<style>
body {
text-align: justify}
</style>
# Gene Level copy number file from TCGA
Downloading the Gene level Copy number files from TCGA, I computed CIN in the following way:
- gene CNV > 2.25 = Amp
- gene CNV < 1.75 = Del
```{r , echo=FALSE, warning=FALSE, message=FALSE}
library(chromoMap)
library(tidyverse)
library(heatmaply)
library(org.Hs.eg.db)
library(dplyr)
library(Matrix)
library(data.table)
```
```{r , echo=FALSE, warning=FALSE, message=FALSE}
## select() interface:
## Objects in this package can be accessed using the select() interface
## from the AnnotationDbi package. See ?select for details.
## Bimap interface:
x <- as.list(org.Hs.egMAP)
# Get the entrez gene identifiers that are mapped to any cytoband
mapped_genes <- mappedkeys(x)
# Convert to a list
xx <- as.list(x[mapped_genes])
```
```{r , echo=FALSE, warning=FALSE, message=FALSE}
# chromosome files
list_gene_names <- read.table("gene_level/gene_level_template.tsv",sep = "\t", header = TRUE)
```
```{r , echo=FALSE, warning=FALSE, message=FALSE}
list_gene_names$entrez <- mapIds(org.Hs.eg.db,
keys=list_gene_names$gene_name,
column="ENTREZID",
keytype="SYMBOL",
multiVals="first")
list_gene_names <- na.omit(list_gene_names)
```
```{r , echo=FALSE, warning=FALSE, message=FALSE}
list_gene_names_cyto <- xx[list_gene_names$entrez]
# Mapping -> converting the list to
# dataframe
list_gene_names_cyto <- t(sapply(list_gene_names_cyto,c))
list_gene_names_cyto <- t(list_gene_names_cyto)
#write.table(list_gene_names_cyto, "gene_level/cytoband_anno.tsv",sep = "\t", quote = FALSE)
list_gene_names_cyto_df <- read.table("gene_level/cytoband_anno.tsv", header = TRUE)
```
```{r , echo=FALSE, warning=FALSE, message=FALSE}
#list_gene_names_cyto_df$symbol <- mapIds(org.Hs.eg.db,
# keys=list_gene_names_cyto_df$entrez,
# column="SYMBOL",
# keytype="ENTREZID",
# multiVals="first")
list_gene_names_cyto_df <- na.omit(list_gene_names_cyto_df)
list_gene_names_cyto_df <- as.data.frame(list_gene_names_cyto_df)
#write.table(list_gene_names_cyto_df, "gene_level/cytoband_anno.tsv",sep = "\t", quote = FALSE)
```
I have mapped cytobands to gene entrez ids using org.Hs.egMAP and using the cytobands I extract the gene level CIN which will be added at cytoband level for all the genes in that cytoband across all the different cases that we have from TCGA-SARC
Plots:
1- Overall boxplots: for each chromosome all the cytoband CIN per sarcoma type
1b - Overall heatmap: for each chromosome a heatmap with all the CIN per cytobands and annotation on the side for each sarcoma type
2- HRD boxplots: The same as before but separating HRDhigh/low
2b - is there any cytoband differentially expressed between HRD/low groups in particular?
3- Make enrichment in those cytobands :)
```{r , echo=FALSE, warning=FALSE, message=FALSE}
cyto_chr1 <- read.table('/Users/aliciapliego/Projects/HRDsarcoma/gene_level/cytobands_chr1.tsv', sep = '\t', header = TRUE)
cyto_chr2 <- read.table('/Users/aliciapliego/Projects/HRDsarcoma/gene_level/cytobands_chr2.tsv', sep = '\t', header = TRUE)
cyto_chr3 <- read.table('/Users/aliciapliego/Projects/HRDsarcoma/gene_level/cytobands_chr3.tsv', sep = '\t', header = TRUE)
cyto_chr4 <- read.table('/Users/aliciapliego/Projects/HRDsarcoma/gene_level/cytobands_chr4.tsv', sep = '\t', header = TRUE)
cyto_chr5 <- read.table('/Users/aliciapliego/Projects/HRDsarcoma/gene_level/cytobands_chr5.tsv', sep = '\t', header = TRUE)
cyto_chr6 <- read.table('/Users/aliciapliego/Projects/HRDsarcoma/gene_level/cytobands_chr6.tsv', sep = '\t', header = TRUE)
cyto_chr7 <- read.table('/Users/aliciapliego/Projects/HRDsarcoma/gene_level/cytobands_chr7.tsv', sep = '\t', header = TRUE)
cyto_chr8 <- read.table('/Users/aliciapliego/Projects/HRDsarcoma/gene_level/cytobands_chr8.tsv', sep = '\t', header = TRUE)
cyto_chr9 <- read.table('/Users/aliciapliego/Projects/HRDsarcoma/gene_level/cytobands_chr9.tsv', sep = '\t', header = TRUE)
cyto_chr10 <- read.table('/Users/aliciapliego/Projects/HRDsarcoma/gene_level/cytobands_chr10.tsv', sep = '\t', header = TRUE)
cyto_chr11 <- read.table('/Users/aliciapliego/Projects/HRDsarcoma/gene_level/cytobands_chr11.tsv', sep = '\t', header = TRUE)
cyto_chr12 <- read.table('/Users/aliciapliego/Projects/HRDsarcoma/gene_level/cytobands_chr12.tsv', sep = '\t', header = TRUE)
cyto_chr13 <- read.table('/Users/aliciapliego/Projects/HRDsarcoma/gene_level/cytobands_chr13.tsv', sep = '\t', header = TRUE)
cyto_chr14 <- read.table('/Users/aliciapliego/Projects/HRDsarcoma/gene_level/cytobands_chr14.tsv', sep = '\t', header = TRUE)
cyto_chr15 <- read.table('/Users/aliciapliego/Projects/HRDsarcoma/gene_level/cytobands_chr15.tsv', sep = '\t', header = TRUE)
cyto_chr16 <- read.table('/Users/aliciapliego/Projects/HRDsarcoma/gene_level/cytobands_chr16.tsv', sep = '\t', header = TRUE)
cyto_chr17 <- read.table('/Users/aliciapliego/Projects/HRDsarcoma/gene_level/cytobands_chr17.tsv', sep = '\t', header = TRUE)
cyto_chr18 <- read.table('/Users/aliciapliego/Projects/HRDsarcoma/gene_level/cytobands_chr18.tsv', sep = '\t', header = TRUE)
cyto_chr19 <- read.table('/Users/aliciapliego/Projects/HRDsarcoma/gene_level/cytobands_chr19.tsv', sep = '\t', header = TRUE)
cyto_chr20 <- read.table('/Users/aliciapliego/Projects/HRDsarcoma/gene_level/cytobands_chr20.tsv', sep = '\t', header = TRUE)
cyto_chr21 <- read.table('/Users/aliciapliego/Projects/HRDsarcoma/gene_level/cytobands_chr21.tsv', sep = '\t', header = TRUE)
cyto_chr22 <- read.table('/Users/aliciapliego/Projects/HRDsarcoma/gene_level/cytobands_chr22.tsv', sep = '\t', header = TRUE)
```
```{r , echo=FALSE, warning=FALSE, message=FALSE}
gene_level_anno <- read.table('/Users/aliciapliego/Projects/HRDsarcoma/gene_level/HRDgenes_gene_level_meta.tsv', sep = '\t', header = TRUE)
row.names(gene_level_anno) <- gene_level_anno$Case_ID
```
## Chromosome 1 Cytobands
```{r , echo=FALSE, warning=FALSE, message=FALSE}
rownames(cyto_chr1) <- cyto_chr1$Case_ID
cyto_chr1$Case_ID <-NULL
cyto_chr1_scaled <- scale(cyto_chr1)
z_scores_chr1 <- (data-mean(cyto_chr1))/sd(cyto_chr1)
```
```{r, echo=FALSE, warning=FALSE, message=FALSE, fig.width= 30, fig.height = 7, fig.align='center'}
cyto_chr1_bp <- read.table('/Users/aliciapliego/Projects/HRDsarcoma/gene_level/cytobands_chr1_bp.tsv', sep = '\t', header = TRUE)
fig <- plot_ly(cyto_chr1_bp,x =~cytoband, y = ~CN, color = ~Type, type = "box", notched=TRUE) %>%
layout(boxmode = "group",
yaxis = list(range=c(0,2000)))
fig
```
```{r, echo=FALSE, warning=FALSE, message=FALSE, fig.width= 20, fig.height = 7, fig.align='center'}
fig <- plot_ly(cyto_chr1_bp,x =~cytoband, y = ~CN, color = ~HRD34, type = "box", notched=TRUE) %>%
layout(boxmode = "group",
yaxis = list(range=c(0,2000)))
fig
```
## Chromosome 2 Cytobands
```{r , echo=FALSE, warning=FALSE, message=FALSE}
rownames(cyto_chr2) <- cyto_chr2$Case_ID
cyto_chr2$Case_ID <-NULL
cyto_chr2_scaled <- scale(cyto_chr2)
```
```{r, echo=FALSE, warning=FALSE, message=FALSE, fig.width= 30, fig.height = 7, fig.align='center'}
cyto_chr2_bp <- read.table('/Users/aliciapliego/Projects/HRDsarcoma/gene_level/cytobands_chr2_bp.tsv', sep = '\t', header = TRUE)
fig <- plot_ly(cyto_chr2_bp,x =~cytoband, y = ~CN, color = ~Type, type = "box", notched=TRUE) %>%
layout(boxmode = "group",
yaxis = list(range=c(0,2000)))
fig
```
```{r, echo=FALSE, warning=FALSE, message=FALSE, fig.width= 20, fig.height = 7, fig.align='center'}
fig <- plot_ly(cyto_chr2_bp,x =~cytoband, y = ~CN, color = ~HRD34, type = "box", notched=TRUE) %>%
layout(boxmode = "group",
yaxis = list(range=c(0,35)))
fig
```
## Chromosome 3 Cytobands
```{r , echo=FALSE, warning=FALSE, message=FALSE}
rownames(cyto_chr3) <- cyto_chr3$Case_ID
cyto_chr3$Case_ID <-NULL
cyto_chr3_scaled <- scale(cyto_chr3)
```
```{r, echo=FALSE, warning=FALSE, message=FALSE, fig.width= 30, fig.height = 7, fig.align='center'}
cyto_chr3_bp <- read.table('/Users/aliciapliego/Projects/HRDsarcoma/gene_level/cytobands_chr3_bp.tsv', sep = '\t', header = TRUE)
fig <- plot_ly(cyto_chr3_bp,x =~cytoband, y = ~CN, color = ~Type, type = "box", notched=TRUE) %>%
layout(boxmode = "group",
yaxis = list(range=c(0,35)))
fig
```
```{r, echo=FALSE, warning=FALSE, message=FALSE, fig.width= 20, fig.height = 7, fig.align='center'}
fig <- plot_ly(cyto_chr3_bp,x =~cytoband, y = ~CN, color = ~HRD34, type = "box", notched=TRUE) %>%
layout(boxmode = "group",
yaxis = list(range=c(0,35)))
fig
```
## Chromosome 4 Cytobands
```{r , echo=FALSE, warning=FALSE, message=FALSE}
rownames(cyto_chr4) <- cyto_chr4$Case_ID
cyto_chr4$Case_ID <-NULL
cyto_chr4_scaled <- scale(cyto_chr4)
```
```{r, echo=FALSE, warning=FALSE, message=FALSE, fig.width= 30, fig.height = 7, fig.align='center'}
cyto_chr4_bp <- read.table('/Users/aliciapliego/Projects/HRDsarcoma/gene_level/cytobands_chr4_bp.tsv', sep = '\t', header = TRUE)
fig <- plot_ly(cyto_chr4_bp,x =~cytoband, y = ~CN, color = ~Type, type = "box", notched=TRUE) %>%
layout(boxmode = "group",
yaxis = list(range=c(0,35)))
fig
```
```{r, echo=FALSE, warning=FALSE, message=FALSE, fig.width= 20, fig.height = 7, fig.align='center'}
fig <- plot_ly(cyto_chr4_bp,x =~cytoband, y = ~CN, color = ~HRD34, type = "box", notched=TRUE) %>%
layout(boxmode = "group",
yaxis = list(range=c(0,35)))
fig
```
## Chromosome 5 Cytobands
```{r , echo=FALSE, warning=FALSE, message=FALSE}
rownames(cyto_chr5) <- cyto_chr5$Case_ID
cyto_chr5$Case_ID <-NULL
cyto_chr5_scaled <- scale(cyto_chr5)
```
```{r, echo=FALSE, warning=FALSE, message=FALSE, fig.width= 30, fig.height = 7, fig.align='center'}
cyto_chr5_bp <- read.table('/Users/aliciapliego/Projects/HRDsarcoma/gene_level/cytobands_chr5_bp.tsv', sep = '\t', header = TRUE)
fig <- plot_ly(cyto_chr5_bp,x =~cytoband, y = ~CN, color = ~Type, type = "box", notched=TRUE) %>%
layout(boxmode = "group",
yaxis = list(range=c(0,35)))
fig
```
```{r, echo=FALSE, warning=FALSE, message=FALSE, fig.width= 20, fig.height = 7, fig.align='center'}
fig <- plot_ly(cyto_chr5_bp,x =~cytoband, y = ~CN, color = ~HRD34, type = "box", notched=TRUE) %>%
layout(boxmode = "group",
yaxis = list(range=c(0,35)))
fig
```
## Chromosome 6 Cytobands
```{r , echo=FALSE, warning=FALSE, message=FALSE}
rownames(cyto_chr6) <- cyto_chr6$Case_ID
cyto_chr6$Case_ID <-NULL
cyto_chr6_scaled <- scale(cyto_chr6)
```
```{r, echo=FALSE, warning=FALSE, message=FALSE, fig.width= 30, fig.height = 7, fig.align='center'}
cyto_chr6_bp <- read.table('/Users/aliciapliego/Projects/HRDsarcoma/gene_level/cytobands_chr6_bp.tsv', sep = '\t', header = TRUE)
fig <- plot_ly(cyto_chr6_bp,x =~cytoband, y = ~CN, color = ~Type, type = "box", notched=TRUE) %>%
layout(boxmode = "group",
yaxis = list(range=c(0,35)))
fig
```
```{r, echo=FALSE, warning=FALSE, message=FALSE, fig.width= 20, fig.height = 7, fig.align='center'}
fig <- plot_ly(cyto_chr6_bp,x =~cytoband, y = ~CN, color = ~HRD34, type = "box", notched=TRUE) %>%
layout(boxmode = "group",
yaxis = list(range=c(0,35)))
fig
```
## Chromosome 7 Cytobands
```{r , echo=FALSE, warning=FALSE, message=FALSE}
rownames(cyto_chr7) <- cyto_chr7$Case_ID
cyto_chr7$Case_ID <-NULL
cyto_chr7_scaled <- scale(cyto_chr7)
```
```{r, echo=FALSE, warning=FALSE, message=FALSE, fig.width= 30, fig.height = 7, fig.align='center'}
cyto_chr7_bp <- read.table('/Users/aliciapliego/Projects/HRDsarcoma/gene_level/cytobands_chr7_bp.tsv', sep = '\t', header = TRUE)
fig <- plot_ly(cyto_chr7_bp,x =~cytoband, y = ~CN, color = ~Type, type = "box", notched=TRUE) %>%
layout(boxmode = "group",
yaxis = list(range=c(0,35)))
fig
```
```{r, echo=FALSE, warning=FALSE, message=FALSE, fig.width= 20, fig.height = 7, fig.align='center'}
fig <- plot_ly(cyto_chr7_bp,x =~cytoband, y = ~CN, color = ~HRD34, type = "box", notched=TRUE) %>%
layout(boxmode = "group",
yaxis = list(range=c(0,35)))
fig
```
## Chromosome 8 Cytobands
```{r , echo=FALSE, warning=FALSE, message=FALSE}
rownames(cyto_chr8) <- cyto_chr8$Case_ID
cyto_chr8$Case_ID <-NULL
cyto_chr8_scaled <- scale(cyto_chr8)
```
```{r, echo=FALSE, warning=FALSE, message=FALSE, fig.width= 30, fig.height = 7, fig.align='center'}
cyto_chr8_bp <- read.table('/Users/aliciapliego/Projects/HRDsarcoma/gene_level/cytobands_chr8_bp.tsv', sep = '\t', header = TRUE)
fig <- plot_ly(cyto_chr8_bp,x =~cytoband, y = ~CN, color = ~Type, type = "box", notched=TRUE) %>%
layout(boxmode = "group",
yaxis = list(range=c(0,35)))
fig
```
```{r, echo=FALSE, warning=FALSE, message=FALSE, fig.width= 20, fig.height = 7, fig.align='center'}
fig <- plot_ly(cyto_chr8_bp,x =~cytoband, y = ~CN, color = ~HRD34, type = "box", notched=TRUE) %>%
layout(boxmode = "group",
yaxis = list(range=c(0,35)))
fig
```
## Chromosome 9 Cytobands
```{r , echo=FALSE, warning=FALSE, message=FALSE}
rownames(cyto_chr9) <- cyto_chr9$Case_ID
cyto_chr9$Case_ID <-NULL
cyto_chr9_scaled <- scale(cyto_chr9)
```
```{r, echo=FALSE, warning=FALSE, message=FALSE, fig.width= 30, fig.height = 7, fig.align='center'}
cyto_chr9_bp <- read.table('/Users/aliciapliego/Projects/HRDsarcoma/gene_level/cytobands_chr9_bp.tsv', sep = '\t', header = TRUE)
fig <- plot_ly(cyto_chr9_bp,x =~cytoband, y = ~CN, color = ~Type, type = "box", notched=TRUE) %>%
layout(boxmode = "group",
yaxis = list(range=c(0,35)))
fig
```
```{r, echo=FALSE, warning=FALSE, message=FALSE, fig.width= 20, fig.height = 7, fig.align='center'}
fig <- plot_ly(cyto_chr9_bp,x =~cytoband, y = ~CN, color = ~HRD34, type = "box", notched=TRUE) %>%
layout(boxmode = "group",
yaxis = list(range=c(0,35)))
fig
```
## Chromosome 10 Cytobands
```{r , echo=FALSE, warning=FALSE, message=FALSE}
rownames(cyto_chr10) <- cyto_chr10$Case_ID
cyto_chr10$Case_ID <-NULL
cyto_chr10_scaled <- scale(cyto_chr10)
```
```{r, echo=FALSE, warning=FALSE, message=FALSE, fig.width= 30, fig.height = 7, fig.align='center'}
cyto_chr10_bp <- read.table('/Users/aliciapliego/Projects/HRDsarcoma/gene_level/cytobands_chr10_bp.tsv', sep = '\t', header = TRUE)
fig <- plot_ly(cyto_chr10_bp,x =~cytoband, y = ~CN, color = ~Type, type = "box", notched=TRUE) %>%
layout(boxmode = "group",
yaxis = list(range=c(0,35)))
fig
```
```{r, echo=FALSE, warning=FALSE, message=FALSE, fig.width= 20, fig.height = 7, fig.align='center'}
fig <- plot_ly(cyto_chr10_bp,x =~cytoband, y = ~CN, color = ~HRD34, type = "box", notched=TRUE) %>%
layout(boxmode = "group",
yaxis = list(range=c(0,35)))
fig
```
## Chromosome 11 Cytobands
```{r , echo=FALSE, warning=FALSE, message=FALSE}
rownames(cyto_chr11) <- cyto_chr11$Case_ID
cyto_chr11$Case_ID <-NULL
cyto_chr11_scaled <- scale(cyto_chr11)
```
```{r, echo=FALSE, warning=FALSE, message=FALSE, fig.width= 30, fig.height = 7, fig.align='center'}
cyto_chr11_bp <- read.table('/Users/aliciapliego/Projects/HRDsarcoma/gene_level/cytobands_chr11_bp.tsv', sep = '\t', header = TRUE)
fig <- plot_ly(cyto_chr11_bp,x =~cytoband, y = ~CN, color = ~Type, type = "box", notched=TRUE) %>%
layout(boxmode = "group",
yaxis = list(range=c(0,35)))
fig
```
```{r, echo=FALSE, warning=FALSE, message=FALSE, fig.width= 20, fig.height = 7, fig.align='center'}
fig <- plot_ly(cyto_chr11_bp,x =~cytoband, y = ~CN, color = ~HRD34, type = "box", notched=TRUE) %>%
layout(boxmode = "group",
yaxis = list(range=c(0,35)))
fig
```
## Chromosome 12 Cytobands
```{r , echo=FALSE, warning=FALSE, message=FALSE}
rownames(cyto_chr12) <- cyto_chr12$Case_ID
cyto_chr12$Case_ID <-NULL
cyto_chr12_scaled <- scale(cyto_chr12)
```
```{r, echo=FALSE, warning=FALSE, message=FALSE, fig.width= 30, fig.height = 7, fig.align='center'}
cyto_chr12_bp <- read.table('/Users/aliciapliego/Projects/HRDsarcoma/gene_level/cytobands_chr12_bp.tsv', sep = '\t', header = TRUE)
fig <- plot_ly(cyto_chr12_bp,x =~cytoband, y = ~CN, color = ~Type, type = "box", notched=TRUE) %>%
layout(boxmode = "group",
yaxis = list(range=c(0,35)))
fig
```
```{r, echo=FALSE, warning=FALSE, message=FALSE, fig.width= 20, fig.height = 7, fig.align='center'}
fig <- plot_ly(cyto_chr12_bp,x =~cytoband, y = ~CN, color = ~HRD34, type = "box", notched=TRUE) %>%
layout(boxmode = "group",
yaxis = list(range=c(0,35)))
fig
```
## Chromosome 13 Cytobands
```{r , echo=FALSE, warning=FALSE, message=FALSE}
rownames(cyto_chr13) <- cyto_chr13$Case_ID
cyto_chr13$Case_ID <-NULL
cyto_chr13_scaled <- scale(cyto_chr13)
```
```{r, echo=FALSE, warning=FALSE, message=FALSE, fig.width= 30, fig.height = 7, fig.align='center'}
cyto_chr13_bp <- read.table('/Users/aliciapliego/Projects/HRDsarcoma/gene_level/cytobands_chr13_bp.tsv', sep = '\t', header = TRUE)
fig <- plot_ly(cyto_chr13_bp,x =~cytoband, y = ~CN, color = ~Type, type = "box", notched=TRUE) %>%
layout(boxmode = "group",
yaxis = list(range=c(0,35)))
fig
```
```{r, echo=FALSE, warning=FALSE, message=FALSE, fig.width= 20, fig.height = 7, fig.align='center'}
fig <- plot_ly(cyto_chr13_bp,x =~cytoband, y = ~CN, color = ~HRD34, type = "box", notched=TRUE) %>%
layout(boxmode = "group",
yaxis = list(range=c(0,35)))
fig
```
## Chromosome 14 Cytobands
```{r , echo=FALSE, warning=FALSE, message=FALSE}
rownames(cyto_chr14) <- cyto_chr14$Case_ID
cyto_chr14$Case_ID <-NULL
cyto_chr14_scaled <- scale(cyto_chr14)
```
```{r, echo=FALSE, warning=FALSE, message=FALSE, fig.width= 30, fig.height = 7, fig.align='center'}
cyto_chr14_bp <- read.table('/Users/aliciapliego/Projects/HRDsarcoma/gene_level/cytobands_chr14_bp.tsv', sep = '\t', header = TRUE)
fig <- plot_ly(cyto_chr14_bp,x =~cytoband, y = ~CN, color = ~Type, type = "box", notched=TRUE) %>%
layout(boxmode = "group",
yaxis = list(range=c(0,35)))
fig
```
```{r, echo=FALSE, warning=FALSE, message=FALSE, fig.width= 20, fig.height = 7, fig.align='center'}
fig <- plot_ly(cyto_chr14_bp,x =~cytoband, y = ~CN, color = ~HRD34, type = "box", notched=TRUE) %>%
layout(boxmode = "group",
yaxis = list(range=c(0,35)))
fig
```
## Chromosome 15 Cytobands
```{r , echo=FALSE, warning=FALSE, message=FALSE}
rownames(cyto_chr15) <- cyto_chr15$Case_ID
cyto_chr15$Case_ID <-NULL
cyto_chr15_scaled <- scale(cyto_chr15)
```
```{r, echo=FALSE, warning=FALSE, message=FALSE, fig.width= 30, fig.height = 7, fig.align='center'}
cyto_chr15_bp <- read.table('/Users/aliciapliego/Projects/HRDsarcoma/gene_level/cytobands_chr15_bp.tsv', sep = '\t', header = TRUE)
fig <- plot_ly(cyto_chr15_bp,x =~cytoband, y = ~CN, color = ~Type, type = "box", notched=TRUE) %>%
layout(boxmode = "group",
yaxis = list(range=c(0,35)))
fig
```
```{r, echo=FALSE, warning=FALSE, message=FALSE, fig.width= 20, fig.height = 7, fig.align='center'}
fig <- plot_ly(cyto_chr15_bp,x =~cytoband, y = ~CN, color = ~HRD34, type = "box", notched=TRUE) %>%
layout(boxmode = "group",
yaxis = list(range=c(0,35)))
fig
```
## Chromosome 16 Cytobands
```{r , echo=FALSE, warning=FALSE, message=FALSE}
rownames(cyto_chr16) <- cyto_chr16$Case_ID
cyto_chr16$Case_ID <-NULL
cyto_chr16_scaled <- scale(cyto_chr16)
```
```{r, echo=FALSE, warning=FALSE, message=FALSE, fig.width= 30, fig.height = 7, fig.align='center'}
cyto_chr16_bp <- read.table('/Users/aliciapliego/Projects/HRDsarcoma/gene_level/cytobands_chr16_bp.tsv', sep = '\t', header = TRUE)
fig <- plot_ly(cyto_chr16_bp,x =~cytoband, y = ~CN, color = ~Type, type = "box", notched=TRUE) %>%
layout(boxmode = "group",
yaxis = list(range=c(0,35)))
fig
```
```{r, echo=FALSE, warning=FALSE, message=FALSE, fig.width= 20, fig.height = 7, fig.align='center'}
fig <- plot_ly(cyto_chr16_bp,x =~cytoband, y = ~CN, color = ~HRD34, type = "box", notched=TRUE) %>%
layout(boxmode = "group",
yaxis = list(range=c(0,35)))
fig
```
## Chromosome 17 Cytobands
```{r , echo=FALSE, warning=FALSE, message=FALSE}
rownames(cyto_chr17) <- cyto_chr17$Case_ID
cyto_chr17$Case_ID <-NULL
cyto_chr17_scaled <- scale(cyto_chr17)
```
```{r, echo=FALSE, warning=FALSE, message=FALSE, fig.width= 30, fig.height = 7, fig.align='center'}
cyto_chr17_bp <- read.table('/Users/aliciapliego/Projects/HRDsarcoma/gene_level/cytobands_chr17_bp.tsv', sep = '\t', header = TRUE)
fig <- plot_ly(cyto_chr17_bp,x =~cytoband, y = ~CN, color = ~Type, type = "box", notched=TRUE) %>%
layout(boxmode = "group",
yaxis = list(range=c(0,35)))
fig
```
```{r, echo=FALSE, warning=FALSE, message=FALSE, fig.width= 20, fig.height = 7, fig.align='center'}
fig <- plot_ly(cyto_chr17_bp,x =~cytoband, y = ~CN, color = ~HRD34, type = "box", notched=TRUE) %>%
layout(boxmode = "group",
yaxis = list(range=c(0,35)))
fig
```
## Chromosome 18 Cytobands
```{r , echo=FALSE, warning=FALSE, message=FALSE}
rownames(cyto_chr18) <- cyto_chr18$Case_ID
cyto_chr18$Case_ID <-NULL
cyto_chr18_scaled <- scale(cyto_chr18)
```
```{r, echo=FALSE, warning=FALSE, message=FALSE, fig.width= 30, fig.height = 7, fig.align='center'}
cyto_chr18_bp <- read.table('/Users/aliciapliego/Projects/HRDsarcoma/gene_level/cytobands_chr18_bp.tsv', sep = '\t', header = TRUE)
fig <- plot_ly(cyto_chr18_bp,x =~cytoband, y = ~CN, color = ~Type, type = "box", notched=TRUE) %>%
layout(boxmode = "group",
yaxis = list(range=c(0,35)))
fig
```
```{r, echo=FALSE, warning=FALSE, message=FALSE, fig.width= 20, fig.height = 7, fig.align='center'}
fig <- plot_ly(cyto_chr18_bp,x =~cytoband, y = ~CN, color = ~HRD34, type = "box", notched=TRUE) %>%
layout(boxmode = "group",
yaxis = list(range=c(0,35)))
fig
```
## Chromosome 19 Cytobands
```{r , echo=FALSE, warning=FALSE, message=FALSE}
rownames(cyto_chr19) <- cyto_chr19$Case_ID
cyto_chr19$Case_ID <-NULL
cyto_chr19_scaled <- scale(cyto_chr19)
```
```{r, echo=FALSE, warning=FALSE, message=FALSE, fig.width= 30, fig.height = 7, fig.align='center'}
cyto_chr19_bp <- read.table('/Users/aliciapliego/Projects/HRDsarcoma/gene_level/cytobands_chr19_bp.tsv', sep = '\t', header = TRUE)
fig <- plot_ly(cyto_chr19_bp,x =~cytoband, y = ~CN, color = ~Type, type = "box", notched=TRUE) %>%
layout(boxmode = "group",
yaxis = list(range=c(0,35)))
fig
```
```{r, echo=FALSE, warning=FALSE, message=FALSE, fig.width= 20, fig.height = 7, fig.align='center'}
fig <- plot_ly(cyto_chr19_bp,x =~cytoband, y = ~CN, color = ~HRD34, type = "box", notched=TRUE) %>%
layout(boxmode = "group",
yaxis = list(range=c(0,35)))
fig
```
## Chromosome 20 Cytobands
```{r , echo=FALSE, warning=FALSE, message=FALSE}
rownames(cyto_chr20) <- cyto_chr20$Case_ID
cyto_chr20$Case_ID <-NULL
cyto_chr20_scaled <- scale(cyto_chr20)
```
```{r, echo=FALSE, warning=FALSE, message=FALSE, fig.width= 30, fig.height = 7, fig.align='center'}
cyto_chr20_bp <- read.table('/Users/aliciapliego/Projects/HRDsarcoma/gene_level/cytobands_chr20_bp.tsv', sep = '\t', header = TRUE)
fig <- plot_ly(cyto_chr20_bp,x =~cytoband, y = ~CN, color = ~Type, type = "box", notched=TRUE) %>%
layout(boxmode = "group",
yaxis = list(range=c(0,35)))
fig
```
```{r, echo=FALSE, warning=FALSE, message=FALSE, fig.width= 20, fig.height = 7, fig.align='center'}
fig <- plot_ly(cyto_chr20_bp,x =~cytoband, y = ~CN, color = ~HRD34, type = "box", notched=TRUE) %>%
layout(boxmode = "group",
yaxis = list(range=c(0,35)))
fig
```
## Chromosome 21 Cytobands
```{r , echo=FALSE, warning=FALSE, message=FALSE}
rownames(cyto_chr21) <- cyto_chr21$Case_ID
cyto_chr21$Case_ID <-NULL
cyto_chr21_scaled <- scale(cyto_chr21)
```
```{r, echo=FALSE, warning=FALSE, message=FALSE, fig.width= 30, fig.height = 7, fig.align='center'}
cyto_chr21_bp <- read.table('/Users/aliciapliego/Projects/HRDsarcoma/gene_level/cytobands_chr21_bp.tsv', sep = '\t', header = TRUE)
fig <- plot_ly(cyto_chr21_bp,x =~cytoband, y = ~CN, color = ~Type, type = "box", notched=TRUE) %>%
layout(boxmode = "group",
yaxis = list(range=c(0,35)))
fig
```
```{r, echo=FALSE, warning=FALSE, message=FALSE, fig.width= 20, fig.height = 7, fig.align='center'}
fig <- plot_ly(cyto_chr21_bp,x =~cytoband, y = ~CN, color = ~HRD34, type = "box", notched=TRUE) %>%
layout(boxmode = "group",
yaxis = list(range=c(0,35)))
fig
```
## Chromosome 22 Cytobands
```{r , echo=FALSE, warning=FALSE, message=FALSE}
rownames(cyto_chr22) <- cyto_chr22$Case_ID
cyto_chr22$Case_ID <-NULL
cyto_chr22_scaled <- scale(cyto_chr22)
```
```{r, echo=FALSE, warning=FALSE, message=FALSE, fig.width= 30, fig.height = 7, fig.align='center'}
cyto_chr22_bp <- read.table('/Users/aliciapliego/Projects/HRDsarcoma/gene_level/cytobands_chr22_bp.tsv', sep = '\t', header = TRUE)
fig <- plot_ly(cyto_chr22_bp,x =~cytoband, y = ~CN, color = ~Type, type = "box", notched=TRUE) %>%
layout(boxmode = "group",
yaxis = list(range=c(0,35)))
fig
```
```{r, echo=FALSE, warning=FALSE, message=FALSE, fig.width= 20, fig.height = 7, fig.align='center'}
fig <- plot_ly(cyto_chr22_bp,x =~cytoband, y = ~CN, color = ~HRD34, type = "box", notched=TRUE) %>%
layout(boxmode = "group",
yaxis = list(range=c(0,35)))
fig
```
T -test of cytobands in python pval < 0.01
* Chromosome 1:
- ddLPS 2p11.1 6.978914699947862e-05
- ddLPS 2p11.2 0.0009328203594964292
- ddLPS 2q11.1 0.0003306106662498429
- ddLPS 2q11.2 0.0007483821759446633
- ddLPS 2q11.2-q12.1 0.0008703008338573793
- ddLPS 2q12-q14 0.004288188013925764
- ddLPS 2q12.1 0.0010700572210934063
- ddLPS 2q12.1-q12.2 0.0015421657073293685
- ddLPS 2q12.2 0.0010208739707162464
- ddLPS 2q12.3 0.0010315552453219951
- ddLPS 2q13 0.0021797548258337828
- ddLPS 2q13-q14.1 0.004288188013925764
- ddLPS 2q14.1 0.006122195261664565
- ddLPS 2q14.1-q14.2 0.0049770919257404525
- ddLPS 2q21.2 0.009925282742590597
- LMS 2p11.1 0.0030093585067312214
- LMS 2q11.1 0.0009351673246347108
- LMS 2q11.2 0.0010391549785624679
- LMS 2q14.2-q14.3 0.00864557480824809
- uLMS 2p14 0.008471017648941986
- uLMS 2p15 0.003009416227452064
- uLMS 2p15-p14 0.0072849500425245595
- uLMS 2p16.1 0.004216181947663537
- uLMS 2p16.1-p15 0.0037613261075078942
- uLMS 2q11.1 0.0016958778150337173
- uLMS 2q11.2 0.006741728286083317
- uLMS 2q12-q14 0.0031034299247518155
- uLMS 2q12.2 0.007912738358005785
- uLMS 2q14.1 0.00422135953924269
* Chromosome 2:
## ------------------- ChromoMAP -----------------------##
```{r , echo=FALSE, warning=FALSE, message=FALSE}
# chromosome files
chr_file_1 = read.table("/Users/aliciapliego/Projects/HRDsarcoma/chromoMap/chr_anno.tsv",sep = "\t")
# annotation files
anno_file_1 = read.table("/Users/aliciapliego/Projects/HRDsarcoma/chromoMap/gene_level1.tsv",sep = "\t")
```
```{r , echo=FALSE, warning=FALSE, message=FALSE}
# passing data.frames directly instead of files
chromoMap(list(chr_file_1),list(anno_file_1))
```
```{r , echo=FALSE, warning=FALSE, message=FALSE}
chromoMap("/Users/aliciapliego/Projects/HRDsarcoma/chromoMap/chr_anno.tsv","/Users/aliciapliego/Projects/HRDsarcoma/chromoMap/gene_level1.tsv",
data_based_color_map = T,
data_type = "numeric",
plots = "bar",
data_colors = list(c("orange","yellow")))
```
```{r , echo=FALSE, warning=FALSE, message=FALSE}
cindex_gene_level_cnv <- read.table('/Users/aliciapliego/Projects/HRDsarcoma/data/HRDgenes_all_gene_level.tsv', sep = '\t', header = TRUE)
cindex_gene_level_cnv <- unique(cindex_gene_level_cnv)
rownames(cindex_gene_level_cnv) <- cindex_gene_level_cnv$Case_ID
cindex_gene_level_cnv$Case_ID <- NULL
cindex_gene_level_meta <- read.table('/Users/aliciapliego/Projects/HRDsarcoma/data/HRDgenes_all_gene_level_meta.tsv', sep = '\t', header = TRUE)
cindex_gene_level_meta$X <- NULL
cindex_gene_level_meta <- cindex_gene_level_meta[cindex_gene_level_meta$Case_ID %in% rownames(cindex_gene_level_cnv),]
```
```{r , echo=FALSE, warning=FALSE, message=FALSE}
cindex_gene_level_cnv_t <- t(cindex_gene_level_cnv)
cindex_gene_level_cnv_t$entrez <- mapIds(org.Hs.eg.db,
keys=rownames(cindex_gene_level_cnv_t),
column="ENSEMBL",
keytype="SYMBOL",
multiVals="first")
```