Run coloc on GWAS-QTL object

get_colocs(
  qtl.egene,
  gwas.region,
  merge_by_rsid = T,
  PP_threshold = 0.8,
  method = "abf",
  verbose = T
)

See also

Examples

data("BST1__Alasoo_2018.macrophage_IFNg") qtl.egene <- data.frame(BST1__Alasoo_2018.macrophage_IFNg)[,grep("*.QTL$|qtl_id|SNP",colnames(BST1__Alasoo_2018.macrophage_IFNg), value = T)] sorted_egenes <- qtl.egene %>% dplyr::group_by(gene.QTL) %>% dplyr::summarise(mean.P=mean(pvalue.QTL), min.P=min(pvalue.QTL)) %>% dplyr::arrange(min.P)
#> Error in qtl.egene %>% dplyr::group_by(gene.QTL) %>% dplyr::summarise(mean.P = mean(pvalue.QTL), min.P = min(pvalue.QTL)) %>% dplyr::arrange(min.P): could not find function "%>%"
qtl.egene <- subset(qtl.egene, gene.QTL==sorted_egenes$gene.QTL[1])
#> Error in eval(e, x, parent.frame()): object 'sorted_egenes' not found
gwas.region <- data.frame(BST1__Alasoo_2018.macrophage_IFNg)[,grep("*.QTL$|qtl_id",colnames(BST1__Alasoo_2018.macrophage_IFNg), value = T, invert = T)] coloc_res <- get_colocs(qtl.egene=qtl.egene, gwas.region=gwas.region)
#> Inferring `N` (effective sample size) from `N_cases` and `N_controls`
#> [1] "+ Preparing sample_size (N) column" #> [1] "++ Computing effective sample size." #> PP.H0.abf PP.H1.abf PP.H2.abf PP.H3.abf PP.H4.abf #> 2.71e-22 1.41e-22 6.10e-01 3.16e-01 7.40e-02 #> [1] "PP abf for shared variant: 7.4%" #> [1] "Hypothesis Results @ PP_threshold = 0.8 :" #> [1] "+ COLOC:: Datasets NOT colocalized at: PP.H3 + PP.H4 >= 0.8 and PP.H3 / PP.H4 >= 2."