plot_posterior_odds: Posterior odds genome plot function

View source: R/plot_mediation.R

plot_posterior_oddsR Documentation

Posterior odds genome plot function

Description

This function takes the posterior odds results from bmediatR() and plots the genome-wide scan.

Usage

plot_posterior_odds(
  bmediatR_object,
  model_type = c("mediation", "partial", "complete", "colocal"),
  med_annot,
  med_var = "protein.id",
  include_chr = c(1:19, "X"),
  expand_lim_factor = 0.025,
  label_thresh = NULL,
  label_thresh_greater_than = TRUE,
  label_only_chr = NULL,
  bgcol = "white",
  altcol = "gray",
  altbgcol = "white",
  hlines_col = "gray80",
  col = "black",
  cex = 0.75,
  qtl_dat = NULL,
  outcome_symbol = NULL,
  ymax = NULL,
  ymin = NULL,
  ...
)

Arguments

bmediatR_object

Output from bmediatR().

model_type

DEFAULT: "mediation". Specifies which model(s)'s posterior probabilities are to be included in the numerator of the posterior odds and then displayed for for genome-wide mediators.

med_annot

Annotation data for -omic mediators. This data provides the coordinate for plotting the mediation odds summary and is expected as a data.frame with the following variables:

  • "med_var" identifier variable – Mediator IDs (e.g., ENSEMBL gene IDs) that uniquely identify evaluated mediators. Colname should match the med_var argument and the IDs in bmediatR_object.

  • symbol – Alternative IDs that are more readily meaningful to humans (e.g., gene symbols). DO not have to be unique.

  • chr – Chromosome of the candidate mediator.

  • middle – Genomic coordinate of the candidate mediator (e.g., midpoint of a coding gene).

med_var

Colname of unique identifier for candidate mediators (e.g., ENSEMBL gene IDs) in med_annot data.frame. Should match IDs in bmediatR_object.

include_chr

DEFAULT: c(1:19, "X"). Chromosomes to include in plot.

label_thresh

DEFAULT: NULL. Label mediators that surpass label_thresh. Default does not add labels.

label_thresh_greater_than

DEFAULT: TRUE. If TRUE, passing mediators have log odds greater than the threshold. If FALSE, passing mediators have log odds less than the threshold.

label_only_chr

DEFAULT: NULL. Only label mediators that pass label_thresh on the specified chromosome.

qtl_dat

DEFAULT: NULL. QTL data that includes position of QTL and outcome. Adds ticks to the figure.

expland_lim_factor

DEFAULT: 0.025. Scale to increase plot limits by.

Examples

plot_posterior_odds()

wesleycrouse/bmediatR documentation built on April 28, 2023, 4:01 p.m.