opts_chunk$set(dev = "png", dev.args = list(type = "cairo"), dpi = 192, fig.path = "figures/", comment = NA, results = 'markup', tidy = F, message = F, warning = F, echo = T)
library(devtools)
load_all("~/git/variani/finemapr")
# specify path to CAVIAR (user-specific)
options(finemapr_caviar = "~/apps/caviar/CAVIAR")

# load the same example data as for FINEMAP
ex <- example_finemap()

# run the tool
# - arg. #1: table with SNP name and Z-score in the first 2 columns
# - arg. #2: the LD matrix with colnames/rownames corresponding to SNP names
# - arg. `args`: pass other arguments to the tool as a string 
out_caviar <- run_caviar(ex$tab1, ex$ld1, args = "-c 3")
print(out_caviar)
plot(out_caviar, label_size = 3)


variani/finemapr documentation built on Dec. 12, 2020, 9:40 p.m.