statgen / pheweb

A tool to build a website to browse hundreds or thousands of GWAS.
MIT License
158 stars 65 forks source link

Make pheno-vs-pheno comparisons #94

Closed pjvandehaar closed 3 years ago

pjvandehaar commented 7 years ago

On the pheno page, add a button "compare to other phenotype". When clicked, show an autocomplete searchbox of phenotype names. When one is selected, show:

  1. [easy] Both Manhattan plots, shorter. For traits that have a p-value better than 1e-40, it would really help to have the graph fold at 1e-10 (or wherever) so that other significant peaks are still visible.

  2. [?] A neglog10pval-vs-neglog10pval plot. To quickly query for the data, maybe one of these subsets would work (& maybe query tooltips via api):

    • show only variants that are in the top 2000 p-values in both traits? (there might not be any)
    • show only variants that are in the top 2000 p-values in either of the traits? (there are 2000-4000)
    • show only variants that have p-value < 1e-2 in both traits?
    • show only variants that have p-value < 1e-4 in both traits?
    • show only variants that have p-value < 1e-6 in both traits?
sgagliano commented 7 years ago

For the second option do you mean having the two Manhattan plots sharing the same x-axis, with one on top, and the other flipped on the bottom? That could work.

pjvandehaar commented 7 years ago

Yep. Flipping the second upside down wouldn't work for 3+ phenotypes, so I'm not sure about that yet.

dtaliun commented 7 years ago

locuszoom.js allows adding any number of plots into the page by just appending them to the top/bottom. This, potentially, allows comparing any number of datasets. However, even such solution is not perfect, since the page is limited by screen size and can't fit more than 2-4 plots at the same time into visible area. Maybe it is not worth trying to implement the case 3+?