Repository navigation
Expand file tree
/
Copy patheqtl_stats.R
More file actions
51 lines (36 loc) · 1.59 KB
/
Copy patheqtl_stats.R
File metadata and controls
51 lines (36 loc) · 1.59 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
###
library(jaffelab)
library(GenomicRanges)
library(limma)
## load results
load("/dcl01/lieber/ajaffe/lab/brainseq_phase2/eqtl_tables/mergedEqtl_output_hippo_4features.rda")
hippoEqtl = allEqtl
hippoEqtl = hippoEqtl[hippoEqtl$FDR < 0.01,]
load("/dcl01/lieber/ajaffe/lab/brainseq_phase2/eqtl_tables/mergedEqtl_output_dlpfc_4features.rda")
dlpfcEqtl = allEqtl
dlpfcEqtl = dlpfcEqtl[dlpfcEqtl$FDR < 0.01,]
rm(allEqtl)
##########################
## hippocampus only ######
##########################
hippoList = split(hippoEqtl, factor(hippoEqtl$Type,
levels=c("Gene","Exon","Jxn", "Tx")))
sapply(hippoList, function(x) max(x$pvalue))
sapply(hippoList, function(x) length(unique(x$EnsemblGeneID)))
sapply(hippoList, function(x) length(unique(x$Symbol)))
sapply(hippoList, function(x) length(unique(x$snps)))
sapply(hippoList, function(x) signif(quantile(abs(x$beta), c(0.25,0.5,0.75)),3))
sapply(hippoList, function(x) table(x$Class[!duplicated(x$gene)]))$Jxn
sapply(hippoList, function(x) prop.table(table(x$Class)))$Jxn
##########################
## dlpfc only ######
##########################
dlpfcList = split(dlpfcEqtl, factor(dlpfcEqtl$Type,
levels=c("Gene","Exon","Jxn", "Tx")))
sapply(dlpfcList, function(x) max(x$pvalue))
sapply(dlpfcList, function(x) length(unique(x$EnsemblGeneID)))
sapply(dlpfcList, function(x) length(unique(x$Symbol)))
sapply(dlpfcList, function(x) length(unique(x$snps)))
sapply(dlpfcList, function(x) signif(quantile(abs(x$beta), c(0.25,0.5,0.75)),3))
sapply(dlpfcList, function(x) table(x$Class[!duplicated(x$gene)]))$Jxn
sapply(dlpfcList, function(x) prop.table(table(x$Class)))$Jxn