privefl / bigsnpr

R package for the analysis of massive SNP arrays.
https://privefl.github.io/bigsnpr/
183 stars 43 forks source link

Is it the correct way to annotate Manhattan plot with significance level? #466

Closed garyzhubc closed 7 months ago

garyzhubc commented 7 months ago

Is it the correct way to annotate Manhattan plot with significance level?snp_manhattan(...) + geom_hline(yintercept = -log10(5e-8), linetype = 2, color = "red")

privefl commented 7 months ago

Yes, you can do that if you want to visually add the threshold of genome-wide significance.

I'll add that to the examples.

garyzhubc commented 6 months ago

Why not add that as an option (also the title)? Also, the index taking seems quire redundant because you can just get it from the bigsnpr object.

privefl commented 6 months ago

Because this is a ggplot object that you get, and you can add all this with the {ggplot2} functions, so why bother adding many parameters in my functions to do the same thing?