Returns the pair-level view, which is the flat table
colocPipeline() used to return directly. Provided so existing
consumers keep working; new code should call the view it actually wants
(see colocViews).
Usage
# S4 method for class 'ColocResult'
as.data.frame(x, row.names = NULL, optional = FALSE, ...)Examples
pairs <- data.frame(
study = "s1", context = "c1", trait = "g1", method = "susie",
gwasStudy = "G1", gwasMethod = "susie", blockId = "chr1_1_1000",
qtlCs = 1L, gwasCs = 1L, nSnps = 2L,
PP.H0.abf = 0.1, PP.H1.abf = 0.1, PP.H2.abf = 0.1,
PP.H3.abf = 0.1, PP.H4.abf = 0.6
)
variants <- list(data.frame(
variant_id = c("chr1:100:A:G", "chr1:200:C:T"),
SNP.PP.H4 = c(0.7, 0.3)
))
as.data.frame(ColocResult(pairs, variants))
#> study context trait method gwasStudy gwasMethod blockId qtlCs gwasCs
#> 1 s1 c1 g1 susie G1 susie chr1_1_1000 1 1
#> nSnps PP.H0.abf PP.H1.abf PP.H2.abf PP.H3.abf PP.H4.abf
#> 1 2 0.1 0.1 0.1 0.1 0.6