Combines Peaky's fine-mapping results, generated separately for each bait, into a single table and stores it on disk. Marginal posterior probabilities of contact (MPPC) are in its 'rjmcmc_pos' column. Other columns' values are described in the vignette. Generates a .pdf plot for each bait by default.

peaky_wrapup(peaky_output_dir, plots = TRUE, ...)

Arguments

peaky_output_dir

Directory which Peaky's intermediate files and results are stored in. Needs a baits_rjmcmc folder generated by interpret_peaky_fs or peaky_run.

plots

Whether or not to generate a .pdf plot for each bait with peaky_plot. A subdirectory called 'plots' will be created if it doesn't exist.

...

further arguments to be passed to peaky_plot, such as calling thresholds.

Value

List containing the output directory where the table is stored, and the table itself.

Details

This function checks for bait_rjmcmc_*.rds files in peaky_output_dir/baits_rjmcmc, reads them, collates them, and optionally plots them.

Examples

base = system.file("extdata",package="peaky") chicago_rds_path = paste0(base,"/chicago_output.rds") peaky_output_dir = paste0(base,"/peaky_from_chicago") if (FALSE) { peaky_prepare_from_chicago(chicago_rds_path, peaky_output_dir, subsample_size=NA) #Big dataset? Consider subsample_size=10e3 for speed. for(i in 1:3){ peaky_run(peaky_output_dir,i) } #Tip: run this in parallel on a cluster by scheduling an array job and passing its elements to i. peaky_wrapup(peaky_output_dir) }