Last updated: 2017-12-06

Code version: 6e2edd4

Analyse GTEX Z scores with SSVD

Read in the top Z scores:

Zscores = readRDS("../data/MatrixEQTLSumStats.Portable.Z.rds")
Ztop = Zscores$test.z
dim(Ztop)
[1] 16069    44

Fit 8 and 16 factors:

z.ssvd.8 = ssvd::ssvd(Ztop,r=8,method="theory")
z.ssvd.16 = ssvd::ssvd(Ztop,r=16,method="theory")

Plot results

par(mfcol=c(2,4))
for(k in 1:8){
  barplot(z.ssvd.8$v[,k],main="SSVD (K=8)")
}

for(k in 1:16){
  barplot(z.ssvd.16$v[,k],main="SSVD (K=16)")
}

Notes

  • When fitting 16 factors the first 8 are the same as with 8. That is the procedure is “greedy”.

  • My first impression is that for K=16 the second set of 8 factors is not quite as “clean” (or sparse) as the first set, or as the flash results. I wonder if this is a consequence of imposing orthogonality?

Session information

sessionInfo()
R version 3.3.2 (2016-10-31)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X El Capitan 10.11.6

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     

loaded via a namespace (and not attached):
 [1] backports_1.1.1 magrittr_1.5    rprojroot_1.2   tools_3.3.2    
 [5] htmltools_0.3.6 yaml_2.1.14     Rcpp_0.12.13    ssvd_1.0       
 [9] stringi_1.1.5   rmarkdown_1.7   knitr_1.17      git2r_0.19.0   
[13] stringr_1.2.0   digest_0.6.12   evaluate_0.10.1

This R Markdown site was created with workflowr