Last updated: 2023-05-18

Checks: 6 1

Knit directory: cTWAS_analysis/

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


The R Markdown file has unstaged changes. To know which version of the R Markdown file created these results, you’ll want to first commit it to the Git repo. If you’re still working on the analysis, you can ignore this warning. When you’re finished, you can run wflow_publish to commit the R Markdown file and build the HTML.

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(20211220) 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 results in this page were generated with repository version 2653427. See the Past versions tab to see a history of the changes made to the R Markdown and HTML files.

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:    .Rhistory
    Ignored:    .ipynb_checkpoints/

Untracked files:
    Untracked:  LDL_LDLR_genetrack.pdf
    Untracked:  LDL_LDLR_locus.pdf
    Untracked:  LDL_TEME199_genetrack.pdf
    Untracked:  LDL_TEME199_locus.pdf
    Untracked:  Proposal plots.R
    Untracked:  RGS14.pdf
    Untracked:  RNF186.pdf
    Untracked:  Rplots.pdf
    Untracked:  SCZ_annotation.xlsx
    Untracked:  SLC8B1.pdf
    Untracked:  analysis/.ipynb_checkpoints/
    Untracked:  cache/
    Untracked:  code/.ipynb_checkpoints/
    Untracked:  data/.ipynb_checkpoints/
    Untracked:  data/FUMA_output/
    Untracked:  data/GO_Terms/
    Untracked:  data/GTEx_Analysis_v8_eQTL.tar
    Untracked:  data/G_list.RData
    Untracked:  data/IBD_ME/
    Untracked:  data/LDL/
    Untracked:  data/LDL_E_S/
    Untracked:  data/LDL_M/
    Untracked:  data/LDL_S/
    Untracked:  data/PGC3_SCZ_wave3_public.v2.tsv
    Untracked:  data/Supplementary Table 15 - MAGMA.xlsx
    Untracked:  data/Supplementary Table 20 - Prioritised Genes.xlsx
    Untracked:  data/UKBB/
    Untracked:  data/UKBB_SNPs_Info.text
    Untracked:  data/WhiteBlood_E/
    Untracked:  data/WhiteBlood_E_M/
    Untracked:  data/WhiteBlood_E_S_M/
    Untracked:  data/WhiteBlood_M/
    Untracked:  data/WhiteBlood_M_compare/
    Untracked:  data/WhiteBlood_M_enet/
    Untracked:  data/WhiteBlood_M_mashr/
    Untracked:  data/cpg_annot.RData
    Untracked:  data/eqtl/
    Untracked:  data/gencode.v26.GRCh38.genes.gtf
    Untracked:  data/gene_OMIM.txt
    Untracked:  data/gene_pip_0.8.txt
    Untracked:  data/gwas_sumstats/
    Untracked:  data/magma.genes.out
    Untracked:  data/mashr_Heart_Atrial_Appendage.db
    Untracked:  data/mashr_sqtl/
    Untracked:  data/mqtl/
    Untracked:  data/notes.txt
    Untracked:  data/scz_2018.RDS
    Untracked:  data/summary_known_genes_annotations.xlsx
    Untracked:  hist.pdf
    Untracked:  submit.sh
    Untracked:  temp.regionlist.RDS
    Untracked:  temp.regions.txt
    Untracked:  temp.susieIrss.txt
    Untracked:  temp.temp.susieIrssres.Rd
    Untracked:  temp_LDR/
    Untracked:  temp_ld_R_chr1.txt
    Untracked:  temp_ld_R_chr10.txt
    Untracked:  temp_ld_R_chr11.txt
    Untracked:  temp_ld_R_chr12.txt
    Untracked:  temp_ld_R_chr13.txt
    Untracked:  temp_ld_R_chr14.txt
    Untracked:  temp_ld_R_chr15.txt
    Untracked:  temp_ld_R_chr16.txt
    Untracked:  temp_ld_R_chr17.txt
    Untracked:  temp_ld_R_chr18.txt
    Untracked:  temp_ld_R_chr19.txt
    Untracked:  temp_ld_R_chr2.txt
    Untracked:  temp_ld_R_chr20.txt
    Untracked:  temp_ld_R_chr21.txt
    Untracked:  temp_ld_R_chr22.txt
    Untracked:  temp_ld_R_chr3.txt
    Untracked:  temp_ld_R_chr4.txt
    Untracked:  temp_ld_R_chr5.txt
    Untracked:  temp_ld_R_chr6.txt
    Untracked:  temp_ld_R_chr7.txt
    Untracked:  temp_ld_R_chr8.txt
    Untracked:  temp_ld_R_chr9.txt
    Untracked:  temp_reg.txt

