Last updated: 2019-09-18

Checks: 7 0

Knit directory: ptb_workflowr/

This reproducible R Markdown analysis was created with workflowr (version 1.4.0). The Checks tab describes the reproducibility checks that were applied when the results were created. The Past versions tab lists the development history.


Great! Since the R Markdown file has been committed to the Git repository, you know the exact version of the code that produced these results.

Great job! The global environment was empty. Objects defined in the global environment can affect the analysis in your R Markdown file in unknown ways. For reproduciblity it’s best to always run the code in an empty environment.

The command set.seed(20190313) was run prior to running the code in the R Markdown file. Setting a seed ensures that any results that rely on randomness, e.g. subsampling or permutations, are reproducible.

Great job! Recording the operating system, R version, and package versions is critical for reproducibility.

Nice! There were no cached chunks for this analysis, so you can be confident that you successfully produced the results during this run.

Great job! Using relative paths to the files within your workflowr project makes it easier to run your code on other machines.

Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility. The version displayed above was the version of the Git repository at the time these results were generated.

Note that you need to be careful to ensure that all relevant files for the analysis have been committed to Git prior to generating the results (you can use wflow_publish or wflow_git_commit). workflowr only checks the R Markdown file, but you know if there are other scripts or data files that it depends on. Below is the status of the Git repository when the results were generated:


Ignored files:
    Ignored:     (dellxps's conflicted copy 2019-09-18).Rhistory
    Ignored:    .Rhistory
    Ignored:    .Rproj.user/
    Ignored:    .drake/
    Ignored:    cache/
    Ignored:    data/NA_character_.RDS
    Ignored:    data/ag_df.RDS
    Ignored:    data/annotations.h5
    Ignored:    data/big_hic_t.tsv.gz
    Ignored:    data/chr19_snpdata_hm3only.RDS
    Ignored:    data/endometrium.jpg
    Ignored:    data/eqtl_gwas_file.tsv.gz
    Ignored:    data/evd_list_chr19_hm3.RDS
    Ignored:    data/exons.bed
    Ignored:    data/fat_eqtl.tsv.gz
    Ignored:    data/gencode.v28.annotation.gff3.gz
    Ignored:    data/genes.bed
    Ignored:    data/gwas_file.tsv.gz
    Ignored:    data/gwas_ptb_file.tsv.gz
    Ignored:    data/gwas_ptb_file_i.tsv.zstd
    Ignored:    data/gwas_scz_file.tsv.gz
    Ignored:    data/hic_t.tsv.gz
    Ignored:    data/little_gwas_i.tsv.zstd
    Ignored:    data/matched_snp.RDS
    Ignored:    data/new_cache_log.RDS
    Ignored:    data/ngwas_df.h5
    Ignored:    data/old_cache_log.RDS
    Ignored:    data/ptb_cred.yml
    Ignored:    data/retd.RDS
    Ignored:    data/shuffeqtl_gwas_file.tsv.gz
    Ignored:    data/split_d.h5
    Ignored:    data/sub_gwas_ptb.tsv.gz
    Ignored:    data/susie_r.RDS
    Ignored:    data/ut_eqtl.tsv.gz
    Ignored:    old_index/

Untracked files:
    Untracked:  analysis/23_and_me.Rmd
    Untracked:  analysis/LD.Rmd
    Untracked:  analysis/awd.RData
    Untracked:  analysis/dataset_SNPs_mismatches-reference.txt
    Untracked:  analysis/enrichment_analysis.Rmd
    Untracked:  analysis/finemap_plot.Rmd
    Untracked:  analysis/joint_annotations.Rmd
    Untracked:  analysis/ldshrink_drake.Rmd
    Untracked:  analysis/mws.RData
    Untracked:  analysis/test_knit_code.Rmd
    Untracked:  analysis/test_knit_code2.Rmd
    Untracked:  bd.txt
    Untracked:  code/
    Untracked:  config.yml
    Untracked:  config/four_features.yaml
    Untracked:  config/four_features_repro_ctrl.yaml
    Untracked:  config/four_features_repro_dec.yaml
    Untracked:  config/gwas.yaml
    Untracked:  de.txt
    Untracked:  extract_results_main.R
    Untracked:  extract_sigma_g.R
    Untracked:  false_positives.dsc
    Untracked:  marginal_joint.R
    Untracked:  power.dsc
    Untracked:  presentations/
    Untracked:  ptb_cache/
    Untracked:  report.Rmd
    Untracked:  sigma_g.dsc
    Untracked:  sim_results/
    Untracked:  sub_drake.sh
    Untracked:  summarize_sigma_g.R
    Untracked:  tmp.txt.gz

Unstaged changes:
    Modified:   .Rprofile
    Modified:   R/functions.R
    Modified:   R/plan.R
    Modified:   analysis/PTB_features.Rmd
    Modified:   analysis/region_discovery.Rmd
    Modified:   config/data/desktop.yaml
    Modified:   config/features.yaml
    Modified:   make.R
    Deleted:    renv.lock
    Deleted:    renv/.gitignore
    Deleted:    renv/activate.R
    Deleted:    renv/settings.dcf

Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.


There are no past versions. Publish this analysis with wflow_publish() to start tracking its development.


Locus Level Analysis

Below are the locus-level FDR for every region with an FDR of less than or equal to 0.1 in at least one of the models. There are 12 such regions in total

Hi-C interactions

ss_df <- tibble::tibble(id=c("rs2999049",
"rs12161066"))

sub_snp_df <-  semi_join(dplyr::select(result_df,id,chrom,pos),ss_df) %>% distinct() %>% transmute(seqnames=paste0("chr",chrom),start=pos,width=1,rsid=id) %>% plyranges::as_granges()
Joining, by = "id"
interactions <- plyranges::join_overlap_inner(plyranges::bind_ranges(bait_hic,target_hic),sub_snp_df) %>% as_tibble()


#write_csv(,"~/Downloads/hic_int.csv")

sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Manjaro Linux

Matrix products: default
BLAS/LAPACK: /usr/lib/libopenblas_haswellp-r0.3.6.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
 [1] tidyselect_0.2.5   RSSp_0.9.0.9000    ldmap_0.0.0.9000  
 [4] daprcpp_1.0.0.9000 ldshrink_1.0-1     furrr_0.1.0.9002  
 [7] future_1.13.0      bigsnpr_0.11.5     bigstatsr_0.9.9   
[10] vroom_1.0.2.9000   RSQLite_2.1.1      drake_7.6.2.9000  
[13] fs_1.3.1           susieR_0.8.1.0545  here_0.1          
[16] dbplyr_1.4.2       MonetDBLite_0.6.1  glue_1.3.1        
[19] DT_0.7.2           forcats_0.4.0      stringr_1.4.0     
[22] dplyr_0.8.3        purrr_0.3.2.9000   readr_1.3.1       
[25] tidyr_0.8.99.9000  tibble_2.1.3       ggplot2_3.2.1.9000
[28] tidyverse_1.2.1   

loaded via a namespace (and not attached):
 [1] colorspace_1.4-1            RcppEigen_0.3.3.5.0        
 [3] rprojroot_1.3-2             XVector_0.24.0             
 [5] GenomicRanges_1.36.0        rstudioapi_0.10            
 [7] listenv_0.7.0               bit64_0.9-7                
 [9] lubridate_1.7.4             xml2_1.2.2                 
[11] codetools_0.2-16            knitr_1.23                 
[13] zeallot_0.1.0               jsonlite_1.6               
[15] workflowr_1.4.0             Rsamtools_2.0.0            
[17] broom_0.5.2                 shiny_1.3.2                
[19] compiler_3.6.1              httr_1.4.1                 
[21] backports_1.1.4             assertthat_0.2.1           
[23] Matrix_1.2-17               cli_1.1.0                  
[25] later_0.8.0                 htmltools_0.3.6            
[27] tools_3.6.1                 igraph_1.2.4.1             
[29] gtable_0.3.0                GenomeInfoDbData_1.2.1     
[31] Rcpp_1.0.2                  Biobase_2.44.0             
[33] cellranger_1.1.0            Biostrings_2.52.0          
[35] vctrs_0.2.0.9002            nlme_3.1-140               
[37] rtracklayer_1.44.0          crosstalk_1.0.0            
[39] iterators_1.0.10            xfun_0.8                   
[41] globals_0.12.4              plyranges_1.4.3            
[43] rvest_0.3.4                 mime_0.7                   
[45] lifecycle_0.1.0             XML_3.98-1.20              
[47] zlibbioc_1.30.0             scales_1.0.0               
[49] promises_1.0.1              hms_0.5.1                  
[51] parallel_3.6.1              SummarizedExperiment_1.14.0
[53] yaml_2.2.0                  memoise_1.1.0              
[55] stringi_1.4.3               S4Vectors_0.22.0           
[57] foreach_1.4.4               BiocGenerics_0.30.0        
[59] filelock_1.0.2              BiocParallel_1.18.0        
[61] storr_1.2.2                 GenomeInfoDb_1.20.0        
[63] matrixStats_0.55.0          rlang_0.4.0.9002           
[65] pkgconfig_2.0.2             bitops_1.0-6               
[67] evaluate_0.14               lattice_0.20-38            
[69] GenomicAlignments_1.20.0    htmlwidgets_1.3            
[71] cowplot_1.0.0               bit_1.1-14                 
[73] magrittr_1.5                R6_2.4.0                   
[75] IRanges_2.18.1              generics_0.0.2             
[77] base64url_1.4               txtq_0.1.6                 
[79] DelayedArray_0.10.0         DBI_1.0.0                  
[81] pillar_1.4.2                haven_2.1.0                
[83] withr_2.1.2                 RCurl_1.95-4.12            
[85] modelr_0.1.4                crayon_1.3.4               
[87] rmarkdown_1.13              grid_3.6.1                 
[89] readxl_1.3.1                data.table_1.12.2          
[91] blob_1.1.1                  git2r_0.26.1               
[93] digest_0.6.20               xtable_1.8-4               
[95] httpuv_1.5.1                RcppParallel_4.4.3         
[97] stats4_3.6.1                munsell_0.5.0