peaky_plot: Plot a Peaky fine-mapping result

Description Usage Arguments Value Plot legend Examples

Description

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.

Usage

1
2
3
4
5
6
7
peaky_plot(
  data,
  bait = NULL,
  max_dist = Inf,
  mppc_threshold = 0.1,
  chicago_threshold = 5
)

Arguments

data

A data.table containing Peaky results, as produced by peaky_plot.

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.

Value

Plot object.

Plot legend

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.

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.