Unstaged changes:
    Deleted:    analysis/Atrial_Fibrillation_Heart_Atrial_Appendage.Rmd
    Deleted:    analysis/Atrial_Fibrillation_Heart_Left_Ventricle.Rmd
    Deleted:    analysis/Autism_Brain_Amygdala.Rmd
    Deleted:    analysis/Autism_Brain_Anterior_cingulate_cortex_BA24.Rmd
    Deleted:    analysis/Autism_Brain_Caudate_basal_ganglia.Rmd
    Deleted:    analysis/Autism_Brain_Cerebellar_Hemisphere.Rmd
    Deleted:    analysis/Autism_Brain_Cerebellum.Rmd
    Deleted:    analysis/Autism_Brain_Cortex.Rmd
    Deleted:    analysis/Autism_Brain_Frontal_Cortex_BA9.Rmd
    Deleted:    analysis/Autism_Brain_Hippocampus.Rmd
    Deleted:    analysis/Autism_Brain_Hypothalamus.Rmd
    Deleted:    analysis/Autism_Brain_Nucleus_accumbens_basal_ganglia.Rmd
    Deleted:    analysis/Autism_Brain_Putamen_basal_ganglia.Rmd
    Deleted:    analysis/Autism_Brain_Spinal_cord_cervical_c-1.Rmd
    Deleted:    analysis/Autism_Brain_Substantia_nigra.Rmd
    Deleted:    analysis/BMI_Brain_Amygdala.Rmd
    Deleted:    analysis/BMI_Brain_Amygdala_S.Rmd
    Deleted:    analysis/BMI_Brain_Anterior_cingulate_cortex_BA24.Rmd
    Deleted:    analysis/BMI_Brain_Anterior_cingulate_cortex_BA24_S.Rmd
    Deleted:    analysis/BMI_Brain_Caudate_basal_ganglia.Rmd
    Deleted:    analysis/BMI_Brain_Caudate_basal_ganglia_S.Rmd
    Deleted:    analysis/BMI_Brain_Cerebellar_Hemisphere.Rmd
    Deleted:    analysis/BMI_Brain_Cerebellar_Hemisphere_S.Rmd
    Deleted:    analysis/BMI_Brain_Cerebellum.Rmd
    Deleted:    analysis/BMI_Brain_Cerebellum_S.Rmd
    Deleted:    analysis/BMI_Brain_Cortex.Rmd
    Deleted:    analysis/BMI_Brain_Cortex_S.Rmd
    Deleted:    analysis/BMI_Brain_Frontal_Cortex_BA9.Rmd
    Deleted:    analysis/BMI_Brain_Frontal_Cortex_BA9_S.Rmd
    Deleted:    analysis/BMI_Brain_Hippocampus.Rmd
    Deleted:    analysis/BMI_Brain_Hippocampus_S.Rmd
    Deleted:    analysis/BMI_Brain_Hypothalamus.Rmd
    Deleted:    analysis/BMI_Brain_Hypothalamus_S.Rmd
    Deleted:    analysis/BMI_Brain_Nucleus_accumbens_basal_ganglia.Rmd
    Deleted:    analysis/BMI_Brain_Nucleus_accumbens_basal_ganglia_S.Rmd
    Deleted:    analysis/BMI_Brain_Putamen_basal_ganglia.Rmd
    Deleted:    analysis/BMI_Brain_Putamen_basal_ganglia_S.Rmd
    Deleted:    analysis/BMI_Brain_Spinal_cord_cervical_c-1.Rmd
    Deleted:    analysis/BMI_Brain_Spinal_cord_cervical_c-1_S.Rmd
    Deleted:    analysis/BMI_Brain_Substantia_nigra.Rmd
    Deleted:    analysis/BMI_Brain_Substantia_nigra_S.Rmd
    Deleted:    analysis/BMI_S_results.Rmd
    Deleted:    analysis/Glucose_Adipose_Subcutaneous.Rmd
    Deleted:    analysis/Glucose_Adipose_Visceral_Omentum.Rmd
    Modified:   analysis/LD_block_analysis.Rmd
    Deleted:    code/WhiteBlood_M_ener_out/WhiteBlood_WholeBlood.out
    Deleted:    code/White_Blood_M_out/White_Blood_BreastMammary.err
    Deleted:    code/White_Blood_M_out/White_Blood_BreastMammary.out
    Deleted:    code/White_Blood_M_out/White_Blood_ColonTransverse.err
    Deleted:    code/White_Blood_M_out/White_Blood_ColonTransverse.out
    Deleted:    code/White_Blood_M_out/White_Blood_KidneyCortex.err
    Deleted:    code/White_Blood_M_out/White_Blood_KidneyCortex.out
    Deleted:    code/White_Blood_M_out/White_Blood_Lung.err
    Deleted:    code/White_Blood_M_out/White_Blood_Lung.out
    Deleted:    code/White_Blood_M_out/White_Blood_MuscleSkeletal.err
    Deleted:    code/White_Blood_M_out/White_Blood_MuscleSkeletal.out
    Deleted:    code/White_Blood_M_out/White_Blood_Ovary.err
    Deleted:    code/White_Blood_M_out/White_Blood_Ovary.out
    Deleted:    code/White_Blood_M_out/White_Blood_Prostate.err
    Deleted:    code/White_Blood_M_out/White_Blood_Prostate.out
    Deleted:    code/White_Blood_M_out/White_Blood_Testis.err
    Deleted:    code/White_Blood_M_out/White_Blood_Testis.out
    Deleted:    code/White_Blood_M_out/White_Blood_WholeBlood.err
    Deleted:    code/White_Blood_M_out/White_Blood_WholeBlood.out
    Deleted:    code/run_IBD_ctwas_rss_LDR_ME.R

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.


