Last updated: 2021-09-09

Checks: 6 1

Knit directory: ctwas_applied/

This reproducible R Markdown analysis was created with workflowr (version 1.6.2). 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(20210726) 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 59e5f4d. 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:


Unstaged changes:
    Modified:   analysis/ukb-d-30500_irnt_Liver.Rmd
    Modified:   analysis/ukb-d-30600_irnt_Liver.Rmd
    Modified:   analysis/ukb-d-30610_irnt_Liver.Rmd
    Modified:   analysis/ukb-d-30620_irnt_Liver.Rmd
    Modified:   analysis/ukb-d-30630_irnt_Liver.Rmd
    Modified:   analysis/ukb-d-30640_irnt_Liver.Rmd
    Modified:   analysis/ukb-d-30650_irnt_Liver.Rmd
    Modified:   analysis/ukb-d-30660_irnt_Liver.Rmd
    Modified:   analysis/ukb-d-30670_irnt_Liver.Rmd
    Modified:   analysis/ukb-d-30680_irnt_Liver.Rmd
    Modified:   analysis/ukb-d-30690_irnt_Liver.Rmd
    Modified:   analysis/ukb-d-30700_irnt_Liver.Rmd
    Modified:   analysis/ukb-d-30710_irnt_Liver.Rmd
    Modified:   analysis/ukb-d-30720_irnt_Liver.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.


