plot_manhattan: Manhattan plot of p-values

Description Usage Arguments Details Value

View source: R/visualisations.R

Description

Plots a Manhattan plot with only the SNPs that have a p-value of at most 0.1.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
plot_manhattan(
  dataset,
  P,
  SNP = SNP,
  causal = causal,
  line_color = "cornflowerblue",
  line_type = "dashed",
  save_plot_path = FALSE,
  plot_filename = "manhattan_plot.png"
)

Arguments

dataset

data imported to R by load_results().

P

column containing p-values to be plotted. State in the format dataset$P_value.

SNP

column containing the SNP values. If loaded with load_results() can be left default otherwise state in the format dataset$SNP.

causal

column containing the causal values. If created created with augment_results() can be left default, otherwise state in the format dataset$causal.

line_color

color of the lines.

line_type

the type of the lines.

save_plot_path

if FALSE, return the function returns a ggplot object. Else a path of the directory to save the plot to.

plot_filename

name of the file to be saved, including file extension. Must be either .pdf, .png or .jpeg

Details

All points above the upper dashed line show SNPs that are significant at 0.05 significance level with Bonferroni-correction. Points above the lower dashed line show SNPs that are significant at a 0.05 significance level.
The color of the point show whether or not they are truly causal for the phenotype.
The user must run some analysis with analysis_association() and load the data with load_results(). Furthermore, augment_results() must be run where the user should create a 'causal' column from the true effect sizes.

Value

Either returns a ggplot object or saves the plot to save_plot_path and returns NULL.


FireGutter/geneference documentation built on Dec. 17, 2021, 8:27 p.m.