These are the previous versions of the repository in which changes were made to the R Markdown (analysis/LD_block_analysis.Rmd) and HTML (docs/LD_block_analysis.html) files. If you’ve configured a remote Git repository (see ?wflow_git_remote), click on the hyperlinks in the table below to view the files as they were in that past version.

File Version Author Date Message
Rmd 2653427 sq-96 2023-05-17 update
html 2653427 sq-96 2023-05-17 update
Rmd 61bc932 sq-96 2023-05-17 update
html 61bc932 sq-96 2023-05-17 update
Rmd a2c2f2e sq-96 2023-05-17 update
html a2c2f2e sq-96 2023-05-17 update
Rmd e368df3 sq-96 2023-05-17 update
html e368df3 sq-96 2023-05-17 update
html 4c5e2b7 sq-96 2023-05-17 update
Rmd 6baaa95 sq-96 2023-05-16 update
html 6baaa95 sq-96 2023-05-16 update

for(i in index){
  genepip <- get_results(i)[[4]]
  genepip <- genepip[,c("id","susie_pip")]
  genepip1 <- get_results1(i)[[4]]
  genepip1 <- genepip1[,c("id","susie_pip")]
  aa <- merge(genepip,genepip1,by = "id")
  duplicated_genes <- unique(genepip[duplicated(genepip$id),]$id)
  #duplicated_df <- aa[aa$id %in% duplicated_genes,]
  load(paste0("/project2/mstephens/causalTWAS/simulations/simulation_ctwas_rss_20210416/ukb-s80.45-adi_simu",i,"-pheno.Rd"))
  true_genes <- unlist(sapply(1:22, function(x){phenores$batch[[x]]$id.cgene}))
  correlation <- cor(aa$susie_pip.x,aa$susie_pip.y)
  aa$label <- 1
  for(j in 1:dim(aa)[1]){
    if(aa[j,"id"] %in% duplicated_genes){
      aa[j,"label"] <- 2
    }
  }
  
  aa$label1 <- 16
  for(k in 1:dim(aa)[1]){
    if(aa[k,"id"] %in% true_genes){
      aa[k,"label1"] <- 17
    }
  }
  
  
  plot(aa$susie_pip.y,aa$susie_pip.x,pch=aa$label1,col=aa$label,cex=0.8,xlab = "old pip", ylab = "new pip",main = paste0(i,"(",round(correlation,3),")"))
}

