pheweb icon indicating copy to clipboard operation
pheweb copied to clipboard

Improve tables

Open sgagliano opened this issue 8 years ago • 4 comments

In the "Top Hits" table, give users the option: (1) to hide/unhide columns (2) to sort columns

Also, add the following columns: (1) add OR/BETA column

sgagliano avatar Feb 01 '17 22:02 sgagliano

How should column hiding/unhiding work? Would you have a drop-down where you can select (with checkmarks) which columns to show?


beta/sebeta: easy. Adding odds ratio should be easy but who knows.

Column sorting: I should use a different table library. Encore uses jquery.datatables.

pjvandehaar avatar Feb 02 '17 07:02 pjvandehaar

column hiding/unhiding: it's implemented in jquery.datatables https://datatables.net/examples/api/show_hide.html

beta/sebeta: start with this; and then we can tackle OR

Column sorting: jquery.datatables looks like a good solution.

sgagliano avatar Feb 02 '17 14:02 sgagliano

@pjvandehaar

Switch the Top Hits table to use jquery.datatables (to allow for sorting and filtering), and add the following columns:

  • Beta (discussed above)
  • "VT" SNP or Indel
  • "GENO" 0=imputed; 1=genotyped
  • VEP Impact

To the Tooltip add:

  • "R2" Imputation quality (or genotyped)
  • VEP Consequence

Eventually, when the user filters the table, the Manhattan plot filters too.

sgagliano avatar Feb 06 '17 17:02 sgagliano

Summary

For top_hits, pheno, and variant page tables:

  • [ ] Make some columns only available if there is data for them (eg, beta)

    • make a header-template that takes a {variant: true, beta_sebeta: true, ...}
    • likewise for row-template
    • put these two into a {%block%} for {%extends%}ing them
    • probably iteratively build these templates together, appending one column at a time. if (v.beta) { header_template += ... ; row_template += ... }
  • [ ] Make columns sortable. (eg, variant)

  • [ ] Allow users to choose which columns to show. (eg, R2)

  • [ ] Later: make the tables below PheWAS and Manhattan filterable, and those filters would affect the plot.

pjvandehaar avatar Feb 07 '17 17:02 pjvandehaar