mpra_tile_plot: Make a MPRA tile plot

Description Usage Arguments Details

Description

Make a tile plot of the MPRA counts for a given variant

Usage

1
2
3
4
5
6
7
8
9
mpra_tile_plot(
  variant_id,
  variant_counts,
  show_barcodes = FALSE,
  composite = FALSE,
  sampler_res = NULL,
  prob = 0.5,
  prob_outer = 0.95
)

Arguments

variant_id

variant ID

variant_counts

a data frame of counts for one variant

show_barcodes

a logical indicating whether to show the barcodes on the left side of the tile plot

composite

a logicial indicating whether or not to include the extra plot components on the right sides

sampler_res

A stanfit object for one variant

prob

if composite = TRUE, a fraction between 0 and 1 indicating the posterior probability mass to include in the inner intervals.

prob_outer

if composite = TRUE, a fraction between 0 and 1 indicating the posterior probability mass to include in the outer intervals.

Details

The barcodes in the output tile plot are sorted according the their average DNA representation.

The barcodes in variant_counts need to be in the same order that they were presented to the malacoda sampler. malacoda tries to preserve the ordering present in the original mpra_data dataset (not including removed poorly represented barcodes), but if you're unsure you can pull from the variant_data column in the analysis_res object. Currently it's necessary that the allele be encoded by 'alt' and 'ref'.

Setting composite = TRUE will include three additional components: a column of tiles whose color indicates the log(mean(RNA)/ mean(DNA)) by row, and posterior interval plots for the variant's activities and transcription shift.


andrewGhazi/malacoda documentation built on Aug. 2, 2020, 12:54 a.m.