peaky_wrapup: Combines fine-mapping results for all baits into a table

Description Usage Arguments Value Details Examples

Description

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.

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
base = system.file("extdata",package="peaky")
chicago_rds_path = paste0(base,"/chicago_output.rds")
peaky_output_dir = paste0(base,"/peaky_from_chicago")
## Not run: 
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)

## End(Not run)

cqgd/pky documentation built on Dec. 13, 2020, 3:32 a.m.