These are the previous versions of the repository in which changes were made to the R Markdown (analysis/ukb-d-30720_irnt_Liver.Rmd) and HTML (docs/ukb-d-30720_irnt_Liver.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 cbf7408 wesleycrouse 2021-09-08 adding enrichment to reports
html cbf7408 wesleycrouse 2021-09-08 adding enrichment to reports
Rmd 4970e3e wesleycrouse 2021-09-08 updating reports
html 4970e3e wesleycrouse 2021-09-08 updating reports
Rmd 627a4e1 wesleycrouse 2021-09-07 adding heritability
Rmd dfd2b5f wesleycrouse 2021-09-07 regenerating reports
html dfd2b5f wesleycrouse 2021-09-07 regenerating reports
Rmd 61b53b3 wesleycrouse 2021-09-06 updated PVE calculation
html 61b53b3 wesleycrouse 2021-09-06 updated PVE calculation
Rmd 837dd01 wesleycrouse 2021-09-01 adding additional fixedsigma report
Rmd d0a5417 wesleycrouse 2021-08-30 adding new reports to the index
Rmd 0922de7 wesleycrouse 2021-08-18 updating all reports with locus plots
html 0922de7 wesleycrouse 2021-08-18 updating all reports with locus plots
html 1c62980 wesleycrouse 2021-08-11 Updating reports
Rmd 5981e80 wesleycrouse 2021-08-11 Adding more reports
html 5981e80 wesleycrouse 2021-08-11 Adding more reports
Rmd 05a98b7 wesleycrouse 2021-08-07 adding additional results
html 05a98b7 wesleycrouse 2021-08-07 adding additional results
html 03e541c wesleycrouse 2021-07-29 Cleaning up report generation
Rmd 276893d wesleycrouse 2021-07-29 Updating reports
html 276893d wesleycrouse 2021-07-29 Updating reports

Overview

These are the results of a ctwas analysis of the UK Biobank trait Cystatin C (quantile) using Liver gene weights.

The GWAS was conducted by the Neale Lab, and the biomarker traits we analyzed are discussed here. Summary statistics were obtained from IEU OpenGWAS using GWAS ID: ukb-d-30720_irnt. Results were obtained from from IEU rather than Neale Lab because they are in a standardard format (GWAS VCF). Note that 3 of the 34 biomarker traits were not available from IEU and were excluded from analysis.

The weights are mashr GTEx v8 models on Liver eQTL obtained from PredictDB. We performed a full harmonization of the variants, including recovering strand ambiguous variants. This procedure is discussed in a separate document. (TO-DO: add report that describes harmonization)

LD matrices were computed from a 10% subset of Neale lab subjects. Subjects were matched using the plate and well information from genotyping. We included only biallelic variants with MAF>0.01 in the original Neale Lab GWAS. (TO-DO: add more details [number of subjects, variants, etc])

Weight QC

TO-DO: add enhanced QC reporting (total number of weights, why each variant was missing for all genes)

qclist_all <- list()

qc_files <- paste0(results_dir, "/", list.files(results_dir, pattern="exprqc.Rd"))

for (i in 1:length(qc_files)){
  load(qc_files[i])
  chr <- unlist(strsplit(rev(unlist(strsplit(qc_files[i], "_")))[1], "[.]"))[1]
  qclist_all[[chr]] <- cbind(do.call(rbind, lapply(qclist,unlist)), as.numeric(substring(chr,4)))
}

qclist_all <- data.frame(do.call(rbind, qclist_all))
colnames(qclist_all)[ncol(qclist_all)] <- "chr"

rm(qclist, wgtlist, z_gene_chr)

#number of imputed weights
nrow(qclist_all)
[1] 10901
#number of imputed weights by chromosome
table(qclist_all$chr)

   1    2    3    4    5    6    7    8    9   10   11   12   13   14   15 
1070  768  652  417  494  611  548  408  405  434  634  629  195  365  354 
  16   17   18   19   20   21   22 
 526  663  160  859  306  114  289 
#proportion of imputed weights without missing variants
mean(qclist_all$nmiss==0)
[1] 0.8366205

Load ctwas results

#load ctwas results
ctwas_res <- data.table::fread(paste0(results_dir, "/", analysis_id, "_ctwas.susieIrss.txt"))

#make unique identifier for regions
ctwas_res$region_tag <- paste(ctwas_res$region_tag1, ctwas_res$region_tag2, sep="_")

#compute PVE for each gene/SNP
ctwas_res$PVE = ctwas_res$susie_pip*ctwas_res$mu2/sample_size #check PVE calculation

#separate gene and SNP results
ctwas_gene_res <- ctwas_res[ctwas_res$type == "gene", ]
ctwas_gene_res <- data.frame(ctwas_gene_res)
ctwas_snp_res <- ctwas_res[ctwas_res$type == "SNP", ]
ctwas_snp_res <- data.frame(ctwas_snp_res)

#add gene information to results
sqlite <- RSQLite::dbDriver("SQLite")
db = RSQLite::dbConnect(sqlite, paste0("/project2/compbio/predictdb/mashr_models/mashr_", weight, ".db"))
query <- function(...) RSQLite::dbGetQuery(db, ...)
gene_info <- query("select gene, genename from extra")
gene_info <- query("select gene, genename, gene_type from extra")
RSQLite::dbDisconnect(db)

ctwas_gene_res <- cbind(ctwas_gene_res, gene_info[sapply(ctwas_gene_res$id, match, gene_info$gene), c("genename", "gene_type")])

#add z score to results
load(paste0(results_dir, "/", analysis_id, "_expr_z_gene.Rd"))
ctwas_gene_res$z <- z_gene[ctwas_gene_res$id,]$z

#load(paste0(results_dir, "/", analysis_id, "_expr_z_snp.Rd")) #for new version, stored after harmonization
z_snp <- readRDS(paste0(results_dir, "/", trait_id, ".RDS")) #for old version, unharmonized

z_snp <- z_snp[z_snp$id %in% ctwas_snp_res$id,] #subset snps to those included in analysis, note some are duplicated, need to match which allele was used
ctwas_snp_res$z <- z_snp$z[match(ctwas_snp_res$id, z_snp$id)] #for duplicated snps, this arbitrarily uses the first allele
ctwas_snp_res$z_flag <- as.numeric(ctwas_snp_res$id %in% z_snp$id[duplicated(z_snp$id)]) #mark the unclear z scores, flag=1

#formatting and rounding for tables
ctwas_gene_res$z <- round(ctwas_gene_res$z,2)
ctwas_snp_res$z <- round(ctwas_snp_res$z,2)
ctwas_gene_res$susie_pip <- round(ctwas_gene_res$susie_pip,3)
ctwas_snp_res$susie_pip <- round(ctwas_snp_res$susie_pip,3)
ctwas_gene_res$mu2 <- round(ctwas_gene_res$mu2,2)
ctwas_snp_res$mu2 <- round(ctwas_snp_res$mu2,2)
ctwas_gene_res$PVE <- signif(ctwas_gene_res$PVE, 2)
ctwas_snp_res$PVE <- signif(ctwas_snp_res$PVE, 2)

#merge gene and snp results with added information
ctwas_gene_res$z_flag=NA
ctwas_snp_res$genename=NA
ctwas_snp_res$gene_type=NA

ctwas_res <- rbind(ctwas_gene_res,
                   ctwas_snp_res[,colnames(ctwas_gene_res)])

#store columns to report
report_cols <- colnames(ctwas_gene_res)[!(colnames(ctwas_gene_res) %in% c("type", "region_tag1", "region_tag2", "cs_index", "gene_type", "z_flag", "id", "chrom", "pos"))]
first_cols <- c("genename", "region_tag")
report_cols <- c(first_cols, report_cols[!(report_cols %in% first_cols)])

report_cols_snps <- c("id", report_cols[-1])

#get number of SNPs from s1 results; adjust for thin
ctwas_res_s1 <- data.table::fread(paste0(results_dir, "/", analysis_id, "_ctwas.s1.susieIrss.txt"))
n_snps <- sum(ctwas_res_s1$type=="SNP")/thin
rm(ctwas_res_s1)

Check convergence of parameters

library(ggplot2)
library(cowplot)

********************************************************
Note: As of version 1.0.0, cowplot does not change the
  default ggplot2 theme anymore. To recover the previous
  behavior, execute:
  theme_set(theme_cowplot())
********************************************************
load(paste0(results_dir, "/", analysis_id, "_ctwas.s2.susieIrssres.Rd"))
  
df <- data.frame(niter = rep(1:ncol(group_prior_rec), 2),
                 value = c(group_prior_rec[1,], group_prior_rec[2,]),
                 group = rep(c("Gene", "SNP"), each = ncol(group_prior_rec)))
df$group <- as.factor(df$group)

df$value[df$group=="SNP"] <- df$value[df$group=="SNP"]*thin #adjust parameter to account for thin argument

p_pi <- ggplot(df, aes(x=niter, y=value, group=group)) +
  geom_line(aes(color=group)) +
  geom_point(aes(color=group)) +
  xlab("Iteration") + ylab(bquote(pi)) +
  ggtitle("Prior mean") +
  theme_cowplot()

df <- data.frame(niter = rep(1:ncol(group_prior_var_rec), 2),
                 value = c(group_prior_var_rec[1,], group_prior_var_rec[2,]),
                 group = rep(c("Gene", "SNP"), each = ncol(group_prior_var_rec)))
df$group <- as.factor(df$group)
p_sigma2 <- ggplot(df, aes(x=niter, y=value, group=group)) +
  geom_line(aes(color=group)) +
  geom_point(aes(color=group)) +
  xlab("Iteration") + ylab(bquote(sigma^2)) +
  ggtitle("Prior variance") +
  theme_cowplot()

plot_grid(p_pi, p_sigma2)

Version Author Date
dfd2b5f wesleycrouse 2021-09-07
#estimated group prior
estimated_group_prior <- group_prior_rec[,ncol(group_prior_rec)]
names(estimated_group_prior) <- c("gene", "snp")
estimated_group_prior["snp"] <- estimated_group_prior["snp"]*thin #adjust parameter to account for thin argument
print(estimated_group_prior)
        gene          snp 
0.0100629404 0.0002347885 
#estimated group prior variance
estimated_group_prior_var <- group_prior_var_rec[,ncol(group_prior_var_rec)]
names(estimated_group_prior_var) <- c("gene", "snp")
print(estimated_group_prior_var)
    gene      snp 
16.04307 20.45468 
#report sample size
print(sample_size)
[1] 344264
#report group size
group_size <- c(nrow(ctwas_gene_res), n_snps)
print(group_size)
[1]   10901 8697330
#estimated group PVE
estimated_group_pve <- estimated_group_prior_var*estimated_group_prior*group_size/sample_size #check PVE calculation
names(estimated_group_pve) <- c("gene", "snp")
print(estimated_group_pve)
       gene         snp 
0.005111955 0.121328819 
#compare sum(PIP*mu2/sample_size) with above PVE calculation
c(sum(ctwas_gene_res$PVE),sum(ctwas_snp_res$PVE))
[1] 0.0242494 1.8986803

Genes with highest PIPs

#distribution of PIPs
hist(ctwas_gene_res$susie_pip, xlim=c(0,1), main="Distribution of Gene PIPs")

Version Author Date
dfd2b5f wesleycrouse 2021-09-07
#genes with PIP>0.8 or 20 highest PIPs
head(ctwas_gene_res[order(-ctwas_gene_res$susie_pip),report_cols], max(sum(ctwas_gene_res$susie_pip>0.8), 20))
        genename region_tag susie_pip     mu2     PVE     z
938       CDC14A       1_61     0.997   61.00 1.8e-04 -7.98
364        RAI14       5_23     0.984   25.67 7.3e-05  4.29
8192        MGMT      10_81     0.983 1046.45 3.0e-03  6.95
4644       LAMC1       1_91     0.982   43.14 1.2e-04 -6.41
6121      ZNF827       4_95     0.975   32.55 9.2e-05  5.26
8040       THBS3       1_76     0.952   70.69 2.0e-04  8.62
2824        UMPS       3_77     0.951   27.46 7.6e-05  6.02
8830      LPCAT4      15_10     0.945   23.48 6.4e-05 -4.76
11399    TNFSF12       17_7     0.940   40.47 1.1e-04 -6.76
6637        NPM2       8_23     0.922   30.62 8.2e-05  5.44
10715       E2F4      16_36     0.920   31.80 8.5e-05 -5.56
3168        KLF7      2_122     0.902   24.03 6.3e-05  4.71
3186       TCF21       6_88     0.897   29.79 7.8e-05  3.81
2283        TFAM      10_38     0.878   27.54 7.0e-05 -5.27
3708    SLC25A19      17_42     0.856   29.11 7.2e-05  5.36
6303        MSI2      17_33     0.846   21.02 5.2e-05 -4.05
7353      CHMP4C       8_58     0.833   26.90 6.5e-05  4.99
12583 AC142472.6      17_27     0.832   28.12 6.8e-05 -5.45
6643     ADAMTS4       1_79     0.829   45.15 1.1e-04  6.82
3881        VIL1      2_129     0.827   94.94 2.3e-04  9.95
1803      PIEZO1      16_53     0.806   25.92 6.1e-05 -4.22

Genes with largest effect sizes

#plot PIP vs effect size
plot(ctwas_gene_res$susie_pip, ctwas_gene_res$mu2, xlab="PIP", ylab="mu^2", main="Gene PIPs vs Effect Size")

Version Author Date
dfd2b5f wesleycrouse 2021-09-07
#genes with 20 largest effect sizes
head(ctwas_gene_res[order(-ctwas_gene_res$mu2),report_cols],20)
               genename region_tag susie_pip      mu2     PVE      z
4556             TMEM60       7_49     0.000 40075.18 0.0e+00  -9.23
12199     RP11-218C14.8      20_17     0.000 19344.77 0.0e+00 143.75
11199         LINC00271       6_89     0.000  7877.35 0.0e+00  -3.41
10903              APTR       7_49     0.000  7796.95 0.0e+00  -1.84
4634              EGLN1      1_118     0.000  7265.79 1.7e-08  -2.95
3058              EXOC8      1_118     0.000  6073.92 3.7e-07   3.29
9811             RSBN1L       7_49     0.000  4253.55 0.0e+00  -1.54
4604               AHI1       6_89     0.000  2715.11 0.0e+00  -1.38
92                PHTF2       7_49     0.000  2511.42 0.0e+00  -1.36
10643            POU5F1       6_25     0.000  1276.24 0.0e+00   9.11
8192               MGMT      10_81     0.983  1046.45 3.0e-03   6.95
10646          PSORS1C1       6_25     0.000   799.91 0.0e+00  -6.44
3748               GZF1      20_17     0.000   648.04 0.0e+00  13.59
10645          PSORS1C2       6_25     0.000   605.06 0.0e+00  -2.15
12306 XXbac-BPG181B23.7       6_25     0.000   406.47 0.0e+00   5.98
10639              MICB       6_25     0.000   375.23 0.0e+00   3.04
11110               LTA       6_25     0.000   286.34 0.0e+00   0.52
4838              VARS2       6_25     0.000   242.96 0.0e+00 -10.23
5042            SHROOM3       4_52     0.074   217.14 4.7e-05 -18.36
9992             FAM47E       4_52     0.010   215.44 6.0e-06 -17.04

Genes with highest PVE

#genes with 20 highest pve
head(ctwas_gene_res[order(-ctwas_gene_res$PVE),report_cols],20)
        genename region_tag susie_pip     mu2     PVE      z
8192        MGMT      10_81     0.983 1046.45 3.0e-03   6.95
3881        VIL1      2_129     0.827   94.94 2.3e-04   9.95
8040       THBS3       1_76     0.952   70.69 2.0e-04   8.62
938       CDC14A       1_61     0.997   61.00 1.8e-04  -7.98
10495      PRMT6       1_66     0.775   71.54 1.6e-04  -8.65
4644       LAMC1       1_91     0.982   43.14 1.2e-04  -6.41
12051  LINC00672      17_23     0.790   47.18 1.1e-04   6.99
6643     ADAMTS4       1_79     0.829   45.15 1.1e-04   6.82
11399    TNFSF12       17_7     0.940   40.47 1.1e-04  -6.76
11575 DNAJC3-AS1      13_48     0.655   53.05 1.0e-04  -7.35
5192      UBE2Q2      15_35     0.513   62.31 9.3e-05 -10.22
6121      ZNF827       4_95     0.975   32.55 9.2e-05   5.26
5207      CYP1A1      15_35     0.528   57.74 8.9e-05  -6.69
7235        APEH       3_35     0.551   52.82 8.5e-05  -7.39
10715       E2F4      16_36     0.920   31.80 8.5e-05  -5.56
6637        NPM2       8_23     0.922   30.62 8.2e-05   5.44
3186       TCF21       6_88     0.897   29.79 7.8e-05   3.81
2824        UMPS       3_77     0.951   27.46 7.6e-05   6.02
5436       PSMA5       1_67     0.715   36.04 7.5e-05   5.84
364        RAI14       5_23     0.984   25.67 7.3e-05   4.29

Genes with largest z scores

#genes with 20 largest z scores
head(ctwas_gene_res[order(-abs(ctwas_gene_res$z)),report_cols],20)
           genename region_tag susie_pip      mu2     PVE      z
12199 RP11-218C14.8      20_17     0.000 19344.77 0.0e+00 143.75
5042        SHROOM3       4_52     0.074   217.14 4.7e-05 -18.36
7163        CCDC158       4_52     0.008   174.32 4.3e-06 -18.07
9992         FAM47E       4_52     0.010   215.44 6.0e-06 -17.04
8037          LMAN2      5_106     0.013   153.80 5.6e-06  16.19
4292           NXT1      20_17     0.000   189.77 0.0e+00 -14.44
5773          CRIP3       6_33     0.004   141.79 1.7e-06 -13.77
3748           GZF1      20_17     0.000   648.04 0.0e+00  13.59
10544       METTL10      10_78     0.007    86.15 1.8e-06 -12.59
4547          HNF1A      12_74     0.016   145.55 6.7e-06 -12.32
10848         CLIC1       6_26     0.000    64.40 9.3e-08 -12.18
10680         ATXN2      12_67     0.104   133.11 4.0e-05  11.85
12454  RP11-758H9.2      17_35     0.003   111.69 9.8e-07 -11.70
10626        MPIG6B       6_26     0.001    70.66 2.7e-07  11.23
1191          ERP29      12_67     0.014    97.73 4.1e-06  10.54
10370       TMEM116      12_67     0.014    97.73 4.1e-06 -10.54
2544          NAA25      12_67     0.013    95.81 3.7e-06 -10.47
10625          MSH5       6_26     0.001    55.61 9.4e-08 -10.40
2308          TUBD1      17_35     0.044    54.76 6.9e-06 -10.40
8505         HECTD4      12_67     0.009    89.71 2.2e-06  10.36

Comparing z scores and PIPs

#set nominal signifiance threshold for z scores
alpha <- 0.05

#bonferroni adjusted threshold for z scores
sig_thresh <- qnorm(1-(alpha/nrow(ctwas_gene_res)/2), lower=T)

#Q-Q plot for z scores
obs_z <- ctwas_gene_res$z[order(ctwas_gene_res$z)]
exp_z <- qnorm((1:nrow(ctwas_gene_res))/nrow(ctwas_gene_res))

plot(exp_z, obs_z, xlab="Expected z", ylab="Observed z", main="Gene z score Q-Q plot")
abline(a=0,b=1)

Version Author Date
dfd2b5f wesleycrouse 2021-09-07
#plot z score vs PIP
plot(abs(ctwas_gene_res$z), ctwas_gene_res$susie_pip, xlab="abs(z)", ylab="PIP")
abline(v=sig_thresh, col="red", lty=2)

Version Author Date
dfd2b5f wesleycrouse 2021-09-07
#proportion of significant z scores
mean(abs(ctwas_gene_res$z) > sig_thresh)
[1] 0.03073113
#genes with most significant z scores
head(ctwas_gene_res[order(-abs(ctwas_gene_res$z)),report_cols],20)
           genename region_tag susie_pip      mu2     PVE      z
12199 RP11-218C14.8      20_17     0.000 19344.77 0.0e+00 143.75
5042        SHROOM3       4_52     0.074   217.14 4.7e-05 -18.36
7163        CCDC158       4_52     0.008   174.32 4.3e-06 -18.07
9992         FAM47E       4_52     0.010   215.44 6.0e-06 -17.04
8037          LMAN2      5_106     0.013   153.80 5.6e-06  16.19
4292           NXT1      20_17     0.000   189.77 0.0e+00 -14.44
5773          CRIP3       6_33     0.004   141.79 1.7e-06 -13.77
3748           GZF1      20_17     0.000   648.04 0.0e+00  13.59
10544       METTL10      10_78     0.007    86.15 1.8e-06 -12.59
4547          HNF1A      12_74     0.016   145.55 6.7e-06 -12.32
10848         CLIC1       6_26     0.000    64.40 9.3e-08 -12.18
10680         ATXN2      12_67     0.104   133.11 4.0e-05  11.85
12454  RP11-758H9.2      17_35     0.003   111.69 9.8e-07 -11.70
10626        MPIG6B       6_26     0.001    70.66 2.7e-07  11.23
1191          ERP29      12_67     0.014    97.73 4.1e-06  10.54
10370       TMEM116      12_67     0.014    97.73 4.1e-06 -10.54
2544          NAA25      12_67     0.013    95.81 3.7e-06 -10.47
10625          MSH5       6_26     0.001    55.61 9.4e-08 -10.40
2308          TUBD1      17_35     0.044    54.76 6.9e-06 -10.40
8505         HECTD4      12_67     0.009    89.71 2.2e-06  10.36

Locus plots for genes and SNPs

ctwas_gene_res_sortz <- ctwas_gene_res[order(-abs(ctwas_gene_res$z)),]

n_plots <- 5
for (region_tag_plot in head(unique(ctwas_gene_res_sortz$region_tag), n_plots)){
  ctwas_res_region <-  ctwas_res[ctwas_res$region_tag==region_tag_plot,]
  start <- min(ctwas_res_region$pos)
  end <- max(ctwas_res_region$pos)
  
  ctwas_res_region <- ctwas_res_region[order(ctwas_res_region$pos),]
  ctwas_res_region_gene <- ctwas_res_region[ctwas_res_region$type=="gene",]
  ctwas_res_region_snp <- ctwas_res_region[ctwas_res_region$type=="SNP",]
  
  #region name
  print(paste0("Region: ", region_tag_plot))
  
  #table of genes in region
  print(ctwas_res_region_gene[,report_cols])
  
  par(mfrow=c(4,1))
  
  #gene z scores
  plot(ctwas_res_region_gene$pos, abs(ctwas_res_region_gene$z), xlab="Position", ylab="abs(gene_z)", xlim=c(start,end),
   ylim=c(0,max(sig_thresh, abs(ctwas_res_region_gene$z))),
   main=paste0("Region: ", region_tag_plot))
  abline(h=sig_thresh,col="red",lty=2)
  
  #significance threshold for SNPs
  alpha_snp <- 5*10^(-8)
  sig_thresh_snp <- qnorm(1-alpha_snp/2, lower=T)
  
  #snp z scores
  plot(ctwas_res_region_snp$pos, abs(ctwas_res_region_snp$z), xlab="Position", ylab="abs(snp_z)",xlim=c(start,end),
   ylim=c(0,max(sig_thresh_snp, max(abs(ctwas_res_region_snp$z)))))
  abline(h=sig_thresh_snp,col="purple",lty=2)
  
  #gene pips
  plot(ctwas_res_region_gene$pos, ctwas_res_region_gene$susie_pip, xlab="Position", ylab="Gene PIP", xlim=c(start,end), ylim=c(0,1))
  abline(h=0.8,col="blue",lty=2)
  
  #snp pips
  plot(ctwas_res_region_snp$pos, ctwas_res_region_snp$susie_pip, xlab="Position", ylab="SNP PIP", xlim=c(start,end), ylim=c(0,1))
  abline(h=0.8,col="blue",lty=2)
}
[1] "Region: 20_17"
           genename region_tag susie_pip      mu2 PVE      z
4292           NXT1      20_17         0   189.77   0 -14.44
3748           GZF1      20_17         0   648.04   0  13.59
12199 RP11-218C14.8      20_17         0 19344.77   0 143.75

Version Author Date
dfd2b5f wesleycrouse 2021-09-07
[1] "Region: 4_52"
     genename region_tag susie_pip    mu2     PVE      z
5038   SCARB2       4_52     0.006  13.65 2.5e-07   0.22
9992   FAM47E       4_52     0.010 215.44 6.0e-06 -17.04
7163  CCDC158       4_52     0.008 174.32 4.3e-06 -18.07
5042  SHROOM3       4_52     0.074 217.14 4.7e-05 -18.36
5036   SEPT11       4_52     0.003   6.52 6.2e-08   1.50
9710   SOWAHB       4_52     0.004   6.81 8.2e-08  -0.62
3202     CCNI       4_52     0.003   4.83 4.2e-08   0.74
5039    CCNG2       4_52     0.003   4.75 4.1e-08  -0.01
5040   CNOT6L       4_52     0.004   6.80 8.0e-08  -0.06
8048    MRPL1       4_52     0.005   9.04 1.3e-07   0.99
5037    FRAS1       4_52     0.003   5.17 4.7e-08  -0.54

Version Author Date
dfd2b5f wesleycrouse 2021-09-07
[1] "Region: 5_106"
           genename region_tag susie_pip    mu2     PVE     z
8146          SIMC1      5_106     0.011  14.00 4.6e-07 -1.68
3450       KIAA1191      5_106     0.011  13.52 4.4e-07  1.40
8737          ARL10      5_106     0.006   8.30 1.5e-07  0.98
5758         HIGD2A      5_106     0.004   4.94 6.3e-08 -0.39
8738           CLTB      5_106     0.004   5.17 6.6e-08  0.73
8046         GPRIN1      5_106     0.006   7.15 1.2e-07  0.52
403         TSPAN17      5_106     0.008   9.53 2.3e-07 -0.69
2780          UNC5A      5_106     0.004   5.51 7.0e-08 -1.24
6811            HK3      5_106     0.025  16.76 1.2e-06  1.46
1119          UIMC1      5_106     0.004   5.86 7.6e-08 -0.89
2779         ZNF346      5_106     0.005   5.98 8.5e-08 -0.39
6807          FGFR4      5_106     0.005  23.62 3.4e-07 -4.35
7484           NSD1      5_106     0.036  13.15 1.4e-06  1.71
8039        PRELID1      5_106     0.033  25.67 2.5e-06  5.38
10820          MXD3      5_106     0.005   5.95 8.7e-08 -2.06
8037          LMAN2      5_106     0.013 153.80 5.6e-06 16.19
10107          PFN3      5_106     0.005  30.55 4.2e-07 -5.09
4159            F12      5_106     0.010  51.24 1.4e-06  7.68
4160           PRR7      5_106     0.004   7.78 9.8e-08 -2.42
2778           DBN1      5_106     0.004   6.16 8.0e-08  1.66
10157        PDLIM7      5_106     0.017  36.54 1.8e-06 -5.90
12333 RP11-1277A3.3      5_106     0.009  16.84 4.5e-07  3.36
301         B4GALT7      5_106     0.007  12.64 2.6e-07  2.53
8144        FAM153A      5_106     0.004   5.12 6.4e-08 -0.91

Version Author Date
dfd2b5f wesleycrouse 2021-09-07
[1] "Region: 6_33"
      genename region_tag susie_pip    mu2     PVE      z
9875  C6orf132       6_33     0.013  18.91 7.2e-07  -1.95
2683    GUCA1B       6_33     0.075  28.84 6.3e-06   2.58
410     MRPS10       6_33     0.042  24.22 2.9e-06   2.33
3634    TRERF1       6_33     0.004   8.16 1.0e-07   0.82
2684     PRPH2       6_33     0.050  22.30 3.2e-06   4.81
3655      TBCC       6_33     0.004   8.01 9.6e-08  -0.74
2685  GLTSCR1L       6_33     0.004   6.33 6.4e-08  -1.27
3659      GNMT       6_33     0.038  26.56 2.9e-06   2.33
5776    RPL7L1       6_33     0.003  11.97 1.2e-07   3.32
10984 C6orf226       6_33     0.003   6.83 5.8e-08   1.69
4811     CNPY3       6_33     0.008  19.55 4.7e-07   3.94
3645      PEX6       6_33     0.020  26.55 1.5e-06  -3.48
2686   PPP2R5D       6_33     0.063  35.29 6.5e-06   3.51
3661      MEA1       6_33     0.764  25.23 5.6e-05   4.88
3658    KLHDC3       6_33     0.003   9.83 8.5e-08   2.46
4813      KLC4       6_33     0.003   6.26 5.8e-08  -1.13
388       CUL7       6_33     0.004   8.40 1.1e-07   0.65
2687     MRPL2       6_33     0.007  18.33 3.9e-07   2.68
2691     DNPH1       6_33     0.004  22.69 2.6e-07  -4.30
5774     TTBK1       6_33     0.003  17.81 1.5e-07   3.85
4818   SLC22A7       6_33     0.014  23.53 9.4e-07   0.92
5773     CRIP3       6_33     0.004 141.79 1.7e-06 -13.77
8316    ZNF318       6_33     0.006  21.17 3.4e-07  -3.60
3644    ABCC10       6_33     0.753  32.38 7.1e-05  -1.49
10559   LRRC73       6_33     0.003   6.33 5.8e-08  -1.09
4823     TJAP1       6_33     0.008  16.80 3.8e-07  -1.67
4819     YIPF3       6_33     0.017  22.42 1.1e-06   2.50
3643      XPO5       6_33     0.004  11.52 1.3e-07   0.96
8232      POLH       6_33     0.004  11.52 1.3e-07  -0.96
8437    GTPBP2       6_33     0.007  14.42 3.1e-07   0.78
3657  MAD2L1BP       6_33     0.003   7.58 7.6e-08  -1.41
1337   MRPS18A       6_33     0.025  21.85 1.6e-06   1.58
2697     VEGFA       6_33     0.005   9.97 1.5e-07  -0.33

Version Author Date
dfd2b5f wesleycrouse 2021-09-07
[1] "Region: 10_78"
      genename region_tag susie_pip   mu2     PVE      z
10544  METTL10      10_78     0.007 86.15 1.8e-06 -12.59
253     ZRANB1      10_78     0.019 18.60 1.0e-06  -2.76
8693     CTBP2      10_78     0.007  4.81 9.4e-08  -0.24
2271     BCCIP      10_78     0.008  6.23 1.4e-07   0.75
9944      UROS      10_78     0.008  6.23 1.4e-07   0.75
1205     DHX32      10_78     0.009  7.98 2.1e-07   1.03

Version Author Date
dfd2b5f wesleycrouse 2021-09-07

SNPs with highest PIPs

#snps with PIP>0.8 or 20 highest PIPs
head(ctwas_snp_res[order(-ctwas_snp_res$susie_pip),report_cols_snps],
max(sum(ctwas_snp_res$susie_pip>0.8), 20))
                 id region_tag susie_pip      mu2     PVE       z
21524    rs71658797       1_48     1.000    73.47 2.1e-04    9.85
57639   rs766167074      1_118     1.000  8245.53 2.4e-02   -3.36
100598  rs141849010       2_69     1.000   112.54 3.3e-04   10.82
116626     rs863678      2_106     1.000   202.21 5.9e-04   12.03
123738   rs72926961      2_120     1.000   242.31 7.0e-04   15.67
194756    rs7642977      3_119     1.000    76.91 2.2e-04    8.90
222706  rs111470070       4_51     1.000    88.87 2.6e-04    7.90
259892  rs766378231        5_2     1.000  5375.59 1.6e-02    3.04
259894  rs544289197        5_2     1.000  5332.91 1.5e-02    2.95
276194  rs113088001       5_31     1.000    44.79 1.3e-04   -5.32
280707   rs11743158       5_41     1.000    88.88 2.6e-04    9.57
314011    rs7447593      5_106     1.000   183.37 5.3e-04   18.10
316108    rs7763581        6_2     1.000    40.29 1.2e-04   -5.67
318233     rs630258        6_7     1.000   103.88 3.0e-04   11.48
332309    rs7742789       6_33     1.000   208.92 6.1e-04  -14.41
345069     rs194944       6_56     1.000   118.51 3.4e-04   10.92
360313  rs199804242       6_89     1.000 36498.11 1.1e-01    4.44
372742   rs78148157        7_2     1.000   117.80 3.4e-04   -7.23
372743   rs13241427        7_2     1.000   159.00 4.6e-04   11.36
390126     rs700752       7_34     1.000   138.70 4.0e-04   11.82
399183   rs10277379       7_49     1.000 36256.27 1.1e-01   10.56
399186  rs761767938       7_49     1.000 47103.94 1.4e-01    9.38
399191   rs11406602       7_49     1.000 42919.02 1.2e-01    9.38
399194    rs1544459       7_49     1.000 46512.21 1.4e-01    9.72
413175    rs3757387       7_78     1.000   212.02 6.2e-04   16.58
421568   rs11767572       7_97     1.000    48.30 1.4e-04    6.26
434803    rs4871905       8_24     1.000   288.11 8.4e-04   19.28
492198    rs1360200       9_45     1.000    48.38 1.4e-04   -7.01
502100  rs141350020       9_62     1.000    41.56 1.2e-04   -6.65
506641  rs113790047       10_2     1.000   120.64 3.5e-04   11.91
560785  rs369062552      11_21     1.000   300.13 8.7e-04   14.85
560795   rs34830202      11_21     1.000   325.65 9.5e-04  -15.76
566437   rs11381239      11_29     1.000    53.66 1.6e-04    6.71
597234   rs11616030      12_11     1.000    61.96 1.8e-04   -7.93
598259   rs11056397      12_13     1.000    79.04 2.3e-04   -8.54
610955    rs6581124      12_35     1.000    42.91 1.2e-04   -6.34
610974    rs7397189      12_36     1.000   101.80 3.0e-04  -10.66
613031   rs61931197      12_39     1.000    35.30 1.0e-04    5.70
627234    rs7970581      12_68     1.000    40.98 1.2e-04   -6.35
630001    rs1169300      12_74     1.000   169.11 4.9e-04   13.19
645081  rs141110756      13_21     1.000   160.04 4.6e-04  -13.98
646980    rs7999449      13_25     1.000 21536.77 6.3e-02    3.82
646982  rs775834524      13_25     1.000 21482.34 6.2e-02    3.86
710010  rs145727191      15_35     1.000    47.59 1.4e-04    8.96
711557    rs7174325      15_38     1.000    77.95 2.3e-04    4.22
731111   rs12927956      16_27     1.000   129.01 3.7e-04    9.45
771135     rs162000      18_14     1.000    47.15 1.4e-04    6.99
796302  rs771303621      19_19     1.000  3176.19 9.2e-03   -2.34
801757     rs814573      19_32     1.000    68.59 2.0e-04   -9.01
801839     rs346738      19_32     1.000    38.18 1.1e-04   -6.49
814540   rs80346074      20_14     1.000    35.64 1.0e-04   -5.75
814700    rs6113933      20_16     1.000   279.73 8.1e-04  -22.57
814757    rs2050735      20_16     1.000   252.51 7.3e-04  -19.85
814775    rs6137887      20_16     1.000   786.01 2.3e-03  -33.20
814866  rs113822376      20_17     1.000   350.31 1.0e-03   26.33
814895   rs73102315      20_17     1.000  3420.32 9.9e-03  -43.87
814897    rs3827142      20_17     1.000 19753.52 5.7e-02 -143.60
815374   rs73101426      20_18     1.000    68.98 2.0e-04   -8.63
815529   rs13039195      20_18     1.000    80.71 2.3e-04   -8.00
815581    rs6076340      20_19     1.000    58.31 1.7e-04    1.18
815624  rs117932602      20_19     1.000    67.09 1.9e-04    7.57
815749    rs6084065      20_19     1.000    96.74 2.8e-04   -9.53
822299     rs209955      20_32     1.000    96.89 2.8e-04   11.08
822303    rs2585441      20_32     1.000    53.18 1.5e-04    7.34
833250    rs2834321      21_15     1.000    74.37 2.2e-04   10.08
918918    rs1050420       6_25     1.000   247.08 7.2e-04  -15.26
923409  rs112436252       6_25     1.000 18790.11 5.5e-02   -8.48
923416    rs7739521       6_25     1.000 18536.17 5.4e-02   -5.75
966355  rs201524046      10_81     1.000 13387.49 3.9e-02   -6.04
966374  rs568584257      10_81     1.000 13340.31 3.9e-02   -1.38
973254  rs200003388      13_48     1.000  6788.65 2.0e-02    1.25
1039982  rs71176182      19_23     1.000  2152.81 6.3e-03    3.69
28365    rs12407689       1_62     0.999    45.61 1.3e-04    6.66
40166     rs9425587       1_84     0.999    60.52 1.8e-04    7.69
73318      rs780093       2_16     0.999    52.76 1.5e-04    8.48
127635    rs2068218      2_128     0.999    32.29 9.4e-05   -5.41
334933   rs76572975       6_38     0.999    38.48 1.1e-04   -6.96
704859   rs57194033      15_25     0.999    48.00 1.4e-04   -6.65
717523    rs8037855      15_48     0.999    67.13 1.9e-04   11.40
729194   rs76597446      16_23     0.999    45.78 1.3e-04    6.80
730945    rs7205341      16_27     0.999    70.66 2.1e-04    8.38
753043    rs3760511      17_22     0.999    32.21 9.3e-05    5.67
834098     rs219783      21_17     0.999    58.55 1.7e-04   -8.10
71332     rs3771257       2_12     0.998    33.85 9.8e-05   -5.51
80778    rs77981979       2_30     0.998    32.19 9.3e-05    5.54
238630  rs115336319       4_83     0.998    31.01 9.0e-05   -4.40
324742    rs1980449       6_19     0.998    43.69 1.3e-04   -6.51
324917  rs115740542       6_20     0.998    34.74 1.0e-04    5.96
325402  rs187257713       6_21     0.998    34.27 9.9e-05   -6.33
326585    rs2248162       6_24     0.998   111.02 3.2e-04  -10.90
506161   rs12380852       9_73     0.998    32.97 9.6e-05    6.56
538864  rs117081694      10_64     0.998    32.88 9.5e-05   -5.62
550559  rs186376420       11_2     0.998    43.38 1.3e-04   -6.85
550607   rs10832888       11_2     0.998    35.46 1.0e-04   -5.99
664843     rs630943      13_59     0.998    31.18 9.0e-05   -5.30
704830    rs7162116      15_25     0.998    51.90 1.5e-04    8.38
720007  rs138922864       16_3     0.998    35.83 1.0e-04    5.77
743440    rs4843216      16_52     0.998    31.79 9.2e-05    4.09
814921    rs6515382      20_17     0.998  1439.34 4.2e-03   52.69
822326    rs6068816      20_32     0.998    36.62 1.1e-04   -5.82
837673   rs73907568      21_23     0.998    31.33 9.1e-05    5.42
100590  rs142743147       2_69     0.997    31.35 9.1e-05    5.33
325721  rs138975185       6_22     0.997    32.78 9.5e-05   -5.94
710039    rs2955742      15_36     0.997    58.63 1.7e-04    7.22
814680  rs112734453      20_16     0.997   157.80 4.6e-04  -16.69
350069    rs9496567       6_67     0.996    30.00 8.7e-05    5.30
461899  rs376277175       8_79     0.996    39.73 1.1e-04   -7.81
434793     rs310311       8_24     0.995   121.30 3.5e-04  -14.62
726978    rs7203451      16_19     0.995   259.48 7.5e-04  -12.43
318266    rs3799511        6_7     0.994    40.87 1.2e-04   -4.52
421552     rs288762       7_97     0.994   113.13 3.3e-04   12.52
214949     rs723585       4_40     0.993    75.06 2.2e-04   -8.70
421819   rs12697965       7_98     0.993    36.96 1.1e-04    8.26
485459  rs117451470       9_30     0.993    28.74 8.3e-05   -4.89
627122   rs35287743      12_66     0.993    33.27 9.6e-05    6.11
630954    rs1055941      12_75     0.993    38.37 1.1e-04    6.36
704876   rs11071331      15_25     0.993    42.06 1.2e-04    2.82
31430    rs11102041       1_69     0.992    80.41 2.3e-04   -6.06
259960   rs62331274        5_2     0.992    60.97 1.8e-04    5.92
717512   rs11634241      15_48     0.992   165.39 4.8e-04   15.47
757763  rs139064373      17_36     0.992    27.97 8.1e-05   -3.98
31428   rs201469841       1_69     0.991    48.13 1.4e-04   -0.98
40768    rs34484492       1_85     0.991    32.86 9.5e-05   -5.95
332498    rs9357429       6_34     0.991    29.71 8.6e-05   -5.21
379939   rs17644994       7_17     0.991    36.24 1.0e-04    6.34
506148    rs1886296       9_73     0.991    29.64 8.5e-05    6.18
593758     rs723672       12_2     0.990    28.86 8.3e-05    5.20
31259    rs78852738       1_67     0.989    28.21 8.1e-05   -5.62
98518    rs11123169       2_67     0.989    54.90 1.6e-04   -7.35
114301    rs7594986      2_103     0.989    61.11 1.8e-04    7.46
235099   rs10024666       4_75     0.987    27.29 7.8e-05    4.93
875475   rs17050272       2_70     0.987   112.22 3.2e-04   10.62
578936   rs57569860      11_52     0.986    26.66 7.6e-05    4.87
421871   rs11761498       7_98     0.985    58.26 1.7e-04    7.88
717499   rs75422555      15_47     0.985    33.93 9.7e-05   -6.70
311671    rs1422755      5_102     0.984    34.95 1.0e-04    5.71
322772    rs3763278       6_15     0.984    30.03 8.6e-05    4.39
826650   rs78581838       21_2     0.984    38.29 1.1e-04   -6.35
971148    rs3184504      12_67     0.984   786.70 2.2e-03  -27.94
638515   rs79490353       13_7     0.982    27.39 7.8e-05    4.58
32876   rs149803516       1_71     0.981    31.04 8.8e-05   -5.35
93036    rs11686739       2_54     0.981    27.57 7.9e-05    4.82
314867    rs4701140      5_108     0.981    27.14 7.7e-05    4.90
352206   rs12196331       6_71     0.981    29.81 8.5e-05    5.73
446408   rs17397411       8_50     0.981    27.95 8.0e-05    5.08
57677     rs1769794      1_118     0.980  4592.09 1.3e-02    5.93
79901      rs588206       2_28     0.980    39.72 1.1e-04    6.25
286872    rs3952745       5_53     0.980    28.16 8.0e-05   -5.36
690625   rs72698888      14_48     0.979    26.70 7.6e-05    4.87
328597   rs56144236       6_27     0.978    28.88 8.2e-05   -5.74
549092   rs75184896      10_84     0.977    26.91 7.6e-05    4.92
610229  rs113897279      12_33     0.977    26.92 7.6e-05    4.77
326087    rs3130253       6_23     0.976    39.17 1.1e-04   -5.88
2539     rs61772085        1_6     0.975    32.95 9.3e-05    5.72
926075  rs148684631       6_61     0.975    76.17 2.2e-04    9.21
332411   rs10223666       6_34     0.973   229.53 6.5e-04   15.67
551352    rs1983100       11_3     0.972    36.19 1.0e-04    5.82
229718    rs6532770       4_66     0.971    36.37 1.0e-04    6.09
608464   rs11830037      12_30     0.971    29.44 8.3e-05    5.71
693060   rs55964922      14_53     0.971    27.18 7.7e-05   -5.26
788827    rs8108787       19_2     0.971    30.85 8.7e-05   -5.38
523150    rs4935194      10_33     0.970    31.73 8.9e-05    6.79
833244    rs2154568      21_15     0.970    37.12 1.0e-04    7.63
476658   rs16931379       9_12     0.967    29.10 8.2e-05   -5.17
816173  rs142348466      20_19     0.967    40.71 1.1e-04   -5.72
111366    rs1980154       2_96     0.966    33.63 9.4e-05    6.27
814352    rs6112780      20_14     0.966    26.30 7.4e-05    4.36
1046592  rs71336771      20_15     0.966    49.73 1.4e-04   -7.59
26806     rs9432440       1_58     0.964    33.12 9.3e-05    5.86
139639   rs59302296        3_7     0.964    28.99 8.1e-05    5.13
692591   rs34804741      14_52     0.964    27.54 7.7e-05   -5.54
660217  rs565714342      13_49     0.962    31.23 8.7e-05    5.46
466368   rs10094480       8_87     0.961    32.04 8.9e-05   -5.39
735812     rs244423      16_37     0.961    79.12 2.2e-04  -10.67
390233  rs113473694       7_35     0.960    26.37 7.4e-05   -4.71
64128     rs4335411      1_131     0.959    25.35 7.1e-05   -4.73
531514    rs1649987      10_50     0.958    26.17 7.3e-05   -4.86
276216     rs255749       5_31     0.957    32.90 9.1e-05    4.79
329153     rs493871       6_28     0.954    31.76 8.8e-05    5.07
3355       rs205474        1_8     0.950    29.41 8.1e-05   -5.34
143537     rs711731       3_15     0.944    24.99 6.8e-05    4.67
302983   rs12109255       5_84     0.944    26.98 7.4e-05   -4.96
971210  rs150383897      12_67     0.944    93.70 2.6e-04    6.13
456323    rs1786344       8_69     0.943    26.67 7.3e-05    4.66
3329       rs284317        1_7     0.942    25.53 7.0e-05   -4.00
706768    rs8041454      15_29     0.942    61.28 1.7e-04   -9.80
790829  rs146992497       19_6     0.939    23.58 6.4e-05    4.47
582359  rs117680242      11_59     0.938    25.51 7.0e-05    4.54
814310   rs61571241      20_14     0.938    25.35 6.9e-05    4.03
517763   rs11007559      10_21     0.936    29.41 8.0e-05    5.17
58860   rs113358743      1_121     0.935    25.09 6.8e-05    4.60
79032    rs13428381       2_27     0.935    33.90 9.2e-05   -6.15
344600    rs2444819       6_55     0.935    47.67 1.3e-04    7.14
222684   rs10006482       4_51     0.933    38.04 1.0e-04    2.54
259882   rs10040050        5_2     0.929  4947.59 1.3e-02    3.65
259814     rs386057        5_1     0.928    45.55 1.2e-04   -6.21
845197   rs71195055      22_15     0.928    36.47 9.8e-05    6.17
236172   rs17296659       4_78     0.927    33.59 9.0e-05   -5.66
776360   rs12954053      18_24     0.927    30.68 8.3e-05    4.84
710848       rs3128      15_37     0.926    26.28 7.1e-05    3.93
272900    rs3096211       5_26     0.925    30.71 8.2e-05    3.95
331858    rs1015149       6_32     0.925    26.92 7.2e-05   -5.21
814377    rs6046722      20_14     0.924    25.68 6.9e-05   -4.63
645410   rs77871802      13_21     0.923    35.37 9.5e-05   -5.49
421817    rs6967289       7_98     0.920    45.89 1.2e-04    7.69
704880    rs7166305      15_25     0.919    57.04 1.5e-04   -4.72
588543   rs73018243      11_75     0.918    24.05 6.4e-05   -4.45
731136   rs72803263      16_27     0.918    25.72 6.9e-05    3.06
789294    rs1064543       19_2     0.918    26.34 7.0e-05    4.75
276026    rs9716017       5_31     0.916    30.10 8.0e-05   -4.77
15345     rs2780869       1_35     0.915    31.27 8.3e-05   -5.45
302229     rs156094       5_83     0.914    27.30 7.2e-05   -5.14
463686    rs4604455       8_83     0.913    26.13 6.9e-05   -5.41
33715     rs1975283       1_72     0.912    57.65 1.5e-04   -7.61
748852    rs1005395      17_13     0.911    24.02 6.4e-05    4.42
494055  rs141649706       9_48     0.909    26.01 6.9e-05   -5.14
371498    rs9456260      6_110     0.908    25.71 6.8e-05    4.93
712157   rs62027546      15_38     0.908    26.35 7.0e-05    4.75
412800   rs57707296       7_78     0.907    30.45 8.0e-05   -2.95
509253   rs78836918       10_7     0.905    23.93 6.3e-05   -4.43
23244     rs6661091       1_50     0.903    55.48 1.5e-04    7.49
734379   rs79574106      16_33     0.903    24.90 6.5e-05    4.64
550354    rs7115054       11_2     0.898   107.07 2.8e-04    9.67
818151    rs6029393      20_24     0.898    40.36 1.1e-04   -6.18
318199   rs10458103        6_7     0.896    52.19 1.4e-04    9.14
373165   rs62442558        7_4     0.896    25.87 6.7e-05    4.86
927534    rs9359877       6_61     0.896    31.30 8.1e-05    5.68
711555   rs12442871      15_38     0.894    60.56 1.6e-04   -1.35
838319   rs34526805       22_1     0.894    26.53 6.9e-05    4.94
794620    rs3794991      19_15     0.892    37.80 9.8e-05    5.98
329848    rs9462097       6_29     0.890    27.48 7.1e-05   -5.27
816457  rs138112660      20_20     0.890    24.76 6.4e-05   -4.35
815394  rs147493439      20_18     0.889    28.61 7.4e-05    1.72
561203   rs10835944      11_22     0.887    26.12 6.7e-05   -4.50
579695    rs7934169      11_54     0.887    23.69 6.1e-05   -4.37
792706  rs144089403      19_10     0.887    25.03 6.4e-05   -4.53
80347      rs935375       2_29     0.886    25.44 6.5e-05   -4.77
571340   rs12420758      11_38     0.886    35.50 9.1e-05   -6.35
47910    rs72739200      1_100     0.884    25.57 6.6e-05    4.65
372739    rs4487642        7_2     0.884    51.68 1.3e-04   -3.40
706570    rs4569205      15_28     0.884    31.95 8.2e-05    5.55
808148    rs1887854       20_3     0.884    23.98 6.2e-05   -4.49
35074   rs148295181       1_74     0.883    23.14 5.9e-05   -4.25
698685   rs12908082      15_11     0.872    24.72 6.3e-05   -4.47
561136    rs6484575      11_22     0.870    27.91 7.1e-05    3.73
300380   rs12153431       5_79     0.869    36.77 9.3e-05    5.44
114787  rs139389756      2_104     0.868    24.69 6.2e-05    4.55
13118   rs115398900       1_30     0.865    24.23 6.1e-05   -4.44
631136   rs11057830      12_76     0.865    24.22 6.1e-05    4.39
112928    rs7607980      2_100     0.857    38.39 9.6e-05    6.04
549146    rs2767419      10_85     0.852    24.25 6.0e-05   -4.45
640906   rs57217617      13_13     0.852    24.77 6.1e-05    4.59
137633    rs4621315        3_4     0.850    26.99 6.7e-05    4.78
436909  rs139800483       8_29     0.850    25.84 6.4e-05   -4.70
439005    rs6474516       8_34     0.850    24.94 6.2e-05   -4.50
257738  rs181147923      4_120     0.849    26.85 6.6e-05    4.66
330324   rs10947659       6_29     0.848    25.91 6.4e-05    4.63
360312    rs2327654       6_89     0.848 36555.79 9.0e-02    4.57
226662    rs9996470       4_60     0.846    27.12 6.7e-05   -4.86
739622    rs9928026      16_44     0.840    76.81 1.9e-04   -8.23
816668  rs111791178      20_21     0.840    28.40 6.9e-05    5.59
133980   rs12623661      2_141     0.838    23.92 5.8e-05   -4.32
803049  rs116922356      19_34     0.837    26.95 6.6e-05   -4.61
571050   rs75592015      11_37     0.836    26.82 6.5e-05    4.90
744018    rs9928396      16_54     0.836    47.58 1.2e-04   -8.57
38434    rs72691538       1_82     0.835    26.54 6.4e-05   -4.60
121090   rs10207044      2_113     0.833    26.56 6.4e-05    5.12
966358   rs74160216      10_81     0.833 13333.32 3.2e-02   -1.37
805825  rs371808578      19_38     0.831    30.71 7.4e-05    5.34
192112     rs822362      3_114     0.829    79.52 1.9e-04    9.06
700661    rs2016840      15_17     0.829    25.80 6.2e-05   -4.68
32600     rs6679677       1_70     0.826    25.10 6.0e-05    4.46
326055    rs1233385       6_23     0.823    75.41 1.8e-04    9.07
710215  rs529538402      15_36     0.820    24.59 5.9e-05    0.14
145100   rs11711833       3_18     0.818    67.59 1.6e-04   -8.28
365342    rs4870114       6_99     0.816    28.55 6.8e-05    5.06
711915   rs28587326      15_38     0.816    32.70 7.8e-05    5.45
33448     rs3949262       1_72     0.813    29.39 6.9e-05   -5.07
116686   rs72940807      2_106     0.812    30.97 7.3e-05    6.69
246911   rs78038533      4_101     0.810    25.08 5.9e-05   -4.76
232632   rs56011514       4_72     0.809    27.67 6.5e-05    4.81
273303  rs149976817       5_27     0.809    23.61 5.5e-05    4.11
259741  rs142220278        5_1     0.808    26.92 6.3e-05    3.95
283965   rs17263175       5_47     0.804    23.98 5.6e-05    4.31
743381   rs56286510      16_52     0.804    25.18 5.9e-05   -3.05
195518   rs13059257      3_120     0.803    32.15 7.5e-05    5.38

SNPs with largest effect sizes

#plot PIP vs effect size
plot(ctwas_snp_res$susie_pip, ctwas_snp_res$mu2, xlab="PIP", ylab="mu^2", main="SNP PIPs vs Effect Size")

Version Author Date
dfd2b5f wesleycrouse 2021-09-07
#SNPs with 50 largest effect sizes
head(ctwas_snp_res[order(-ctwas_snp_res$mu2),report_cols_snps],50)
                id region_tag susie_pip      mu2     PVE     z
399186 rs761767938       7_49     1.000 47103.94 1.4e-01  9.38
399194   rs1544459       7_49     1.000 46512.21 1.4e-01  9.72
399190  rs11972122       7_49     0.000 42936.39 1.3e-06  9.25
399191  rs11406602       7_49     1.000 42919.02 1.2e-01  9.38
399195   rs1544458       7_49     0.000 42311.24 0.0e+00  9.45
399185   rs6465794       7_49     0.000 41630.90 0.0e+00  8.90
399184   rs6465793       7_49     0.000 41630.26 0.0e+00  8.90
399215  rs10272350       7_49     0.000 41564.31 0.0e+00  9.12
399219   rs2463008       7_49     0.000 39540.07 0.0e+00  9.80
399225  rs10267180       7_49     0.000 39521.92 0.0e+00  9.74
399165  rs13240016       7_49     0.000 39386.76 0.0e+00  8.60
399174   rs7799383       7_49     0.000 38449.85 0.0e+00  8.13
360312   rs2327654       6_89     0.848 36555.79 9.0e-02  4.57
360329   rs6923513       6_89     0.631 36554.22 6.7e-02  4.56
360313 rs199804242       6_89     1.000 36498.11 1.1e-01  4.44
360316 rs113527452       6_89     0.000 36362.44 6.8e-14  4.54
399183  rs10277379       7_49     1.000 36256.27 1.1e-01 10.56
360321 rs200796875       6_89     0.000 36145.85 0.0e+00  4.41
360334   rs7756915       6_89     0.000 35915.65 0.0e+00  4.41
399177   rs7795371       7_49     0.000 35748.18 0.0e+00 10.68
360327   rs6570040       6_89     0.000 34475.24 0.0e+00  4.50
360314   rs6570031       6_89     0.000 34393.91 0.0e+00  4.51
360315   rs9389323       6_89     0.000 34375.06 0.0e+00  4.46
399239    rs848470       7_49     0.000 32612.24 0.0e+00 -7.24
360331   rs9321531       6_89     0.000 30183.74 0.0e+00  4.48
360304   rs9321528       6_89     0.000 29813.68 0.0e+00  5.03
360332   rs9494389       6_89     0.000 28336.04 0.0e+00  4.10
360336   rs5880262       6_89     0.000 28268.41 0.0e+00  3.92
360310   rs2208574       6_89     0.000 27357.20 0.0e+00  4.35
360309   rs1033755       6_89     0.000 27346.90 0.0e+00  4.19
399133   rs9640663       7_49     0.000 27102.90 0.0e+00  7.45
399129   rs2868787       7_49     0.000 27100.95 0.0e+00  7.42
360307   rs2038551       6_89     0.000 26864.98 0.0e+00  5.03
360318   rs9494377       6_89     0.000 26845.53 0.0e+00  4.07
360305   rs2038550       6_89     0.000 26791.90 0.0e+00  4.97
399144   rs4727451       7_49     0.000 26704.33 0.0e+00  7.20
399163  rs58729654       7_49     0.000 26613.65 0.0e+00  8.05
399157   rs6465771       7_49     0.000 26051.71 0.0e+00  7.31
399249  rs34022094       7_49     0.000 25436.74 0.0e+00 -6.60
399247    rs848458       7_49     0.000 25420.14 0.0e+00 -6.51
399123   rs1972568       7_49     0.000 24142.99 0.0e+00  7.28
399114   rs7788492       7_49     0.000 24135.77 0.0e+00  7.20
399116  rs67630171       7_49     0.000 24122.18 0.0e+00  7.17
399115   rs4729540       7_49     0.000 24108.83 0.0e+00  7.22
399121   rs7806750       7_49     0.000 24087.23 0.0e+00  7.25
399111   rs7357107       7_49     0.000 24084.90 0.0e+00  7.22
399203   rs4729772       7_49     0.000 22694.57 0.0e+00  8.90
360294   rs6570026       6_89     0.000 22217.44 0.0e+00  4.28
360290   rs6926161       6_89     0.000 21932.90 0.0e+00  4.25
360299   rs6930773       6_89     0.000 21568.69 0.0e+00  5.04

SNPs with highest PVE

#SNPs with 50 highest pve
head(ctwas_snp_res[order(-ctwas_snp_res$PVE),report_cols_snps],50)
                 id region_tag susie_pip      mu2    PVE       z
399186  rs761767938       7_49     1.000 47103.94 0.1400    9.38
399194    rs1544459       7_49     1.000 46512.21 0.1400    9.72
399191   rs11406602       7_49     1.000 42919.02 0.1200    9.38
360313  rs199804242       6_89     1.000 36498.11 0.1100    4.44
399183   rs10277379       7_49     1.000 36256.27 0.1100   10.56
360312    rs2327654       6_89     0.848 36555.79 0.0900    4.57
360329    rs6923513       6_89     0.631 36554.22 0.0670    4.56
646980    rs7999449      13_25     1.000 21536.77 0.0630    3.82
646982  rs775834524      13_25     1.000 21482.34 0.0620    3.86
814897    rs3827142      20_17     1.000 19753.52 0.0570 -143.60
923409  rs112436252       6_25     1.000 18790.11 0.0550   -8.48
923416    rs7739521       6_25     1.000 18536.17 0.0540   -5.75
966355  rs201524046      10_81     1.000 13387.49 0.0390   -6.04
966374  rs568584257      10_81     1.000 13340.31 0.0390   -1.38
966358   rs74160216      10_81     0.833 13333.32 0.0320   -1.37
57639   rs766167074      1_118     1.000  8245.53 0.0240   -3.36
923915  rs577861830       6_25     0.500 16709.59 0.0240   -6.53
923916  rs560154168       6_25     0.500 16709.59 0.0240   -6.53
973254  rs200003388      13_48     1.000  6788.65 0.0200    1.25
259892  rs766378231        5_2     1.000  5375.59 0.0160    3.04
259894  rs544289197        5_2     1.000  5332.91 0.0150    2.95
57677     rs1769794      1_118     0.980  4592.09 0.0130    5.93
259882   rs10040050        5_2     0.929  4947.59 0.0130    3.65
814895   rs73102315      20_17     1.000  3420.32 0.0099  -43.87
796302  rs771303621      19_19     1.000  3176.19 0.0092   -2.34
57636    rs10489611      1_118     0.324  8230.31 0.0078   -3.63
973261    rs4073353      13_48     0.359  6791.51 0.0071    5.66
57630     rs2256908      1_118     0.293  8229.85 0.0070   -3.64
57637     rs2486737      1_118     0.271  8230.20 0.0065   -3.63
57633     rs2790891      1_118     0.269  8229.81 0.0064   -3.63
57634     rs2491405      1_118     0.269  8229.81 0.0064   -3.63
796304  rs111064632      19_19     0.698  3171.53 0.0064   -2.24
1039982  rs71176182      19_23     1.000  2152.81 0.0063    3.69
57638      rs971534      1_118     0.237  8230.13 0.0057   -3.62
973260   rs67878607      13_48     0.243  6791.62 0.0048    5.65
966357  rs117610876      10_81     0.115 13330.80 0.0044   -1.38
814921    rs6515382      20_17     0.998  1439.34 0.0042   52.69
973257    rs9584309      13_48     0.214  6792.12 0.0042    5.65
796308   rs12151080      19_19     0.408  3163.29 0.0038   -2.30
973151    rs7336153      13_48     0.633  2036.62 0.0037    7.96
796306    rs6511437      19_19     0.375  3169.14 0.0035   -2.28
1039944  rs10414879      19_23     0.402  2220.71 0.0026    3.88
814775    rs6137887      20_16     1.000   786.01 0.0023  -33.20
971148    rs3184504      12_67     0.984   786.70 0.0022  -27.94
973152    rs4098441      13_48     0.347  2023.17 0.0020    7.91
222825   rs17253722       4_52     0.793   651.87 0.0015   29.86
1039942  rs28633567      19_23     0.228  2221.51 0.0015    3.84
973253    rs7321862      13_48     0.069  6787.40 0.0014    5.64
57626     rs1076804      1_118     0.055  8217.64 0.0013   -3.63
57646     rs2211176      1_118     0.056  8225.35 0.0013   -3.59

SNPs with largest z scores

#SNPs with 50 largest z scores
head(ctwas_snp_res[order(-abs(ctwas_snp_res$z)),report_cols_snps],50)
                id region_tag susie_pip      mu2     PVE       z
814897   rs3827142      20_17     1.000 19753.52 5.7e-02 -143.60
814898   rs5030707      20_17     0.000 19614.98 0.0e+00 -142.96
814893  rs13039536      20_17     0.000 19577.77 0.0e+00 -142.76
814889   rs8121283      20_17     0.000 19084.00 0.0e+00 -140.90
814891   rs8121405      20_17     0.000 19061.59 0.0e+00 -140.84
814890   rs8115417      20_17     0.000 19054.13 0.0e+00 -140.80
814886  rs57549987      20_17     0.000 19053.80 0.0e+00 -140.79
814885   rs1555355      20_17     0.000 19050.79 0.0e+00 -140.78
814888   rs6036471      20_17     0.000 19034.06 0.0e+00 -140.73
814883  rs56077567      20_17     0.000 18975.74 0.0e+00 -140.52
814887   rs6036470      20_17     0.000 18938.72 0.0e+00 -140.48
814882  rs13043266      20_17     0.000 18874.84 0.0e+00 -140.24
814877   rs4815223      20_17     0.000 18428.19 0.0e+00 -138.69
814879  rs34792920      20_17     0.000 18353.43 0.0e+00 -138.52
814878   rs6048925      20_17     0.000 18462.98 0.0e+00 -138.45
814900 rs199651024      20_17     0.000 14059.48 0.0e+00 -128.69
814876 rs200582457      20_17     0.000 10399.68 0.0e+00  -99.72
814938   rs4629231      20_17     0.000  6464.14 0.0e+00  -90.22
814916  rs77770287      20_17     0.000  6311.18 0.0e+00  -89.45
814918   rs2226058      20_17     0.000  6273.16 0.0e+00  -89.20
814892 rs200585819      20_17     0.000  9401.03 0.0e+00  -84.58
814880    rs726217      20_17     0.000  9332.86 0.0e+00   84.19
814911   rs2983605      20_17     0.000  8439.12 0.0e+00   78.56
814921   rs6515382      20_17     0.998  1439.34 4.2e-03   52.69
814920   rs1538909      20_17     0.000  2003.69 0.0e+00  -52.55
814923   rs7263473      20_17     0.002  1422.11 9.7e-06   52.49
814937  rs75841856      20_17     0.000  1403.26 3.1e-12   52.15
814922   rs6036488      20_17     0.000  1961.36 0.0e+00  -52.06
814939   rs6083243      20_17     0.000  1401.72 0.0e+00  -45.68
814928  rs62208893      20_17     0.000  1396.50 0.0e+00  -45.65
814927   rs6132654      20_17     0.000  1396.26 0.0e+00  -45.64
814942  rs11087433      20_17     0.000  1394.76 0.0e+00  -45.64
814945   rs6049062      20_17     0.000  1393.01 0.0e+00  -45.59
814954  rs35488686      20_17     0.000  1293.38 0.0e+00   45.52
814895  rs73102315      20_17     1.000  3420.32 9.9e-03  -43.87
814884  rs62208864      20_17     0.000   848.40 0.0e+00   43.59
814935  rs35783127      20_17     0.000  1030.48 0.0e+00   41.94
814929  rs35627338      20_17     0.000  1022.34 0.0e+00   41.79
814941   rs4380313      20_17     0.000  1021.83 0.0e+00   41.78
814933   rs8121966      20_17     0.000  1020.32 0.0e+00   41.77
814943  rs60609640      20_17     0.000  1020.06 0.0e+00   41.74
814917  rs10854252      20_17     0.000   652.03 0.0e+00   40.06
814958   rs6114276      20_17     0.000  1383.76 0.0e+00  -39.78
814969   rs6114287      20_17     0.000  1381.70 0.0e+00  -39.66
814980  rs72490829      20_17     0.000  1386.17 0.0e+00  -39.66
814994   rs6106724      20_17     0.000  1381.53 0.0e+00  -39.62
814995   rs8115480      20_17     0.000  1381.71 0.0e+00  -39.62
814989   rs6106721      20_17     0.000  1379.42 0.0e+00  -39.61
815005   rs6114316      20_17     0.000  1381.98 0.0e+00  -39.61
814972 rs144538582      20_17     0.000  1090.64 0.0e+00   36.48

Gene set enrichment for genes with PIP>0.8

#GO enrichment analysis
library(enrichR)
Welcome to enrichR
Checking connection ... 
Enrichr ... Connection is Live!
FlyEnrichr ... Connection is available!
WormEnrichr ... Connection is available!
YeastEnrichr ... Connection is available!
FishEnrichr ... Connection is available!
dbs <- c("GO_Biological_Process_2021", "GO_Cellular_Component_2021", "GO_Molecular_Function_2021")
genes <- ctwas_gene_res$genename[ctwas_gene_res$susie_pip>0.8]

#number of genes for gene set enrichment
length(genes)
[1] 21
if (length(genes)>0){
  GO_enrichment <- enrichr(genes, dbs)

  for (db in dbs){
    print(db)
    df <- GO_enrichment[[db]]
    df <- df[df$Adjusted.P.value<0.05,c("Term", "Overlap", "Adjusted.P.value", "Genes")]
    print(df)
  }
  
  #DisGeNET enrichment
  
  # devtools::install_bitbucket("ibi_group/disgenet2r")
  library(disgenet2r)
  
  disgenet_api_key <- get_disgenet_api_key(
                    email = "wesleycrouse@gmail.com", 
                    password = "uchicago1" )
  
  Sys.setenv(DISGENET_API_KEY= disgenet_api_key)
  
  res_enrich <-disease_enrichment(entities=genes, vocabulary = "HGNC",
                               database = "CURATED" )
  
  df <- res_enrich@qresult[1:10, c("Description", "FDR", "Ratio",  "BgRatio")]
  print(df)
  
  #WebGestalt enrichment
  library(WebGestaltR)
  
  background <- ctwas_gene_res$genename
  
  #listGeneSet()
  databases <- c("pathway_KEGG", "disease_GLAD4U", "disease_OMIM")
  
  enrichResult <- WebGestaltR(enrichMethod="ORA", organism="hsapiens",
                              interestGene=genes, referenceGene=background,
                              enrichDatabase=databases, interestGeneType="genesymbol",
                              referenceGeneType="genesymbol", isOutput=F)
  print(enrichResult[,c("description", "size", "overlap", "FDR", "database", "userId")])
}
Uploading data to Enrichr... Done.
  Querying GO_Biological_Process_2021... Done.
  Querying GO_Cellular_Component_2021... Done.
  Querying GO_Molecular_Function_2021... Done.
Parsing results... Done.
[1] "GO_Biological_Process_2021"
                                          Term Overlap Adjusted.P.value
1 epithelial cell differentiation (GO:0030855)   3/101       0.03936883
            Genes
1 VIL1;TCF21;E2F4
[1] "GO_Cellular_Component_2021"
[1] Term             Overlap          Adjusted.P.value Genes           
<0 rows> (or 0-length row.names)
[1] "GO_Molecular_Function_2021"
[1] Term             Overlap          Adjusted.P.value Genes           
<0 rows> (or 0-length row.names)
ZNF827 gene(s) from the input list not found in DisGeNET CURATEDADAMTS4 gene(s) from the input list not found in DisGeNET CURATEDNPM2 gene(s) from the input list not found in DisGeNET CURATEDMSI2 gene(s) from the input list not found in DisGeNET CURATEDLPCAT4 gene(s) from the input list not found in DisGeNET CURATEDAC142472.6 gene(s) from the input list not found in DisGeNET CURATEDRAI14 gene(s) from the input list not found in DisGeNET CURATED
                                                                                         Description
43                                                                        Hereditary orotic aciduria
47                                                                                   Orotic aciduria
48                                                                Hereditary orotic aciduria, type 1
85                                                                  DEAFNESS, AUTOSOMAL RECESSIVE 32
86                                                               MICROCEPHALY, AMISH TYPE (disorder)
87                     Dehydrated Hereditary Stomatocytosis, Pseudohyperkalemia, and Perinatal Edema
93                                       Progressive polyneuropathy with bilateral striatal necrosis
99                                                                          LYMPHATIC MALFORMATION 6
100                                    MITOCHONDRIAL DNA DEPLETION SYNDROME 15 (HEPATOCEREBRAL TYPE)
101 DEHYDRATED HEREDITARY STOMATOCYTOSIS 1 WITH OR WITHOUT PSEUDOHYPERKALEMIA AND/OR PERINATAL EDEMA
           FDR Ratio BgRatio
43  0.01486291  1/14  1/9703
47  0.01486291  1/14  1/9703
48  0.01486291  1/14  1/9703
85  0.01486291  1/14  1/9703
86  0.01486291  1/14  1/9703
87  0.01486291  1/14  1/9703
93  0.01486291  1/14  1/9703
99  0.01486291  1/14  1/9703
100 0.01486291  1/14  1/9703
101 0.01486291  1/14  1/9703
******************************************

*                                        *

*          Welcome to WebGestaltR !      *

*                                        *

******************************************
Loading the functional categories...
Loading the ID list...
Loading the reference list...
Performing the enrichment analysis...
Warning in oraEnrichment(interestGeneList, referenceGeneList, geneSet,
minNum = minNum, : No significant gene set is identified based on FDR 0.05!
NULL

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

Matrix products: default
BLAS/LAPACK: /software/openblas-0.2.19-el7-x86_64/lib/libopenblas_haswellp-r0.2.19.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] WebGestaltR_0.4.4 disgenet2r_0.99.2 enrichR_3.0       cowplot_1.0.0    
[5] ggplot2_3.3.3    

loaded via a namespace (and not attached):
  [1] bitops_1.0-6                matrixStats_0.57.0         
  [3] fs_1.3.1                    bit64_4.0.5                
  [5] doParallel_1.0.16           progress_1.2.2             
  [7] httr_1.4.1                  rprojroot_2.0.2            
  [9] GenomeInfoDb_1.20.0         doRNG_1.8.2                
 [11] tools_3.6.1                 utf8_1.2.1                 
 [13] R6_2.5.0                    DBI_1.1.1                  
 [15] BiocGenerics_0.30.0         colorspace_1.4-1           
 [17] withr_2.4.1                 tidyselect_1.1.0           
 [19] prettyunits_1.0.2           bit_4.0.4                  
 [21] curl_3.3                    compiler_3.6.1             
 [23] git2r_0.26.1                Biobase_2.44.0             
 [25] DelayedArray_0.10.0         rtracklayer_1.44.0         
 [27] labeling_0.3                scales_1.1.0               
 [29] readr_1.4.0                 apcluster_1.4.8            
 [31] stringr_1.4.0               digest_0.6.20              
 [33] Rsamtools_2.0.0             svglite_1.2.2              
 [35] rmarkdown_1.13              XVector_0.24.0             
 [37] pkgconfig_2.0.3             htmltools_0.3.6            
 [39] fastmap_1.1.0               BSgenome_1.52.0            
 [41] rlang_0.4.11                RSQLite_2.2.7              
 [43] generics_0.0.2              farver_2.1.0               
 [45] jsonlite_1.6                BiocParallel_1.18.0        
 [47] dplyr_1.0.7                 VariantAnnotation_1.30.1   
 [49] RCurl_1.98-1.1              magrittr_2.0.1             
 [51] GenomeInfoDbData_1.2.1      Matrix_1.2-18              
 [53] Rcpp_1.0.6                  munsell_0.5.0              
 [55] S4Vectors_0.22.1            fansi_0.5.0                
 [57] gdtools_0.1.9               lifecycle_1.0.0            
 [59] stringi_1.4.3               whisker_0.3-2              
 [61] yaml_2.2.0                  SummarizedExperiment_1.14.1
 [63] zlibbioc_1.30.0             plyr_1.8.4                 
 [65] grid_3.6.1                  blob_1.2.1                 
 [67] parallel_3.6.1              promises_1.0.1             
 [69] crayon_1.4.1                lattice_0.20-38            
 [71] Biostrings_2.52.0           GenomicFeatures_1.36.3     
 [73] hms_1.1.0                   knitr_1.23                 
 [75] pillar_1.6.1                igraph_1.2.4.1             
 [77] GenomicRanges_1.36.0        rjson_0.2.20               
 [79] rngtools_1.5                codetools_0.2-16           
 [81] reshape2_1.4.3              biomaRt_2.40.1             
 [83] stats4_3.6.1                XML_3.98-1.20              
 [85] glue_1.4.2                  evaluate_0.14              
 [87] data.table_1.14.0           foreach_1.5.1              
 [89] vctrs_0.3.8                 httpuv_1.5.1               
 [91] gtable_0.3.0                purrr_0.3.4                
 [93] assertthat_0.2.1            cachem_1.0.5               
 [95] xfun_0.8                    later_0.8.0                
 [97] tibble_3.1.2                iterators_1.0.13           
 [99] GenomicAlignments_1.20.1    AnnotationDbi_1.46.0       
[101] memoise_2.0.0               IRanges_2.18.1             
[103] workflowr_1.6.2             ellipsis_0.3.2