s— title: “Analyze GTex Data with Brian’s Summary Data” author: “Chris McKennan” date: ‘2016-05-09’ output: html_document —

Last updated: 2016-05-10

Code version: 5238faba5f48c4dd40de36aff9a0e23341fdea3b

Objectives

I want to look at the trans eQTLs that we identify in both sun-exposed lower leg and non-sun-exposed suprapubic skin. Since these tissues are similar, we should (in theory) see similar trans-eQTLs in both tissues.

Determine Overlap in Tissues

The perl script Overlap2Networks.pl looks for overlap in eQTLs between two tissues. It gives the number of trans-eQTLs that are shared across tissues. It also looks for gene-gene correlation networks that are similar across tissues and looks at the eQTL sharing in those networks. The idea here is if we have two identical networks defined apriori, then we should see similar trans-eQTLs in those networks across tissues.

perl Overlap2Networks.pl ../output/cis_summary_data/skinnotsunexposedsuprapubic/thresh_60 ../output/cis_summary_data/skinsunexposedlowerleg/thresh_60

13% overlap, 193 shared gene-gene correlation networks

 perl Overlap2Networks.pl ../output/cis_summary_data/muscleskeletal/thresh_80 ../output/cis_summary_data/adiposesubcutaneous/thresh_80

13% overlap, 23 shared gene-gene correlation networks

perl Overlap2Networks.pl ../output/cis_summary_data/braincaudatebasalganglia/thresh_60 ../output/cis_summary_data/braincaudatebasalganglia/thresh_60

There is NO overlap in these two brain tissues, 0 shared gene-gene correlation networks

Grab functions

Source Gibbs Sampler and Bayes Factor functions.

source("../R/SimulateNetworkExpression.R")  #Compute Bayes factors
source("../R/directionality_CGM.R")    #Gibbs Sampler
library('gtools')

Input file

overlap.file <- "skinnotsunexposedsuprapubic_skinsunexposedlowerleg.OverlapeQTL.txt"
X <- data.frame(read.table(overlap.file, sep="\t", dec=".", comment.char="#", header=T))

Plot Results

ind.nonzero <- which(X$trans.eQTLs_T1 != 0 & X$trans.eQTLs_T2 != 0)
X.nonzero <- X[ind.nonzero,]
N.eQTLs <- apply(cbind(X.nonzero$trans.eQTLs_T1, X.nonzero$trans.eQTLs_T2), 1, min)
ind.1 <- which(N.eQTLs == 1)
frac.shared <- X.nonzero$Shared_trans.eQTLs/N.eQTLs
frac.shared.no1 <- frac.shared[-ind.1]

hist(frac.shared, main="Fraction of eQTLs that are Shared in Overlapping Networks", xlab="#Shared/#trans-eQTLs")

hist(frac.shared.no1, main="Fraction of eQTLs that are Shared in Overlapping Networks, no singletons", xlab="#Shared/#trans-eQTLs")

Session information

sessionInfo()
R version 3.2.4 (2016-03-10)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.10.5 (Yosemite)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] gtools_3.5.0 knitr_1.12.3

loaded via a namespace (and not attached):
 [1] magrittr_1.5    formatR_1.3     tools_3.2.4     htmltools_0.3.5
 [5] Rcpp_0.12.4     stringi_1.0-1   rmarkdown_0.9.5 stringr_1.0.0  
 [9] digest_0.6.9    evaluate_0.9