-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathTP53_co-occurrence.Rnw
More file actions
36 lines (30 loc) · 1.22 KB
/
TP53_co-occurrence.Rnw
File metadata and controls
36 lines (30 loc) · 1.22 KB
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
<<setup_tp53, include=FALSE>>=
io = import('io')
ar = import('array')
df = import('data_frame')
st = import('stats')
tcga = import('data/tcga')
util = import('./util_2')
# define the genes we're interested in
genes_mut = c("TP53")
genes_cna = c("TP53_del", "TP53_amp", "MYC_amp", "RAD21_amp", "NDRG1_amp", "PABPC1_amp", "GATA3_amp", "SOX17_amp")
# load tcga scores for p53
p53 = io$load('../scores/tcga/pathways_mapped/speed_matrix.RData')[,'p53',drop=FALSE]
# load mutation status for the genes
path = '../analyses/tcga_mutation'
mut = io$load(file.path(path, 'mut_driver_matrix.RData'))[,genes_mut,drop=FALSE]
cna = io$load(file.path(path, 'cna_driver_matrix.RData'))[,genes_cna,drop=FALSE]
data = ar$stack(list(mut, cna), along=2)
TP53 = data[,"TP53"]
TP53_del = data[,"TP53_del"]
TP53_amp = data[,"TP53_amp"]
others = data[,!grepl("TP53", colnames(data))]
ar$intersect(p53, TP53, TP53_del, TP53_amp, data, others, along=1)
study = tcga$barcode2study(rownames(others))
# all TP53 mods are required as covariates to reach
# p>0.4 for MYC, RAD21, NDRG1, and PABPC1
assocs = st$lm(p53 ~ study + TP53 + TP53_del + TP53_amp + others) %>%
filter(term == "others") %>%
select(-term, -p53) %>%
mutate(adj.p = p.adjust(p.value, method="fdr"))
@