Last updated: 2020-03-08

workflowr checks: (Click a bullet for more information)
  • R Markdown file: uncommitted changes The R Markdown is untracked by Git. 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.

  • Environment: empty

    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.

  • Seed: set.seed(20190721)

    The command set.seed(20190721) 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.

  • Session information: recorded

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

  • Repository version: 47185fd

    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:    .DS_Store
        Ignored:    .Rhistory
        Ignored:    .Rproj.user/
        Ignored:    docs/.DS_Store
        Ignored:    draft/
        Ignored:    output/output_sparse/
    
    Untracked files:
        Untracked:  .gitignore~
        Untracked:  analysis/SEG_housekeeping_enrich.Rmd
        Untracked:  analysis/band_prec_robocov.Rmd
        Untracked:  analysis/blood_corspan_robospan_probospan.Rmd
        Untracked:  analysis/corspan_robospan_probospan.Rmd
        Untracked:  analysis/diff_robospan_examples.Rmd
        Untracked:  analysis/eigenvalues_hub.Rmd
        Untracked:  analysis/figure2.Rmd
        Untracked:  analysis/gtex_analysis_robocov_examples.Rmd
        Untracked:  analysis/gtex_pRobocov_pRobospan.Rmd
        Untracked:  analysis/gtex_predictive_robocov.Rmd
        Untracked:  analysis/gtex_rank_imputation.Rmd
        Untracked:  analysis/gtex_robocov.Rmd
        Untracked:  analysis/gtex_robocov_ex_robospan.Rmd
        Untracked:  analysis/housekeeping_PPI_MR_enrichment.Rmd
        Untracked:  analysis/hub_robocov.Rmd
        Untracked:  analysis/mean_robocov.Rmd
        Untracked:  analysis/pLI_shet_robospan_probospan.Rmd
        Untracked:  analysis/predictive_analytics_gtex.Rmd
        Untracked:  analysis/robocov_demo.Rmd
        Untracked:  analysis/robospan_blood_compare.Rmd
        Untracked:  analysis/robospan_corr.Rmd
        Untracked:  analysis/summary_correlation_structure.Rmd
        Untracked:  analysis/supp_figure_simulation.Rmd
        Untracked:  analysis/toeplitz_robocov.Rmd
        Untracked:  code/  robocov_sim.R
        Untracked:  code/FDR_Robospan.R
        Untracked:  code/Joints_Nov24.R
        Untracked:  code/Untitled.R
        Untracked:  code/annot_size.R
        Untracked:  code/band_prec_ocor_sim.R
        Untracked:  code/band_prec_pcor_sim.R
        Untracked:  code/band_prec_sim.R
        Untracked:  code/band_prec_sim2.R
        Untracked:  code/bandprec_cor_sim.R
        Untracked:  code/baseline_strategies.R
        Untracked:  code/corr_span.R
        Untracked:  code/correlation_gene_scores.R
        Untracked:  code/gene_score_all_strategies.R
        Untracked:  code/gtex_robocov.R
        Untracked:  code/gtex_robocov_precision.R
        Untracked:  code/hub_prec_cor_sim.R
        Untracked:  code/hub_sim.R
        Untracked:  code/hub_sim2.R
        Untracked:  code/hub_sim_sparse.R
        Untracked:  code/joint_robocov_model.R
        Untracked:  code/joints_robocov.R
        Untracked:  code/many_tau_star.R
        Untracked:  code/maxHiCgene.R
        Untracked:  code/meta_enrich.R
        Untracked:  code/meta_single_enrich.R
        Untracked:  code/postprocess_hub_toeplitz.R
        Untracked:  code/predictive_analytics_hub.R
        Untracked:  code/predictive_analytics_toeplitz.R
        Untracked:  code/robocov_gtex.R
        Untracked:  code/robocov_gtex_blood.R
        Untracked:  code/robocov_gtex_brain.R
        Untracked:  code/sim_results.R
        Untracked:  code/single_tau_star.R
        Untracked:  code/toeplitz_prec_cor_sim.R
        Untracked:  code/toeplitz_sim.R
        Untracked:  code/toeplitz_sim2.R
        Untracked:  code/toeplitz_sim_sparse.R
        Untracked:  data/Cor_pairwise_all_genes.rda
        Untracked:  data/Gene_Scores/
        Untracked:  data/Robocov_Box_all_genes.rda
        Untracked:  data/Robocov_Precision_all_genes.rda
        Untracked:  data/gene_names_GTEX_V6.txt
        Untracked:  data/housekeeping_genes.txt
        Untracked:  data/person_tissue_genes_voom.rda
        Untracked:  docs/figure/
        Untracked:  sim_code/
    
    Unstaged changes:
        Modified:   .gitignore
        Modified:   analysis/index.Rmd
    
    
    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.

Processing gene scores (Corspan, Robospan and pRobospan)

probocov_gtex = get(load("/Users/kushaldey/Documents/Robocov-pages/data/Robocov_Precision_all_genes.rda"))
robocov_gtex = get(load("/Users/kushaldey/Documents/Robocov-pages/data/Robocov_Box_all_genes.rda"))
cor_gtex = get(load("/Users/kushaldey/Documents/Robocov-pages/data/Cor_pairwise_all_genes.rda"))

probospan = apply(probocov_gtex, 3, sum)/(53*53)
robospan = apply(robocov_gtex, 3, sum)/(53*53)
corspan = apply(cor_gtex, 3, sum)/(53*53)

Ensembl and Gene symbol names

ensembl_gene_symbol = read.table("/Users/kushaldey/Documents/Robocov-pages/data/Gene_Scores/ensembl_and_hgnc_symbols.txt")
head(ensembl_gene_symbol)
               V1       V2
