peaky_plot.Rd
Generates a plot for a single bait, showing its read counts, adjusted read counts, CHiCAGO scores (if available) and marginal posterior probabilities of contact (MPPC) across the local genome. Can be used at several stages of the pipeline, missing data will automatically be omitted.
peaky_plot( data, bait = NULL, max_dist = Inf, mppc_threshold = 0.1, chicago_threshold = 5 )
data | A data.table containing Peaky results, as produced by |
---|---|
bait | The bait ID or name (matches the data's b.name column) to plot. |
max_dist | The maximum distance to plot, measured from the bait. Defaults to the entire region analyzed. |
mppc_threshold | Threshold on Peaky's MPPC (in the 'rjmcmc_pos' column). Calls marked in orange. |
chicago_threshold | Threshold on CHiCAGO scores (in the 'score' column). Calls marked in blue. |
Plot object.
Green: Peaky's fitted fine-mapping model. Orange: Peaky's calls based on the threshold set. Blue: CHiCAGO calls based on the threshold set, if data is available.
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) }