Version Author Date
2653427 sq-96 2023-05-17
61bc932 sq-96 2023-05-17
a2c2f2e sq-96 2023-05-17
e368df3 sq-96 2023-05-17
6baaa95 sq-96 2023-05-16

Version Author Date
2653427 sq-96 2023-05-17
61bc932 sq-96 2023-05-17
a2c2f2e sq-96 2023-05-17
e368df3 sq-96 2023-05-17
6baaa95 sq-96 2023-05-16

Version Author Date
2653427 sq-96 2023-05-17
61bc932 sq-96 2023-05-17
a2c2f2e sq-96 2023-05-17
e368df3 sq-96 2023-05-17
6baaa95 sq-96 2023-05-16

Version Author Date
2653427 sq-96 2023-05-17
61bc932 sq-96 2023-05-17
a2c2f2e sq-96 2023-05-17
e368df3 sq-96 2023-05-17
6baaa95 sq-96 2023-05-16

Version Author Date
2653427 sq-96 2023-05-17
61bc932 sq-96 2023-05-17
a2c2f2e sq-96 2023-05-17
e368df3 sq-96 2023-05-17
6baaa95 sq-96 2023-05-16

Version Author Date
2653427 sq-96 2023-05-17
61bc932 sq-96 2023-05-17
a2c2f2e sq-96 2023-05-17
e368df3 sq-96 2023-05-17
6baaa95 sq-96 2023-05-16

Version Author Date
2653427 sq-96 2023-05-17
61bc932 sq-96 2023-05-17
a2c2f2e sq-96 2023-05-17
e368df3 sq-96 2023-05-17
6baaa95 sq-96 2023-05-16

Version Author Date
2653427 sq-96 2023-05-17
61bc932 sq-96 2023-05-17
a2c2f2e sq-96 2023-05-17
e368df3 sq-96 2023-05-17
6baaa95 sq-96 2023-05-16

Version Author Date
2653427 sq-96 2023-05-17
61bc932 sq-96 2023-05-17
a2c2f2e sq-96 2023-05-17
e368df3 sq-96 2023-05-17
6baaa95 sq-96 2023-05-16

Version Author Date
2653427 sq-96 2023-05-17
61bc932 sq-96 2023-05-17
a2c2f2e sq-96 2023-05-17
e368df3 sq-96 2023-05-17
6baaa95 sq-96 2023-05-16

sessionInfo()
R version 4.1.0 (2021-05-18)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

Matrix products: default
BLAS/LAPACK: /software/openblas-0.3.13-el7-x86_64/lib/libopenblas_haswellp-r0.3.13.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] workflowr_1.7.0

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.9        highr_0.9         compiler_4.1.0    pillar_1.8.1     
 [5] bslib_0.4.1       later_1.3.0       git2r_0.30.1      jquerylib_0.1.4  
 [9] tools_4.1.0       getPass_0.2-2     digest_0.6.31     jsonlite_1.8.4   
[13] evaluate_0.19     lifecycle_1.0.3   tibble_3.1.8      pkgconfig_2.0.3  
[17] rlang_1.0.6       cli_3.4.1         rstudioapi_0.14   yaml_2.3.6       
[21] xfun_0.35         fastmap_1.1.0     httr_1.4.4        stringr_1.5.0    
[25] knitr_1.41        sass_0.4.4        fs_1.5.2          vctrs_0.5.1      
[29] rprojroot_2.0.3   data.table_1.14.6 glue_1.6.2        R6_2.5.1         
[33] processx_3.8.0    fansi_1.0.3       rmarkdown_2.19    callr_3.7.3      
[37] magrittr_2.0.3    whisker_0.4.1     ps_1.7.2          promises_1.2.0.1 
[41] htmltools_0.5.4   httpuv_1.6.7      utf8_1.2.2        stringi_1.7.8    
[45] cachem_1.0.6