1 ENSG00000000419     DPM1
2 ENSG00000000457    SCYL3
3 ENSG00000000460 C1orf112
4 ENSG00000000938      FGR
5 ENSG00000000971      CFH
6 ENSG00000001036    FUCA2
gene_symbols = ensembl_gene_symbol[match(names(probospan), ensembl_gene_symbol[,1]), 2]

probospan2 = probospan[which(!is.na(gene_symbols))] 
names(probospan2) = gene_symbols[which(!is.na(gene_symbols))]

robospan2 = robospan[which(!is.na(gene_symbols))] 
names(robospan2) = gene_symbols[which(!is.na(gene_symbols))]

corspan2 = corspan[which(!is.na(gene_symbols))] 
names(corspan2) = gene_symbols[which(!is.na(gene_symbols))]
length(robospan2)
[1] 13148
corspan_top10 = names(corspan2)[order(corspan2, decreasing = T)[1:1600]]
df = cbind.data.frame(corspan_top10, 1)
write.table(df, file = "/Users/kushaldey/Documents/Robocov-pages/data/Gene_Scores/Corspan_mean.txt",
            quote = F, col.names = F, row.names = F, sep = "\t")
robospan2_df = read.table("/Users/kushaldey/Documents/Robocov-pages/data/Gene_Scores/Robospan_mean.txt")
dim(robospan2_df)
[1] 1600    2
probospan2_df = read.table("/Users/kushaldey/Documents/Robocov-pages/data/Gene_Scores/pRobospan_mean.txt")
dim(probospan2_df)
[1] 1600    2
corspan2_df = read.table("/Users/kushaldey/Documents/Robocov-pages/data/Gene_Scores/Corspan_mean.txt")
dim(corspan2_df)
[1] 1600    2

Housekeeping genes

housekeep = read.table("/Users/kushaldey/Documents/Robocov-pages/data/housekeeping_genes.txt")
head(housekeep)
     V1        V2
1  AAAS NM_015665
2 AAGAB NM_024666
3  AAMP NM_001087
4  AAR2 NM_015511
5  AARS NM_001605
6 AARS2 NM_020745
gene_names_gtex = as.character(read.table("/Users/kushaldey/Documents/Robocov-pages/data/Gene_Scores/ensembl_and_hgnc_symbols.txt")[,2])
length(intersect(housekeep[,1], robospan2_df[,1]))/length(intersect(housekeep[,1], gene_names_gtex))/ (1600/13500)
[1] 0.8364218
length(intersect(housekeep[,1], probospan2_df[,1]))/length(intersect(housekeep[,1], gene_names_gtex))/ (1600/13500)
[1] 0.1440364
length(intersect(housekeep[,1], corspan2_df[,1]))/length(intersect(housekeep[,1], gene_names_gtex))/ (1600/13500)
[1] 0.7252358
seg_gtex = read.table("/Users/kushaldey/Documents/Mouse_Humans/data/Gene_Scores/Fin_GTEx_WholeBlood.txt")
dim(seg_gtex)
[1] 1983    2
length(intersect(seg_gtex[,1], robospan2_df[,1]))/length(intersect(seg_gtex[,1], gene_names_gtex))/ (1600/13500)
[1] 1.480824
length(intersect(seg_gtex[,1], probospan2_df[,1]))/length(intersect(seg_gtex[,1], gene_names_gtex))/ (1600/13500)
[1] 2.524858
length(intersect(seg_gtex[,1], corspan2_df[,1]))/length(intersect(seg_gtex[,1], gene_names_gtex))/ (1600/13500)
[1] 1.459517
head(seg_gtex, 50)
         V1 V2
1       FGR  1
2    CASP10  1
3  SLC22A16  1
4    SLC4A1  1
5     SKAP2  1
6   FAM214B  1
7       MPO  1
8     ITGAL  1
9    ITGA2B  1
10   KRT33A  1
11  ALDH3B1  1
12  LGALS14  1
13 CEACAM21  1
14  SLC13A2  1
15     MATK  1
16    CD79B  1
17     E2F2  1
18     NADK  1
19   TFAP2D  1
20  PGLYRP1  1
21    MMP25  1
22     IL32  1
23 TRAF3IP3  1
24      CD4  1
25    ABHD5  1
26    PLAUR  1
27   TYROBP  1
28      LTF  1
29    ALOX5  1
30 SLC25A39  1
31      CD6  1
32    TACC3  1
33     ACPP  1
34  CCDC88C  1
35      BID  1
36  SLC11A1  1
37    MARCO  1
38    RUNX3  1
39 SERPINB1  1
40   SLC7A9  1
41  SLC45A4  1
42    RNF10  1
43     DEF6  1
44     TYMP  1
45  RNASET2  1
46     CD44  1
47   SLAMF7  1
48   BTN3A1  1
49   IFNGR1  1
50   SH2D2A  1

Session information

sessionInfo()
R version 3.5.1 (2018-07-02)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS High Sierra 10.13.6

Matrix products: default
BLAS: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib

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] workflowr_1.1.1   Rcpp_1.0.1        digest_0.6.19    
 [4] rprojroot_1.3-2   R.methodsS3_1.7.1 backports_1.1.4  
 [7] magrittr_1.5      git2r_0.23.0      evaluate_0.12    
[10] stringi_1.4.3     whisker_0.3-2     R.oo_1.22.0      
[13] R.utils_2.7.0     rmarkdown_1.10    tools_3.5.1      
[16] stringr_1.4.0     yaml_2.2.0        compiler_3.5.1   
[19] htmltools_0.3.6   knitr_1.20       

This reproducible R Markdown analysis was created with workflowr 1.1.1