mash_plot_manhattan_by_condition: Manhattan plot in ggplot colored by significant conditions

Description Usage Arguments Value Examples

View source: R/pvdiv_mash_results.R

Description

Takes a mash object and, for some vector of phenotypes, returns a Manhattan plot ggplot object (and its dataframe). Each SNP in the plot is colored by the number of phenotypes it is significant for. Even and odd chromosomes have different shapes for their SNPs, so that chromosome identity can be determined.

Usage

1
2
3
4
5
6
7
mash_plot_manhattan_by_condition(
  m,
  cond = NA,
  saveoutput = FALSE,
  suffix = "",
  thresh = 0.05
)

Arguments

m

A mash object (outputted by mash).

cond

A vector of phenotypes. Defaults to the names of each column in the mash object.

saveoutput

Logical. Should the output be saved to the path?

suffix

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

thresh

Numeric. The threshold used for the local false sign rate to call significance in a condition.

Value

A tbl_df() of the data used to make the Manhattan plot, and a ggplot object containing the Manhattan.

Examples

1
## Not run: manhattan_out <- mash_ggman_by_condition(m = m, saveoutput = TRUE)

Alice-MacQueen/switchgrassGWAS documentation built on Jan. 23, 2022, 7:55 p.m.