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

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-30670_irnt_Liver.Rmd) and HTML (docs/ukb-d-30670_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 Urea (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-30670_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.0052340814 0.0002113812 
#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 
33.20338 12.32724 
#report sample size
print(sample_size)
[1] 344052
#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.005506366 0.065870944 
#compare sum(PIP*mu2/sample_size) with above PVE calculation
c(sum(ctwas_gene_res$PVE),sum(ctwas_snp_res$PVE))
[1] 0.01624708 0.53314062

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
8040      THBS3       1_76     1.000  379.94 1.1e-03  21.52
7484       NSD1      5_106     0.999 1538.12 4.5e-03   3.31
7040      INHBB       2_70     0.987   79.45 2.3e-04   8.70
8041    SLC50A1       1_76     0.984  256.52 7.3e-04 -19.43
4335       LGR6      1_102     0.977   46.82 1.3e-04  -5.66
938      CDC14A       1_61     0.960   39.54 1.1e-04  -6.06
3186      TCF21       6_88     0.942   37.95 1.0e-04   6.24
4101     OSBPL2      20_36     0.847   24.88 6.1e-05   4.54
9251     PHLDA2       11_2     0.827   29.90 7.2e-05   5.04
5549      PSEN2      1_116     0.787   25.80 5.9e-05   4.92
3465      PTGFR       1_48     0.780   27.88 6.3e-05  -4.66
10099    SPTSSB       3_99     0.778   32.24 7.3e-05  -5.59
4811      CNPY3       6_33     0.770   25.62 5.7e-05   5.08
770      NFATC3      16_36     0.743   29.59 6.4e-05   5.23
607       PRKCQ       10_7     0.723   23.44 4.9e-05   4.15
3426      CCRL2       3_32     0.694   36.72 7.4e-05  -5.75
11521     GSTA2       6_39     0.690   73.90 1.5e-04  -8.67
11821 C17orf100       17_6     0.617   26.50 4.7e-05  -4.62
5320    ANAPC11      17_46     0.593   23.80 4.1e-05  -4.49
290       NR1H3      11_29     0.580   44.17 7.4e-05  -7.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
4634          EGLN1      1_118     0.000 5904.72 1.3e-11  -4.17
3058          EXOC8      1_118     0.000 4944.14 0.0e+00   4.16
4556         TMEM60       7_49     0.000 4337.19 0.0e+00  -3.59
7484           NSD1      5_106     0.999 1538.12 4.5e-03   3.31
11199     LINC00271       6_89     0.000 1338.21 0.0e+00  -1.51
8824         DMRTA1       9_17     0.000 1142.65 0.0e+00  -3.38
10903          APTR       7_49     0.000  934.09 0.0e+00   0.31
8039        PRELID1      5_106     0.000  885.75 1.3e-14   6.62
6807          FGFR4      5_106     0.000  500.46 0.0e+00  -0.51
10840        PPP1CB       2_17     0.004  485.92 5.7e-06   3.27
4604           AHI1       6_89     0.000  460.18 0.0e+00   0.10
9811         RSBN1L       7_49     0.000  459.15 0.0e+00  -1.23
8270        TRMT61B       2_17     0.020  390.01 2.3e-05  -3.69
8040          THBS3       1_76     1.000  379.94 1.1e-03  21.52
7172          SPDYA       2_17     0.007  337.31 7.1e-06  -3.39
8041        SLC50A1       1_76     0.984  256.52 7.3e-04 -19.43
11046 RP11-370B11.3       9_17     0.000  231.07 0.0e+00   0.04
8037          LMAN2      5_106     0.000  219.64 1.3e-08   9.58
92            PHTF2       7_49     0.000  185.84 0.0e+00  -2.23
10820          MXD3      5_106     0.000  179.00 0.0e+00  -3.36

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
7484      NSD1      5_106     0.999 1538.12 4.5e-03   3.31
8040     THBS3       1_76     1.000  379.94 1.1e-03  21.52
8041   SLC50A1       1_76     0.984  256.52 7.3e-04 -19.43
7040     INHBB       2_70     0.987   79.45 2.3e-04   8.70
11521    GSTA2       6_39     0.690   73.90 1.5e-04  -8.67
4335      LGR6      1_102     0.977   46.82 1.3e-04  -5.66
938     CDC14A       1_61     0.960   39.54 1.1e-04  -6.06
3186     TCF21       6_88     0.942   37.95 1.0e-04   6.24
3426     CCRL2       3_32     0.694   36.72 7.4e-05  -5.75
290      NR1H3      11_29     0.580   44.17 7.4e-05  -7.22
10099   SPTSSB       3_99     0.778   32.24 7.3e-05  -5.59
9251    PHLDA2       11_2     0.827   29.90 7.2e-05   5.04
3440    ACVR2A       2_88     0.570   40.59 6.7e-05   6.24
770     NFATC3      16_36     0.743   29.59 6.4e-05   5.23
3465     PTGFR       1_48     0.780   27.88 6.3e-05  -4.66
4101    OSBPL2      20_36     0.847   24.88 6.1e-05   4.54
5549     PSEN2      1_116     0.787   25.80 5.9e-05   4.92
5074     ZCRB1      12_27     0.455   44.25 5.9e-05   6.41
5087   SLC38A4      12_29     0.259   78.22 5.9e-05   7.76
1058      GCKR       2_16     0.430   45.91 5.7e-05  -8.67

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
8040         THBS3       1_76     1.000 379.94 1.1e-03  21.52
8041       SLC50A1       1_76     0.984 256.52 7.3e-04 -19.43
8865          FUT2      19_33     0.017 151.64 7.6e-06  14.34
8862        MAMSTR      19_33     0.002  96.47 6.8e-07 -11.48
2310         GOSR2      17_27     0.001 102.88 3.0e-07  10.44
5788         RSPO3       6_84     0.005  99.50 1.4e-06 -10.25
2041        FAM83E      19_33     0.012  80.84 2.9e-06 -10.07
8042         EFNA1       1_76     0.000 125.16 2.3e-10   9.61
8037         LMAN2      5_106     0.000 219.64 1.3e-08   9.58
337         SH3YL1        2_1     0.008  94.37 2.3e-06  -9.51
8100          NRG4      15_35     0.003 104.91 8.8e-07  -9.50
5192        UBE2Q2      15_35     0.001  96.32 3.3e-07  -9.31
7040         INHBB       2_70     0.987  79.45 2.3e-04   8.70
5042       SHROOM3       4_52     0.040  75.55 8.8e-06  -8.69
1058          GCKR       2_16     0.430  45.91 5.7e-05  -8.67
10987      C2orf16       2_16     0.430  45.91 5.7e-05  -8.67
11521        GSTA2       6_39     0.690  73.90 1.5e-04  -8.67
796        PPP2R3A       3_84     0.025  70.13 5.2e-06  -8.64
7163       CCDC158       4_52     0.033  73.35 7.0e-06  -8.61
12279 CTD-2376I4.1       5_43     0.128  52.48 2.0e-05   8.10

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.01183378
#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
8040         THBS3       1_76     1.000 379.94 1.1e-03  21.52
8041       SLC50A1       1_76     0.984 256.52 7.3e-04 -19.43
8865          FUT2      19_33     0.017 151.64 7.6e-06  14.34
8862        MAMSTR      19_33     0.002  96.47 6.8e-07 -11.48
2310         GOSR2      17_27     0.001 102.88 3.0e-07  10.44
5788         RSPO3       6_84     0.005  99.50 1.4e-06 -10.25
2041        FAM83E      19_33     0.012  80.84 2.9e-06 -10.07
8042         EFNA1       1_76     0.000 125.16 2.3e-10   9.61
8037         LMAN2      5_106     0.000 219.64 1.3e-08   9.58
337         SH3YL1        2_1     0.008  94.37 2.3e-06  -9.51
8100          NRG4      15_35     0.003 104.91 8.8e-07  -9.50
5192        UBE2Q2      15_35     0.001  96.32 3.3e-07  -9.31
7040         INHBB       2_70     0.987  79.45 2.3e-04   8.70
5042       SHROOM3       4_52     0.040  75.55 8.8e-06  -8.69
1058          GCKR       2_16     0.430  45.91 5.7e-05  -8.67
10987      C2orf16       2_16     0.430  45.91 5.7e-05  -8.67
11521        GSTA2       6_39     0.690  73.90 1.5e-04  -8.67
796        PPP2R3A       3_84     0.025  70.13 5.2e-06  -8.64
7163       CCDC158       4_52     0.033  73.35 7.0e-06  -8.61
12279 CTD-2376I4.1       5_43     0.128  52.48 2.0e-05   8.10

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: 1_76"
            genename region_tag susie_pip    mu2     PVE      z
5524           KCNN3       1_76     0.001  56.38 2.1e-07  -5.07
12211 RP11-307C12.13       1_76     0.001  43.57 7.7e-08  -3.89
6789            SHC1       1_76     0.000   7.33 6.2e-12  -2.05
5514          ADAM15       1_76     0.000  22.45 1.8e-11   4.03
7073           DCST2       1_76     0.000  27.59 3.0e-08  -3.74
7074           DCST1       1_76     0.000  30.81 1.1e-08  -4.40
5523           EFNA3       1_76     0.000  50.02 4.6e-11   1.04
8041         SLC50A1       1_76     0.984 256.52 7.3e-04 -19.43
8042           EFNA1       1_76     0.000 125.16 2.3e-10   9.61
9069            DPM3       1_76     0.000  54.70 4.7e-11   1.21
8040           THBS3       1_76     1.000 379.94 1.1e-03  21.52
8924             GBA       1_76     0.000 108.92 1.4e-09   6.22
6795         FAM189B       1_76     0.000  11.79 1.4e-11  -3.04
8829            CLK2       1_76     0.000  72.72 4.1e-10  -6.90
4294            DAP3       1_76     0.000   6.62 7.2e-12   1.68
7076          YY1AP1       1_76     0.000   8.81 7.6e-12   2.65
3021           GON4L       1_76     0.000  69.81 5.5e-11   7.42
4300           SYT11       1_76     0.000  67.45 7.1e-11   7.31
5527            RIT1       1_76     0.000  65.86 5.4e-11   6.96
3022         ARHGEF2       1_76     0.000  37.32 3.6e-11   5.04
7094            SSR2       1_76     0.000   8.14 1.0e-11   0.97
3023         LAMTOR2       1_76     0.000   6.87 6.2e-12  -2.18
6798        SLC25A44       1_76     0.002  33.78 1.5e-07   5.90
6797            PMF1       1_76     0.338  45.60 4.5e-05   6.68
7093          TMEM79       1_76     0.005  34.45 4.5e-07  -5.85
6796           PAQR6       1_76     0.000  14.50 1.8e-11  -2.05
10515           SMG5       1_76     0.000   8.31 7.0e-12  -1.94
10442           GLMP       1_76     0.000  10.84 1.0e-11  -2.08
7092           TSACC       1_76     0.000  12.21 2.6e-11   0.45

Version Author Date
dfd2b5f wesleycrouse 2021-09-07
[1] "Region: 19_33"
      genename region_tag susie_pip    mu2     PVE      z
10231    DACT3      19_33     0.002   5.13 3.0e-08  -0.21
1999     PRKD2      19_33     0.002   4.92 2.8e-08   0.06
1219     STRN4      19_33     0.002   5.51 3.3e-08  -0.35
9210      FKRP      19_33     0.003   8.69 7.5e-08   0.96
1998    SLC1A5      19_33     0.003   8.73 7.4e-08  -1.03
6725  ARHGAP35      19_33     0.003  10.37 1.0e-07   1.04
4115     NPAS1      19_33     0.002   4.87 2.7e-08   0.12
4114     ZC3H4      19_33     0.009  19.21 4.9e-07  -1.81
5375      SAE1      19_33     0.009  19.21 4.9e-07  -1.81
2002     CCDC9      19_33     0.004  11.03 1.2e-07   1.14
10232    C5AR1      19_33     0.002   6.18 4.0e-08   0.55
11840   INAFM1      19_33     0.007  17.37 3.5e-07   1.90
4510     C5AR2      19_33     0.017  25.45 1.3e-06  -2.21
4505     DHX34      19_33     0.003   7.71 5.9e-08  -0.79
3155    ZNF541      19_33     0.004  11.75 1.4e-07   1.13
546    GLTSCR1      19_33     0.002   6.77 4.5e-08   0.78
285       EHD2      19_33     0.002   5.91 3.8e-08  -0.37
2021   SULT2A1      19_33     0.002   5.02 2.8e-08  -0.35
2035   PLA2G4C      19_33     0.002   6.50 4.5e-08  -0.26
2033      LIG1      19_33     0.004  10.65 1.1e-07  -0.94
9623  C19orf68      19_33     0.002   6.61 4.3e-08  -0.81
2032     CARD8      19_33     0.002   6.38 4.0e-08  -0.81
2031   CCDC114      19_33     0.002   5.32 3.1e-08   0.32
5374      EMP3      19_33     0.002   7.38 4.6e-08  -1.54
2028     GRWD1      19_33     0.011  22.35 7.2e-07  -2.37
9317    KCNJ14      19_33     0.008  22.64 5.6e-07  -2.93
2027     CYTH2      19_33     0.007  16.30 3.1e-07  -1.72
5376     LMTK3      19_33     0.006  18.33 2.9e-07  -2.52
1139   SULT2B1      19_33     0.002   5.48 3.4e-08   0.07
2041    FAM83E      19_33     0.012  80.84 2.9e-06 -10.07
547      SPHK2      19_33     0.002  21.24 1.5e-07   4.90
2037       DBP      19_33     0.031  33.07 3.0e-06  -2.99
548       CA11      19_33     0.003  10.25 8.6e-08   1.81
8865      FUT2      19_33     0.017 151.64 7.6e-06  14.34
8862    MAMSTR      19_33     0.002  96.47 6.8e-07 -11.48
9314    IZUMO1      19_33     0.002   5.15 2.9e-08  -0.24

Version Author Date
dfd2b5f wesleycrouse 2021-09-07
[1] "Region: 17_27"
          genename region_tag susie_pip    mu2     PVE     z
8499         DCAKD      17_27     0.005  21.77 3.1e-07 -2.11
12583   AC142472.6      17_27     0.019  34.27 1.9e-06 -3.12
6678      ARHGAP27      17_27     0.001  10.97 4.3e-08 -1.26
11062      PLEKHM1      17_27     0.001   5.39 1.3e-08 -0.15
9773          MAPT      17_27     0.001   5.02 1.1e-08  0.88
9663        ARL17A      17_27     0.002  12.01 8.2e-08 -2.53
3310        KANSL1      17_27     0.001  25.67 8.8e-08 -5.40
12113 RP11-798G7.6      17_27     0.001  25.67 8.8e-08 -5.40
8846       LRRC37A      17_27     0.040  49.91 5.8e-06  5.42
11381     LRRC37A2      17_27     0.009  14.49 3.7e-07 -0.65
802            NSF      17_27     0.038  55.03 6.1e-06  6.32
2301          WNT3      17_27     0.001  10.45 2.7e-08  1.23
2310         GOSR2      17_27     0.001 102.88 3.0e-07 10.44
41           CDC27      17_27     0.003  19.23 1.5e-07 -2.25
11884        ITGB3      17_27     0.001   5.18 1.1e-08  0.33
9041       EFCAB13      17_27     0.001   5.08 1.1e-08  0.15
5281        NPEPPS      17_27     0.002  13.20 5.8e-08  1.81
2309         KPNB1      17_27     0.001   6.00 1.4e-08 -0.24
10511       TBKBP1      17_27     0.001   7.21 1.9e-08 -0.59

Version Author Date
dfd2b5f wesleycrouse 2021-09-07
[1] "Region: 6_84"
     genename region_tag susie_pip   mu2     PVE      z
2616  TPD52L1       6_84     0.005  6.24 9.1e-08  -0.78
2618    NCOA7       6_84     0.005  4.99 6.6e-08   0.31
2617    HINT3       6_84     0.005  6.83 9.9e-08  -1.08
633    TRMT11       6_84     0.005  5.71 7.9e-08  -0.79
5788    RSPO3       6_84     0.005 99.50 1.4e-06 -10.25

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.000   17.99 0.0e+00  1.63
3450       KIAA1191      5_106     0.000    6.60 0.0e+00  0.49
8737          ARL10      5_106     0.000    6.64 0.0e+00 -0.70
5758         HIGD2A      5_106     0.000    5.75 0.0e+00  0.06
8738           CLTB      5_106     0.000    6.25 0.0e+00  0.15
8046         GPRIN1      5_106     0.000    7.06 0.0e+00 -0.70
403         TSPAN17      5_106     0.000    9.59 0.0e+00  0.24
2780          UNC5A      5_106     0.000    9.53 0.0e+00 -1.07
6811            HK3      5_106     0.000   13.58 0.0e+00 -0.61
1119          UIMC1      5_106     0.000   21.25 0.0e+00 -0.85
2779         ZNF346      5_106     0.000   13.38 0.0e+00 -0.02
6807          FGFR4      5_106     0.000  500.46 0.0e+00 -0.51
7484           NSD1      5_106     0.999 1538.12 4.5e-03  3.31
8039        PRELID1      5_106     0.000  885.75 1.3e-14  6.62
10820          MXD3      5_106     0.000  179.00 0.0e+00 -3.36
8037          LMAN2      5_106     0.000  219.64 1.3e-08  9.58
10107          PFN3      5_106     0.000  112.28 0.0e+00 -0.87
4159            F12      5_106     0.000  163.28 0.0e+00  3.34
4160           PRR7      5_106     0.000   26.63 0.0e+00 -0.34
2778           DBN1      5_106     0.000   23.93 0.0e+00 -0.01
10157        PDLIM7      5_106     0.000   11.14 0.0e+00 -3.41
12333 RP11-1277A3.3      5_106     0.000    5.34 0.0e+00  1.00
301         B4GALT7      5_106     0.000    6.05 0.0e+00  0.02
8144        FAM153A      5_106     0.000   17.51 0.0e+00 -1.35

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
59149  rs766167074      1_118     1.000 5961.82 1.7e-02  -4.11
74828     rs780093       2_16     1.000   70.41 2.0e-04 -10.49
75129  rs569546056       2_17     1.000  580.83 1.7e-03  -2.90
94504    rs4441469       2_54     1.000   36.15 1.1e-04   6.44
100038   rs4849177       2_67     1.000   99.30 2.9e-04  10.12
102108 rs141849010       2_69     1.000   35.69 1.0e-04   5.91
118140    rs847164      2_106     1.000   54.85 1.6e-04   9.07
127508  rs11887861      2_124     1.000   73.51 2.1e-04   7.60
147537   rs7619139       3_18     1.000   78.92 2.3e-04   9.30
159960  rs13066345       3_45     1.000  155.52 4.5e-04  12.30
196231  rs16862782      3_115     1.000  357.82 1.0e-03 -21.08
207051  rs62411644       4_17     1.000   35.61 1.0e-04  -5.87
214751  rs12639940       4_32     1.000   59.03 1.7e-04   8.08
215113  rs11729899       4_33     1.000   48.90 1.4e-04   7.45
276375  rs11740818       5_23     1.000   50.48 1.5e-04  -7.09
313008  rs17645325       5_93     1.000   36.29 1.1e-04  -6.45
366014 rs199804242       6_89     1.000 5468.96 1.6e-02   3.25
376131    rs300143      6_108     1.000  222.91 6.5e-04 -15.74
378443  rs78148157        7_2     1.000  223.14 6.5e-04 -12.26
378444  rs13241427        7_2     1.000  186.93 5.4e-04  11.86
404884  rs10277379       7_49     1.000 4003.60 1.2e-02   6.01
404887 rs761767938       7_49     1.000 4616.27 1.3e-02   3.82
404895   rs1544459       7_49     1.000 4536.92 1.3e-02   4.42
411852  rs10276555       7_63     1.000   67.53 2.0e-04   6.61
441512   rs1397799       8_24     1.000  122.77 3.6e-04  11.95
470902   rs9720968       8_83     1.000  110.28 3.2e-04  10.36
470907  rs10505503       8_83     1.000   48.11 1.4e-04   6.02
486613    rs476924       9_17     1.000 4289.59 1.2e-02  -3.29
486616 rs141465689       9_17     1.000 4271.20 1.2e-02  -3.26
568194 rs369062552      11_21     1.000  148.39 4.3e-04  14.22
568204  rs34830202      11_21     1.000  251.45 7.3e-04 -14.10
618228   rs2657880      12_35     1.000  120.90 3.5e-04  11.72
618383   rs7397189      12_36     1.000  133.69 3.9e-04 -12.27
714683   rs3803487      15_27     1.000   64.11 1.9e-04   8.25
718458   rs2472297      15_35     1.000   62.20 1.8e-04  -9.67
718700 rs145727191      15_35     1.000   89.66 2.6e-04  11.74
718852 rs143513665      15_36     1.000   42.52 1.2e-04   8.93
739801  rs12927956      16_27     1.000   52.32 1.5e-04   6.72
762870   rs1058166      17_22     1.000   74.73 2.2e-04   9.53
762899   rs4794765      17_22     1.000   61.24 1.8e-04  -8.54
765210 rs137906947      17_27     1.000  143.59 4.2e-04  -9.70
783300    rs162000      18_14     1.000   43.74 1.3e-04   6.80
788623   rs4890562      18_25     1.000   64.12 1.9e-04   9.64
788626  rs12458806      18_25     1.000   79.16 2.3e-04   0.67
788631  rs12964854      18_25     1.000  112.59 3.3e-04   9.21
789410   rs9953845      18_26     1.000   72.19 2.1e-04   9.08
815477    rs814573      19_32     1.000   39.68 1.2e-04  -6.35
815741  rs34783010      19_32     1.000  230.58 6.7e-04 -15.84
816729  rs12978750      19_33     1.000  172.40 5.0e-04 -16.37
835569   rs6123359      20_32     1.000   38.20 1.1e-04   6.89
835575   rs2585441      20_32     1.000   39.94 1.2e-04   6.39
837290  rs62205363      20_34     1.000   66.70 1.9e-04   6.34
846666    rs219783      21_17     1.000  129.85 3.8e-04 -11.90
881241 rs139439683      5_106     1.000 1880.65 5.5e-03  -2.93
919642   rs9749331      19_34     1.000   70.53 2.0e-04  -7.22
100030 rs567964928       2_67     0.999   32.12 9.3e-05   5.14
276265   rs4703440       5_23     0.999   63.34 1.8e-04   7.92
453114  rs17397411       8_50     0.999   33.64 9.8e-05   5.06
605668  rs11056397      12_13     0.999   32.87 9.5e-05  -5.38
836748  rs12481011      20_33     0.999   33.47 9.7e-05   4.92
385664 rs542176135       7_17     0.998   45.17 1.3e-04  -6.93
616443    rs863226      12_31     0.998   31.31 9.1e-05   4.54
718729   rs2955742      15_36     0.998   39.75 1.2e-04   8.59
198416   rs7642977      3_119     0.997   37.03 1.1e-04   6.09
281080 rs113088001       5_31     0.997   39.13 1.1e-04  -5.94
376163   rs1445288      6_108     0.997   31.83 9.2e-05   5.23
765209  rs60372268      17_27     0.997   53.92 1.6e-04  -8.11
788484  rs72902699      18_24     0.997   43.87 1.3e-04  -6.89
839293    rs926167       21_2     0.996   41.31 1.2e-04   5.45
399152   rs2709273       7_39     0.995   30.09 8.7e-05   5.43
546883   rs1408345      10_64     0.995   29.06 8.4e-05   5.37
660502   rs9543236      13_35     0.995   31.22 9.0e-05  -5.34
332884   rs4509168       6_26     0.994   32.23 9.3e-05   5.69
426268  rs10224210       7_94     0.992  326.95 9.4e-04  19.30
616450   rs1878234      12_31     0.991   36.40 1.0e-04   4.94
770599  rs11079697      17_39     0.991   29.13 8.4e-05  -5.44
919835  rs12979373      19_34     0.991   35.20 1.0e-04  -6.00
328639    rs793705       6_18     0.989   34.27 9.8e-05  -6.01
378433   rs4724786        7_2     0.988   53.28 1.5e-04   3.34
701648  rs10141666      14_53     0.987   35.50 1.0e-04  -5.98
322671  rs13193887        6_7     0.986   28.35 8.1e-05   4.93
569246   rs2476504      11_23     0.985   26.98 7.7e-05  -4.83
411856   rs6968978       7_63     0.984   28.25 8.1e-05  -3.55
234548  rs35518360       4_67     0.983   29.10 8.3e-05  -5.20
277813 rs115634741       5_26     0.983   33.62 9.6e-05  -7.51
286330   rs4302565       5_43     0.982   27.19 7.8e-05   4.21
744483  rs59156463      16_37     0.982   42.01 1.2e-04  -8.30
763961  rs12948083      17_25     0.982   29.87 8.5e-05   5.32
395827    rs700752       7_34     0.980   43.13 1.2e-04   6.48
881376  rs13172121      5_106     0.980 1882.66 5.4e-03  -3.09
228398  rs13124978       4_56     0.978   26.15 7.4e-05  -4.87
726206  rs59646751      15_48     0.978   75.74 2.2e-04   9.08
710398   rs8030172      15_19     0.972   24.43 6.9e-05   4.70
766052    rs890398      17_29     0.971   26.51 7.5e-05   5.08
814329  rs12982615      19_28     0.970   27.93 7.9e-05  -5.22
598365 rs148884160      11_80     0.968   25.59 7.2e-05   4.82
816748    rs495315      19_33     0.968   54.44 1.5e-04  10.55
765910   rs9895945      17_28     0.966   39.79 1.1e-04   6.52
61584   rs17520491      1_123     0.963   26.04 7.3e-05   4.97
777450   rs4513192       18_3     0.955   34.25 9.5e-05  -5.15
783259    rs527616      18_14     0.955   25.89 7.2e-05  -5.24
845812   rs2154568      21_15     0.952   43.09 1.2e-04   6.46
618364   rs6581124      12_35     0.951   25.99 7.2e-05  -4.95
823859   rs6040069       20_8     0.949   24.37 6.7e-05  -4.67
327008  rs41271299       6_15     0.939   24.90 6.8e-05   4.68
744654 rs139861017      16_37     0.939   26.33 7.2e-05   4.78
836733   rs1884500      20_33     0.939   27.83 7.6e-05   2.53
865550 rs111552903       1_76     0.939   43.32 1.2e-04  -3.27
75132    rs4580350       2_17     0.937  579.68 1.6e-03   2.96
760748 rs112861323      17_18     0.935   24.52 6.7e-05  -4.71
486614  rs34033213       9_17     0.934 4217.97 1.1e-02  -3.16
673200   rs7987209      13_59     0.934   57.79 1.6e-04   7.64
514655 rs113790047       10_2     0.931   40.23 1.1e-04   6.42
372393   rs1449674      6_101     0.927   25.28 6.8e-05  -4.77
837292   rs1407040      20_34     0.924   44.01 1.2e-04  -3.89
512914 rs115478735       9_70     0.918   47.26 1.3e-04   6.96
751423  rs34341288      16_50     0.918   25.09 6.7e-05  -4.80
775586  rs28454947      17_46     0.913   34.74 9.2e-05   6.20
578812  rs10796869      11_38     0.911   46.76 1.2e-04   7.75
291707  rs61552236       5_53     0.909   46.48 1.2e-04  -6.85
568577  rs11031796      11_22     0.905   29.50 7.8e-05   5.12
490977  rs34223057       9_26     0.904   26.38 6.9e-05   4.97
524925  rs79545879      10_20     0.903   24.85 6.5e-05   4.24
744767 rs192776582      16_38     0.901   25.84 6.8e-05   5.14
155013  rs62259692       3_36     0.895   27.03 7.0e-05   4.72
534550  rs10821950      10_42     0.894   39.14 1.0e-04  -6.19
10043   rs56307352       1_21     0.890   25.79 6.7e-05  -4.83
530628   rs4935194      10_33     0.883   24.01 6.2e-05   4.40
196246  rs62278004      3_115     0.881  105.40 2.7e-04  15.80
320818   rs1272694        6_3     0.876   33.07 8.4e-05  -5.73
726248  rs45506098      15_48     0.871   23.65 6.0e-05   4.42
813205 rs117236730      19_25     0.871   23.99 6.1e-05   4.72
347018   rs2815715       6_50     0.869   24.77 6.3e-05   4.71
389323  rs67971665       7_23     0.862   30.03 7.5e-05  -5.52
196229   rs2679508      3_115     0.854   64.94 1.6e-04  -3.66
51120  rs113608553      1_104     0.850   32.33 8.0e-05  -5.54
286323    rs745063       5_43     0.848  140.50 3.5e-04  13.29
285593  rs11743158       5_41     0.847   32.75 8.1e-05   5.38
200390 rs151223318        4_2     0.845   23.91 5.9e-05  -4.28
6670    rs61779072       1_14     0.843   24.33 6.0e-05   4.57
3331   rs115560453        1_7     0.841   24.84 6.1e-05   4.67
264283  rs62331274        5_2     0.839   23.85 5.8e-05   4.36
307115    rs156094       5_83     0.839   28.89 7.0e-05  -5.09
725302   rs4335732      15_46     0.836   25.95 6.3e-05  -4.79
159269  rs28599817       3_43     0.832  131.33 3.2e-04  12.33
329357 rs115740542       6_20     0.829   24.66 5.9e-05   4.42
827576  rs10854249      20_15     0.824   29.01 6.9e-05  -5.10
695677  rs17796675      14_41     0.821   24.23 5.8e-05   4.45
765712   rs3809778      17_28     0.815   30.66 7.3e-05  -5.73
199178  rs13059257      3_120     0.814   42.62 1.0e-04   6.50
528884  rs56059584      10_29     0.810   23.77 5.6e-05   4.44
660106   rs5804585      13_35     0.810  103.13 2.4e-04 -10.42
196247  rs12634556      3_115     0.806  312.60 7.3e-04 -22.53
919644    rs837640      19_34     0.806   40.97 9.6e-05   4.85
919251 rs117643180       17_6     0.803   49.54 1.2e-04   7.00

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
59149  rs766167074      1_118     1.000 5961.82 1.7e-02 -4.11
59148     rs971534      1_118     0.248 5908.03 4.3e-03 -4.23
59146   rs10489611      1_118     0.248 5907.99 4.3e-03 -4.23
59147    rs2486737      1_118     0.221 5907.92 3.8e-03 -4.23
59140    rs2256908      1_118     0.252 5907.66 4.3e-03 -4.24
59143    rs2790891      1_118     0.216 5907.53 3.7e-03 -4.23
59144    rs2491405      1_118     0.216 5907.53 3.7e-03 -4.23
59156    rs2211176      1_118     0.274 5906.32 4.7e-03 -4.25
59157    rs2790882      1_118     0.274 5906.32 4.7e-03 -4.25
59155    rs2248646      1_118     0.205 5905.84 3.5e-03 -4.24
59136    rs1076804      1_118     0.286 5900.27 4.9e-03 -4.28
59158    rs1416913      1_118     0.205 5899.53 3.5e-03 -4.26
59161    rs2790874      1_118     0.029 5897.00 5.0e-04 -4.19
59137     rs910824      1_118     0.047 5884.99 8.0e-04 -4.26
59160    rs2808603      1_118     0.012 5882.27 2.0e-04 -4.20
59135    rs2474635      1_118     0.011 5867.60 1.9e-04 -4.26
59132     rs722302      1_118     0.003 5855.98 4.9e-05 -4.24
59154  rs143905935      1_118     0.000 5852.55 5.9e-08 -3.97
59152    rs2739509      1_118     0.000 5795.21 1.2e-06 -4.13
59162    rs2474631      1_118     0.000 5691.35 6.6e-13 -3.99
59159    rs3071894      1_118     0.000 5682.17 4.9e-15 -3.88
59164    rs2790871      1_118     0.000 5625.37 3.2e-16 -3.97
59165    rs2790870      1_118     0.000 5623.86 1.7e-16 -3.95
59150    rs2739512      1_118     0.000 5617.18 5.1e-15 -3.99
59130    rs7414807      1_118     0.000 5529.37 3.4e-09 -4.81
59167  rs371976741      1_118     0.000 5506.55 3.6e-18  4.10
366013   rs2327654       6_89     0.776 5489.94 1.2e-02  2.70
366030   rs6923513       6_89     0.684 5489.74 1.1e-02  2.70
366014 rs199804242       6_89     1.000 5468.96 1.6e-02  3.25
366017 rs113527452       6_89     0.069 5463.66 1.1e-03  2.74
366022 rs200796875       6_89     0.000 5427.97 3.2e-08  2.63
366035   rs7756915       6_89     0.000 5398.15 5.0e-08  2.79
59141    rs6659323      1_118     0.000 5361.86 0.0e+00 -4.12
366028   rs6570040       6_89     0.000 5181.21 0.0e+00  2.76
366015   rs6570031       6_89     0.000 5170.39 0.0e+00  2.81
366016   rs9389323       6_89     0.000 5167.78 0.0e+00  2.79
404887 rs761767938       7_49     1.000 4616.27 1.3e-02  3.82
404895   rs1544459       7_49     1.000 4536.92 1.3e-02  4.42
366032   rs9321531       6_89     0.000 4536.09 0.0e+00  2.60
366005   rs9321528       6_89     0.000 4473.43 0.0e+00  2.49
486613    rs476924       9_17     1.000 4289.59 1.2e-02 -3.29
486616 rs141465689       9_17     1.000 4271.20 1.2e-02 -3.26
366037   rs5880262       6_89     0.000 4262.57 0.0e+00  2.93
366033   rs9494389       6_89     0.000 4250.36 0.0e+00  2.12
486614  rs34033213       9_17     0.934 4217.97 1.1e-02 -3.16
404891  rs11972122       7_49     0.000 4161.39 0.0e+00  3.97
404892  rs11406602       7_49     0.000 4159.04 0.0e+00  3.96
486617    rs664198       9_17     0.000 4149.87 6.9e-07 -3.37
486621  rs35519115       9_17     0.000 4131.73 4.2e-07 -3.14
366011   rs2208574       6_89     0.000 4107.71 0.0e+00  2.34

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
59149  rs766167074      1_118     1.000 5961.82 0.01700  -4.11
366014 rs199804242       6_89     1.000 5468.96 0.01600   3.25
404887 rs761767938       7_49     1.000 4616.27 0.01300   3.82
404895   rs1544459       7_49     1.000 4536.92 0.01300   4.42
366013   rs2327654       6_89     0.776 5489.94 0.01200   2.70
404884  rs10277379       7_49     1.000 4003.60 0.01200   6.01
486613    rs476924       9_17     1.000 4289.59 0.01200  -3.29
486616 rs141465689       9_17     1.000 4271.20 0.01200  -3.26
366030   rs6923513       6_89     0.684 5489.74 0.01100   2.70
486614  rs34033213       9_17     0.934 4217.97 0.01100  -3.16
881241 rs139439683      5_106     1.000 1880.65 0.00550  -2.93
881376  rs13172121      5_106     0.980 1882.66 0.00540  -3.09
59136    rs1076804      1_118     0.286 5900.27 0.00490  -4.28
59156    rs2211176      1_118     0.274 5906.32 0.00470  -4.25
59157    rs2790882      1_118     0.274 5906.32 0.00470  -4.25
59140    rs2256908      1_118     0.252 5907.66 0.00430  -4.24
59146   rs10489611      1_118     0.248 5907.99 0.00430  -4.23
59148     rs971534      1_118     0.248 5908.03 0.00430  -4.23
59147    rs2486737      1_118     0.221 5907.92 0.00380  -4.23
59143    rs2790891      1_118     0.216 5907.53 0.00370  -4.23
59144    rs2491405      1_118     0.216 5907.53 0.00370  -4.23
59155    rs2248646      1_118     0.205 5905.84 0.00350  -4.24
59158    rs1416913      1_118     0.205 5899.53 0.00350  -4.26
75129  rs569546056       2_17     1.000  580.83 0.00170  -2.90
75132    rs4580350       2_17     0.937  579.68 0.00160   2.96
278240  rs11956741       5_27     0.716  532.98 0.00110 -24.85
366017 rs113527452       6_89     0.069 5463.66 0.00110   2.74
196231  rs16862782      3_115     1.000  357.82 0.00100 -21.08
426268  rs10224210       7_94     0.992  326.95 0.00094  19.30
59137     rs910824      1_118     0.047 5884.99 0.00080  -4.26
196247  rs12634556      3_115     0.806  312.60 0.00073 -22.53
568204  rs34830202      11_21     1.000  251.45 0.00073 -14.10
815741  rs34783010      19_32     1.000  230.58 0.00067 -15.84
376131    rs300143      6_108     1.000  222.91 0.00065 -15.74
378443  rs78148157        7_2     1.000  223.14 0.00065 -12.26
378444  rs13241427        7_2     1.000  186.93 0.00054  11.86
59161    rs2790874      1_118     0.029 5897.00 0.00050  -4.19
816729  rs12978750      19_33     1.000  172.40 0.00050 -16.37
278235  rs28856650       5_27     0.296  531.27 0.00046 -24.81
159960  rs13066345       3_45     1.000  155.52 0.00045  12.30
404870  rs17156706       7_49     0.337  454.50 0.00044  -3.20
568194 rs369062552      11_21     1.000  148.39 0.00043  14.22
765210 rs137906947      17_27     1.000  143.59 0.00042  -9.70
75131    rs2169748       2_17     0.233  573.44 0.00039  -2.89
618383   rs7397189      12_36     1.000  133.69 0.00039 -12.27
75128    rs7562170       2_17     0.226  574.94 0.00038  -2.80
846666    rs219783      21_17     1.000  129.85 0.00038 -11.90
441512   rs1397799       8_24     1.000  122.77 0.00036  11.95
718676  rs28607641      15_35     0.552  221.46 0.00036  15.78
286323    rs745063       5_43     0.848  140.50 0.00035  13.29

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
278240  rs11956741       5_27     0.716 532.98 1.1e-03 -24.85
278235  rs28856650       5_27     0.296 531.27 4.6e-04 -24.81
278212  rs11955175       5_27     0.013 520.66 2.0e-05 -24.60
196247  rs12634556      3_115     0.806 312.60 7.3e-04 -22.53
196249  rs11924549      3_115     0.194 307.88 1.7e-04 -22.45
865988    rs760077       1_76     0.000 345.16 6.0e-08 -21.52
865999   rs2990223       1_76     0.000 344.97 7.5e-08 -21.47
196231  rs16862782      3_115     1.000 357.82 1.0e-03 -21.08
865879   rs6676150       1_76     0.005 318.25 4.8e-06  20.90
196256   rs1027498      3_115     0.000 220.81 2.0e-10 -20.38
866012 rs139558368       1_76     0.000 308.48 3.6e-08  20.25
865832   rs9330264       1_76     0.010 233.91 6.5e-06 -19.37
426268  rs10224210       7_94     0.992 326.95 9.4e-04  19.30
426270  rs10224002       7_94     0.018 320.13 1.6e-05  19.03
865975    rs423144       1_76     0.000 155.37 1.1e-11 -18.28
865973   rs7366775       1_76     0.000 154.47 1.1e-11 -18.25
865958   rs4971101       1_76     0.000 150.47 1.1e-11 -18.10
865959   rs2070803       1_76     0.000 150.26 1.1e-11 -18.10
865982   rs2075571       1_76     0.000 149.12 1.2e-11 -18.09
865955   rs4971100       1_76     0.000 148.76 1.1e-11 -18.03
865946   rs9426886       1_76     0.000 149.48 1.1e-11 -17.94
865952 rs541049493       1_76     0.000 146.59 1.1e-11 -17.87
865945  rs11264341       1_76     0.000 147.45 1.1e-11 -17.85
196242  rs73188608      3_115     0.000 168.83 7.9e-15 -17.82
196243  rs73188616      3_115     0.000 168.73 7.9e-15 -17.82
196248   rs4686916      3_115     0.000 168.59 7.9e-15 -17.82
196250  rs73188638      3_115     0.000 167.63 7.5e-15 -17.79
865910 rs141625351       1_76     0.000 165.33 5.2e-11  17.71
866625  rs12134456       1_76     0.000 233.57 5.2e-10  17.63
866002   rs1057941       1_76     0.000 140.64 9.9e-12 -17.62
196245  rs12233463      3_115     0.000 155.97 3.2e-15 -17.60
865953   rs4971099       1_76     0.000 138.06 8.7e-12 -17.04
426266  rs66497154       7_94     0.005 244.05 3.2e-06  16.71
865967   rs4072037       1_76     0.000 224.81 4.2e-11 -16.46
865944   rs3814316       1_76     0.000 125.05 7.0e-12 -16.45
865972   rs2974937       1_76     0.000 224.63 4.5e-11 -16.43
816729  rs12978750      19_33     1.000 172.40 5.0e-04 -16.37
865965  rs12743084       1_76     0.000 222.86 4.1e-11 -16.34
865943   rs4971059       1_76     0.000 119.42 7.0e-12 -16.33
865978   rs2066981       1_76     0.000 219.50 5.5e-11 -16.21
865984    rs370545       1_76     0.000 219.43 5.5e-11 -16.20
865985    rs914615       1_76     0.000 219.39 5.5e-11 -16.20
865968  rs12411216       1_76     0.000 218.85 4.7e-11  16.17
865936   rs4971091       1_76     0.000 106.33 6.7e-12 -15.89
865938   rs4971093       1_76     0.000 105.51 6.7e-12 -15.86
815741  rs34783010      19_32     1.000 230.58 6.7e-04 -15.84
816737    rs838145      19_33     0.067 182.63 3.6e-05  15.82
196246  rs62278004      3_115     0.881 105.40 2.7e-04  15.80
718676  rs28607641      15_35     0.552 221.46 3.6e-04  15.78
718677   rs7177266      15_35     0.448 220.98 2.9e-04  15.76

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] 9
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
1                                     metanephric mesenchymal cell differentiation (GO:0072162)
2                                                            diaphragm development (GO:0060539)
3                                                               lung morphogenesis (GO:0060425)
4                                    negative regulation of gonadotropin secretion (GO:0032277)
5                  mesenchymal cell differentiation involved in kidney development (GO:0072161)
6                                                               spleen development (GO:0048536)
7  regulation of RNA polymerase II regulatory region sequence-specific DNA binding (GO:1903025)
8                                          embryonic digestive tract morphogenesis (GO:0048557)
9                         cell differentiation involved in metanephros development (GO:0072202)
10                                              metanephric mesenchyme development (GO:0072075)
11                                                  intracellular sterol transport (GO:0032366)
12                                                    ovarian follicle development (GO:0001541)
13                                                          carbohydrate transport (GO:0008643)
14                                               regulation of histone methylation (GO:0031060)
15                      negative regulation of androgen receptor signaling pathway (GO:0060766)
16                                                            placenta development (GO:0001890)
17                                             intracellular cholesterol transport (GO:0032367)
18                                                   digestive tract morphogenesis (GO:0048546)
19                                        negative regulation of insulin secretion (GO:0046676)
20                                                         vasculature development (GO:0001944)
21                                          monosaccharide transmembrane transport (GO:0015749)
22                                                  mesonephric tubule development (GO:0072164)
23                                negative regulation of peptide hormone secretion (GO:0090278)
24                                branching involved in ureteric bud morphogenesis (GO:0001658)
25                                              activin receptor signaling pathway (GO:0032924)
26                                                        ureteric bud development (GO:0001657)
27                                                      ureteric bud morphogenesis (GO:0060675)
28                                           embryonic digestive tract development (GO:0048566)
29                                                                sterol transport (GO:0015918)
30                                                        female gonad development (GO:0008585)
31                                                  hexose transmembrane transport (GO:0008645)
32                                                 organophosphate ester transport (GO:0015748)
33                                                             histone methylation (GO:0016571)
34                                                  bile acid biosynthetic process (GO:0006699)
35                       regulation of transcription regulatory region DNA binding (GO:2000677)
36                                                    respiratory tube development (GO:0030323)
37 negative regulation of intracellular steroid hormone receptor signaling pathway (GO:0033144)
38                                               skeletal muscle organ development (GO:0060538)
39                                                     bile acid metabolic process (GO:0008206)
40                                                             negative chemotaxis (GO:0050919)
41                                                  respiratory system development (GO:0060541)
42                                                                lung development (GO:0030324)
43                                     positive regulation of reproductive process (GO:2000243)
44                               regulation of androgen receptor signaling pathway (GO:0060765)
45                                              skeletal muscle tissue development (GO:0007519)
46                                              positive regulation of cytokinesis (GO:0032467)
47                                        negative regulation of protein secretion (GO:0050709)
48                                                 regulation of exit from mitosis (GO:0007096)
49                                                             protein methylation (GO:0006479)
50                                   branching morphogenesis of an epithelial tube (GO:0048754)
51                                            positive regulation of cell division (GO:0051781)
52                                                   embryonic organ morphogenesis (GO:0048562)
53          positive regulation of pathway-restricted SMAD protein phosphorylation (GO:0010862)
54                                   organic hydroxy compound biosynthetic process (GO:1901617)
55                                                           cholesterol transport (GO:0030301)
56                                                     protein homotetramerization (GO:0051289)
57                                negative regulation of protein metabolic process (GO:0051248)
   Overlap Adjusted.P.value   Genes
1      1/5       0.03849410   TCF21
2      1/5       0.03849410   TCF21
3      1/5       0.03849410   TCF21
4      1/5       0.03849410   INHBB
5      1/6       0.03849410   TCF21
6      1/8       0.03849410   TCF21
7      1/9       0.03849410    NSD1
8      1/9       0.03849410   TCF21
9     1/10       0.03849410   TCF21
10    1/11       0.03849410   TCF21
11    1/13       0.03849410  OSBPL2
12    1/14       0.03849410   INHBB
13    1/14       0.03849410 SLC50A1
14    1/14       0.03849410    NSD1
15    1/15       0.03849410   TCF21
16    1/15       0.03849410  PHLDA2
17    1/15       0.03849410  OSBPL2
18    1/16       0.03849410   TCF21
19    1/17       0.03849410   INHBB
20    1/17       0.03849410   TCF21
21    1/17       0.03849410 SLC50A1
22    1/17       0.03849410   TCF21
23    1/18       0.03849410   INHBB
24    1/19       0.03849410   TCF21
25    1/19       0.03849410   INHBB
26    1/19       0.03849410   TCF21
27    1/19       0.03849410   TCF21
28    1/20       0.03906516   TCF21
29    1/21       0.03959608  OSBPL2
30    1/22       0.04009088   INHBB
31    1/23       0.04055305 SLC50A1
32    1/25       0.04213143  OSBPL2
33    1/26       0.04213143    NSD1
34    1/27       0.04213143  OSBPL2
35    1/27       0.04213143    NSD1
36    1/30       0.04384167   TCF21
37    1/32       0.04384167   TCF21
38    1/32       0.04384167   TCF21
39    1/33       0.04384167  OSBPL2
40    1/33       0.04384167    LGR6
41    1/35       0.04384167   TCF21
42    1/35       0.04384167   TCF21
43    1/35       0.04384167   INHBB
44    1/36       0.04384167   TCF21
45    1/37       0.04384167   TCF21
46    1/37       0.04384167  CDC14A
47    1/39       0.04426833   INHBB
48    1/39       0.04426833  CDC14A
49    1/41       0.04557053    NSD1
50    1/44       0.04605592   TCF21
51    1/44       0.04605592  CDC14A
52    1/44       0.04605592   TCF21
53    1/47       0.04823897   INHBB
54    1/50       0.04957595  OSBPL2
55    1/51       0.04957595  OSBPL2
56    1/52       0.04957595  OSBPL2
57    1/52       0.04957595   INHBB
[1] "GO_Cellular_Component_2021"
[1] Term             Overlap          Adjusted.P.value Genes           
<0 rows> (or 0-length row.names)
[1] "GO_Molecular_Function_2021"
                                                                Term
1                             androgen receptor binding (GO:0050681)
2                              nuclear receptor binding (GO:0016922)
3  histone methyltransferase activity (H4-K20 specific) (GO:0042799)
4                                    Roundabout binding (GO:0048495)
5                phosphatidylinositol transfer activity (GO:0008526)
6  histone methyltransferase activity (H3-K36 specific) (GO:0046975)
7                           retinoid X receptor binding (GO:0046965)
8                         cholesterol transfer activity (GO:0120020)
9                        retinoic acid receptor binding (GO:0042974)
10                             sterol transfer activity (GO:0120015)
11                       phospholipid transfer activity (GO:0120014)
12                    bHLH transcription factor binding (GO:0043425)
13                     thyroid hormone receptor binding (GO:0046966)
14                            estrogen receptor binding (GO:0030331)
   Overlap Adjusted.P.value      Genes
1     2/27      0.002575322 NSD1;TCF21
2    2/120      0.025631315 NSD1;TCF21
3      1/5      0.028934537       NSD1
4      1/8      0.028934537       LGR6
5      1/9      0.028934537     OSBPL2
6     1/11      0.028934537       NSD1
7     1/11      0.028934537       NSD1
8     1/18      0.033682910     OSBPL2
9     1/18      0.033682910       NSD1
10    1/19      0.033682910     OSBPL2
11    1/22      0.033682910     OSBPL2
12    1/22      0.033682910      TCF21
13    1/28      0.039524143       NSD1
14    1/35      0.045812150       NSD1
SLC50A1 gene(s) from the input list not found in DisGeNET CURATED
                        Description         FDR Ratio BgRatio
32 DEAFNESS, AUTOSOMAL RECESSIVE 32 0.008864152   1/8  1/9703
40  DEAFNESS, AUTOSOMAL DOMINANT 67 0.008864152   1/8  1/9703
41   5q35 microduplication syndrome 0.008864152   1/8  1/9703
42                 SOTOS SYNDROME 1 0.008864152   1/8  1/9703
35      Chromosome 5, monosomy 5q35 0.013375050   1/8  2/9703
37            Nonsyndromic Deafness 0.013375050   2/8 81/9703
23          Familial Testotoxicosis 0.015184726   1/8  3/9703
21                  Sotos' syndrome 0.017709123   1/8  4/9703
22                  Weaver syndrome 0.019669705   1/8  5/9703
3       Beckwith-Wiedemann Syndrome 0.024765953   1/8  7/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