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.

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

if (FALSE) manhattan_out <- mash_ggman_by_condition(m = m, saveoutput = TRUE)