mash_plot_pairwise_sharing: Create a ggplot of pairwise sharing of mash effects

Description Usage Arguments Value

View source: R/mash-evaluation.R

Description

Given a correlation matrix, an RDS with a correlation matrix, or a mash object, create a ggplot of pairwise sharing of mash effects using get_pairwise_sharing and ggcorr.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
mash_plot_pairwise_sharing(
  m = NULL,
  effectRDS = NULL,
  corrmatrix = NULL,
  reorder = TRUE,
  thr.r2 = NA,
  saveoutput = FALSE,
  filename = NA,
  suffix = "",
  ...
)

Arguments

m

An object of type mash

effectRDS

An RDS containing a correlation matrix.

corrmatrix

A correlation matrix

reorder

Logical. Should the columns be reordered by similarity?

thr.r2

Numeric. Value between 0 and 1. The r^2 value above which effects are considered to be linked; in this case, only the SNP with the more significant log10Bayes Factor value in mash is kept.

saveoutput

Logical. Should the output be saved to the path?

filename

Character string with an output filename. Optional.

suffix

Character. Optional. A unique suffix used to save the files, instead of the current date & time.

...

Other arguments to get_pairwise_sharing or ggcorr.

Value

A list containing a dataframe containing the correlations and a ggplot2 object containing the correlation plot.


Alice-MacQueen/snpdiver documentation built on Dec. 17, 2021, 8:41 a.m.