/
decayAndStability.Rmd
308 lines (203 loc) · 8.19 KB
/
decayAndStability.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
---
title: "Decay and stability"
author: "Briana Mittleman"
date: "1/30/2020"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
```{r}
library(workflowr)
library(tidyverse)
```
In this analysis I want to look as both decay and stability elements. I can see if there are overlaps with apaQTLs of the differentially used between total and nuclear.
##NMD
Colombo et al. looked at transcriptome wide identification of NMD-targeted transcripts, in https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5238794/pdf/189.pdf.
Supplemental table 2 has a list of differentailly expressed genes. They say top 1000 are the most significant. This analysis is in hela cells. The meta_meta column has the pvalues used for the final analysis. It is from a combind score from the SMGs and UPF1 data.
Nguyen et al. - Similar analysis in LCLs but from individuals with intelectual disability. The knock down experiment is in hela cells. table 1 has similar studies that used micro arrays
I will use the Colombo set because it is the most recent and comprehensive. This study used RNA seq rather than arrays.
```{bash, eval=F}
mkdir ../data/NMD
```
Saved the supplementary table there.
Pull in the apaQTL genes, NMD genes, and Total/nuclear genes.
I will need all of those tested in each set to do the overlap.
```{r}
NMD=read.table("../data/NMD/NMD_res_Colomboetal.txt",stringsAsFactors = F, header = T)
NMD_sig= NMD %>% dplyr::slice(1:1000)
```
```{r}
apaTested=read.table("../data/apaQTLs/TestedNuclearapaQTLGenes.txt",col.names = c('gene'),stringsAsFactors = F)
apaSig=read.table("../data/apaQTLs/NuclearapaQTLGenes.txt", col.names = c("gene"),stringsAsFactors = F)
totalTest=read.table("../data/apaQTLs/TestedTotalapaQTLGenes.txt",col.names = c('gene'),stringsAsFactors = F)
totalSig=read.table("../data/apaQTLs/TotalapaQTLGenes.txt", col.names = c("gene"),stringsAsFactors = F)
```
```{r}
#chr10:27035787:27035907:ABI1
TvNTested=read.table("../data/DiffIso/EffectSizes.txt", header = T,stringsAsFactors = F) %>% separate(intron, into = c("chr", "start","end", "gene"),sep=":")
TvNsig=read.table("../data/highdiffsiggenes.txt",col.names = "gene", stringsAsFactors = F)
```
Overlap:
Nuclear QTL set
```{r}
x=length(intersect(apaSig$gene, NMD_sig$gene_name))
m=nrow(NMD_sig)
n=nrow(NMD)-1000
k=nrow(apaSig)
#expected
which(grepl(max(dhyper(1:x, m, n, k)), dhyper(1:x, m, n, k)))
#actual:
x
#pval
phyper(x, m, n, k,lower.tail=F)
```
```{r}
apaQTL_intron= read.table("../data/apaQTLs/Nuclear_apaQTLs4pc_5fdr.txt", header=T,stringsAsFactors = F) %>% filter(Loc=="intron")
```
```{r}
apaQTL_utr= read.table("../data/apaQTLs/Nuclear_apaQTLs4pc_5fdr.txt", header=T,stringsAsFactors = F) %>% filter(Loc=="utr3")
```
```{r}
x=length(intersect(apaQTL_intron$Gene, NMD_sig$gene_name))
m=nrow(NMD_sig)
n=nrow(NMD)-1000
k=nrow(apaQTL_intron)
#expected
which(grepl(max(dhyper(1:x, m, n, k)), dhyper(1:x, m, n, k)))
#actual:
x
#pval
phyper(x, m, n, k,lower.tail=F)
```
```{r}
x=length(intersect(apaQTL_utr$Gene, NMD_sig$gene_name))
m=nrow(NMD_sig)
n=nrow(NMD)-1000
k=nrow(apaQTL_utr)
#expected
which(grepl(max(dhyper(1:x, m, n, k)), dhyper(1:x, m, n, k)))
#actual:
x
#pval
phyper(x, m, n, k,lower.tail=F)
```
Total qtls:
```{r}
x=length(intersect(totalSig$gene, NMD_sig$gene_name))
m=nrow(NMD_sig)
n=nrow(NMD)-1000
k=nrow(totalSig)
#length(intersect(apaSig$gene, NMD$gene_name))
#expected
which(grepl(max(dhyper(1:x, m, n, k)), dhyper(1:x, m, n, k)))
#actual:
x
#pval
phyper(x, m, n, k,lower.tail=F)
```
Nuclear apaQTLs are more enriched for NMD
TVN set
```{r}
x=length(intersect(TvNsig$gene, NMD_sig$gene_name))
m=nrow(NMD_sig)
n=nrow(NMD)-1000
k=length(TvNsig$gene)
#length(intersect(TvNsig$gene, NMD$gene_name))
#expected
which(grepl(max(dhyper(1:x, m, n, k)), dhyper(1:x, m, n, k)))
#actual:
x
#pval
phyper(x, m, n, k,lower.tail=F)
```
Look at the expression independent ones:
```{r}
expInd=read.table("../data/ExpressionIndependentapaQTLs.txt", header = T, stringsAsFactors = F) %>% dplyr::select(Gene) %>% unique()
x=length(intersect(expInd$Gene, NMD_sig$gene_name))
m=nrow(NMD_sig)
n=nrow(NMD)-1000
k=length(expInd$Gene)
#expected
which(grepl(max(dhyper(1:x, m, n, k)), dhyper(1:x, m, n, k)))
#actual:
x
#pval
phyper(x, m, n, k,lower.tail=F)
```
No overlap here
###Stability
From the ARED come back to this.
###miRNAs
http://www.targetscan.org/cgi-bin/targetscan/data_download.vert72.cgi
```{bash,eval=F}
mkdir ../data/miRNAbinding
```
I downloaded all of the targets and the bedfile with targets.
The Targets_CS_pctiles.hg19.consFam.consSite.bed files has the conserved family miRNA and conserved binding sites. This is the most conservative analysis
```{r}
PAS=read.table("../data/PAS/APApeak_Peaks_GeneLocAnno.Nuclear.5perc.sort.bed", col.names = c("chr",'start','end','id','score','strand')) %>% separate(id, into=c("num",'gene','loc'),sep=":")
miRNAtargets=read.table("../data/miRNAbinding/Targets_CS_pctiles.hg19.consFam.consSite.bed", stringsAsFactors = F,col.names = c("chr", "start", "end", "ID", "score", "strand", "thikStart", "thinkEnd", "RGB", "blockcount", "blocksize", "blockstart")) %>% separate(ID, into= c("gene", "miRNA"), sep=":") %>% filter(gene %in% PAS$gene)
PASGene=PAS %>% select(gene) %>% unique()
```
I will group by gene and look how many miRNA binding sites.
```{r}
miRNAtargetsbygene=miRNAtargets %>% group_by(gene) %>% summarise(nMi=n()) %>% full_join(PASGene, by="gene") %>% mutate(nMi = ifelse(is.na(nMi), 0, nMi), withSite=ifelse(nMi >0, "Yes", "No"),SigAPA=ifelse(gene %in% apaSig$gene,"Yes","No"), TvN=ifelse(gene %in% TvNsig$gene, "Yes","No"))
```
Are genes with QTLs more likely to have conserved miRNA sites.
```{r}
x=miRNAtargetsbygene %>% filter(withSite=='Yes', SigAPA=='Yes') %>% nrow()
m=miRNAtargetsbygene %>% filter(withSite=='Yes') %>% nrow()
n=miRNAtargetsbygene %>% filter(withSite=='No') %>% nrow()
k=miRNAtargetsbygene %>% filter(SigAPA=='Yes') %>% nrow()
#expected
which(grepl(max(dhyper(1:x, m, n, k)), dhyper(1:x, m, n, k)))
#actual:
x
#pval
phyper(x, m, n, k,lower.tail=F)
```
This is significant. We can say that genes with a QTL are enriched for genes with conserved miRNA target sites.
We expect to this to be stronger with looking at apaQTLs affecting UTR isoforms. The mechanism could be that one isoform is degraded by miRNAs and we only see the other isoform. This is more likely to be a utr mechanism.
```{r}
miRNAtargetsbyloc=miRNAtargets %>% group_by(gene) %>% summarise(nMi=n()) %>% full_join(PASGene, by="gene") %>% mutate(nMi = ifelse(is.na(nMi), 0, nMi), withSite=ifelse(nMi >0, "Yes", "No"),Intronic=ifelse(gene %in% apaQTL_intron$Gene, "Yes","No"),UTR=ifelse(gene %in% apaQTL_utr$Gene, "Yes","No"))
```
```{r}
x=miRNAtargetsbyloc %>% filter(withSite=='Yes', Intronic=='Yes') %>% nrow()
m=miRNAtargetsbyloc %>% filter(withSite=='Yes') %>% nrow()
n=miRNAtargetsbyloc %>% filter(withSite=='No') %>% nrow()
k=miRNAtargetsbyloc %>% filter(Intronic=='Yes') %>% nrow()
#expected
which(grepl(max(dhyper(1:x, m, n, k)), dhyper(1:x, m, n, k)))
#actual:
x
#pval
phyper(x, m, n, k,lower.tail=F)
```
```{r}
x=miRNAtargetsbyloc %>% filter(withSite=='Yes', UTR=='Yes') %>% nrow()
m=miRNAtargetsbyloc %>% filter(withSite=='Yes') %>% nrow()
n=miRNAtargetsbyloc %>% filter(withSite=='No') %>% nrow()
k=miRNAtargetsbyloc %>% filter(UTR=='Yes') %>% nrow()
#expected
which(grepl(max(dhyper(1:x, m, n, k)), dhyper(1:x, m, n, k)))
#actual:
x
#pval
phyper(x, m, n, k,lower.tail=F)
```
We cannot differentiate between location here either. This is most likely due to the ratios. We are not sure which isoform is actually the one with the mechanism of action and which is reactionary.
Do this with total v nuclear as well.
```{r}
x=miRNAtargetsbygene %>% filter(withSite=='Yes', TvN=='Yes') %>% nrow()
m=miRNAtargetsbygene %>% filter(withSite=='Yes') %>% nrow()
n=miRNAtargetsbygene %>% filter(withSite=='No') %>% nrow()
k=miRNAtargetsbygene %>% filter(TvN=='Yes') %>% nrow()
#expected
which(grepl(max(dhyper(1:x, m, n, k)), dhyper(1:x, m, n, k)))
#actual:
x
#pval
phyper(x, m, n, k,lower.tail=F)
```
This is significant as well. miRNAs may be part of the reason we do not detect as many total transcripts as total transcripts.