Plots a Manhattan plot with only the SNPs that have a p-value of at most 0.1.
plot_manhattan( dataset, P, SNP = SNP, causal = causal, line_color = "cornflowerblue", line_type = "dashed", save_plot_path = FALSE, plot_filename = "manhattan_plot.png" )
dataset | data imported to R by |
---|---|
P | column containing p-values to be plotted. State in the format dataset$P_value. |
SNP | column containing the SNP values. If loaded with |
causal | column containing the causal values. If created created with
|
line_color | color of the lines. |
line_type | the type of the lines. |
save_plot_path | if |
plot_filename | name of the file to be saved, including file extension. Must be either .pdf, .png or .jpeg |
Either returns a ggplot
object or saves the plot to
save_plot_path
and returns NULL.
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.